-
Notifications
You must be signed in to change notification settings - Fork 3
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 the way time is added to a model #58
Conversation
Nice improvements! I did add something else when I went through the changes. I moved the attributes with time information ('time_units', 'start_time', 'nstp', 'tsmult', 'steady_start' and 'steady_state') from the model_ds to the time DataArray. So instead of I tested locally and it worked. So when the test pass this can be merged. |
Good change. Maybe we can then also rename 'time_units' to 'units' and 'start_time' to 'start'? |
Good one, added this in 8e54b1b |
Actually it was not that easy. The 'units' attribute of the time coordinate seams to be locked and I get this error when I try to write it to a netcdf file: |
This pull request changes the way time is added to a model:
When
steady_start
is True, a steady state stress-period is added before the first value of time with a stress period length ofsteady_start_perlen
. The current ways to specify time (transient_timesteps
orperlen
) are still supported.The variable
time
now always contains the time at the end of each stress period (not sure if this was the case before), so heads and other output can be easily added to the model_ds. To minimise double information,nper
andperlen
are removed from the attributes of model_ds, and are calculated when needed.