ESCOMP / CTSM

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

Duplicate definitions of SMP (smp_l) #447

Open olyson opened 6 years ago

olyson commented 6 years ago

General bug information

CTSM version you are using: release-clm5.0.01

Does this bug cause significantly incorrect results in the model's science? Yes

Configurations affected: All

Details of bug

There are two different definitions for SMP (smp_l in the code). The first, and correct (consistent), is in SoilWaterMovementMod.F90 (subroutine compute_hydraulic_properties) where smp_l(c,j) = smp(j). The second, which should be removed because it is overwriting the first definition and is inconsistent with how smp is used in the soil water equations, is in HydrologyNoDrainageMod.F90:

  do j = 1, nlevgrnd
     do fc = 1, num_hydrologyc
        c = filter_hydrologyc(fc)

        s_node = max(h2osoi_vol(c,j)/watsat(c,j), 0.01_r8)
        s_node = min(1.0_r8, s_node)

        smp_l(c,j) = -sucsat(c,j)*s_node**(-bsw(c,j))
        smp_l(c,j) = max(smpmin(c), smp_l(c,j))
     end do
  end do
olyson commented 6 years ago

Turns out that removing these lines causes water balance errors because this updated smp_l for use by Photosynthesis in the next time step. Likely fix is to keep this calculation (because it is updating smp_l from updated soil water), but make the calculation consistent with what is done in SoilWaterMovement (which includes ice content as well as liquid water content). This will change answers, needs to be tested.