/[MITgcm]/MITgcm_contrib/jmc_script/grph_StD.m
ViewVC logotype

Diff of /MITgcm_contrib/jmc_script/grph_StD.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

--- MITgcm_contrib/jmc_script/grph_StD.m	2008/05/29 23:47:13	1.1
+++ MITgcm_contrib/jmc_script/grph_StD.m	2008/10/08 18:18:04	1.2
@@ -1,17 +1,17 @@
-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='stDiag';
+ namA={'mG_2','vmUpW'}; 
+%namA=char{'r525','r526','r527','r528'}; 
+ Nexp=size(namA,2);
 %-
+%namA(2)={'r528'};
 
-% $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.2 2008/10/08 18:18:04 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=60*ones(1,Nexp);
+namLg=namA ; namLg=strrep(namLg,'_','\_');
 %-----------
 %- ngEn = Nb of Energy plot: = 2 or = 4  ;
 ngEn=2;
@@ -25,14 +25,15 @@
 %- define list of fields to read in:
 %listV={'Eta','U','V','W','T','S','DETADT2','RELHUM','Phi'};
 %listV={'Eta','U','V','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 +43,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');
@@ -66,13 +67,13 @@
 end
 if krd ~= 0,
  ttA=squeeze(tiA(:,2,:));
- ttA=ttA/86400; titT='days'; ttA=ttA/30 ; titT='month'; ttA=ttA/12 ; titT='year';
+ ttA=ttA/86400; titT='days'; %ttA=ttA/30 ; titT='month'; ttA=ttA/12 ; titT='year';
 end
 %=========================================================
 
 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];
 %-----------
@@ -104,6 +105,7 @@
 ieA=min(ieA,nItMx);
 %titall='AIM , Cubic-G (32x32) , cpl-FM Forcing' ; 
 titall='Global Ocean, Cubic-G (32x32) , NCEP Forc (2)' ;
+%titall='Dyncore test-case 5 (cs-32)' ;
 
 %=========================================================
  
@@ -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');

 

  ViewVC Help
Powered by ViewVC 1.1.22