1 ! module overland_routing_properties_data.F
2 ! Purpose: This module contains the overland_control_struct class. This types holds
3 ! the mass blance variables used in the overland routing code
4 ! National Water Center
5 ! Responsibility: Donald W Johnson donald.w.johnson@noaa.gov
6 ! Authors: Donald W Johnson, Nels Frazier
8 module overland_mass_balance
11 ! holds variables used for mass balance
12 type overland_mass_balance_struct
15 ! replaced with accumulated_change_in_soil_moisture
16 !real(kind=8) :: dsmctot
17 ! total difference in soil moisture each timestep
18 real(kind=8) :: accumulated_change_in_soil_moisture
20 ! replaced with pre_soil_mosture_content
21 !real(kind=8) :: smctot1 ! NEED VARIABLE INFO
22 ! Pre time step soil moisture content accumulator (mm) TODO verify unit
23 real(kind=8) :: pre_soil_moisture_content
25 ! replaced with post_soil_moisture_content
26 !real(kind=8) :: smctot2 ! NEED VARIABLE INFO
27 ! Post time step soil moisture content accumulator (mm) TODO verify unit
28 real(kind=8) :: post_soil_moisture_content
30 ! replaced with pre_infiltration_excess
31 !real(kind=8) :: suminfxs1 ! NEED VARIABLE INFO
33 ! Pre time step infiltration excess accumulator (mm) TODO verify unit
34 ! FIX ME -- this variable was declared as real(kind=8) as mis match with parameter specification
35 ! in Noah_distributed_routing.F:OverlandRouting matched it with parameter specified as real(kind=4)
36 ! this caused an implicit cast to single percision float which was required as the value was then used
37 ! in the sum_real mpi call which required single percision. Does this variable need to be a double?
38 real :: pre_infiltration_excess
40 ! replaced with post_infiltration_excess
41 !real(kind=8) :: suminfxsrt ! NEED VARIABLE INFO
42 ! Post time step infiltration excess accumulator (mm) TODO verify unit
43 ! FIX ME -- this variable was declared as real(kind=8) as mis match with parameter specification
44 ! in Noah_distributed_routing.F:OverlandRouting matched it with parameter specified as real(kind=4)
45 ! this caused an implicit cast to single percision float which was required as the value was then used
46 ! in the sum_real mpi call which required single percision. Does this variable need to be a double?
47 real :: post_infiltration_excess
50 procedure :: init => overland_mass_balance_init
51 procedure :: destroy => overland_mass_balance_destroy
52 end type overland_mass_balance_struct
56 ! initalize the mass balance variables
57 subroutine overland_mass_balance_init(this)
59 class(overland_mass_balance_struct), intent(inout) :: this ! the type object being initalized
60 this%accumulated_change_in_soil_moisture = 0.0
61 this%pre_soil_moisture_content = 0.0
62 this%post_soil_moisture_content = 0.0
63 this%pre_infiltration_excess = 0.0
64 this%post_infiltration_excess = 0.0
65 end subroutine overland_mass_balance_init
67 ! none of the mass balance variables are dynamicly allocated if such are added
68 ! they should be deallocated here
69 subroutine overland_mass_balance_destroy(this)
71 class(overland_mass_balance_struct), intent(inout) :: this ! the type object being destroyed
72 end subroutine overland_mass_balance_destroy
75 end module overland_mass_balance