Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[netCDF #FJH-116834]: questions regarding udunits



Hi,

> Other questions:
> 1. Is it possible to have a variable (for station data) where char
> type is used as a dimension? You have any example?

Yes, you can use a char type for a coordinate variable, if that's what you
mean.
Since the maximum value of a signed char is 127, this would only work if you
have 127 or fewer values for the dimension.  Here is an example of the CDL,
and you can make the corresponding netCDF file using "ncgen -b CDLFILE":
netcdf noman {
dimensions:
   stno = 5;
   namelen = 20;
variables:
   char stno(stno);   // character coordinate variable, < 127 stations
   char station_name(stno, namelen);
data:
   station_name = "abc", "defg", "paris", "london", "san diego";
}

> 2. For gridded data, I believe there is an attribute to specify
> whether the location is cell center or not. What is that attribute and
> acceptable values? Is this attribute CF complainant?

I think you need to use the "bounds" attribute on the coordinate variables.
A description is in the CF section "7. Data Representative of Cells" at

  http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.1/cf-conventions.html#id2618835

If you want the center of the cell to represent all the values in the cell, you
may
need to use the "cell_methods" attribute, which is described in the same
section.

--Russ

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: FJH-116834
Department: Support netCDF
Priority: Normal
Status: Closed


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690