-
Notifications
You must be signed in to change notification settings - Fork 5
Description
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

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:

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

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

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.