Support for monthly/yearly data #739
-
Hi everyone, I'm sorry for this rather general question, but I could not find an answer to it in the manual. Is it currently possible to use pastas for monthly or yearly data? Because theoretically the intervalls are not equidistant and in the docs it is pointed out several times, that the stress needs to be equidistant.
When I try to create a model the I tried to use the predefined settings for the stresses, like Some extra info: If anyone can help, that would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Just to make sure that I understand: You have monthly stresses and want to simulate with monthly time steps. That means you have head measurements only at the end of each month. Is that indeed what you want to do? Or do you want to enter monthly stresses (say monthly average values) and then simulate heads on a daily basis? |
Beta Was this translation helpful? Give feedback.
-
Good questions @TLMueller. Is it an option for you to resample your data to a regular (near-monthly) timestep? E.g. 30 days? That way you meet pastas equidistant stresses requirement, but the result also fits the resolution of your data. The function Another option is maybe to keep the daily calculation time step with daily precipitation and evaporation stresses. And resample any stresses you have on a monthly basis to daily values, for example by dividing the monthly stress over the number of days in that month. That way you won't have to resample your head time series at all, allowing you to calibrate the model on all your observations. It could be worth trying, but this might not work very well if your data is really too sparse.
This is something we have to look into, as I think we should provide a more clear error message for this case. A quick guess: it seems as if there might be a period in which there are head observations but no precipitation data? In solve() pastas is extending the precipitation time series (but not necessarily to fill the warmup period, because warmup=0), but to match the tmin/tmax? This introduces a NaN that cannot be filled because no filling logic is provided. |
Beta Was this translation helpful? Give feedback.
I got your email and had a look at your code. The reason you're seeing an error is that the internal computation time step is still daily ("D"). This is the default setting in pastas.
When running solve, you see this warning, which indicates that pastas is trying to up-sample the stresses but it could not, because the settings were not defined (=None):
To summarize, this is what is happening: