It is not about the ROMS code, but about the matlab code that is included tha package.
In the recent update, the scripts that compute the standard deviation have been changed a lot.
But mis-position of this one line causes very different result.
For the line 204-222 in d_std.m file look like this.
Code: Select all
for fval = field_list,
field = char(fval); % convert cell to string
field_avg = [field, '_avg']; % average field
field_std = [field, '_std']; % standard deviation field
try,
F = nc_read(ncfile, field, rec);
Rcount = Rcount + 1;
catch,
disp([' D_STD: error while processing, rec = ', num2str(rec)]);
disp([' for variable : ', field]);
disp([' in file: ', HisFile1]);
return
end,
S.(field_avg) = S.(field_avg) + F;
S.(field_std) = S.(field_std) + F.^2;
end,
So, this seems to be changed like this
Code: Select all
for fval = field_list,
field = char(fval); % convert cell to string
field_avg = [field, '_avg']; % average field
field_std = [field, '_std']; % standard deviation field
try,
F = nc_read(ncfile, field, rec);
catch,
disp([' D_STD: error while processing, rec = ', num2str(rec)]);
disp([' for variable : ', field]);
disp([' in file: ', HisFile1]);
return
end,
S.(field_avg) = S.(field_avg) + F;
S.(field_std) = S.(field_std) + F.^2;
end,
Rcount = Rcount + 1;
Thank you.
Hajoon