Skip to content

Commit 836d93d

Browse files
committed
Add full docstring to replicate_cycle
1 parent f65e01a commit 836d93d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

mpas_analysis/sea_ice/timeseries.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,34 @@ def seaice_timeseries(config, streamMap=None, variableMap=None):
350350

351351

352352
def replicate_cycle(ds, dsToReplicate, calendar):
353+
"""
354+
Replicates a periodic time series `dsToReplicate` to cover the timeframe
355+
of the dataset `ds`.
356+
357+
Parameters
358+
----------
359+
ds : dataset used to find the start and end time of the replicated cycle
360+
361+
dsToReplicate : dataset to replicate. The period of the cycle is the
362+
length of dsToReplicate plus the time between the first two time
363+
values (typically one year total).
364+
365+
calendar : {'gregorian', 'gregorian_noleap'}
366+
The name of one of the calendars supported by MPAS cores
367+
368+
Returns:
369+
--------
370+
dsShift : a cyclicly repeated version of `dsToReplicte` covering the range
371+
of time of `ds`.
372+
373+
Authors
374+
-------
375+
Xylar Asay-Davis, Milena Veneziani
376+
377+
Last Modified
378+
-------------
379+
02/22/2017
380+
"""
353381
dsStartTime = days_to_datetime(ds.Time.min(), calendar=calendar)
354382
dsEndTime = days_to_datetime(ds.Time.max(), calendar=calendar)
355383
repStartTime = days_to_datetime(dsToReplicate.Time.min(),

0 commit comments

Comments
 (0)