/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/ecco_v4/insitu_diags.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/profilesMatlabProcessing/ecco_v4/insitu_diags.m

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


Revision 1.5 - (hide annotations) (download)
Tue Jul 29 16:47:50 2014 UTC (10 years, 11 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65t, checkpoint65u
Changes since 1.4: +10 -1 lines
MITprof files will be used from the myenv.profiles directory
   or [dirMat '/profiles/output/'] is myenv.profiles is missing

1 gforget 1.3 function []=insitu_diags(dirMat,doComp,dirTex,nameTex);
2 gforget 1.2 %object: driver for insitu_misfit and insitu_cost
3 gforget 1.3 %inputs: dirMat is the directory where diagnozed .mat files will be saved
4 gforget 1.2 % -> set it to '' to use the default [dirModel 'mat/']
5     % doComp states whether to compute (1) or display (0)
6     % dirTex is the directory where tex and fig files will be created
7 gforget 1.3 % nameTex is the tex file name (default : 'myPlots')
8 gforget 1.5 %
9     %notes : MITprof files will be used from the myenv.profiles directory
10     % or [dirMat '/profiles/output/'] is myenv.profiles is missing
11    
12     gcmfaces_global;
13 gforget 1.1
14 gforget 1.3 dirMat=[dirMat '/'];
15 gforget 1.2
16 gforget 1.5 if isfield(myenv,'profiles');
17     dirData=myenv.profiles;
18     else;
19     dirData=[dirMat '/profiles/output/'];
20     end;
21 gforget 1.4 while ~isdir(dirData)&doComp;
22 gforget 1.3 fprintf(['directory : ' dirData '\n'])
23     dirData=input(['does not exist. Specify directory of nc file : \n']);
24     end;
25    
26     dirMat={'dirMat',dirMat};
27     dirData={'dirData',dirData};
28 gforget 1.2
29     if isempty(who('dirTex'));
30 gforget 1.3 addToTex={'addToTex',0}; dirTex={'dirTex',''}; nameTex={'nameTex',''};
31 gforget 1.2 else;
32     if ~ischar(dirTex); error('mis-specified dirTex'); end;
33     if dirTex(1)~='/'; dirTex=[pwd '/' dirTex]; end; %make full path
34 gforget 1.3 addToTex={'addToTex',1}; dirTex={'dirTex',[dirTex '/']};
35     if isempty(who('nameTex')); nameTex='myPlots'; end;
36     nameTex={'nameTex',nameTex};
37 gforget 1.2 end;
38 gforget 1.1
39     if doComp;
40 gforget 1.3 insitu_misfit(1,dirData,dirMat);
41     insitu_cost(1,dirData,dirMat);
42 gforget 1.1 else;
43 gforget 1.3 insitu_misfit(0,dirMat,addToTex,dirTex,nameTex);
44     insitu_cost(0,dirMat,addToTex,dirTex,nameTex);
45 gforget 1.1 end;
46    

  ViewVC Help
Powered by ViewVC 1.1.22