Search the data

MATLAB routine for use with sea level data

A simple MATLAB script to read the netCDF file.

%
% A simple Matlab script to read the BODC netcdf file.
%
% Author: Nathan Bindoff
% Date: 28 March 2000
% The script uses Jim Mansbridge's netcdf routines for matlab.
%
% Documentation and description of these routines can be found at 
% http://www.marine.csiro.au/sw/matlab-netcdf.html.
%
% IMPORTANT NOTE: If you run into problems with this script, 
%                 it may be that you need to replace getcdf 
%                 with getnc. (getcdf was part of the earlier Matlab
%                 4.x CSIRO release, and the script should work if
%                 you use the old CSIRO software, which is still 
%                 available on the www). getnc is used with Matlab 5.
%
% Read the BODC sea-level data 
%
inqnc('b0033379')
%
%
file='b0033379'
%
%
sea_level=getcdf(file,'sea_level');
sea_level_quality_flag=getcdf(file,'sea_level_quality_flag');
woce_time_of_day=getcdf(file,'woce_time_of_day');
woce_time_of_day_quality_flag=getcdf(file,'woce_time_of_day_quality_flag');
woce_date=getcdf(file,'woce_date');
latitude=getcdf(file,'latitude');
longitude=getcdf(file,'longitude');
%
% 
%The 2 dimensions are  1) primary_dimension = 8760  2) position_dimension = 1.
%primary_dimension is unlimited in length
% 
%----- Get further information about the following variables -----
% 
%  -1) None of them (no further information)
%   0) All of the variables
%   1) sea_level              2) sea_level_quality_flag   3) woce_time_of_day
%   4) woce_time_of_day_quality_flag   5) woce_date     6) latitude
%   7) longitude