EcohydrologyTeam / ClearWater-modules

A collection of water quality and vegetation process simulation modules designed to couple with water transport models.
MIT License
5 stars 1 forks source link

Improve `update_state_values` to accept non `xarray` inputs #52

Open xaviernogueira opened 1 year ago

xaviernogueira commented 1 year ago

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.