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

Improve update_state_values to accept non xarray inputs #52

Open
xaviernogueira opened this issue Nov 8, 2023 · 0 comments
Open

Improve update_state_values to accept non xarray inputs #52

xaviernogueira opened this issue Nov 8, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request refactor-core For core functionality, not model specifc

Comments

@xaviernogueira
Copy link
Contributor

Currently when using Model.increment_timestep() you can update state (and now static w/ PR #51) variable values before running the computation. This allows modules to interact with other 3rd party models.

As of now, you need to provide a dictionary with variable names as keys, and an updated xr.DataArray as values. This was largely fine for state variables, as we tend to model them over a spatial domain. However, static variables may be better represented by a single number. While the user has the opportunity to adjust the last timestep of the xr.Dataset variable, that is more cumbersome than simply updating with a single float for the whole domain.

I also want to rename the argument to update_values while I am at it.

@xaviernogueira xaviernogueira added enhancement New feature or request refactor-core For core functionality, not model specifc labels Nov 8, 2023
@xaviernogueira xaviernogueira self-assigned this Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor-core For core functionality, not model specifc
Projects
None yet
Development

No branches or pull requests

1 participant