[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IDL and NetCDF
- Subject: Re: IDL and NetCDF
- From: m.hadfield(at)niwa.cri.nz (Mark Hadfield)
- Date: Wed, 13 Jun 2001 21:08:44 +0000 (UTC)
- Mail-From: <m.hadfield@niwa.cri.nz> from clam.niwa.cri.nz [202.36.29.1]
- Newsgroups: comp.lang.idl-pvwave
- Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
- References: <A%GV6.101$DH.19532@news.get2net.dk>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:25340
From: "Claus Sølvsteen" <cls@fomfrv.dk>
> Is there anyone out there who knows about using NetCDF in IDL
programming -
> or knows anybody who does?
> I have recently started using this, and my problems are not answered
> entirely from the IDL online manuals and the "basic" NetCDF homepage,
> www.unidata.ucar.edu/packages/netcdf
> For instance, I am in doubt about 1) how do I use (and when should I use)
> unlimited variables, 2) is it possible to use structures as variables, and
> 3) how do I most properly create my program so that it is easily seen
which
> variables belong together?
These are really netCDF questions rather than IDL questions, and you might
want to take them a netCDF newsgroup. (I think it's sci.data.formats. It's
ages since I looked at that. I wonder if it's still active?) You could also
look in the documentation, eg...
http://www.unidata.ucar.edu/packages/netcdf/guidec/
...from which you can extract (with some searching) information about netCDF
concepts.
But, to have a stab at your questions:
1) Unlimited variables (there can only be one per netCDF file) are used to
represent dimensions, like time, whose size is not known in advance.
2) IDL structures can't be stored directly in netCDF variables, but you can
break the structure up into its constituent tags and store each of these as
a variable, unless the tag is itself a structure in which case you have to
break it up, unless ...
3) netCDF has no explicit mechanism for recording the fact that certain
variables belong with each other. But you can use naming conventions to make
that fact clear. E.g. if you have a structure called "velocity" with tags
"u", "v" and "w" you could store these in netCDF as "velocity_u",
"velocity_v", "velocity_w".
> I have a long set of observations of radar altimetry measurements og
> significant wave heights and wind speeds. So all measurements are acquired
> at different times. One measurement consists of information about
> acquisition time (year, month, day, decimal hour), lat/lon, SWH, rms of
SWH
> measurement, wind speed and others). Note that some variables are
integers,
> some are doubles/floats - so I cannot just make a DblArr consisting all
> measurements.
> A file consists of several repeated tracks/cycles and the measurements
have
> been put into a grid - therefore several measurements within a file may
> belong to a certain grid point though their acquisition times are
different.
> On the other hand, for some grid points there may be no data.
> I hope that someone can help me.
Hmmm. This may require some ingenuity on your part, and you may decide that
netCDF is not the best format for you. It can almost certainly store the
data, but it may not be able to represent all the relationships inherent in
the data. (It's not clear to me exactly what those relationships are.)
Perhaps you could make an unlimited dimension called "acquisition", then
variables called time (Julian date) or "time_year", "time_month", ...,
"lon", "lat", "swh", "swh_rms" etc all varying with "acquisition". The grid
(if it's spatially fixed) can be stored in the same file, and then position
on the grid for each acquisition can be described by one or more variables
dimensioned as "acquisition".
Hope this helps...
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research
--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG