akhter0907 / CTSM5.2.023

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
1 stars 0 forks source link

Where to use GW irrigation based on GW_ratio? #14

Open akhter0907 opened 1 month ago

akhter0907 commented 1 month ago

Farshid's version subtracted (1-GWratio)*qflx_irrig from runoff in HydrologyDrainage. But starting from ctsm5.1.dev081, they don't subtract qflx_irrif from runoff. Instead qflx_irrig is automatically subtracted from the river model. So, how to divide total irrigation into surface and groundwater based on GW_ratio?

amansnama commented 3 weeks ago

Previously, irrigation was subtracted from runoff. Currently, irrigation is subtracted from river storage in ROF model (MOSART). So, we need to modify the irrigation (water_inst%waterlnd2atmbulk_inst%qirrig_grc) passed from land model to rof model by (1-GWratio). This is done in lnd2atmMod.F90:

        if ((lun%itype(l)==istsoil .or. lun%itype(l)==istcrop) .and. col%active(c)) then
             qflx_adjusted_irrig_col(c) = (1._r8 - GW_ratio(c)) * &
               water_inst%waterfluxbulk_inst%qflx_sfc_irrig_col(c) 
...
    call c2g( bounds, &
         qflx_adjusted_irrig_col(bounds%begc:bounds%endc), &
         water_inst%waterlnd2atmbulk_inst%qirrig_grc(bounds%begg:bounds%endg), &
         c2l_scale_type= 'urbanf', l2g_scale_type='unity' )

However, when GW_ratio is not available (when use_pumping is off), GW_ratio remains a NaN, which crashes during runtime. Quick fix is to set it to zero when use_pumping=off (which has been done in GroundwaterInitMod.F90>read_GWinput). Proper way would be to place the GW_ratio code in lnd2atmMod.F90 within a if use_pumping conditional block.