Conversation
…layer temperatures
…rt of an issue with the abiotic model and not key to this PR
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #807 +/- ##
===========================================
+ Coverage 94.08% 94.09% +0.01%
===========================================
Files 74 74
Lines 5220 5229 +9
===========================================
+ Hits 4911 4920 +9
Misses 309 309 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sallymatson
approved these changes
Apr 1, 2025
Collaborator
sallymatson
left a comment
There was a problem hiding this comment.
Made one comment.. otherwise, LGTM !
Comment on lines
+123
to
+149
| # Friction velocity, [m s-1] | ||
| # friction_velocity = wind.calculate_friction_velocity( | ||
| # reference_wind_speed=data["wind_speed_ref"] | ||
| # .isel(time_index=time_index) | ||
| # .to_numpy(), | ||
| # reference_height=( | ||
| # data["layer_heights"][0].to_numpy() | ||
| # + abiotic_constants.wind_reference_height | ||
| # ), | ||
| # roughness_length=roughness_length, | ||
| # zero_plane_displacement=zero_plane_displacement, | ||
| # von_karman_constant=core_constants.von_karmans_constant, | ||
| # ) | ||
|
|
||
| # Aerodynamic resistance canopy, [s m-1] | ||
| # TODO The current implementation returns quite high values at the top canopy | ||
| # There seems to be an issue with fluxes as, needs to be checked when fixing | ||
| # temperature update function. Could have to do with low wind speeds. | ||
| # aerodynamic_resistance_canopy = energy_balance.calculate_aerodynamic_resistance( | ||
| # wind_heights=data["layer_heights"][ | ||
| # layer_structure.index_filled_canopy | ||
| # ].to_numpy(), | ||
| # roughness_length=roughness_length, | ||
| # zero_plane_displacement=zero_plane_displacement, | ||
| # friction_velocity=friction_velocity, | ||
| # von_karman_constant=core_constants.von_karmans_constant, | ||
| # ) |
Collaborator
There was a problem hiding this comment.
Are these things you want to leave in?
Collaborator
Author
There was a problem hiding this comment.
yes, I have moved this in and out in the past, it produces totally wrong values and I think it is due to the numbers I put in, not the function itself. I don't want to do it in this PR because it's a more general issue with time intervals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the initialisation of aerodynamic resistances to the hydrology model because the variable will be required for the canopy evaporation. If the VE runs with
abiotic_simple, these are otherwise not inilialised. The actual calculation of aero resistance in canopy remains in the abiotic model. The implementation there is still tentative, fixing that is a separate issue.@sallymatson and @davidorme you have seen this before, it is the branch that we lost in the GitHub void.
Fixes #794
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks