[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

950130: netCDF usage



>From: address@hidden (Leslie Hartten)
>Organization: NOAA
>Keywords: 199501301713.AA10564 netCDF use

Leslie,

>  I am interested in netCDF because so much of the TOGA COARE data seems
>to be in netCDF format.  I have downloaded the netcdf source code and
>documentation, printed out the documentation, and read through portions
>of the Users Guide.  I am unsure of how to proceed.
>
>  I do most of my data analysis by writing FORTRAN code to manipulate
>the data; I occasionally port ascii files (original or derived) to a
>Macintosh for use in a spreadsheet or plotting program.  I am trying to
>understand how netCDF data files are meant to be used.  Is data put in
>that format only because it is then easy to ship from machine to machine?

Primarily, but the netCDF is actually an API for reading writing data
in network transparent fashion.  Many people like this API for development.
The other thing that the netCDF allows for is storage of meta-data, i.e.
data about the data that you are storing.  Meta-data allows you to document
the data you have in the netCDF format.

>Should I leave the files (e.g. the surface observations at the 6 ISS sites
>during COARE) in .cdf format and write FORTRAN code which includes
>netCDF FORTRAN calls to open the files and load in the data, then process
>that data inside the rest of the FORTRAN program?  

That is typically what people do.  I would venture to guess that this is
what they do regardless of the format-of/access-to the data set (i.e. you
read in data sets and then process them).

>Should I use netcdf
>utilities to creade .cdl files, then transform these ascii files into my
>own format (with my own headers) and proceed with my processing?  

The method forcreation of a cdl is the choice of the user.  I have created 
CDLs from existing netCDF files (using ncdump) and then modified them for my 
own use.  I have also created CDLs with a text editor and then used netCDF 
utilities (ncgen) to create template applications that I then expanded upon.
The choice is yours.  Your decision will be become easier as you become
more familiar with the netCDF package and the generic applications, ncdump
and ncgen, that come with the package.

>Is there a way to "read" just the headers to see what's inside a file?

The generic netCDF application ncdump is used for doing this and more.

>Thank you for any assistance,

>Dr. Leslie M. Hartten
>CIRES, Univ. of Colorado         email: address@hidden
>Campus Box 216                                   ^^^^^^^^^^^ new address!!
>Boulder  CO  80309-0216          phone: (303)497-7052   fax: 497-5373

Tom Yoksas