You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/troubleshooting_and_testing/implicit_contracts.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,27 @@ Many models are considered to be steady-state over that timeframe, but not all :
18
18
!!! Note
19
19
Implicitely, this means any vector variables given as input to the simulation must be consistent with the number of weather timesteps. Providing one weather value but a larger vector variable is an exception : the weather data is replicated over each timestep. (This may be subject to change in the future when support for different timesteps in a single simulation is implemented)
20
20
21
+
## Why does my model skip half-hour rows?
22
+
23
+
If your meteo has 30-minute rows but a model appears to run hourly, check timestep resolution order:
24
+
25
+
1. If model has explicit `TimeStepModel(...)`, it is used.
26
+
2. Else if model `timespec(model)` is non-default, it is used.
27
+
3. Else model uses meteo `duration`.
28
+
29
+
Then compatibility rules apply:
30
+
31
+
1.`timestep_hint.required` is enforced for meteo-derived clocks.
32
+
2.`timestep_hint.preferred` is informational only.
33
+
3. Meteo aggregation/integration happens only for models with coarser effective clocks.
34
+
35
+
Common cause:
36
+
- model has explicit hourly `TimeStepModel(...)`, so 30-minute rows are intentionally aggregated to hourly runs.
37
+
38
+
Quick diagnostics:
39
+
- Run `explain_model_specs(mapping_or_sim)` to see, per process, whether runtime clock comes from explicit `ModelSpec`, model `timespec`, or meteo base step.
40
+
- Ensure meteo `duration` is present and valid on every row (mandatory when meteo is provided).
41
+
21
42
## Weather data must be interpolated prior to simulation
22
43
23
44
If your weather data isn't adjusted to conform to a regular timestep, you will need to adjust it to fit that constraint. PlantSimEngine does no interpolation prior to simulation and expects regular weather timesteps.
@@ -72,4 +93,4 @@ This order of simulation depends on the way the models link together. If you rep
72
93
73
94
When iterating and slowly making a simulation more physiologically realistic and complex, it is therefore fully possible that the order in which two models are run is flipped by a user change.
74
95
75
-
This design choice implementation -a concession made for ease of use and flexibility when developing a simulation- means that until your set of models is fully stabilized and you know which variables are `PreviousTimestep` and what order models run in, as you expand and change the set you might see differences of execution of one timestep for some models. It isn't a conceptual problem as most models are steady-state, and simulation order is stable for a given set of models, but it does mean PlantSimEngine will be less conveient for some types of simulation.
96
+
This design choice implementation -a concession made for ease of use and flexibility when developing a simulation- means that until your set of models is fully stabilized and you know which variables are `PreviousTimestep` and what order models run in, as you expand and change the set you might see differences of execution of one timestep for some models. It isn't a conceptual problem as most models are steady-state, and simulation order is stable for a given set of models, but it does mean PlantSimEngine will be less conveient for some types of simulation.
0 commit comments