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

Contents 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.4 - (show annotations) (download)
Sat Jan 18 23:42:50 2014 UTC (11 years, 6 months ago) by gforget
Branch: MAIN
Changes since 1.3: +1 -1 lines
- insitu_cost.m : bug fix wrt listBas, allow for 'mat/cost/' subdir
- insitu_diags.m : no need to 'profiles/output/' for display phase
- insitu_misfit.m : allow for 'mat/cost/' subdir

1 function []=insitu_diags(dirMat,doComp,dirTex,nameTex);
2 %object: driver for insitu_misfit and insitu_cost
3 %inputs: dirMat is the directory where diagnozed .mat files will be saved
4 % -> 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 % nameTex is the tex file name (default : 'myPlots')
8
9 dirMat=[dirMat '/'];
10
11 dirData=[dirMat '/profiles/output/'];
12 while ~isdir(dirData)&doComp;
13 fprintf(['directory : ' dirData '\n'])
14 dirData=input(['does not exist. Specify directory of nc file : \n']);
15 end;
16
17 dirMat={'dirMat',dirMat};
18 dirData={'dirData',dirData};
19
20 if isempty(who('dirTex'));
21 addToTex={'addToTex',0}; dirTex={'dirTex',''}; nameTex={'nameTex',''};
22 else;
23 if ~ischar(dirTex); error('mis-specified dirTex'); end;
24 if dirTex(1)~='/'; dirTex=[pwd '/' dirTex]; end; %make full path
25 addToTex={'addToTex',1}; dirTex={'dirTex',[dirTex '/']};
26 if isempty(who('nameTex')); nameTex='myPlots'; end;
27 nameTex={'nameTex',nameTex};
28 end;
29
30 if doComp;
31 insitu_misfit(1,dirData,dirMat);
32 insitu_cost(1,dirData,dirMat);
33 else;
34 insitu_misfit(0,dirMat,addToTex,dirTex,nameTex);
35 insitu_cost(0,dirMat,addToTex,dirTex,nameTex);
36 end;
37

  ViewVC Help
Powered by ViewVC 1.1.22