/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_diags/diags_set_F.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/gcmfaces_diags/diags_set_F.m

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


Revision 1.12 - (show annotations) (download)
Mon Feb 8 23:37:57 2016 UTC (9 years, 5 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65x, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, HEAD
Changes since 1.11: +27 -27 lines
- rename cont as tend in calc_budget_????.m

1
2 %select kBudget:
3 if ~isempty(setDiagsParams);
4 kBudget=setDiagsParams{1};
5 else;
6 kBudget=1;
7 end;
8
9 %override default file name:
10 %---------------------------
11 tmp1=setDiags;
12 if kBudget>1;
13 tmp1=sprintf('F%02i',kBudget);
14 end;
15 fileMat=['diags_set_' tmp1];
16
17 if userStep==1;%diags to be computed
18 listDiags=['glo_vol_ocn glo_vol_tot glo_vol_ice glo_bp'];
19 listDiags=[listDiags ' glo_heat_ocn glo_heat_tot glo_heat_ice'];
20 listDiags=[listDiags ' glo_salt_ocn glo_salt_tot glo_salt_ice'];
21 if sum([90 1170]~=mygrid.ioSize)==0;
22 listDiags=[listDiags ' gsbox_vol_ocn gsbox_vol_tot gsbox_vol_ice gsbox_bp'];
23 listDiags=[listDiags ' arctic_vol_ocn arctic_vol_tot arctic_vol_ice arctic_bp'];
24 listDiags=[listDiags ' gsbox_heat_ocn gsbox_heat_tot gsbox_heat_ice'];
25 listDiags=[listDiags ' arctic_heat_ocn arctic_heat_tot arctic_heat_ice'];
26 listDiags=[listDiags ' gsbox_salt_ocn gsbox_salt_tot gsbox_salt_ice'];
27 listDiags=[listDiags ' arctic_salt_ocn arctic_salt_tot arctic_salt_ice'];
28 end;
29
30 elseif userStep==2;%input files and variables
31 listFlds={ 'ETAN','SIheff','SIhsnow','THETA ','SALT ','PHIBOT','geothFlux'};
32 listFlds={listFlds{:},'SIatmFW ','oceFWflx','SItflux','TFLUX','SFLUX','oceSPflx','SRELAX'};
33 listFlds={listFlds{:},'oceQnet ','SIatmQnt','SIaaflux','SIsnPrcp','SIacSubl'};
34 listFlds={listFlds{:},'TRELAX','WTHMASS','WSLTMASS','oceSflux','oceQsw','oceSPtnd'};
35 if kBudget>1;
36 listFlds={listFlds{:},'ADVr_TH','DFrE_TH','DFrI_TH','ADVr_SLT','DFrE_SLT','DFrI_SLT','WVELMASS'};
37 end;
38 listFlds={listFlds{:},'SDIAG1','SDIAG2','SDIAG3'};
39 listFlds={listFlds{:},'UVELMASS','VVELMASS','AB_gT','AB_gS'};
40 listFlds={listFlds{:},'ADVx_TH ','ADVy_TH ','DFxE_TH ','DFyE_TH '};
41 listFlds={listFlds{:},'ADVx_SLT','ADVy_SLT','DFxE_SLT','DFyE_SLT'};
42 listFlds={listFlds{:},'ADVxHEFF','ADVyHEFF','DFxEHEFF','DFyEHEFF'};
43 listFlds={listFlds{:},'ADVxSNOW','ADVySNOW','DFxESNOW','DFyESNOW'};
44 listFldsNames=deblank(listFlds);
45 %
46 listFiles={'rate_budg2d_snap_set1','budg2d_hflux_set1','budg2d_zflux_set1','budg2d_zflux_set2'};
47 if kBudget==1;
48 listFiles={listFiles{:},'rate_budg2d_snap_set2','budg2d_hflux_set2','geothermalFlux'};
49 else;
50 tmp1=sprintf('rate_budg2d_snap_set3_%02i',kBudget);
51 tmp2=sprintf('budg2d_zflux_set3_%02i',kBudget);
52 tmp3=sprintf('budg2d_hflux_set3_%02i',kBudget);
53 tmp4=sprintf('geothermalFlux_%02i',kBudget);
54 listFiles={listFiles{:},tmp1,tmp2,tmp3,tmp4};
55 end;
56 listSubdirs={[dirMat 'BUDG/' ],[dirMat '../BUDG/' ],[dirModel 'diags/BUDG/'],[dirModel 'diags/']};
57
58 elseif userStep==3;%computational part;
59
60 %preliminary tests
61 test1=isempty(dir([dirModel 'diags/BUDG/budg2d_snap_set1*']));
62 test2=isempty(dir([dirMat 'BUDG/rate_budg2d_snap_set1*']))&...
63 isempty(dir([dirMat '../BUDG/rate_budg2d_snap_set1*']));
64
65 if (strcmp(setDiags,'F')&test1&test2);
66 fprintf('\n abort : global and regional budgets, due to missing \n');
67 fprintf(['\n ' dirModel 'diags/BUDG/budg2d_snap_set1* \n']);
68 return;
69 end;
70
71 if (strcmp(setDiags,'F')&test2);
72 fprintf('\n abort : global and regional budgets, due to missing \n');
73 fprintf(['\n ' dirModel 'diags/BUDG/rate_budg2d_snap_set1* \n']);
74 return;
75 end;
76
77 %override default file name:
78 %---------------------------
79 tmp1=setDiags;
80 if kBudget>1;
81 tmp1=sprintf('F%02i',kBudget);
82 end;
83 fileMat=['diags_set_' tmp1 '_' num2str(tt) '.mat'];
84
85 %fill in optional fields:
86 %------------------------
87 if isempty(who('TRELAX')); TRELAX=0*mygrid.XC; end;
88 if isempty(who('SRELAX')); SRELAX=0*mygrid.XC; end;
89 if isempty(who('AB_gT')); AB_gT=0*mygrid.XC; end;
90 if isempty(who('AB_gS')); AB_gS=0*mygrid.XC; end;
91 if isempty(who('oceSPtnd')); oceSPtnd=0*mygrid.XC; end;
92 if isempty(who('oceSPflx')); oceSPflx=0*mygrid.XC; end;
93 if isempty(who('PHIBOT')); PHIBOT=0*mygrid.XC; end;
94 if isempty(who('geothFlux')); geothFlux=0; end;
95
96 %aliases from development phase (applies to 2012 core runs)
97 %---------------------------------------------------------
98 if ~isempty(who('SDIAG1')); SRELAX=SDIAG1; end;
99 if ~isempty(who('SDIAG2')); SIatmFW=SDIAG2; end;
100 if ~isempty(who('SDIAG3')); SItflux=SDIAG3; end;
101
102
103 %=======MASS=========
104
105 [budgMo,budgMi,budgMoi]=calc_budget_mass(kBudget);
106
107 %bottom pressure for comparison:
108 bp=myparms.rhoconst/9.81*PHIBOT;
109
110 %compute global integrals:
111 %-------------------------
112 msk=mygrid.mskC(:,:,kBudget);
113 tmp1=calc_mskmean_T(budgMoi,msk,'extensive');
114 glo_vol_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
115 tmp1=calc_mskmean_T(budgMo,msk,'extensive');
116 glo_vol_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
117 tmp1=calc_mskmean_T(budgMi,msk,'extensive');
118 glo_vol_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
119 glo_bp=nansum(bp.*msk.*mygrid.RAC)/nansum(msk.*mygrid.RAC);
120
121 if sum([90 1170]~=mygrid.ioSize)==0;
122 %compute gsbox integrals:
123 msk=mygrid.mskC(:,:,kBudget).*v4_basin('atl').*(mygrid.YC>=26&mygrid.YC<=45);
124 tmp1=calc_mskmean_T(budgMoi,msk,'extensive');
125 gsbox_vol_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
126 tmp1=calc_mskmean_T(budgMo,msk,'extensive');
127 gsbox_vol_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
128 tmp1=calc_mskmean_T(budgMi,msk,'extensive');
129 gsbox_vol_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
130 gsbox_bp=nansum(bp.*msk.*mygrid.RAC)/nansum(msk.*mygrid.RAC);
131
132 %and arctic integrals:
133 msk=mygrid.mskC(:,:,kBudget).*v4_basin('arct');
134 tmp1=calc_mskmean_T(budgMoi,msk,'extensive');
135 arctic_vol_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
136 tmp1=calc_mskmean_T(budgMo,msk,'extensive');
137 arctic_vol_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
138 tmp1=calc_mskmean_T(budgMi,msk,'extensive');
139 arctic_vol_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
140 arctic_bp=nansum(bp.*msk.*mygrid.RAC)/nansum(msk.*mygrid.RAC);
141 end;
142
143 %=======HEAT=======
144
145 [budgHo,budgHi,budgHoi]=calc_budget_heat(kBudget);
146
147 %compute global integrals:
148 %-------------------------
149 msk=mygrid.mskC(:,:,kBudget);
150 tmp1=calc_mskmean_T(budgHoi,msk,'extensive');
151 glo_heat_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
152 tmp1=calc_mskmean_T(budgHo,msk,'extensive');
153 glo_heat_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
154 tmp1=calc_mskmean_T(budgHi,msk,'extensive');
155 glo_heat_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
156
157 if sum([90 1170]~=mygrid.ioSize)==0;
158 %compute gsbox integrals:
159 msk=mygrid.mskC(:,:,kBudget).*v4_basin('atl').*(mygrid.YC>=26&mygrid.YC<=45);
160 tmp1=calc_mskmean_T(budgHoi,msk,'extensive');
161 gsbox_heat_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
162 tmp1=calc_mskmean_T(budgHo,msk,'extensive');
163 gsbox_heat_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
164 tmp1=calc_mskmean_T(budgHi,msk,'extensive');
165 gsbox_heat_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
166
167 %and arctic integrals:
168 msk=mygrid.mskC(:,:,kBudget).*v4_basin('arct');
169 tmp1=calc_mskmean_T(budgHoi,msk,'extensive');
170 arctic_heat_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
171 tmp1=calc_mskmean_T(budgHo,msk,'extensive');
172 arctic_heat_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
173 tmp1=calc_mskmean_T(budgHi,msk,'extensive');
174 arctic_heat_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
175 end;
176
177 %=======SALT=======
178
179 [budgSo,budgSi,budgSoi]=calc_budget_salt(kBudget);
180
181 %compute global integrals:
182 %-------------------------
183 msk=mygrid.mskC(:,:,kBudget);
184 tmp1=calc_mskmean_T(budgSoi,msk,'extensive');
185 glo_salt_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
186 tmp1=calc_mskmean_T(budgSo,msk,'extensive');
187 glo_salt_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
188 tmp1=calc_mskmean_T(budgSi,msk,'extensive');
189 glo_salt_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
190
191 if sum([90 1170]~=mygrid.ioSize)==0;
192 %compute gsbox integrals:
193 msk=mygrid.mskC(:,:,kBudget).*v4_basin('atl').*(mygrid.YC>=26&mygrid.YC<=45);
194 tmp1=calc_mskmean_T(budgSoi,msk,'extensive');
195 gsbox_salt_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
196 tmp1=calc_mskmean_T(budgSo,msk,'extensive');
197 gsbox_salt_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
198 tmp1=calc_mskmean_T(budgSi,msk,'extensive');
199 gsbox_salt_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
200
201 %and arctic integrals:
202 msk=mygrid.mskC(:,:,kBudget).*v4_basin('arct');
203 tmp1=calc_mskmean_T(budgSoi,msk,'extensive');
204 arctic_salt_tot=[tmp1.tend;tmp1.hconv;tmp1.zconv];
205 tmp1=calc_mskmean_T(budgSo,msk,'extensive');
206 arctic_salt_ocn=[tmp1.tend;tmp1.hconv;tmp1.zconv];
207 tmp1=calc_mskmean_T(budgSi,msk,'extensive');
208 arctic_salt_ice=[tmp1.tend;tmp1.hconv;tmp1.zconv];
209 end;
210
211 %===================== COMPUTATIONAL SEQUENCE ENDS =========================%
212 %===================== PLOTTING SEQUENCE BEGINS =========================%
213
214 elseif userStep==-1&multiBasins==1;%plotting
215
216 if isempty(setDiagsParams);
217 choicePlot={'all'};
218 elseif isnumeric(setDiagsParams{1})&length(setDiagsParams)==1;
219 choicePlot={'all'};
220 elseif isnumeric(setDiagsParams{1});
221 choicePlot={setDiagsParams{2:end}};
222 else;
223 choicePlot=setDiagsParams;
224 end;
225
226 tt=[1:length(alldiag.listTimes)];
227 TT=alldiag.listTimes(tt);
228 nt=length(TT);
229
230 if (kBudget==1)&(sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'mass')));
231
232 %1.1) ocean+seaice mass budgets
233 %------------------------------
234 figureL;
235 %global volume budget:
236 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_vol_tot,'kg/m2','Global Mean Mass (incl. ice)');
237 %add bp:
238 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.glo_bp);
239 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
240 %gsboxern hemisphere budget:
241 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_vol_tot,'kg/m2','Gulf Stream Box Mass (incl. ice)');
242 %add bp:
243 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.gsbox_bp);
244 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
245 %arcticern hemisphere budget:
246 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_vol_tot,'kg/m2','Arctic Mass (incl. ice)');
247 %add bp:
248 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.arctic_bp);
249 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
250 %add to tex file
251 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
252 myCaption={myCaption{:},'mass budget (ocean+ice) in kg/m2.'};
253 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
254
255 %1.2) ice mass budgets
256 %---------------------
257 figureL;
258 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_vol_ice,'kg/m2','Global Mean Mass (only ice)');
259 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.glo_bp);
260 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
261 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_vol_ice,'kg/m2','Gulf Stream Box Mass (only ice)');
262 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.gsbox_bp);
263 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
264 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_vol_ice,'kg/m2','Arctic Mass (only ice)');
265 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.arctic_bp);
266 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
267 %add to tex file
268 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
269 myCaption={myCaption{:},'mass budget (ice only) in kg/m2.'};
270 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
271
272 end;
273
274 if (sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'mass')));
275
276 %1.3) ocean mass budgets
277 %-----------------------
278 figureL;
279 %global volume budget:
280 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_vol_ocn,'kg/m2','Global Mean Mass (only ocean)');
281 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.glo_bp);
282 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
283 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_vol_ocn,'kg/m2','Gulf Stream Box Mass (only ocean)');
284 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.gsbox_bp);
285 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
286 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_vol_ocn,'kg/m2','Arctic Mass (only ocean)');
287 dt=median(diff(TT))*86400; bp=dt*cumsum(alldiag.arctic_bp);
288 plot(TT,bp,'k'); aa=legend; bb=get(aa,'String'); bb={bb{:},'bp'}; legend(bb,'Orientation','horizontal');
289 %add to tex file
290 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
291 myCaption={myCaption{:},'mass budget (ocean only) in kg/m2.'};
292 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
293
294 end;
295
296 if (kBudget==1)&(sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'heat')));
297
298 %2.1) ocean+seaice heat budgets
299 %------------------------------
300 figureL;
301 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_heat_tot,'J/m2','Global Mean Ocean Heat (incl. ice)');
302 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_heat_tot,'J/m2','Gulf Stream Box Ocean Heat (incl. ice)');
303 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_heat_tot,'J/m2','Arctic Ocean Heat (incl. ice)');
304 %add to tex file
305 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
306 myCaption={myCaption{:},'heat budget (ocean+ice) in J/m2.'};
307 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
308
309 %2.2) ice heat budgets
310 %---------------------
311 figureL;
312 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_heat_ice,'J/m2','Global Mean Ocean Heat (only ice)');
313 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_heat_ice,'J/m2','Gulf Stream Box Ocean Heat (only ice)');
314 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_heat_ice,'J/m2','Arctic Ocean Heat (only ice)');
315 %add to tex file
316 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
317 myCaption={myCaption{:},'heat budget (ice only) in J/m2.'};
318 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
319
320 end;
321
322 if (sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'heat')));
323
324 %2.3) ocean heat budgets
325 %-----------------------
326 figureL;
327 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_heat_ocn,'J/m2','Global Mean Ocean Heat (only ocean)');
328 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_heat_ocn,'J/m2','Gulf Stream Box Ocean Heat (only ocean)');
329 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_heat_ocn,'J/m2','Arctic Ocean Heat (only ocean)');
330 %add to tex file
331 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
332 myCaption={myCaption{:},'heat budget (ocean only) in J/m2.'};
333 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
334
335 end;
336
337 if (kBudget==1)&(sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'salt')));
338
339 %3.1) ocean+seaice salt budgets
340 %------------------------------
341 figureL;
342 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_salt_tot,'g/m2','Global Mean Ocean Salt (incl. ice)');
343 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_salt_tot,'g/m2','Gulf Stream Box Ocean Salt (incl. ice)');
344 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_salt_tot,'g/m2','Arctic Ocean Salt (incl. ice)');
345 %add to tex file
346 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
347 myCaption={myCaption{:},'salt budget (ocean+ice) in g/m2.'};
348 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
349
350 %2.2) ice salt budgets
351 %---------------------
352 figureL;
353 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_salt_ice,'g/m2','Global Mean Ocean Salt (only ice)');
354 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_salt_ice,'g/m2','Gulf Stream Box Ocean Salt (only ice)');
355 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_salt_ice,'g/m2','Arctic Ocean Salt (only ice)');
356 %add to tex file
357 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
358 myCaption={myCaption{:},'salt budget (ice only) in g/m2.'};
359 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
360
361 end;
362
363
364 if (sum(strcmp(choicePlot,'all'))|sum(strcmp(choicePlot,'salt')));
365
366 %3.3) ocean salt budgets
367 %-----------------------
368 figureL;
369 subplot(3,1,1); disp_budget_mean_mask(TT,alldiag.glo_salt_ocn,'g/m2','Global Mean Ocean Salt (only ocean)');
370 subplot(3,1,2); disp_budget_mean_mask(TT,alldiag.gsbox_salt_ocn,'g/m2','Gulf Stream Box Ocean Salt (only ocean)');
371 subplot(3,1,3); disp_budget_mean_mask(TT,alldiag.arctic_salt_ocn,'g/m2','Arctic Ocean Salt (only ocean)');
372 %add to tex file
373 myCaption={myYmeanTxt,' global (upper) gsbox (mid) and arctic (lower), '};
374 myCaption={myCaption{:},'salt budget (ocean only) in g/m2.'};
375 if addToTex&multiTimes; write2tex(fileTex,2,myCaption,gcf); elseif ~multiTimes; close; end;
376
377 end;
378
379 end;

  ViewVC Help
Powered by ViewVC 1.1.22