getrex_1d Subroutine

private subroutine getrex_1d(theta, rex, fws, Fs, thetaS, thetaw, Etrans, gamma, dx, dt, zr)

Root extraction : Haverd et al. 2013

Warning: This subroutine has diverged from the other getrex_1d subroutine in cable_sli_roots.F90. Considering this subroutine predates the other one, it is likely this is an older version and should be updated. No tests have been done to quantify the differences.

Changes identified as of 27/06/2025:

  • theta and thetas arguments instead ot thetaS and S=theta/thetaS
  • rex is INTENT(OUT) in sli_roots module. Correct for this version as well.
  • Condition WHERE (Fs(:) > zero .AND. layer_depth < zr ) changed to WHERE (Fs(:) > zero (zr unused in sli_roots)
  • IF (ANY(((rex*dt) > MAX((theta(:)-thetaw(:)),zero)*dx(:)) .AND. (Etrans > zero))) THEN changed to IF (ANY(((rex*dt) > (theta(:)-thetaw(:))*dx(:)) .AND. ((rex*dt) > zero))) THEN

Arguments

Type IntentOptional Attributes Name
real(kind=r_2), intent(in), DIMENSION(:) :: theta
real(kind=r_2), intent(inout), DIMENSION(:) :: rex
real(kind=r_2), intent(inout) :: fws
real(kind=r_2), intent(in), DIMENSION(:) :: Fs
real(kind=r_2), intent(in), DIMENSION(:) :: thetaS
real(kind=r_2), intent(in), DIMENSION(:) :: thetaw
real(kind=r_2), intent(in) :: Etrans
real(kind=r_2), intent(in) :: gamma
real(kind=r_2), intent(in), DIMENSION(:) :: dx
real(kind=r_2), intent(in) :: dt
real(kind=r_2), intent(in) :: zr