Commit 5b0eb494 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix error converting the time from Gregorian to Modified Julian Day

parent afd94b7f
......@@ -66,7 +66,7 @@ eratimehours = datevec((double(eratimehours)/24) + datenum('1900-01-01 00:00:0.0
% Convert the ERA times to Modified Julian Date.
era.time = greg2mjulian(eratimehours(:,1), eratimehours(:,2),...
eratimehours(:,3), eratimehours(:,4), eratimehours(:,5),...
eratimehours(:,1));
eratimehours(:,6));
if(ftbverbose);
fprintf('beg time of ERA Interim data %04i/%02i/%02i %02i:%02i:%02i\n', eratimehours(1,:));
......
......@@ -72,7 +72,7 @@ nceptimehours = netcdf.getVar(nc_u10, time_varid);
nceptimedays = datevec((nceptimehours/24) + (datenum(1, 0, -1)));
ncep.time = greg2mjulian(nceptimedays(:,1), nceptimedays(:,2),...
nceptimedays(:,3), nceptimedays(:,4), nceptimedays(:,5),...
nceptimedays(:,1));
nceptimedays(:,6));
if(ftbverbose);
fprintf('beg time of NCEP data %04i/%02i/%02i %02i:%02i:%02i\n',nceptimedays(1,:));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment