Soil Water Balance (SWB2)
Loading...
Searching...
No Matches
mass_balance__interception.F90
Go to the documentation of this file.
2
3 use iso_c_binding, only : c_short, c_int, c_float, c_double
4 implicit none
5
6 private
7
9
10contains
11
12 elemental subroutine calculate_interception_mass_balance( interception_storage, &
13 actual_et_interception, &
14 interception, &
15 interception_storage_max, &
16 reference_et0 )
17
18 real (c_float), intent(inout) :: interception_storage
19 real (c_double), intent(inout) :: actual_et_interception
20 real (c_float), intent(inout) :: interception
21 real (c_float), intent(in) :: interception_storage_max
22 real (c_double), intent(in) :: reference_et0
23
24 real (c_float) :: temp_storage
25
26 temp_storage = interception_storage + interception
27
28 if ( temp_storage > interception_storage_max ) then
29 ! reduce the previously calculated interception value to account for
30 ! limited interception storage
31 interception = interception_storage_max - interception_storage
32 interception_storage = interception_storage_max
33 else
34 interception_storage = temp_storage
35 endif
36
37 actual_et_interception = min( reference_et0, interception_storage )
38 interception_storage = max( 0.0_c_float, interception_storage - actual_et_interception )
39
41
elemental subroutine, public calculate_interception_mass_balance(interception_storage, actual_et_interception, interception, interception_storage_max, reference_et0)