Skip to content
Snippets Groups Projects
Commit 0c61f5da authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

when reading netcdf file with version 1.5, var_LINCOEF_CONV was not set...

when reading netcdf file with version 1.5, var_LINCOEF_CONV was not set correctly to offset and slope
parent 76ef5695
No related branches found
No related tags found
No related merge requests found
......@@ -107,10 +107,22 @@ var ={'SSJT_LINCOEF', 'CNDC_LINCOEF', 'SSTP_LINCOEF'};
lin_type = {'offset','slope'};
lin_val = [0,1];
% loop over each variables
% ------------------------
for i = 1:numel(var)
% check if var_LINCOEF not empty
% -----------------------------------
if isempty(tsg.(var{i}))
for j = 1:tsg.dim.LINCOEF
tsg.(var{i})(j) = lin_val(j);
end
end
% check if var_LINCOEF_CONV not empty
% -----------------------------------
if isempty(tsg.([var{i} '_CONV']))
for j = 1:tsg.dim.LINCOEF
tsg.([var{i} '_CONV']) = ...
[tsg.([var{i} '_CONV']); padding(lin_type{j}, tsg.dim.COEF_CONV_SIZE)];
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment