respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

incorrect timeseries key assignment for inorganic nutrient species #101

Closed ptomasula closed 1 year ago

ptomasula commented 1 year ago

@PaulDudaRESPEC @aufdenkampe @bcous

This is fix for a bug that @bcous discovered when trying to run HSP2 for some project work. He noticed that the timeseries he specified for inorganic nutrient species were not being correctly input into RQUAL and NUTRX modules.

We determined the timeseries for inorganic species of nutrients were being assigned an incorrect key in the timeseries dictionary returned by the utlities.get_stimeseries function. The timeseries were not coded with an underscore between the TMEMN and TMEMSB definitions (i.e. NUIF11 instead of NUIF1_1) as expected by the this section of RQUAL module https://github.com/respec/HSPsquared/blob/f9555f2e48cc3409f33c29d3c6504d9bdc0f91fb/HSP2/RQUAL_Class.py#L439-L449.

aufdenkampe commented 1 year ago

@PaulDudaRESPEC, let us know if you would like to review and/or test this fix. If not, we're happy to merge it directly into the develop branch. @bcous & @McGrupp10 are successfully using this fix for their modeling.

PaulDudaRESPEC commented 1 year ago

I gave it a quick review, it looks good.