Commit fb6872f6 authored by Dan Baston's avatar Dan Baston

Avoid passing forecast args to ObservedForcing

parent 7a4fd88c
......@@ -39,12 +39,25 @@ def create_forcing_file(workspace: DefaultWorkspace,
*,
yearmon: str,
model: Optional[str] = None,
target: Optional[str]=None,
member: Optional[str]=None) -> List[Step]:
target: Optional[str] = None,
member: Optional[str] = None) -> List[Step]:
if target:
assert member
assert model
assert isinstance(data, ForecastForcing)
precip = data.precip_monthly(yearmon=yearmon, target=target, member=member)
temp = data.temp_monthly(yearmon=yearmon, target=target, member=member)
wetdays = data.p_wetdays(yearmon=yearmon, target=target, member=member)
else:
assert not model
assert not member
assert isinstance(data, ObservedForcing)
precip = data.precip_monthly(yearmon=yearmon, target=target, member=member)
temp = data.temp_monthly(yearmon=yearmon, target=target, member=member)
wetdays = data.p_wetdays(yearmon=yearmon, target=target, member=member)
precip = data.precip_monthly(yearmon=yearmon)
temp = data.temp_monthly(yearmon=yearmon)
wetdays = data.p_wetdays(yearmon=yearmon)
return [
wsim_merge(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment