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

Re: I have a question ...



> Date: Tue, 15 Dec 1998 19:45:55 -0800
> From: Larry Bunch <address@hidden>
> Organization: Data Reduction Services
> To: Russ Rew <address@hidden>
> Cc: Dave Aubin <address@hidden>
> Subject: I have a question ...

Hi Larry,

> I have a question regarding the following material found at website
> ftp://ftp.unidata.ucar.edu/pub/netcdf/Conventions/NCAR-RAF/nimbus/Conventions.TimeSeries
> 
> It states ...
> 
> Variable attributes: 
>    Variables in the file are organized into 3 sorted lists.  The
>    first sorted list consists of Analog or Digitally-sampled
>    variables, these only have calibration coefficients applied to
>    them.  The second group is raw data from "block" probes (e.g.
>    PMS1D, IRS, GPS, and some from group 1 that need special
>    processing).  The third group consists of purely derived
>    variables.  I have included one [low rate] example from each of
>    the 3 groups.
> 
> float ADIFR(Time) ;
>         ADIFR:units = "mbar" ;
>         ADIFR:long_name = "Vertical Differential Pressure, Radome" ;
>         ADIFR:SampledRate = 50 ;
>         ADIFR:OutputRate = 1 ;
>         ADIFR:CalibrationCoefficients = 0.092f, 6.9450002f, 0.0011f ;
>         ADIFR:MissingValue = -32767.f ;
> 
> What my question is ... how do I create the various portions of the
> variable,
> e.g. "units", "long_name", "SampledRate", etc.

Those are the variable's attributes.  NetCDF attributes are named
strings or vectors of numbers used to provide ancillary information
about a variable.  You create variable attributes and assign them
names and values using the attribute interfaces.  The way this is done
depends on which language interface you are using.  For example, for
the C interface, you would look in the Attributes chapter of the C
User's Guide and find a description of the functions to call to create
an attribute, given its variable ID, name, data type, length, and
value:

  http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-13.html#HEADING13-0

There are similar attribute interfaces for Fortran, C++, Perl, and
Java.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu