41 |
%=============== |
%=============== |
42 |
|
|
43 |
if choiceStruct==2; |
if choiceStruct==2; |
|
budgName='budgHo' |
|
|
|
|
|
structIn=[]; |
|
|
% |
|
|
load release1/mat/diags_grid_parms.mat myparms; |
|
|
dirMat=['release1/mat/diags_set_' budgName '/']; |
|
|
fileMat=[budgName '_*.mat']; |
|
|
structIn.vars=diags_read_from_mat(dirMat,fileMat); |
|
|
|
|
|
%vector of time increment |
|
|
[listTimes]=diags_list_times({'release1/diags/BUDG/'},{'budg2d_hflux_set1'}); |
|
|
structIn.vars.dt=diff(listTimes); |
|
|
structIn.vars.dt=3600*structIn.vars.dt(1:end-1)'; |
|
|
% |
|
|
specs=structIn.vars.specs(1); |
|
|
if strcmp(specs.units,'W'); |
|
|
structIn.descr={'Heat budget in extensive form (in Watt, on C-Grid)'}; |
|
|
elseif strcmp(specs.units,'kg/s'); |
|
|
structIn.descr={'Mass budget in extensive form (in kg/s, on C-Grid)'}; |
|
|
elseif strcmp(specs.units,'g/s'); |
|
|
structIn.descr={'Salt budget in extensive form (in g/s, on C-Grid)'}; |
|
|
else; |
|
|
error('unknown budget'); |
|
|
end; |
|
|
structIn.descr={structIn.descr{:},'between',specs.top,'(top) and',specs.bottom,'(bottom)'}; |
|
|
% |
|
|
vars=[]; nv=length(vars)+1; |
|
|
vars(nv).fldName='tend'; vars(nv).longName='tendency term'; vars(nv).units=specs.units; nv=length(vars)+1; |
|
|
vars(nv).fldName='trU'; vars(nv).longName='horizontal transport'; vars(nv).units=specs.units; nv=length(vars)+1; |
|
|
vars(nv).fldName='trV'; vars(nv).longName='horizontal transport'; vars(nv).units=specs.units; nv=length(vars)+1; |
|
|
vars(nv).fldName='trWtop'; vars(nv).longName='vertical transport'; vars(nv).units=specs.units; nv=length(vars)+1; |
|
|
vars(nv).fldName='trWbot'; vars(nv).longName='vertical transport'; vars(nv).units=specs.units; nv=length(vars)+1; |
|
|
vars(nv).fldName='dt'; vars(nv).longName='time increment'; vars(nv).units='s'; nv=length(vars)+1; |
|
|
% |
|
|
structIn.defs=vars; |
|
|
% |
|
|
struct2nctiles('release1/',budgName,structIn,[90 90]); |
|
44 |
|
|
45 |
end; |
end; |
46 |
|
|