From 65fd559c387f9020dd1d2aeb7ad295363416e5cb Mon Sep 17 00:00:00 2001 From: Sean Bryan Date: Tue, 28 Nov 2023 14:55:31 +1100 Subject: [PATCH] Update docstring --- payu/models/cable.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/payu/models/cable.py b/payu/models/cable.py index f29e4580..91bd75d3 100644 --- a/payu/models/cable.py +++ b/payu/models/cable.py @@ -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: