/[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.5 - (show 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 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 %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
14 dirMat=[dirMat '/'];
15
16 if isfield(myenv,'profiles');
17 dirData=myenv.profiles;
18 else;
19 dirData=[dirMat '/profiles/output/'];
20 end;
21 while ~isdir(dirData)&doComp;
22 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
29 if isempty(who('dirTex'));
30 addToTex={'addToTex',0}; dirTex={'dirTex',''}; nameTex={'nameTex',''};
31 else;
32 if ~ischar(dirTex); error('mis-specified dirTex'); end;
33 if dirTex(1)~='/'; dirTex=[pwd '/' dirTex]; end; %make full path
34 addToTex={'addToTex',1}; dirTex={'dirTex',[dirTex '/']};
35 if isempty(who('nameTex')); nameTex='myPlots'; end;
36 nameTex={'nameTex',nameTex};
37 end;
38
39 if doComp;
40 insitu_misfit(1,dirData,dirMat);
41 insitu_cost(1,dirData,dirMat);
42 else;
43 insitu_misfit(0,dirMat,addToTex,dirTex,nameTex);
44 insitu_cost(0,dirMat,addToTex,dirTex,nameTex);
45 end;
46

  ViewVC Help
Powered by ViewVC 1.1.22