Curvilinear data has a different kind of grid. The longitudes and latitudes that describe the grid are not simple 1-D lists of values but instead are described by 2-D arrays of values. The data variables, and these longitude and latitude coordinate variables are on simple index-based XY grids. An ncdump of such a file might look like this:
netcdf curvilinear_demo {
dimensions:
ix = 360 ;
jy = 200 ;
bnds = 2 ;
depth = 1 ;
time = unlimited ; // (1 currently)
variables:
double ix(ix) ;
ix:long_name = "i index" ;
ix:axis = "x" ;
double jy(jy) ;
jy:long_name = "j index" ;
jy:axis = "y" ;
float geolon(jy, ix) ;
geolon:long_name = "geographical longitude at cell center" ;
geolon:units = "degrees_east" ;
float geolat(jy, ix) ;
geolat:long_name = "geographical latitude at cell center" ;
geolat:units = "degrees_north" ;
double depth(depth) ;
depth:long_name = "depth" ;
depth:units = "m" ;
depth:axis = "z" ;
depth:positive = "down" ;
depth:point_spacing = "uneven" ;
double time(time) ;
time:long_name = "time" ;
time:units = "days since 2001-01-01 00:00:00" ;
time:axis = "t" ;
time:calendar = "noleap" ;
time:bounds = "time_bnds" ;
double time_bnds(time, bnds) ;
float thetao(time, depth, jy, ix) ;
thetao:missing_value = 1.e+20f ;
thetao:_fillvalue = 1.e+20f ;
thetao:long_name = "potential temperature" ;
thetao:units = "k" ;
thetao:coordinates = "geolon geolat sigma time" ;
// global attributes:
:history = "ferret v6.03 2-jul-07" ;
data:
ix = 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12.,
13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24.,
...;
jy = 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12.,
13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24.,
...
depth = 5 ;
time = 15. ;
}
If we run this file through addXML, we will get a correct description of the data and the grid. The coordinates attribute of the variable thetao tells addXML to look for the longitude and latitude coordinate variables and the xml will reflect this.
Some datasets lack the "coordinates" attribute. For such a dataset we will get either error messages or a file that doesn't really represent the file configuration. The solution is to either add a coordinates attribute to the dataset using NcML or some other means (this is the preferred method), or to add information to the configuration by hand.
Even when the dataset is correctly set up by addXML, there are customizations that can be made to improve performance and to set LAS up to allow for regridding to a rectilinear grid. See the following sections for more details.