Subroutine vom_mqss

1581 : 
1582 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1583 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1584 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1585 : !*-----steady-state tissue water (mqss) --------------------------------
1586 : 
1587 :       subroutine vom_mqss (mqss_out)
1588 :       use vom_vegwat_mod
1589 :       implicit none
1590 : 
1591 :       REAL*8, INTENT(out) :: mqss_out
1592 : 
1593 :       REAL*8 :: sum1, sum2, mul1, mul2
1594 : 
1595 : !     * (Out[257]) steady-state Mq
1596 : 
1597 : !     mqss_out = MAX(0.9d0 * q_mqx,(q_mqx * (p_mpbar * (q_md * q_md    &
1598 : !    &         + 752.d0 * q_md * q_mqx + q_mqx * q_mqx)                &
1599 : !    &         * SUM((rsurft_(1:pos_ult) / (i_rrootm + rsoil(1:pos_ult)))) &
1600 : !    &         - (q_md + q_mqx) * (q_md + q_mqx) * (etmt__             &
1601 : !    &         - SUM(((-c_hhydrst(1:pos_ult) - pcap_(1:pos_ult))       &
1602 : !    &         * rsurft_(1:pos_ult)) / (i_rrootm + rsoil(1:pos_ult)))))) &
1603 : !    &         / (p_mpbar * (q_md * q_md + 752.d0 * q_md * q_mqx       &
1604 : !    &         + q_mqx * q_mqx) * SUM((rsurft_(1:pos_ult) / (i_rrootm  &
1605 : !    &         + rsoil(1:pos_ult))))))
1606 : 
1607 :       sum1 = SUM(rsurft_(1:pos_ult) / (i_rrootm + rsoil(1:pos_ult)))
1608 :       mul1 = p_mpbar * (q_md * q_md + 752.d0 * q_md * q_mqx + q_mqx * q_mqx) * sum1
1609 : 
1610 :       sum2 = SUM(((-c_hhydrst(1:pos_ult) - pcap_(1:pos_ult))           &
1611 :      &     * rsurft_(1:pos_ult)) / (i_rrootm + rsoil(1:pos_ult)))
1612 :       mul2 = (q_md + q_mqx) * (q_md + q_mqx) * (etmt__ - sum2)
1613 : 
1614 :       mqss_out = q_mqx * (mul1 - mul2) / mul1
1615 :       mqss_out = MAX(0.9d0 * q_mqx, mqss_out)
1616 : 
1617 :       return
1618 :       end subroutine vom_mqss