All data loaded into IVE must be in netCDF (network Common Data Form) format. The data can be either in a single file containing all desired data, or in multiple files where each file contains the data for single value of a specified dimension and the alphanumeric file name includes the numerical value of the specified dimension (e.g. each file might contain the data for one time in an multi-time data set). The following document describes
Dimensions are declared in the first section of the netcdf file which begins with the keyword `dimensions' Two examples of the dimensions section of a netcdf file are:
dimensions:a ndnx = 801 ;
ny = 1 ;
nz = 80 ;
time = UNLIMITED ;
dimensions:In both examples, the time dimension is unlimited, which allows the data to contain an arbitrary number of time levels. Only the last dimension in the data set can be unlimited. Observe that, as illustrated by the second example, the spatial coordinates need not be labeled x, y and z.lat = 73 ;
lon = 73 ;
level = 10 ;
time = UNLIMITED ;
variables:Note that the unlimited dimension appears first and the order in which the dimensions are declared is opposite that used in standard FORTRAN. (The ordering is consistent with standard C.)float sample (time,nz,ny,nx);
Global Attributes
The Global attributes define the size of the physical domain and the units in which to express and to display the physical coordinates. All unit names and conversions between units are defined via the Unidata program udunits. If no units are included in the attributes, IVE treats the data as dimensionless and assumes a spacing of one dimensionless unit between each data point along each coordinate axis. The global attributes recognized by IVE are as follows. In accordance with the netCDF standard, all global attributes begin with a colon.
If the `units' attribute is specified and the `display_units' attribute is omitted, the coordinate will be labeled using the physical units.
Per Field Attributes
The per field attributes define the physical domain over which each particular field is defined, the physical units in which the field is expressed, the units in which the variable is to be displayed and a flag for any missing data. Let `sample' be the name of a data field. All per field attributes begin with the characters `sample:' The global attributes recognized by IVE are as follows.
In a multiple file data set the data is split along a "file coordinate," which is one of the four coordinates x, y, z or t. Each individual netCDF file contains all the data associated with a single value of the "file coordinate." That netCDF file must also contain the numerical value of the "file coordinate" in its alphanumeric name. Depending on the parameters set by the MULTIPLE_READ command, IVE will treat these netCDF files individually or combine selected files into a larger data set in a manner that is transparent to the user.
netcdf simple {
dimensions:nx = 50 ;
ny = 50 ;
nz = 30 ;
nt = 10 ;
nt1 = 1 ;variables:
float A(nt,nz,ny,nx);
float B(nt1,nz,ny,nx);
(Note that the header information in an existing netCDF file may be obtained using the command ncdump -h filename ) No attributes are specified in this netCDF file. IVE uses nondimensional units to specify the domain for the field `A' as 1 < x < 50, 1 < y < 50, 1 < z < 30, and 1 < t < 10. The domain for field `B' is identical to that for `A', except that there is no time dependence. As a consequence, the time-coordinate slider will not appear in the window/slicer widget when field `B' is selected.
The following portion of a netCDF file contains five variables. A single four-dimensional data array `A(lat,lon,level,time)' contains the data to be plotted. Four one-dimensional arrays, `lat', `lon' `level', and `time' contain the coordinates of the physical grid. These coordinates may be irregularly spaced and may have attributes stating their physical units.
netcdf explicit_grid{(The preceding lists both the netCDF header and the values of the "coordinate variables," i.e., variables that are also dimensions. This type of listing may be obtained from an existing netCDF file using the command ncdump -c filename . The double slash // precedes a comment line in the netCDF file.)
dimensions:lon = 5;
lat = 5;
level = 5;
time = 7;variables:
float A(time,level,lat,lon);
A:units = "meters/second";
float lon(lon);
lon:units = "degrees_east";
float lat(lat);
lat:units = "degrees_north";
float level(level);
level:units = "millibars";
float time(time);
time:units = "hours";//global attributes:
:x_label = "longitude";data:
:y_label = "latitude";
:z_label = "level";
:t_label = "time";lon = -180, -90, 0, 90, 180 ;
lat = -90, 45, 0, 45, 90 ;
level = 1000, 850, 700, 500, 300 ;
time = 0, 2, 4, 6, 8, 10, 12 ;
IVE sets the the domain limits to match the first and last data point in each coordinate variable. In this example, the sliders in the window/slicer widget will show the limits -180 < lon < 180, -90 < lat < 90, 1000 > lev > 300, and 0 < tim < 12. Note that IVE uses the first three letters in the name of the global label attributes to label the sliders. IVE recognizes `lon',`lat',`level' and `time' as coordinate variables and automatically treats them as if they had the attribute "no_button" set to `1'
netcdf implicit_grid{
dimensions:lon = 101;
lat = 101;
level = 5;
time = UNLIMITED ; //(7 currently)variables:
float A(time,level,lat,lon);
A:units = "meters/second";float level(level);
level:units = "millibars";float time(time);
time:units = "hours";//global attributes:
:x_min = -180.f;data:
:x_max = 180.f;
:x_units = "degrees_east";
:x_label = "longitude";
:y_min = -90.f;
:y_max = 90.f;
:y_units = "degrees_north";
:y_label = "latitude";
:z_label = "level";
:t_label = "time";level = 1000, 850, 700, 500, 300 ;
time = 0, 2, 4, 6, 8, 10, 12 ;
IVE uses the default transform routines to linearly interpolate between the array indices and the physical location along the x and y coordinates. Let `i' be the value of the first array index. Since :x_delta is not specified, `i' is mapped to a position along the x (or longitude) coordinate via the relation
:x_min + (i-1)*(:x_max - :x_min)/(lon-1)The sliders in the window/slicer widget will look like those in the preceding example. The only difference is that the "lon" and "lat" sliders will not be subject to the "gravity" that forces the indicator to stop only at values corresponding to grid points that are actually present in the data set. Gravity is typically useful only when there are a small number of data points along the coordinate axis.
If :x_delta were specified, `i' would be mapped to a position along the x (or longitude) coordinate via the relation
:x_min + :x_delta*(i-1)If :x_delta and A:x_min were both specified, `i' would be mapped to a position along the x (or longitude) coordinate via the relation
A:x_min + :x_delta*(i-1)which allows `A' to be staggered with respect to other fields along the 1st coordinate axis.
netcdf data_1500{
dimensions:lon = 101;
lat = 101;
level = 5;
time = 1;variables:
float A(time,level,lat,lon);
A:units = "meters/second";float level(level);
level:units = "millibars";float time(time);
time:units = "hours";//global attributes:
:x_min = -180.f;data:
:x_max = 180.f;
:x_units = "degrees_east";
:x_label = "longitude";
:y_min = -90.f;
:y_max = 90.f;
:y_units = "degrees_north";
:y_label = "latitude";
:z_label = "level";
:t_label = "time";level = 1000, 850, 700, 500, 300 ;
time = 1500 ;
The data_1000.nc and data_2000.nc would have "time" set to 1000 and 2000, respectively. If the same data set was used with a "file coordinate" of z, the file names would have been data_1000.nc, data_850.nc, data_700.nc, data_500.nc, and data_300.nc and the data_850.nc file would look as follows:
netcdf data_850{back to index
dimensions:lon = 101;
lat = 101;
level = 1;
time = 3;variables:
float A(time,level,lat,lon);
A:units = "meters/second";float level(level);
level:units = "millibars";float time(time);
time:units = "hours";//global attributes:
:x_min = -180.f;data:
:x_max = 180.f;
:x_units = "degrees_east";
:x_label = "longitude";
:y_min = -90.f;
:y_max = 90.f;
:y_units = "degrees_north";
:y_label = "latitude";
:z_label = "level";
:t_label = "time";level = 850 ;
time = 1000, 1500, 2000 ;