3.1 The Archive File 3.1 The Archive File 3.1.2 Getrectg function variables Index
NVODS Home

3.1.1 An example

The following archive M-file describes the Levitus ocean atlas dataset. (You can find it in the DATASETS directory, called woa94mon.m.) Many of the M-files follow the same basic structure. Most of the variables set here are necessary for the operation of the browser. A few of them, however, are set only for the convenience of the getxxx function (called getrectg here). If you have to write a new getxxx function, you may not need them.

%  World Ocean Atlas Monthly Climatology

% FUNCTIONS -- REQUIRED
GetFunctionName = 'getrectg';

% VARIABLES -- OPTIONAL
Server = ['http://ferret.wrc.noaa.gov/cgi-bin/nph-nc',...
   '/data/Ocean_atlas_monthly.nc'];
axes_order = [4 3 2 1];
% force time axis to correct day [Y M D H M S]
Time_Offset = [0 0 -1 0 0 0];

% VARIABLES -- REQUIRED
LonRange = [20.000 380.000];
LatRange = [-90.000 90.000];
TimeRange = [1800 str2num(datestr(date,10))];
DepthRange = [0.0 1000.0];
DepthUnits = 'Meters';
Resolution = 111.0;

DataName = 'Water Column - World Ocean Atlas 1994 Monthly - PMEL';
SelectableVariables = str2mat('Sea_Temp', 'Salinity');
DodsName = str2mat('TEMP','SALT');

Acknowledge = sprintf('%s\n%s\n%s\n%s\n%s', ...
Comments1 = sprintf('%s\n', ...

The following variables are for use by the browser.

GetFunctionName
This is the name of the getxxx function that will return both the catalog information as well as the actual data. See Section 3.2. The getrectg function is a common one used to return gridded multi-dimensional data. The getxxx function must be available in your MATLABPATH.
LonRange, LatRange, TimeRange, DepthRange
These four two-element vectors describe the spatial bounds of the dataset's data. This dataset is stored on a grid; the first elements of these range vectors indicate the positions of the first row (column) in the dataset. The latitude and longitude are given in decimal degrees. Times are given in decimal years. In the example here, the data is a climatology, an average over many years This means that the entire time range isn't particularly meaningful (which is why it's set to the maximum), though being able to select by time is important, so you can select the appropriate month.
DepthUnits
This is a character string naming the units in which the data stores depth information. The OPeNDAP Matlab GUI has no knowledge of units, so it's really just an axis label.
Resolution
This is a value, in kilometers, of the distance between adjacent horizontal values in the grid. The OPeNDAP Matlab GUI is only set up for grids with the same resolution in the X and Y dimensions. For georeferenced grids, the resolution refers to the distance between adjacent X values at the equator.
DataName
This is the name of the dataset, to be used in the bookmark list.
DataRange
An array of data pairs, giving an upper and lower bound to the data. The entries in the array correspond to the entries in the DataNull array. This matrix is used by the browser plot functions to create a consistent color scale for the imaging of multiple returning data slices within one dataset. It is only used for image and pcolor plots. An entry of [NaN NaN] indicates the total range of that variable is not known and the browser should scale each image using the local minimum and maximum. The temptation to write in non-NaN scale entries for longitude should be avoided, since the browser converts longitude to match the current window view upon return. Not required.
Comments
A detailed description of the dataset. To avoid Matlab limitations on the length of a command, data descriptions may be broken up into several input lines, which are then concatenated:

Comments1 = sprintf('%s\n', ...
    '        Levitus (1982) Climatological Atlas of the World Ocean', ...
    '    ', ...
    'Annual climatologies of salinity and temperature on 1x1 degree ');

Comments2 = sprintf('%s\n', ...
    '    ', ...
    'Levitus, S., Climatological Atlas of the World, NOAA/ERL GFDL', ...
    'Professional Paper 13,  Princeton, N.J.,  (NTIS PB83-184093),', ...
    '1982.');
Comments3 = sprintf('%s\n', ...
    '    Time_Period_of_Content = ', ...
    '         Beginning_Date:1935 ', ...
    '         Ending_Date:1978 ');

Comments = [Comments1 Comments2 Comments3];
    
Acknowledge
A text string indicating how uses of this data should acknowledge its originator.
Data_Use_Policy
A text string indicating what limitations are set on the use of this data.

Tom Sgouros, December 21, 2004