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
Presently, HSP2 can not handle irregular time series as inputs.
Although irregular time series inputs are not common for HSPF, @bcous has found a historical set of WDM files where the input time series started at 1 hour intervals and then switched to 15 minute intervals. HSPF resamples all inputs to the model time step immediately prior to a run, so everything works fine in HSPF.
~/Documents/Python/limno.HSPsquared/HSP2/utilities.pyintransform(ts, name, how, siminfo)
78pass79eliftsfreq==None: # Sparse time base, frequency not defined--->80ts=ts.reindex(siminfo['tbase']).ffill().bfill()
81elifhow=='SAME':
82ts=ts.resample(freq).ffill() # tsfreq >= freq assumed, or bad user choiceKeyError: 'tbase'
We have several options to fix this:
Drop higher frequency data
Fill entire time series to highest frequency, but how?
Fill options: NaN (or -999.0), previous value, interpolated value
Split into two time series
Modify HSP2.utilties.py code to handle it
We'll do option 1 in the short term (probably "manually"), but option 4 is probably the best long term fix.
This issue will track progress on option 4.
The text was updated successfully, but these errors were encountered:
Presently, HSP2 can not handle irregular time series as inputs.
Although irregular time series inputs are not common for HSPF, @bcous has found a historical set of WDM files where the input time series started at 1 hour intervals and then switched to 15 minute intervals. HSPF resamples all inputs to the model time step immediately prior to a run, so everything works fine in HSPF.
With the recent successful Rewrite readWDM.py to read by data group & block #21, we can properly read these and all other tested WDM. However, as @ptomasula commented (LimnoTech#21 (comment)), running HSP2 on those inputs will throw an error if
tsfreq == None
:We have several options to fix this:
HSP2.utilties.py
code to handle itWe'll do option 1 in the short term (probably "manually"), but option 4 is probably the best long term fix.
This issue will track progress on option 4.
The text was updated successfully, but these errors were encountered: