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