Closed PaulDudaRESPEC closed 2 years ago
I changed the code to execute RQUAL before GQUAL, and it seems to work successfully. There's a slight difference in GQUAL that results from this change in some cases when compared to HSPF output, where in certain situations HSPF used the previous time step value of RQUAL output in the GQUAL computation. With this HSP2 code change, we actually use the current time step value of RQUAL output, which is logically a better solution.
That sounds like a win-win. Thanks!
In GQUAL, the flags PHFLAG and PHYTFG can be used to indicate that input data to the module should come from timeseries computed in RQUAL modules PHYTO and PHCARB. In HSPF, the values of these state variables from the previous time step are available and used. However, because of differences in the time looping in HSP2, those computed time series are not yet available when needed.
A possible solution to this issue would be to change the sequence of simulated sections, so that RQUAL sections are computed before GQUAL.