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

Centralise data inputs to PModel in PModelEnvironment #390

Open
davidorme opened this issue Jan 18, 2025 · 0 comments · May be fixed by #412
Open

Centralise data inputs to PModel in PModelEnvironment #390

davidorme opened this issue Jan 18, 2025 · 0 comments · May be fixed by #412

Comments

@davidorme
Copy link
Collaborator

davidorme commented Jan 18, 2025

A set of linked changes to PModelEnvironment

  • Following the proposed API sketch in PModel API for 2.0.0 #394, the suggestion for PModelEnvironment is that with the new PModel API all of the forcing variables can be set in the PModelEnvironment, so fapar and ppfd are set here. This makes it really easy to switch from standard to subdaily P Models.
  • Free up the definition of extra variables to the PModelEnvironment. At the moment, downstream methods can require extra variables to calculate a method. The method registry setup makes this easily extendable, but at the moment these extra variables are hardcoded into the PModelEnvironment setup. We should change this to add any variables with the right dimensions via kwargs - this does lose specific variable bounds checking, but that is a relatively small price.
  • Centralise calculation of tk in PModelEnvironment. Many of the calculations in the PModelEnvironment require scaling factors calculated using temperature in Kelvin. At the moment, all of these functions take temperature in °C and then convert internally. It would be much saner to calculate once when creating a PModelEnvironment instance and then store as an attribute and pass tk to functions not tc.
@davidorme davidorme changed the title Centralise calculation of tk in PModelEnvironment Centralise data inputs to PModel in PModelEnvironment Feb 2, 2025
@davidorme davidorme linked a pull request Feb 4, 2025 that will close this issue
7 tasks
@davidorme davidorme linked a pull request Feb 4, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

1 participant