1 |
prefix='dynStD'; |
prefix='dynStD'; |
2 |
namA='r527'; |
prefix='oceStD'; |
3 |
|
pCoords=0; |
4 |
|
namA='c06'; |
5 |
Nexp=1; Nc=size(namA,2); |
Nexp=1; Nc=size(namA,2); |
6 |
%-- |
%-- |
7 |
|
|
12 |
%nItMx=60*ones(1,Nexp); |
%nItMx=60*ones(1,Nexp); |
13 |
namLg=namA ; namLg=strrep(namLg,'_','\_'); |
namLg=namA ; namLg=strrep(namLg,'_','\_'); |
14 |
%----------- |
%----------- |
|
%- ngEn = Nb of Energy plot: = 2 or = 4 ; |
|
|
ngEn=2; |
|
15 |
%- test if the variable krd is define : |
%- test if the variable krd is define : |
16 |
if size(who('krd'),1) > 0, |
if size(who('krd'),1) > 0, |
17 |
fprintf('krd is defined and = %i \n',krd); |
fprintf('krd is defined and = %i \n',krd); |
56 |
fprintf('save to "sav_StD.mat" file ...'); |
fprintf('save to "sav_StD.mat" file ...'); |
57 |
save('sav_StD.mat','vvA','tiA','ntA','rList','listV'); |
save('sav_StD.mat','vvA','tiA','ntA','rList','listV'); |
58 |
fprintf(' done\n') |
fprintf(' done\n') |
59 |
end |
end |
60 |
elseif krd < 0, |
elseif krd < 0, |
61 |
fprintf('load from "sav_StD.mat" file ...'); |
fprintf('load from "sav_StD.mat" file ...'); |
62 |
load sav_StD |
load sav_StD |
64 |
end |
end |
65 |
if krd ~= 0, |
if krd ~= 0, |
66 |
ttA=squeeze(tiA(:,2,:)); |
ttA=squeeze(tiA(:,2,:)); |
67 |
ttA=ttA/3600; titT='hrs'; ttA=ttA/24; titT='days'; |
ttA=ttA/3600; titT='hrs'; ttA=ttA/24 ; titT='days'; |
68 |
ttA=ttA/30 ; titT='month'; ttA=ttA/12 ; titT='year'; |
ttA=ttA/30 ; titT='month'; ttA=ttA/12 ; titT='year'; |
69 |
end |
end |
70 |
%========================================================= |
%========================================================= |
82 |
%-- |
%-- |
83 |
|
|
84 |
list_on=zeros(1,nbV); |
list_on=zeros(1,nbV); |
85 |
nbG=8; |
nbG=9; |
86 |
nbG=min(nbG,nbV); list_on(1:nbG)=1 ; |
nbG=min(nbG,nbV); list_on(1:nbG)=1 ; |
87 |
%list_on(1:6)=[1 1 1 1 1 1]; |
%list_on(1:6)=[1 1 1 1 1 1]; |
88 |
|
%list_on(5:7)=0; |
89 |
|
|
90 |
isA=ones(1,Nexp); ieA=ntA; |
isA=ones(1,Nexp); ieA=ntA; |
91 |
%- limit the length : for search of isA <->1500y: find(ttA(:,2) == 1500) |
%- limit the length : for search of isA <->1500y: find(ttA(:,2) == 1500) |
92 |
%isA=isA*31 ; % drop the 1rst mnth (1 Monitor/d) |
%isA=isA*3 ; % drop the 1rst mnth (1 Monitor/10.d) |
|
%isA=isA*36 ; % drop the 1rst year (1 Monitor/10d) |
|
|
%isA(1)=31 ; isA(2)=4 ; % drop the 1rst mnth |
|
93 |
%ieA(:)=360; isA(:)=1; |
%ieA(:)=360; isA(:)=1; |
94 |
|
|
95 |
linA(1,:)='k-'; % ieA(1)=60 ; % ieA(1)=1152 ; |
linA(1,:)='k-'; % ieA(1)=60 ; % ieA(1)=1152 ; |
100 |
linA(6,:)='c-'; |
linA(6,:)='c-'; |
101 |
|
|
102 |
ieA=min(ieA,nItMx); |
ieA=min(ieA,nItMx); |
|
%titall='AIM , Cubic-G (32x32) , cpl-FM Forcing' ; |
|
|
%titall='Global Ocean, Cubic-G (32x32) , NCEP Forc (2)' ; |
|
103 |
titall=['Exp: ',namLg(1,:)]; |
titall=['Exp: ',namLg(1,:)]; |
104 |
|
|
105 |
%========================================================= |
%========================================================= |
106 |
|
|
107 |
|
%-default: dxRed=0; dyRed=0; dxB=0.1; dyB=0.9; |
108 |
|
dxRed=0; dyRed=0.03; dxB=0.02; dyB=0.9; |
109 |
|
[xyP,xyB]=def_subP(-4,dxRed,dyRed,dxB,dyB); |
110 |
|
xyP(:,2)=xyP(:,2)+0.010; |
111 |
|
xyB(:,2)=xyB(:,2)+0.010; |
112 |
|
|
113 |
for ng=1:nbV, |
for ng=1:nbV, |
114 |
%------------------- |
%------------------- |
115 |
flag=list_on(ng); kl=0; |
yax=[1:nk-1]; if pCoords == 0, yax=-[1:nk-1]; end |
116 |
|
flag=list_on(ng); |
117 |
vv1=vvA(:,:,:,:,ng,:); namV=char(listV(ng)); |
vv1=vvA(:,:,:,:,ng,:); namV=char(listV(ng)); |
118 |
titv=strrep(namV,'_','\_'); |
titv=strrep(namV,'_','\_'); |
119 |
%if strcmp(namV,'Eta'), vv1=vv1/100; titv='Eta [mb]'; end |
if strcmp(namV,'Eta') & pCoords == 1, vv1=vv1/100; titv='Eta [mb]'; end |
120 |
%if strcmp(namV,'T'), kl=1; end |
if strcmp(namV,'T') & pCoords == 1, |
121 |
if strcmp(namV,'T'), |
namfil=['../res_',namA(1:end),'/RC']; D=dir([namfil,'.data']); |
|
namfil=['../res_',namA(2:end),'/RC']; D=dir([namfil,'.data']); |
|
122 |
if size(D,1) == 1, |
if size(D,1) == 1, |
123 |
rC=rdmds(namfil); |
rC=rdmds(namfil); |
124 |
fprintf(' convert Pot.Temp to Temp.:'); |
fprintf(' convert Pot.Temp to Temp.:'); |
132 |
fprintf(' no file: %s\n',namfil); |
fprintf(' no file: %s\n',namfil); |
133 |
end |
end |
134 |
end |
end |
|
%if ng == 1, flag=2*list_on(1) ; end |
|
|
if kl > 0, titv=[titv,'\_',int2str(kl)]; |
|
|
fprintf([' var= ',namV,' at level k= %i \n'],kl); |
|
|
end |
|
135 |
|
|
136 |
if flag == 1 |
if flag == 1 |
137 |
%-- |
%-- |
138 |
figure(ng); set(ng,'position',[100+100*ng 60+40*ng 500 700]);clf; |
figure(ng); set(ng,'position',[100+100*ng 60+40*ng 500 700]);clf; |
|
% if ng == 2, var=squeeze(vv1(2,:,1,:,:)); end % to get surf.Temp |
|
139 |
if kList(ng) == 1, |
if kList(ng) == 1, |
140 |
var=squeeze(vv1(1+kl,:,1,:,:)); |
var=squeeze(vv1(1,:,1,:,:)); |
141 |
dd=squeeze(max(var)-min(var)); av=squeeze(mean(var)); |
dd=squeeze(max(var)-min(var)); av=squeeze(mean(var)); |
142 |
if Nexp == 1, av=av'; dd=dd'; end ; |
if Nexp == 1, av=av'; dd=dd'; end ; |
143 |
for nv=1:4, |
for nv=1:4, |
144 |
subplot(410+nv); ttmn=' Mx-mn:'; ttav=' Av:'; |
axes('position',xyP(nv,:)); ttmn=' Mx-mn:'; ttav=' Av:'; |
145 |
for n=1:Nexp, |
for n=1:Nexp, |
146 |
plot(ttA(isA(n):ieA(n),n),var(isA(n):ieA(n),nv,n),linA(n,:)); |
plot(ttA(isA(n):ieA(n),n),var(isA(n):ieA(n),nv,n),linA(n,:)); |
147 |
if n == 1, hold on ; end ; |
if n == 1, hold on ; end ; |
150 |
end ; hold off ; |
end ; hold off ; |
151 |
AA=axis ; dAA=AA(4)-AA(3); |
AA=axis ; dAA=AA(4)-AA(3); |
152 |
if AA(3)*AA(4) <= 0, AA(3)=min(AA(3),-dAA/10); AA(4)=max(AA(4),dAA/10); end |
if AA(3)*AA(4) <= 0, AA(3)=min(AA(3),-dAA/10); AA(4)=max(AA(4),dAA/10); end |
153 |
if ttax1 < ttax2, AA(1)=ttax1; AA(2)=ttax2; end; |
if ttax1 < ttax2, AA(1)=ttax1; AA(2)=ttax2; end; |
154 |
axis(AA); grid ; |
axis(AA); grid ; |
155 |
if nv == 1, title(['Avr ',titv,' ',ttmn]); end |
if nv == 1, title(['Avr ',titv,' ',ttmn]); xlabel(titT); end |
156 |
if nv == 2, title(['Std-Dev ',titv,' ',ttav]); end |
if nv == 2, title(['Std-Dev ',titv,' ',ttav]); end |
157 |
if nv == 3, title(['min ',titv,' ',ttav]); legend(namLg(1:Nexp,:),0); end |
if nv == 3, title(['min ',titv,' ',ttav]); legend(namLg(1:Nexp,:),0); end |
158 |
if nv == 4, title(['Max ',titv,' ',ttav]); end |
if nv == 4, title(['Max ',titv,' ',ttav]); end |
159 |
%if nv == 2, title(['Del-2 ',titv,' ',ttav]); end |
%if nv == 2, title(['Del-2 ',titv,' ',ttav]); end |
160 |
end ; xlabel(titT); |
end ; %xlabel(titT); |
161 |
else |
else |
162 |
n=1; |
n=1; k1=2; |
163 |
|
if strcmp(namV,'CONVADJ') || strcmp(namV,'DRHODR'), |
164 |
|
k1=3; yax=yax(2:nk-1); |
165 |
|
end |
166 |
for nv=1:4, |
for nv=1:4, |
167 |
subplot(410+nv); |
axes('position',xyP(nv,:)); |
168 |
var=squeeze(vv1(2:nk,:,1,nv,n))'; |
var=squeeze(vv1(k1:nk,:,1,nv,n))'; mnV=min(var(:)); MxV=max(var(:)); |
169 |
mnV=min(var(:)); MxV=max(var(:)); ccv=c_levs(mnV,MxV,-12); |
ccv=c_levs(mnV,MxV,-12); %ccv=c_levs(mnV,MxV,-20); |
170 |
%- pressure coordinate, from bottom (k=1) to top (k=nr=nk-1) |
if MxV > mnV, |
171 |
%[cs,h]=contour(ttA(isA(n):ieA(n),n),[1:nk-1],var(isA(n):ieA(n),:)',ccv); |
[cs,h]=contour(ttA(isA(n):ieA(n),n),yax,var(isA(n):ieA(n),:)',ccv); |
172 |
%- z coordinate, from bottom (k=nr=nk-1) to top (k=1) |
%clabel(cs);isoline0(h); |
173 |
[cs,h]=contour(ttA(isA(n):ieA(n),n),-[1:nk-1],var(isA(n):ieA(n),:)',ccv); |
BB=colorbar; set(BB,'Position',xyB(nv,:)); |
174 |
%clabel(cs);isoline0(h); |
end |
175 |
colorbar; |
if nv == 1, title(['Avr ',titv]); xlabel(titT); end |
|
if nv == 1, title(['Avr ',titv]); end |
|
176 |
if nv == 2, title(['Std-Dev ',titv]); end |
if nv == 2, title(['Std-Dev ',titv]); end |
177 |
if nv == 3, title(['min ',titv]); ; end |
if nv == 3, title(['min ',titv]); ; end |
178 |
if nv == 4, title(['Max ',titv]); end |
if nv == 4, title(['Max ',titv]); end |
179 |
AA=axis; dAA=AA(4)-AA(3); |
AA=axis; dAA=AA(4)-AA(3); |
180 |
ttmn=sprintf('mn= %4.3g , Mx= %4.3g',mnV,MxV); |
ttmn=sprintf('mn= %4.3g , Mx= %4.3g',mnV,MxV); |
181 |
text(AA(1)*.4+AA(2)*.6,AA(3)-0.27*dAA,ttmn); |
text(AA(1)*.4+AA(2)*.6,AA(3)-0.20*dAA,ttmn); |
182 |
end ; xlabel(titT); |
end ; %xlabel(titT); |
183 |
end |
end |
184 |
%-- |
%-- |
185 |
axes('position',[.01,.01,.99,.99],'Visible','off'); |
axes('position',[.01,.01,.99,.99],'Visible','off'); |
186 |
T=text(0.5,0.97,titall); |
T=text(0.2,0.98,titall); |
187 |
set(T,'HorizontalAlignment','center','FontSize',12); |
set(T,'HorizontalAlignment','center','FontSize',12); |
188 |
Td=text(0.99,0.01,date); |
Td=text(0.01,0.01,date); |
189 |
set(Td,'HorizontalAlignment','right','FontSize',6); |
set(Td,'HorizontalAlignment','left','FontSize',6); |
190 |
%--- |
%--- |
191 |
end |
end |
192 |
|
|
193 |
%------------------- |
%------------------- |
194 |
end |
end |
195 |
|
|
196 |
%========================================================= |
%========================================================= |