CTSM icon indicating copy to clipboard operation
CTSM copied to clipboard

Aquifer water state variable not output to history when use_groundwater_irrigation is true

Open swensosc opened this issue 3 years ago • 1 comments

In WaterStateType, the history output for wa_col is only active when use_aquifer_layer is true. It should also be output when use_groundwater_irrigation is true. This is not straightforward to implement, because use_groundwater_irrigation is a private parameter in IrrigationMod, so some way of passing the value of use_groundwater_irrigation to WaterStateType is needed. Until then, users running with active groundwater irrigation will not have history output for WA (the water in the aquifer).

swensosc avatar Jul 15 '22 19:07 swensosc

This does seem a bit tricky. Looking through the initialization ordering - especially in clm_instInit, it looks like it might work to move the initialization of soil_water_retention_curve and irrigation_inst to immediately before the call to water_inst%Init. Then we could add a function in IrrigationMod to return the value of use_groundwater_irrigation, which would get passed down through water_inst%Init similarly to what is done for use_aquifer_layer. Based on the arguments to create_soil_water_retention_curve (none) and to irrigation_inst%init, it looks like it should be safe to do this rearrangement.

billsacks avatar Jul 18 '22 03:07 billsacks