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/wind profiles #350

Merged
merged 26 commits into from
Dec 5, 2023
Merged

Conversation

vgro
Copy link
Collaborator

@vgro vgro commented Dec 5, 2023

This PR adds the wind submodule to the new abiotic model. It is not very complex, basically just a long list of functions that in the end are called in the AbioticModel.

@TaranRallings did you make some commits to this branch or did this come from git merge develop? It looks like I missed an update, please ignore the animal files in the review, we can sort this out when I eventually merge in develop.

The question came up about what the required_init_vars should contain regarding the dummy data set, please comment on #349 .

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f151b97) 95.79% compared to head (bd9f8d7) 95.97%.

Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/new_abiotic_model     #350      +/-   ##
=============================================================
+ Coverage                      95.79%   95.97%   +0.17%     
=============================================================
  Files                             55       56       +1     
  Lines                           2595     2705     +110     
=============================================================
+ Hits                            2486     2596     +110     
  Misses                           109      109              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Noticed a couple of problems, but otherwise looks good to me!

wind_reference_height=(self.data["canopy_height"] + 10).to_numpy(),
turbulence_sign=True,
abiotic_constants=AbioticConsts(),
core_constants=CoreConsts(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't this make it impossible for the user to change the constants, because default values will always be used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh yes, you're right. I copied the arguments and missed changing that.

virtual_rainforest/models/abiotic/wind.py Show resolved Hide resolved
@vgro vgro requested a review from jacobcook1995 December 5, 2023 15:30
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.

LGTM!

@vgro vgro merged commit 5300cd1 into feature/new_abiotic_model Dec 5, 2023
22 checks passed
@vgro vgro deleted the feature/wind_profiles branch December 5, 2023 17:08
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