Re: Queries from a couple of newbies


>Date: Fri, 3 Dec 1999 11:35:20 +1100 (AEDT)
>From: Eugene Tan <chet@xxxxxxxxxx>
>To: visad-list@xxxxxxxxxxxxx
>Subject: Re: Queries from a couple of newbies

In the above message, you wrote:

> float   latitude(recNum);
>         latitude:long_name = "latitude";
>         latitude:units      = "degree_north";
>         latitude:reference  = "station table";
> We convert this to a netCDF (.nc) file using 'ncgen'. What we would like
> to know is: does the 'units' variable get used to define the units (as in
> degrees, meters, etc.) of the Visad latitude RealType variable that is
> extracted from the file.

The static, class-variable RealType.Latitude is created by the RealType
class and knows nothing about your netCDF file.  It has a default unit
corresponding to angular degrees.  The netCDF import subsystem of VisAD
will create a new RealType corresponding to your netCDF variable.  It
will be named "latitude" and have a unit also corresponding to angular

> Also, are we allowed to define our variable type
> ie. latitude:foo? Does this get inserted into a Visad type?

I'm not sure what you mean.  Please elucidate.

> Question 2:
> This is another netCDF question. If we define our data structures in the
> CDL file with no data, is it possible to insert the data later?

The class will create a VisAD data object
corresponding to the netCDF file.  It will have the "header" information
but all the data fields will be empty.

> If so, how do we do it?

I'm not sure "where" and "when" you want to add the data: in the netCDF
file or to the VisAD data object?  If you add it to the netCDF file,
then you'll have to use again to import the data
-- creating a new VisAD data object.  If you add it to the "empty" VisAD
data object created by importing the (origially empty) netCDF file, then
you'll have to use VisAD methods for setting data values.  (NB: only
Fields are modifiable: all other VisAD data types are immutable).

> Is there a way to convert a CDL file into netCDF in the Visad/other 
> library? We are using the 'ncgen' program that we compiled the other day.

The only way I know to convert a CDL file into a netCDF file is via the
ncgen utility.

Steve Emmerson   <>

  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: