forked from NakamuraTakashi/matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup.m
68 lines (57 loc) · 2.72 KB
/
startup.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function startup
% startup -- User script configuration for Matlab. It can set default
% paths, define Handle Graphics defaults, or predefine
% variables in your workspace.
% svn $Id$
%===========================================================================%
% Copyright (c) 2002-2019 The ROMS/TOMS Group %
% Licensed under a MIT/X style license %
% See License_ROMS.txt Hernan G. Arango %
%===========================================================================%
% Set miscelaneous parameters.
global IPRINT
IPRINT=0;
format long g
% Change "my_root" to the appropriate path were these matlab scripts are
% installed in your computer.
my_home = getenv('HOME');
my_root = strcat(my_home, '../');
path(path, fullfile(my_root, 'matlab', '4dvar', ''))
path(path, fullfile(my_root, 'matlab', 'bathymetry', ''))
path(path, fullfile(my_root, 'matlab', 'boundary', ''))
path(path, fullfile(my_root, 'matlab', 'coastlines', ''))
path(path, fullfile(my_root, 'matlab', 'colormaps', ''))
path(path, fullfile(my_root, 'matlab', 'forcing', ''))
path(path, fullfile(my_root, 'matlab', 'grid', ''))
path(path, fullfile(my_root, 'matlab', 'grid_gui', ''))
path(path, fullfile(my_root, 'matlab', 'initial', ''))
path(path, fullfile(my_root, 'matlab', 'landmask', ''))
path(path, fullfile(my_root, 'matlab', 'mex', ''))
path(path, fullfile(my_root, 'matlab', 'netcdf', ''))
path(path, fullfile(my_root, 'matlab', 'seagrid', ''))
path(path, fullfile(my_root, 'matlab', 'seagrid', 'presto', ''))
path(path, fullfile(my_root, 'matlab', 'seawater', ''))
path(path, fullfile(my_root, 'matlab', 't_tide', ''))
path(path, fullfile(my_root, 'matlab', 'tidal_ellipse', ''))
path(path, fullfile(my_root, 'matlab', 'utility', ''))
path(path, fullfile(my_root, 'matlab', 'my_scripts', ''))
% 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
load_toolbox = true;
if (load_toolbox),
addpath (strcat(my_root, '/matlab/lib/mexcdf/mexnc'), '-end');
addpath (strcat(my_root, '/matlab/lib/mexcdf/snctools'), '-end');
% javaaddpath (strcat(my_root, '/matlab/lib/toolsui-4.3.jar'), '-end');
javaaddpath (strcat(my_root, '/matlab/lib/netcdfAll-4.3.jar'), '-end');
javaaddpath (strcat(my_root, '/matlab/lib/mexcdf/snctools/classes'), '-end');
setpref('SNCTOOLS','USE_JAVA', true);
end
%path(path, 'C:\cygwin64\bin')