Opened 11 years ago

Closed 11 years ago

#603 closed upgrade (Done)

Update Matlab scripts tp process 4D-Var observations

Reported by: arango Owned by: arango
Priority: major Milestone: Matlab Processing Scripts
Component: Matlab Version: 3.7
Keywords: Cc:

Description

Several Matlab scripts used to process 4D-Var observations were updated. The observations URL are now passed as an argument to the processing functions, so the extraction scripts are more generic. Since mostly of the 4D-Var observations are on OpenDAP servers, the scripts now support the native NetCDF interface for Matlab version 2012a or higher and SNCTOOLS with Java support for older Matlab versions.

Users can download SNCTOOLS from SourceForge. If doing so, notice that the startup.m script has now:

my_home = getenv('HOME');

...

% Load NetCDF Toolbox for OpenDAP support for versions 2008b or higher. 
% However, this is not needed if version 2012a or higher since Matlab
% native NetCDF interface supports OpenDAP.  Users need to change the
% paths for SNCTOOLS and JAVA.

v = version('-release');
vyear = str2num(v(1:4));
load_toolbox = vyear >= 2008;
if ((vyear == 2008 && v(5:5) == 'a') || vyear >= 2012),
  load_toolbox = false;
end

if (load_toolbox),
  addpath (strcat(my_home, '/ocean/matlab/snctools'), '-end');
  javaaddpath (strcat(my_home, '/ocean/matlab/classes/toolsUI-4.1.jar'), '-end');
  javaaddpath (strcat(my_home, '/ocean/matlab/classes/netcdfAll-4.2.jar'), '-end');
  javaaddpath (strcat(my_home, '/ocean/matlab/snctools/classes'), '-end');
  setpref('SNCTOOLS','USE_JAVA', true);
end


Change History (1)

comment:1 by arango, 11 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.