Conversation
…time-step-and-area-in-particular-with-energy-fluxes
…time-step-and-area-in-particular-with-energy-fluxes
…time-step-and-area-in-particular-with-energy-fluxes
|
@vgro Could you walk through the logic of the time interval value to |
…time-step-and-area-in-particular-with-energy-fluxes
for more information, see https://pre-commit.ci
|
I want the timestep that goes in the functions (delta t) to be one hour, the update interval of the model will most likely always be larger than that, so I divide the model update interval by 3600 to get the number of hours per model time interval. If the model time interval is a day or shorter, run for every hour (this will be the option with hourly input data), if not than do only one step |
…time-step-and-area-in-particular-with-energy-fluxes
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #933 +/- ##
========================================
Coverage 94.22% 94.22%
========================================
Files 79 79
Lines 6320 6308 -12
========================================
- Hits 5955 5944 -11
+ Misses 365 364 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dalonsoa
left a comment
There was a problem hiding this comment.
I've made a comment about a potential error, but other than that, I do not see any other, more elegant way of doing this if the equations being solved require smaller timesteps. To be honest, inner loops to handle shorter timesteps is something that I was expecting to happen given the different timescales of the processes you are handling.
…time-step-and-area-in-particular-with-energy-fluxes
…time-step-and-area-in-particular-with-energy-fluxes
…area-in-particular-with-energy-fluxes' of https://github.com/ImperialCollegeLondon/virtual_rainforest into 780-abiotic-model---account-properly-for-time-step-and-area-in-particular-with-energy-fluxes
…time-step-and-area-in-particular-with-energy-fluxes
davidorme
left a comment
There was a problem hiding this comment.
Looks good - thanks for clarifying the timing stuff. I do find the setup within run_microclimate a bit confusing - it seems like the running mode (iterated vs equilibrium) might be something that is an argument to the function. Having said that - there's a lot of stuff still to come when the hourly data becomes available - so I think that's polishing for later.
Thanks for the feedback. I will definitely revisit the setup; at the moment the model just returns the final state and I would like to treat this more like the hydrology model where monthly means/stats will be returned. I just didn't want to complicate this PR any further (initially only intended to make sure everything has the same unit). Will consider #517 in this context. |
…time-step-and-area-in-particular-with-energy-fluxes
This PR aims to sort out the time intervals for the energy balance. The equations really only make sense in a short time interval, an hour or so, so I did a very clumsy for loop implementation as a first step and would appreciate feedback on how to better handle it. At the moment we cannot have hourly input data, so it does not make sense to run it for more than 1 average hour, this is a separate problem.
I have also deleted a lot of bits that are handled by the plant model now (related to absorbed radiation).
Fixes #780
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks