Skip to content

Commit

Permalink
cosmetic changes within grid_add_time.m
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelforget committed Apr 2, 2019
1 parent a33fc8e commit 9f42030
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions gcmfaces_IO/grid_add_time.m
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
function addTime(timeVec,units)
%addTime Adds timeseries information to mygrid to use when writing netCDF
%files
function []=grid_add_time(timeVec,timeUnits)
% grid_add_time(timeVec,timeUnits) adds a time axis to mygrid for use e.g.
% when writing netcdf files via prep2nctiles.m
% Inputs:
% timeVec: a vector containing the timeseries. Must be same length as
% the number of time steps.
% units: units for timeseries (ex: 'days since 1992-1-1 0:0:0')
% timeVec: a vector containing the times associated with model output.
% Must be same length as the number of output files / records.
% timeUnits: units for the time axis (ex: 'days since 1992-1-1 0:0:0')
% Usage:
% addTime([14 45 74],'days since 1992-1-1 0:0:0') % 3 time steps 14,
% addTime([14 45 74],'days since 1992-1-1 0:0:0') % 3 records at 14,
% 45 and 74 days since 01/01/1992.

% Get Grid
% Bring mygrid to function scope
gcmfaces_global;

% Add time info to grid for writing to NCtiles
% Add time info to mygrid
mygrid.timeVec = timeVec;
mygrid.timeUnits = units;

mygrid.timeUnits = timeUnits;

end

0 comments on commit 9f42030

Please sign in to comment.