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

Home » Public Forums » archive » 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 #38778 is a reply to message #38722] Tue, 30 March 2004 02:39 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Mark Hadfield wrote:
> Reimar Bauer wrote:
>
>> Mark Hadfield wrote:
>>
>>> Reimar Bauer wrote:
>>>
>>>> You need only to check the first three bytes of the file. If it is
>>>> 'CDF'
>>>> then it is a netCDF file.
>>>
>>>
>>> Or possibly some other sort of file with 'CDF' in the first three bytes!
>>>
>>
>> Yes if you have one other. Do you have an example.
>
>
> No.
>
>> It works since a while for us.
>
>
> I'm just worried that it will fail to work when you least expect it.
>
> I like the idea of trying to open the file with NCDF_OPEN and catching
> any errors, because that directly answers the question: "can I open this
> file as netCDF?".
>
>
>

You are right, it could be better to do it this way because the internal
file format will be changed to HDF SD format by version 4 of netCDF.
I don't know when but then probably the string test of my routine stops
working.

Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL sort to Matlab sort
Next Topic: Averaging quaternions

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

Current Time: Sun Oct 12 05:55:06 PDT 2025

Total time taken to generate the page: 0.16318 seconds