Commit e7302bbe authored by Pierre Cazenave's avatar Pierre Cazenave

Make sure we are able to provide data for the requested period.

parent ad5a1d14
......@@ -98,6 +98,8 @@ end
% Create year and month arrays for the period we've been given.
[yyyy, mm, dd, HH, MM, SS] = mjulian2greg(modelTime);
assert(min(yyyy) >= 1979, 'CFSv2 data not available prior to 1979')
assert(max(yyyy) <= 2009, 'CFSv2 data not available after 2009')
dates = datenum([yyyy; mm; dd; HH; MM; SS]');
serial = dates(1):dates(2);
[years, months, ~, ~, ~, ~] = datevec(serial);
......
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