1 |
clear all |
clear all |
2 |
|
|
|
global MITprof_verbose; %to print notes to screen |
|
|
if isempty(MITprof_verbose); MITprof_verbose=2; end; |
|
|
|
|
|
if MITprof_verbose; |
|
|
fprintf('creating database directory with reference datasets\n'); |
|
|
fprintf('===============================\n\n') |
|
|
end; |
|
|
if ~exist('climatology','dir'), status=mkdir('climatology'); end |
|
3 |
gcmfaces_global; |
gcmfaces_global; |
4 |
eval(['!ln -s ' myenv.gcmfaces_dir 'sample_input/GRIDv4 climatology/']); |
myenv.verbose=1; |
5 |
eval(['!ln -s ' myenv.gcmfaces_dir 'sample_input/OCCAetcONv4GRID/* climatology/']); |
|
6 |
|
fprintf('\n\n basic MITprof test: started... \n'); |
7 |
|
|
8 |
if MITprof_verbose; |
if myenv.verbose; |
9 |
fprintf('adding directories to your path\n'); |
fprintf('\nadding directories to your path\n'); |
10 |
fprintf('===============================\n\n') |
fprintf('===============================\n\n') |
11 |
end; |
end; |
12 |
|
MITprof_global; |
13 |
|
|
14 |
global MITprof_dir; MITprof_dir=[pwd '/']; |
if myenv.verbose; |
15 |
fid=fopen([MITprof_dir 'MITprof_path.m'],'wt'); |
fprintf('\nloading reference grid and climatology\n') |
|
aa=sprintf(['global MITprof_dir; MITprof_dir=''' MITprof_dir ''';\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir ';\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_IO_v2/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_IO_external/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_misc/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_process_main_v2/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_stats/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'profiles_devel/;\n']); |
|
|
aa=sprintf([aa 'addpath ' MITprof_dir 'climatology/;\n']); |
|
|
eval(aa); |
|
|
fid=fopen([MITprof_dir 'MITprof_path.m'],'wt'); fprintf(fid,aa); fclose(fid); |
|
|
|
|
|
|
|
|
if MITprof_verbose; |
|
|
fprintf('\ngenerating .mat files for reference grid and climatology\n') |
|
16 |
fprintf('========================================\n\n') |
fprintf('========================================\n\n') |
17 |
end; |
end; |
18 |
profiles_prep_load_fields(1); |
profiles_prep_load_fields; |
19 |
|
|
20 |
fprintf('\n\n basic MITprof test: started... \n'); |
if myenv.verbose; |
|
|
|
|
if MITprof_verbose; |
|
21 |
fprintf('\nrunning main program on sample data sets\n') |
fprintf('\nrunning main program on sample data sets\n') |
22 |
fprintf('========================================\n\n') |
fprintf('========================================\n\n') |
23 |
end; |
end; |
27 |
%process it |
%process it |
28 |
profiles_prep_main(dataset); |
profiles_prep_main(dataset); |
29 |
% |
% |
30 |
fprintf(['\n\n wod05 sample -- done -- ' dataset.dirOut dataset.fileOut '.nc was created \n\n']); |
fil=[dataset.dirOut dataset.fileOut]; |
31 |
|
if ~isempty(dir(fil)); |
32 |
|
fprintf(['\n\n wod05 sample -- done -- ' fil ' was created \n\n']); |
33 |
|
else; |
34 |
|
warning(['wod05 sample -- SKIPPED -- ' fil ' was NOT created \n\n']); |
35 |
|
end; |
36 |
|
|
37 |
%select the data source (and specific params) => argo sample |
%select the data source (and specific params) => argo sample |
38 |
dataset=profiles_prep_select('argo','indian'); |
dataset=profiles_prep_select('argo','indian'); |
39 |
%process it |
%process it |
40 |
profiles_prep_main(dataset); |
profiles_prep_main(dataset); |
41 |
% |
% |
42 |
fprintf(['\n\nargo sample -- done -- ' dataset.dirOut dataset.fileOut '.nc was created \n\n']); |
fil=[dataset.dirOut dataset.fileOut]; |
43 |
|
if ~isempty(dir(fil)); |
44 |
|
fprintf(['\n\n argo sample -- done -- ' fil ' was created \n\n']); |
45 |
|
else; |
46 |
|
warning(['argo sample -- SKIPPED -- ' fil ' was NOT created \n\n']); |
47 |
|
end; |
48 |
|
|
49 |
%select the data source (and specific params) => odv sample |
%select the data source (and specific params) => odv sample |
50 |
dataset=profiles_prep_select('odv','ODVcompact_sample'); |
dataset=profiles_prep_select('odv','ODVcompact_sample'); |
51 |
%process it |
%process it |
52 |
profiles_prep_main(dataset); |
profiles_prep_main(dataset); |
53 |
% |
% |
54 |
fprintf(['\n\nodv sample -- done -- ' dataset.dirOut dataset.fileOut '.nc was created \n\n']); |
fil=[dataset.dirOut dataset.fileOut]; |
55 |
|
if ~isempty(dir(fil)); |
56 |
|
fprintf(['\n\n odv sample -- done -- ' fil ' was created \n\n']); |
57 |
|
else; |
58 |
|
warning(['odv sample -- SKIPPED -- ' fil ' was NOT created \n\n']); |
59 |
|
end; |
60 |
|
|
61 |
fprintf('\n basic MITprof test: completed. \n'); |
fprintf('\n basic MITprof test: completed. \n'); |
62 |
|
|