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

Home » Public Forums » archive » IDL & reading headers of netCDF files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL & reading headers of netCDF files [message #57902] Tue, 08 January 2008 02:46 Go to next message
chloesharrocks is currently offline  chloesharrocks
Messages: 16
Registered: January 2008
Junior Member
I'm a 4th year Physics UG trying to get to grips with IDL ready for my
research project involving atmospheric data next term. I'm trying to
read the header contents of some netCDF files and am at a complete
loss (it doens't help that I have never worked with netCDF files
before and don't know what I'm actually trying to look for!). I have
done some very basic C-Programming before, but am a novice at
programming and have no exerience with UNIX.

I've been using Liam Gumley's book and have read the section on
reading and writing netCDF files but can't get the information I
want. I've managed to obtain a list of the variables my files
contain, but my supervisors have asked me to use the ncdump -h command
to read what the header is. So here are my problems:

1. I'm a Mac OS X user so have tried during the ncdump - h command in
my terminal but it fails. I understand this is because I need some
netCDF software on my computer. I tried to download this but got
completely lost in the detailed instructions relating to Unix - it
seemed to imply that I required a C-compiler on my computer for the
installation to work (I don't have a C-compiler) and the files it told
me to use did not exist in the folder I had just downloaded.

2. Is there any way of avoiding UNIX and being able to read the
contents of the header directly in IDL's Development Environment?

3. I have downloaded Panoply ( http://www.giss.nasa.gov/tools/panoply/)
which seems to open the netCDF files very easily and provides me with
information about the variables contained and also seems to be able to
plot data onto maps very easily. Is this essentially doing what the
ncdump - h command does?

If anyone could guide me through a step-by-step guide to downloading
the netCDF software onto my Mac and also letting me know whether I can
do the equivalent command directly in IDLDE I would be very grateful.

Thanks
Chloé
Re: IDL & reading headers of netCDF files [message #58021 is a reply to message #57902] Wed, 09 January 2008 04:11 Go to previous messageGo to next message
JMB is currently offline  JMB
Messages: 13
Registered: January 2008
Junior Member
> If anyone could guide me through a step-by-step guide to downloading
> the netCDF software onto my Mac and also letting me know whether I can
> do the equivalent command directly in IDLDE I would be very grateful.

Did you try to use the HDF icon in IDLDE?
Once you have selected your NetCDF file, try the preview button for
each field.

Then you could write with IDL a netCDF reader specific to the datasets
you really need.

Jérôme
Re: IDL & reading headers of netCDF files [message #58743 is a reply to message #58021] Fri, 15 February 2008 05:19 Go to previous messageGo to next message
JMB is currently offline  JMB
Messages: 13
Registered: January 2008
Junior Member
This is even better to read the netCDF header,

Here is the NetCDF reader written by David Fanning:

http://www.dfanning.com/programs/ncdf_browser.zip

Jérôme
Re: IDL & reading headers of netCDF files [message #58775 is a reply to message #57902] Thu, 21 February 2008 08:27 Go to previous message
kishore1818 is currently offline  kishore1818
Messages: 24
Registered: June 2007
Junior Member
On Jan 8, 6:46 am, chloesharro...@gmail.com wrote:
> I'm a 4th year Physics UG trying to get to grips with IDL ready for my
> research project involving atmospheric data next term. I'm trying to
> read the header contents of some netCDF files and am at a complete
> loss (it doens't help that I have never worked with netCDF files
> before and don't know what I'm actually trying to look for!). I have
> done some very basic C-Programming before, but am a novice at
> programming and have no exerience with UNIX.
>
> I've been using Liam Gumley's book and have read the section on
> reading and writing netCDF files but can't get the information I
> want. I've managed to obtain a list of the variables my files
> contain, but my supervisors have asked me to use the ncdump -h command
> to read what the header is. So here are my problems:
>
> 1. I'm a Mac OS X user so have tried during the ncdump - h command in
> my terminal but it fails. I understand this is because I need some
> netCDF software on my computer. I tried to download this but got
> completely lost in the detailed instructions relating to Unix - it
> seemed to imply that I required a C-compiler on my computer for the
> installation to work (I don't have a C-compiler) and the files it told
> me to use did not exist in the folder I had just downloaded.
>
> 2. Is there any way of avoiding UNIX and being able to read the
> contents of the header directly in IDL's Development Environment?
>
> 3. I have downloaded Panoply (http://www.giss.nasa.gov/tools/panoply/)
> which seems to open the netCDF files very easily and provides me with
> information about the variables contained and also seems to be able to
> plot data onto maps very easily. Is this essentially doing what the
> ncdump - h command does?
>
> If anyone could guide me through a step-by-step guide to downloading
> the netCDF software onto my Mac and also letting me know whether I can
> do the equivalent command directly in IDLDE I would be very grateful.
>
> Thanks
> Chloé

Hi Chloe,

You are trying to read the NetCDF files. I am giving one program. You
can try this one, and it will tell what are the paramters are
available in your Netcdf file. using that you can read the netCDF
file. just give your filename at line number 698. Still, if have any
problem reading the program tell me I will give one sample NetCDF
file and how to read the program also. I am using different types of
data formats.
best of luck.

The IDL program file.
http://www.mathstat.dal.ca/~kishore/


Thanks

Kishore
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: image statistics without the NaN
Next Topic: New netCDF Browser

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

Current Time: Wed Oct 08 15:16:01 PDT 2025

Total time taken to generate the page: 0.15129 seconds