comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: catching netcdf error codes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: catching netcdf error codes [message #38719] Fri, 26 March 2004 13:53 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Benjamin Hornberger wrote:

> Hi all,
>
> I don't know how to catch a netcdf error code. I want to write a
> function is_netcdf() which checks if a file is a netcdf file. For
> that, I use the ncdf_open() function. If the file is not a netcdf
> file, then I will get an error which I want to catch. The error sais
> "%NCDF_OPEN: Unable to open the file "...". (NC_ERROR=-51)".
>
> If I now check !error_state.code, it is -1088 and not -51. Which
> variable holds the "nc_error", how can I get that?
>
> Thanks for your help,
> Benjamin

Dear Benjamin

we have already written such a routine.

You'll find it here
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _work/rb_lib
is_ncdf_file.pro

You need only to check the first three bytes of the file. If it is 'CDF'
then it is a netCDF file.

For further routines and licensing please have a look at

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html


best regards

Reimar
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Its working!
Next Topic: Makefile for external calls on Solaris 9 (64-bit)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:59:06 PDT 2025

Total time taken to generate the page: 0.00627 seconds