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

Re: 20041014: Use of "coordinates" attribute in IDV



Hi Rich:

Technically, its correct that each variable needs to seperately specify its coordinate system in CF.

The IDV parsing code uses a more lenient algorithm to identify coordinate systems. It uses the "coordinates" attribute on any variable to identify all possible coordinate axes, then creates coordinate systems for all variables from the pool of possible ones. The ones that are georeferencing are then available in the IDV to visualize. In principle, this could do the wrong thing, but in practice it doesnt, and it solves little problems like forgetting about some of the variables.

I would fix that problem anyway if I were you, and any other that makes your file non-standard CF, since other programs wont necessarily be using our CF convention parser.

To: address@hidden
From: Rich Signell <address@hidden>
Subject: Use of "coordinates" attribute in IDV
Organization: UCAR/Unidata
Keywords: 200410132134.i9DLYhUE013277

IDVers,

I just noticed something interesting.  I thought I needed the
"coordinates" attribute to specify the coordinate variables of a
curvilinear orthogonal variable, but I forgot to specify the
"coordinates" attribute for the variable "sensible" below, and
somehow IDV is figuring out how to plot this on it's own.

How is IDV figuring that the coordinate variable for "sensible"
are "lon_rho" and "lat_rho"?

(When do I *need* the "coordinates" attribute?)

netcdf adria03_avg_cf {
dimensions:
       tracer = 2 ;
       sc_r = 20 ;
       sc_w = 21 ;
       eta_rho = 60 ;
       xi_rho = 160 ;
       ocean_time = UNLIMITED ; // (268 currently)
       eta_psi = 59 ;
       xi_psi = 159 ;
       eta_u = 60 ;
       xi_u = 159 ;
       eta_v = 59 ;
       xi_v = 160 ;
variables:

   short sensible(ocean_time, eta_rho, xi_rho) ;
               sensible:scale_factor = -0.01264064f ;
               sensible:add_offset = -313.445f ;
double lon_rho(eta_rho, xi_rho) ;
               lon_rho:units = "degree_east" ;
               lon_rho:field = "lon_rho, scalar" ;
 double lat_rho(eta_rho, xi_rho) ;
               lat_rho:units = "degree_north" ;
               lat_rho:field = "lat_rho, scalar" ;