Skip to content

Conversation

@ptomasula
Copy link
Collaborator

@ptomasula ptomasula commented Sep 2, 2022

@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

if 'NUIF1_1' in ts:
self.INO3 = ts['NUIF1_1'] # optional, input
if 'NUIF1_2' in ts:
self.INH4 = ts['NUIF1_2'] # optional, input
if 'NUIF1_3' in ts:
self.INO2 = ts['NUIF1_3'] # optional, input
if 'NUIF1_4' in ts:
self.IPO4 = ts['NUIF1_4'] # optional, input
.

The time series for inorganic species of nutrients was 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 definition as expected by the RQUAL module (https://github.com/respec/HSPsquared/blob/f9555f2e48cc3409f33c29d3c6504d9bdc0f91fb/HSP2/RQUAL_Class.py#L439-L449).
@aufdenkampe
Copy link
Collaborator

@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 PaulDudaRESPEC merged commit 9caff7b into develop Sep 6, 2022
@PaulDudaRESPEC
Copy link
Member

I gave it a quick review, it looks good.

@aufdenkampe aufdenkampe deleted the InorganicNurtientTSNotLoading branch October 12, 2022 14:39
PaulDudaRESPEC added a commit that referenced this pull request Mar 12, 2025
incorrect timeseries key assignment for inorganic nutrient species
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants