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

Home » Public Forums » archive » Re: Is_netCDF Function
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: Is_netCDF Function [message #38738 is a reply to message #38737] Fri, 26 March 2004 06:56 Go to previous messageGo to previous message
mmiller3 is currently offline  mmiller3
Messages: 81
Registered: January 2002
Member
>>>> > "Kenneth" == Kenneth P Bowman <kpb@null.com> writes:

> To tell if a file is a netCDF file, try opening it and be
> prepared to handle the error.

We check for netcdf files like this:

header = bytarr(3)
openr, lun, filename, /get_lun
readu, lun, header
free_lun, lun
if string(header) eq 'CDF' then print, 'I think this might be a netcdf file...'

This is based on the file format specs from Unidata
( http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-18 .html)

Mike

--
Michael A. Miller mmiller3@iupui.edu
Imaging Sciences, Department of Radiology, IU School of Medicine
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Changing the Colour Table for RGB images on Linux/Solaris
Next Topic: Re: X and tvrd color scaling problem

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

Current Time: Fri Oct 10 06:10:50 PDT 2025

Total time taken to generate the page: 0.16411 seconds