97 |
dirOut=fullfile(dirOut,budgName,filesep); |
dirOut=fullfile(dirOut,budgName,filesep); |
98 |
if ~isdir(dirOut); mkdir(dirOut); end; |
if ~isdir(dirOut); mkdir(dirOut); end; |
99 |
|
|
|
%time vectors |
|
|
[listTimes]=diags_list_times({[dirIn 'diags/BUDG/']},{'budg2d_hflux_set1'}); |
|
|
structIn.vars.t0=3600*listTimes(1:end-2); |
|
|
structIn.vars.t1=3600*listTimes(2:end-1); |
|
|
|
|
100 |
%load variable |
%load variable |
101 |
eval(['load ' dirIn dirMat 'diags_grid_parms.mat myparms;']); |
eval(['load ' dirIn dirMat 'diags_grid_parms.mat myparms;']); |
102 |
dirMat=[dirIn dirMat 'diags_set_' budgName '/']; |
dirMat=[dirIn dirMat 'diags_set_' budgName '/']; |
103 |
fileMat=[budgName '_*.mat']; |
fileMat=[budgName '_*.mat']; |
104 |
tic; structIn.vars=diags_read_from_mat(dirMat,fileMat,fldName); toc; |
tic; structIn.vars=diags_read_from_mat(dirMat,fileMat,fldName); toc; |
105 |
|
|
106 |
|
%time vectors |
107 |
|
[listTimes]=diags_list_times({[dirIn 'diags/BUDG/']},{'budg2d_hflux_set1'}); |
108 |
|
structIn.vars.t0=3600*listTimes(1:end-2); |
109 |
|
structIn.vars.t1=3600*listTimes(2:end-1); |
110 |
|
|
111 |
%rename trWtop as trW if adequate |
%rename trWtop as trW if adequate |
112 |
if strcmp(fldName,'trWtop'); |
if strcmp(fldName,'trWtop'); |
113 |
structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop); |
structIn.vars=setfield(structIn.vars,'trW',structIn.vars.trWtop); |