--- MITgcm_contrib/jmc_script/grph_StD.m 2008/05/29 23:47:13 1.1 +++ MITgcm_contrib/jmc_script/grph_StD.m 2008/11/08 18:26:09 1.3 @@ -1,20 +1,18 @@ -Nexp=3; - Nc=4; nc=Nc*ones(1,Nexp); prefix='stDiag'; - namA(1,1:Nc)='r06a'; - namA(2,1:Nc)='r07a'; - namA(3,1:Nc)='r07b'; + prefix='dynStD'; + namA={'r16b','r17a'}; +%namA={'r17a'}; + Nexp=size(namA,2); %- +%namA(2)={'r16a'}; -% $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/jmc_script/grph_StD.m,v 1.1 2008/05/29 23:47:13 jmc Exp $ +% $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/jmc_script/grph_StD.m,v 1.3 2008/11/08 18:26:09 jmc Exp $ % $Name: $ nItMx=1e10*ones(1,Nexp); %nItMx(3)=11; -%nItMx=360*ones(1,Nexp); -namLg=namA ; for n=1:Nexp, namLg(n,find(namLg(n,:)=='_'))='-'; end +nItMx=2400*ones(1,Nexp); +namLg=namA ; namLg=strrep(namLg,'_','\_'); %----------- -%- ngEn = Nb of Energy plot: = 2 or = 4 ; -ngEn=2; %- test if the variable krd is define : if size(who('krd'),1) > 0, fprintf('krd is defined and = %i \n',krd); @@ -23,16 +21,18 @@ end if krd > 0, %- define list of fields to read in: + clear listV ; %listV={'Eta','U','V','W','T','S','DETADT2','RELHUM','Phi'}; -%listV={'Eta','U','V','W','T','S','CONVADJ','DETADT2'}; + listV={'Eta','W','T','S','CONVADJ','DETADT2'}; +%listV={'Eta','UE_VEL_C','VN_VEL_C','W','T','DETADT2','Phi'}; %- or take all them: -clear listV ; listV='all_flds'; +%clear listV ; listV='all_flds'; %----------- %- start to read the longest record: n=1; rf=-1; if strcmp(char(listV),'all_flds'), rf=0; end [ntA(n),rList,tim,vv1,listV] = ... - read_StD(prefix,namA(n,1:nc(n)),listV); + read_StD(prefix,namA(n),listV); nIt=ntA(n); nk=size(vv1,1); nRg=size(vv1,3); %- set global dims: & load vvA --> vvB nbV=size(listV,2); @@ -42,7 +42,7 @@ %---- for n=2:Nexp, [ntA(n),rList,tim,vv1,listV] = ... - read_StD(prefix,namA(n,1:nc(n)),listV); + read_StD(prefix,namA(n),listV); nIt=ntA(n); nk=size(vv1,1); nRg=size(vv1,3); if (nrec < nIt), fprintf('\n'); @@ -72,7 +72,7 @@ ttax1=0 ; ttax2=0 ; ttay=zeros(nbV,2); %-- fixed time axis bound : -% ttax1=3; ttax2=3.3; +% ttax1=15.; ttax2=20.; %-- fixed Y axis bound : % ttay(4,:)=[0 0.6]; %----------- @@ -90,9 +90,9 @@ isA=ones(1,Nexp); ieA=ntA; %- limit the length : for search of isA <->1500y: find(ttA(:,2) == 1500) %isA=isA*31 ; % drop the 1rst mnth (1 Monitor/d) -%isA=isA*36 ; % drop the 1rst year (1 Monitor/10d) +isA=isA*2 ; % drop the 1rst mnth (1 Monitor/30d) %isA(1)=31 ; isA(2)=4 ; % drop the 1rst mnth -%ieA(:)=360; isA(:)=1; +%ieA(:)=240; %isA(:)=1; linA(1,:)='k-'; % ieA(1)=60 ; % ieA(1)=1152 ; linA(2,:)='b-'; @@ -103,7 +103,8 @@ ieA=min(ieA,nItMx); %titall='AIM , Cubic-G (32x32) , cpl-FM Forcing' ; -titall='Global Ocean, Cubic-G (32x32) , NCEP Forc (2)' ; +titall='Global Ocean, Cubic-G (32x32) , CORE Forc (2)' ; +%titall='Dyncore test-case 5 (cs-32)' ; %========================================================= @@ -113,7 +114,7 @@ vv1=vvA(:,:,:,:,ng,:); namV=char(listV(ng)); titv=strrep(namV,'_','\_'); %if strcmp(namV,'Eta'), vv1=vv1/100; titv='Eta [mb]'; end -%if strcmp(namV,'T'), kl=1; end +%if strcmp(namV,'T'), kl=1; end % <-- to get surf.Temp %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); @@ -122,10 +123,11 @@ if flag == 1 %-- 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 - var=squeeze(vv1(1+kl,:,1,:,:)); - dd=squeeze(max(var)-min(var)); av=squeeze(mean(var)); - if Nexp == 1, av=av'; dd=dd'; end ; + var=squeeze(vv1(1+kl,:,1,:,:)); dd=zeros(5,Nexp); av=zeros(5,Nexp); + for n=1:Nexp, + dd(:,n)=max(var(isA(n):ieA(n),:,n))-min(var(isA(n):ieA(n),:,n)); + av(:,n)=mean(var(isA(n):ieA(n),:,n)); + end for nv=1:4, subplot(410+nv); ttmn=' Mx-mn:'; ttav=' Av:'; for n=1:Nexp, @@ -134,16 +136,14 @@ ttmn=sprintf([ttmn,' %2.1e ;'],dd(nv,n)); ttav=sprintf([ttav,' %3.2e ;'],av(nv,n)); end ; hold off ; - if ttax1 < ttax2, AA=axis; axis([ttax1 ttax2 AA(3:4)]); end; AA=axis ; dAA=AA(4)-AA(3); if AA(3)*AA(4) <= 0, AA(3)=min(AA(3),-dAA/10); AA(4)=max(AA(4),dAA/10); end + if ttax1 < ttax2, AA(1)=ttax1; AA(2)=ttax2; end; axis(AA); grid ; - %AA=axis; text(AA(1)*.9+AA(2)*.1,AA(3)*0.1+AA(4)*0.9,ttmn); if nv == 1, title(['Avr ',titv,' ',ttmn]); end if nv == 2, title(['Std-Dev ',titv,' ',ttav]); end - if nv == 3, title(['min ',titv,' ',ttav]); legend(namLg(1:Nexp,:),0); end + if nv == 3, title(['min ',titv,' ',ttav]); legend(namLg,0); end if nv == 4, title(['Max ',titv,' ',ttav]); end - %if nv == 2, title(['Del-2 ',titv,' ',ttav]); end end ; xlabel(titT); %-- axes('position',[.01,.01,.99,.99],'Visible','off');