Skip to content

Variable declared as BASIN dimension not being selected correctly in CRHM_GUI Selected variable panel #440

@loganxingfang

Description

@loganxingfang

I noticed there is bug for variable that is declared as BASIN dimension; when selecting them and clicking Add All HRUs to add it to Select panel, there is more than one variable being selected. I have a prj file here to demonstrate this.
Example_prj_CRHM_GUI_build_saved_24Nov2023.zip

Selecting basinflow and basingw variables to the "Selected" panel, when selecting them and clicking Add All HRUs, there are 15 basinflow and 15 basingw variables being added to the "Selected" panel. I have the screen shot here
basinflow_basingw_screen shot

If a variable is declared as TDim::NHRU, then selecting them and clicking Add All HRUs would add the variable for all HRUs. However, both basinflow and basingw variables are declared as as BASIN dimension:

declvar("basinflow", TDim::BASIN, "basin surface and sub-surface outflow", "(m^3/int)", &basinflow);
declvar("basingw", TDim::BASIN, "cumulative basin groundwater outflow", "(m^3/int)", &basingw);

so, selecting them and clicking Add All HRUs should add only one variable, e.g. basinflow(1), basingw(1) see below for that from Borland CRHM:
basinflow_basingw_screen shot_BorlandCRHM

I have another variable from module pbsmSnobal for an example:

selecting variable BasinSnowLoss and clicking Add All HRUs added this variable for all 15 HRUs in CRHM_GUI, see screen shot
BasinSnowLoss_screen shot

It should only be one variable BasinSnowLoss(1) being added, see correct one from Borland CRHM
BasinSnowLoss_screen shot_BorlandCRHM

In addition, selecting variable and clicking Add All HRUs and Layers also results in the same error in CRHM_GUI.

These two bugs of Add All HRUs and Add All HRUs and Layers exist for any variable declared as TDim::BASIN and should be fixed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions