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

Feature/separate hydrology #243

Merged
merged 17 commits into from
Jun 21, 2023
Merged

Feature/separate hydrology #243

merged 17 commits into from
Jun 21, 2023

Conversation

vgro
Copy link
Collaborator

@vgro vgro commented Jun 20, 2023

I moved the hydrology (soil moisture and runoff) out of the abiotic_simple_model to a new model (hydrology_model) to make it easier to plug in different (external) hydrology models that might have different levels of complexity and different time steps; for example HydroPy, SPLASH, WSIMOD. The functions are the same as before, just in a separate model. This means that the hydrology initializes the soil_moisture variable which the soil model depends on, so has to come before that.

In the course of this, I renamed the simple_regression module to microclimate as this is more descriptive of what is going on there.

There are still some features missing: the vertical (downward) flow, the subsurface flow, the horizontal flow between grid cells, the stream flow and the extraction of water by plant roots (=evapotranspiration). This will be implemented step by step after discussion with group members as it requires some thinking about the order of processes.

Question: The equation at the end of hydrology_model does not show in the online documentation, any suggestions why this could be?

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copy link
Collaborator

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a sensible restructure to me! I've added a few minor comments, but nothing major really

Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good - and definitely the refactoring makes sense now that the codebase an d potential use is growing. Excellent use of some of xarray capabilities.

I'm not sure on the question about the documentation. What equation does not show?

@vgro
Copy link
Collaborator Author

vgro commented Jun 21, 2023

This looks really good - and definitely the refactoring makes sense now that the codebase an d potential use is growing. Excellent use of some of xarray capabilities.

I'm not sure on the question about the documentation. What equation does not show?

Thank you for the positive feedback.
We solved the issue with the documentation, @jacobcook1995 came across a similar problem before and had a solution.

Copy link
Collaborator

@davidorme davidorme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too.

@vgro vgro merged commit 1fe8e44 into develop Jun 21, 2023
@vgro vgro deleted the feature/separate_hydrology branch June 21, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants