Compute spatial average of soil water balance variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=short), | intent(in) | :: | dt |
time step (s) |
||
type(grid_real), | intent(in) | :: | sm |
mean soil moisture (m3/m3) |
||
type(grid_real), | intent(in) | :: | smrz |
root zone soil moisture (m3/m3) |
||
type(grid_real), | intent(in) | :: | smtz |
transmission zone soil moisture (m3/m3) |
||
type(grid_real), | intent(in) | :: | runoff |
runoff rate (m/s) |
||
type(grid_real), | intent(in) | :: | infrate |
infiltration rate (m/s) |
||
type(grid_real), | intent(in) | :: | perc |
percolation (m/s) |
||
type(grid_real), | intent(in) | :: | et |
actual evapotranspiration rate (m/s) |
||
type(grid_real), | intent(in) | :: | pet |
potential evapotranspiration rate (m/s) |
||
type(grid_real), | intent(in) | :: | caprise |
actual evapotranspiration rate (m/s) |
||
type(grid_real), | intent(in) | :: | error |
balance error (mm) |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | count | ||||
integer(kind=short), | public | :: | i |
SUBROUTINE ComputeSpatialAverageBalance & ! (dt, sm, smrz, smtz, runoff, infrate, perc, et, pet, caprise, error) IMPLICIT NONE !arguments with intent in: INTEGER (KIND = short), INTENT(IN) :: dt !!time step (s) TYPE (grid_real), INTENT(IN) :: sm !!mean soil moisture (m3/m3) TYPE (grid_real), INTENT(IN) :: smrz !!root zone soil moisture (m3/m3) TYPE (grid_real), INTENT(IN) :: smtz !!transmission zone soil moisture (m3/m3) TYPE (grid_real), INTENT(IN) :: runoff !!runoff rate (m/s) TYPE (grid_real), INTENT(IN) :: infrate !!infiltration rate (m/s) TYPE (grid_real), INTENT(IN) :: perc !!percolation (m/s) TYPE (grid_real), INTENT(IN) :: et !!actual evapotranspiration rate (m/s) TYPE (grid_real), INTENT(IN) :: pet !!potential evapotranspiration rate (m/s) TYPE (grid_real), INTENT(IN) :: caprise !!actual evapotranspiration rate (m/s) TYPE (grid_real), INTENT(IN) :: error !! balance error (mm) !local declarations INTEGER (KIND = short) :: i INTEGER (KIND = short) :: count !-------------------------------end of declaration----------------------------- DO i = 1, nextents count = 0 !mean soil moisture IF ( balanceout (1) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (sm, maskInteger = extents (i) % mask ) END IF !root zone soil moisture IF ( balanceout (2) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (smrz, maskInteger = extents (i) % mask ) END IF !transmission zone soil moisture IF ( balanceout (3) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (smtz, maskInteger = extents (i) % mask ) END IF !runoff IF ( balanceout (4) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (runoff, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !infiltration IF ( balanceout (5) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (infrate, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !percolation IF ( balanceout (6) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (perc, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !actual evapotranspiration IF ( balanceout (7) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (et, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !potential evapotranspiration IF ( balanceout (8) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (pet, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !capillary rise IF ( balanceout (9) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (caprise, maskInteger = extents (i) % mask ) * & dt * 1000. !conversion to mm over dt END IF !balance error IF ( balanceout (10) ) THEN count = count + 1 extents (i) % balance (count) = & GetMean (error, maskInteger = extents (i) % mask ) END IF END DO RETURN END SUBROUTINE ComputeSpatialAverageBalance