Skip to content

Commit

Permalink
Update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBryan51 committed Nov 28, 2023
1 parent 60ea3f6 commit 65fd559
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion payu/models/cable.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,35 @@


def _get_forcing_path(variable, year, input_dir, offset=None, repeat=None):
"""Return the met forcing file path for a given variable and year."""
"""Return the met forcing file path for a given variable and year.
Parameters
----------
variable : str
Variable name.
year : int
Year value.
input_dir : str
Path to work input directory.
offset : list of int, optional
Offset the current simulation year from `offset[0]` to `offset[1]`
before inferring the met forcing path.
repeat : list of int, optional
Constrain the current simulation year between `repeat[0]` and
`repeat[1]` (inclusive) before inferring the met forcing path. If the
year is outside the interval, the constrained year repeats over the
interval.
Returns
-------
path : str
Path (relative to control directory) to the inferred met forcing file.
Raises
------
FileNotFoundError
If unable to infer met forcing path.
"""
if offset:
year += offset[1] - offset[0]
if repeat:
Expand Down

0 comments on commit 65fd559

Please sign in to comment.