1 |
gforget |
1.1 |
function []=cost_altimeter_disp(dirModel,choicePlot,suf,varargin); |
2 |
|
|
%object: compute or plot the various sea level statistics |
3 |
|
|
% (std model-obs, model, obs, leading to cost function terms) |
4 |
|
|
%inputs: dirModel is the model run directory |
5 |
|
|
% doComp is the switch from computation to plot |
6 |
|
|
|
7 |
|
|
%if doDifObsOrMod==1; suf='modMobs'; elseif doDifObsOrMod==2; suf='obs'; else; suf='mod'; end; |
8 |
|
|
|
9 |
|
|
if nargin==4; addToTex=varargin{1}; else; addToTex=0; end; |
10 |
|
|
|
11 |
gforget |
1.3 |
gcmfaces_global; |
12 |
gforget |
1.1 |
gcmfaces_lines_zonal; |
13 |
|
|
|
14 |
|
|
%%%%%%%%%%%%%%% |
15 |
|
|
%define pathes: |
16 |
|
|
%%%%%%%%%%%%%%% |
17 |
|
|
|
18 |
gforget |
1.3 |
% dirData='/net/altix3700/raid4/gforget/mysetups/ecco_v4/INPUTS_90x50/'; |
19 |
gforget |
1.1 |
dirData='/net/altix3700/raid4/gforget/mysetups/ecco_v4/INPUTS_90x50/'; |
20 |
|
|
dirOut=[dirModel 'mat/']; if isempty(dir(dirOut)); eval(['mkdir ' dirOut ';']); end; |
21 |
|
|
runName=pwd; tmp1=strfind(runName,'/'); runName=runName(tmp1(end)+1:end); |
22 |
|
|
|
23 |
|
|
%%%%%%%%%%%%%%%%% |
24 |
|
|
%do computations: |
25 |
|
|
%%%%%%%%%%%%%%%%% |
26 |
|
|
|
27 |
|
|
eval(['load ' dirOut 'cost_altimeter_' suf '.mat myflds;']); |
28 |
|
|
|
29 |
|
|
if strcmp(suf,'modMobs'); tit='modeled-observed'; |
30 |
|
|
elseif strcmp(suf,'obs'); tit='observed'; |
31 |
|
|
elseif strcmp(suf,'mod'); tit='modeled'; |
32 |
|
|
else; error('unknown field'); |
33 |
|
|
end |
34 |
|
|
|
35 |
gforget |
1.2 |
if choicePlot==1; tit=[tit ' rms']; uni='(cm)'; |
36 |
|
|
elseif choicePlot==2; tit='prior uncertainty'; uni='(cm)'; |
37 |
|
|
else; tit=[tit ' cost']; uni=''; |
38 |
gforget |
1.1 |
end; |
39 |
|
|
|
40 |
|
|
if choicePlot==1;%rms |
41 |
|
|
|
42 |
|
|
if strcmp(suf,'modMobs'); |
43 |
|
|
cc=[-0.4:0.05:-0.25 -0.2:0.03:-0.05 -0.03:0.01:0.03 0.05:0.03:0.2 0.25:0.05:0.4]; |
44 |
|
|
figure; m_map_gcmfaces(100*myflds.dif_mdt,0,{'myCaxis',100*cc}); drawnow; |
45 |
gforget |
1.2 |
tmp1=strfind(tit,'rms'); |
46 |
|
|
if ~isempty(tmp1); tit2=[tit(1:tmp1-1) 'difference' tit(tmp1+3:end)]; else; tit2=tit; end; |
47 |
|
|
myCaption={tit2,'-- mean dynamic topography ',uni}; |
48 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
49 |
|
|
end; |
50 |
|
|
|
51 |
|
|
cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4]; |
52 |
|
|
figure; m_map_gcmfaces(100*myflds.rms_sladiff_smooth,0,{'myCaxis',100*cc}); drawnow; |
53 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- large space/time scales'}; |
54 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
55 |
|
|
|
56 |
|
|
%figure; m_map_gcmfaces(100*myflds.rms_sladiff_point35d,0,{'myCaxis',100*cc}); drawnow; |
57 |
gforget |
1.2 |
%myCaption={tit,'-- sea level anomaly ',uni,' -- large time scales'}; |
58 |
gforget |
1.1 |
%if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
59 |
|
|
|
60 |
|
|
figure; m_map_gcmfaces(100*myflds.rms_sladiff_point,0,{'myCaxis',100*cc}); drawnow; |
61 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- pointwise'}; |
62 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
63 |
|
|
|
64 |
|
|
elseif choicePlot==2;%uncertainty fields |
65 |
|
|
|
66 |
|
|
cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4]; |
67 |
|
|
figure; m_map_gcmfaces(100*myflds.sig_mdt,0,{'myCaxis',100*cc}); drawnow; |
68 |
gforget |
1.2 |
myCaption={tit,'-- mean dynamic topography ',uni}; |
69 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
70 |
|
|
|
71 |
|
|
cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4]; |
72 |
|
|
figure; m_map_gcmfaces(100*myflds.sig_sladiff_smooth,0,{'myCaxis',100*cc}); drawnow; |
73 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- large space/time scales'}; |
74 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
75 |
|
|
|
76 |
|
|
%figure; m_map_gcmfaces(100*myflds.sig_sladiff_point,0,{'myCaxis',100*cc}); drawnow; |
77 |
gforget |
1.2 |
%myCaption={tit,'-- sea level anomaly ',uni,' -- large time scales'}; |
78 |
gforget |
1.1 |
%if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
79 |
|
|
|
80 |
|
|
figure; m_map_gcmfaces(100*myflds.sig_sladiff_point,0,{'myCaxis',100*cc}); drawnow; |
81 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- pointwise'}; |
82 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
83 |
|
|
|
84 |
|
|
else;%cost |
85 |
|
|
|
86 |
|
|
cc=[0:0.005:0.02 0.03:0.01:0.05 0.06:0.02:0.1 0.14:0.03:0.2 0.25:0.05:0.4]*100; |
87 |
|
|
|
88 |
|
|
figure; m_map_gcmfaces(((myflds.dif_mdt.^2)./(myflds.sig_mdt.^2)),0,{'myCaxis',cc}); drawnow; |
89 |
gforget |
1.2 |
myCaption={tit,'-- mean dynamic topography ',uni}; |
90 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
91 |
|
|
|
92 |
|
|
figure; m_map_gcmfaces(((myflds.rms_sladiff_smooth.^2)./(myflds.sig_sladiff_smooth.^2)),0,{'myCaxis',cc}); drawnow; |
93 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- large space/time scales'}; |
94 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
95 |
|
|
|
96 |
|
|
%figure; m_map_gcmfaces(((myflds.rms_sladiff_point35d.^2)./(myflds.sig_sladiff_point.^2)),0,{'myCaxis',cc}); drawnow; |
97 |
gforget |
1.2 |
%myCaption={tit,'-- sea level anomaly ',uni,' -- large time scales'}; |
98 |
gforget |
1.1 |
%if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
99 |
|
|
|
100 |
|
|
figure; m_map_gcmfaces(((myflds.rms_sladiff_point.^2)./(myflds.sig_sladiff_point.^2)),0,{'myCaxis',cc}); drawnow; |
101 |
gforget |
1.2 |
myCaption={tit,'-- sea level anomaly ',uni,' -- pointwise'}; |
102 |
gforget |
1.1 |
if addToTex; write2tex([dirModel 'tex/myPlots.tex'],2,myCaption,gcf); end; |
103 |
|
|
|
104 |
|
|
end; |
105 |
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|