Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change modeled_timestep to be forcing_interval #117

Closed
ghost opened this issue Aug 11, 2021 · 0 comments · Fixed by #118
Closed

change modeled_timestep to be forcing_interval #117

ghost opened this issue Aug 11, 2021 · 0 comments · Fixed by #118
Labels
bug Bug when generating configuration

Comments

@ghost
Copy link

ghost commented Aug 11, 2021

the modeled_timestep attribute of the TimestepForcingJSON configuration object should be forcing_interval instead, and should default to 1 hour. This attribute translates to WTIMINC and RSTIMINC.

class TimestepForcingJSON(ForcingJSON, ABC):
default_modeled_timestep: timedelta
field_types = {'modeled_timestep': timedelta}
def __init__(self, modeled_timestep: timedelta = None, **kwargs):
if modeled_timestep is None:
modeled_timestep = self.default_modeled_timestep
if 'fields' not in kwargs:
kwargs['fields'] = {}
kwargs['fields'].update(TimestepForcingJSON.field_types)
ForcingJSON.__init__(self, **kwargs)
self['modeled_timestep'] = modeled_timestep

@saeed-moghimi-noaa

@ghost ghost added the bug Bug when generating configuration label Aug 11, 2021
@ghost ghost self-assigned this Aug 11, 2021
@ghost ghost closed this as completed in #118 Aug 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug when generating configuration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants