/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/MITprof_global.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/profilesMatlabProcessing/MITprof_global.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Mon Jul 28 23:30:07 2014 UTC (10 years, 11 months ago) by gforget
Branch: MAIN
Changes since 1.2: +2 -0 lines
MITprof_global.m : define myenv.MITprof_griddir and myenv.MITprof_climdir
profiles_process_init.m : avoid creating for ‘climatology/‘ subdirectory
profiles_prep_load_fields.m : revert default to reading of grid and atlases
    from binary files, while reading and writing to mat files becomes optional.
profiles_prep_revise.m : bring up to date
profiles_samples/reference_results/ : update weights etc using profiles_prep_revise.m

1 gforget 1.1 function []=MITprof_global(varargin);
2     %object: take care of path and global variables (mygrid and mitprofenv),
3     % and sends global variables to caller routine workspace
4     %notes: - in any call, if this has not yet been done,
5     % this routine also adds MITprof subdirectories
6     % to the matlab path, and it defines mitprofenv.
7     % - this routine replaces MITprof_path
8    
9     %get/define global variables:
10 gforget 1.2 gcmfaces_global;
11 gforget 1.1
12     %take care of path:
13     test0=which('MITprof_load.m');
14     if isempty(test0);
15     test0=which('MITprof_global.m'); ii=strfind(test0,filesep);
16     mydir=test0(1:ii(end));
17     %
18     addpath(fullfile(mydir));
19     addpath(fullfile(mydir,'profiles_process_main_v2'));
20     addpath(fullfile(mydir,'profiles_IO_v2'));
21     addpath(fullfile(mydir,'profiles_IO_external'));
22     addpath(fullfile(mydir,'profiles_misc'));
23     addpath(fullfile(mydir,'profiles_stats'));
24     addpath(fullfile(mydir,'ecco_v4'));
25     addpath(fullfile(mydir,'profiles_devel'));
26     end;
27    
28     %environment variables:
29 gforget 1.2 if ~isfield(myenv,'MITprof_dir');
30 gforget 1.1 test0=which('MITprof_global.m'); ii=strfind(test0,filesep);
31 gforget 1.2 myenv.MITprof_dir=test0(1:ii(end));
32 gforget 1.3 myenv.MITprof_griddir=fullfile(myenv.gcmfaces_dir,'sample_input','GRIDv4',filesep);
33     myenv.MITprof_climdir=fullfile(myenv.gcmfaces_dir,'sample_input','OCCAetcONv4GRID',filesep);
34 gforget 1.1 end;
35    
36     %send to workspace:
37     evalin('caller','global mygrid mitprofenv');
38    

  ViewVC Help
Powered by ViewVC 1.1.22