ImperialCollegeLondon / virtual_ecosystem

This repository is the home for the codebase for the Virtual Ecosystem project.
https://virtual-ecosystem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Amending vertical layer structure #441

Closed davidorme closed 2 months ago

davidorme commented 2 months ago

Description

This is a work in progress PR implementing the removal of the explicit subcanopy layer from the vertical layer structure.

The current progress is

New location for Grid

Things to do:

Fix everything that this breaks:

These fixes can be by individual PR onto this branch to pick off issues until we have a passing PR to merge down.

Fixes #421 (issue)

Type of change

Key checklist

Further checks

davidorme commented 2 months ago

First review of WIP

@jacobcook1995 and @vgro - Do you need any of this implementation changing or extending? @alexdewar Anything obviously mad?

jacobcook1995 commented 2 months ago

Yeah looks sensible to me, I'm not planning to continue using topsoil_index in the long run (I don't know if @vgro is though), so from my perspective I'm happy with any implementation that doesn't break the current tests

vgro commented 2 months ago

Looks sensible to me, also good job tidying up the conftest :-) One concern is that I have the parallel branch for including stats which and I don't know in which order we want to merge this in develop to make the least mess ?

davidorme commented 2 months ago

This PR is a little on the long side, as @vgro says. Not sure how easy it would have been to break this work up, but in general I think little PRs often is better than big PRs occasionally, especially when the work touches a lot of different areas of code.

@alexdewar. I completely agree - the problem here is that one of the core changes we want to make in this PR changes the vertical structure of the simulation so that the dimensions of the data change. That's not something that we can adopt incrementally, but we are trying to isolate the bits for different models in sub-branches. Thanks for the comments!

davidorme commented 2 months ago

@dalonsoa Any idea on the qa failure here? The pre-commit.ci is running the same thing with the same configuration - wait. Might be python version?

The only other thing I looked at is the mypy configuration in pyproject.toml specifies the numpy.testing.mypy-plugin, but that shouldn't affect the pre-commit configuration and that is identical between the two actions.

davidorme commented 2 months ago

Not obviously a python version thing. I've switch my poetry environment between 3.10, 3.11 and 3.12 and pre-commit run -a passes on all three.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.75%. Comparing base (d7298af) to head (778ba2b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #441 +/- ## =========================================== + Coverage 94.66% 94.75% +0.08% =========================================== Files 70 70 Lines 3786 3791 +5 =========================================== + Hits 3584 3592 +8 + Misses 202 199 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

davidorme commented 2 months ago

@vgro Can you approve this - we know it's a partial implementation of what is coming in #452 but we should bank it and then we can work on implementing #452 on a separate PR.

davidorme commented 2 months ago

@dalonsoa I think we need you to approve this too after your requested changes. We know it's a halfway house, but we want to be able to move on with other stuff in develop while the changes in #452 are adopted.