-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cosmetic changes within grid_add_time.m
- Loading branch information
1 parent
a33fc8e
commit 9f42030
Showing
1 changed file
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|