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

Home » Public Forums » archive » on reading NCDF files
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: on reading NCDF files [message #37765 is a reply to message #37673] Tue, 20 January 2004 08:12 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
"Sangwoo" <leesw@astro.snu.ac.kr> wrote in message
news:3ee6ff80.0401192300.534dc5b1@posting.google.com...
> Hi everyone!
>
> I'm gonna read a NCDF file. It may contain several variables within
> itself. When I extract a variable named "image", the procedure is as
> follows:
>
> cid=ncdf_open('test.nc')
> vid=ncdf_varid(cid,'image')
> ncdf_varget,cid,vid,image
>
> But suppose I don't know the name of each variable unfortunately. Is
> there any way to figure out the details of the included
> variables(name, dimension, etc.)? The second command fails when I put
> a wrong variable. And is there any way to read the included variables
> all at once? (something like /all keyword)
>
> I wonder if there's any way to figure out all details of the included
> variables from an NCDF file directly.

You may wish to try the following sample programs from my book:

NCDF_VARDIR: returns a list of variable names in a netCDF file
NCDF_ATTDIR: returns a list of attribute names associated with a given
variable

The programs are available at

http://www.gumley.com/PIP/About_Book.html

in the "Sample Programs" archive files. Reading and writing netCDF files in
IDL is explained in detail in Chapter 4.

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: wavelet code?
Next Topic: write unix textfile with windows idl

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

Current Time: Sun Oct 12 09:46:14 PDT 2025

Total time taken to generate the page: 1.42716 seconds