1 module module_subsurface_static_data
4 type subsurface_static_interface
13 procedure :: init => subsurface_static_data_init
14 procedure :: destroy => subsurface_static_data_destroy
15 end type subsurface_static_interface
19 subroutine subsurface_static_data_init(this, ixrt, jxrt, nsoil, dt, rt_option)
21 class(subsurface_static_interface), intent(inout) :: this ! the type object being initialized
22 integer, intent(in) :: ixrt ! x routing grid size
23 integer, intent(in) :: jxrt ! y routing grid size
24 integer, intent(in) :: nsoil ! nsoil
25 real, intent(in) :: dt
26 integer, intent(in) :: rt_option
28 logical :: allocation_error = .false.
34 this%rt_option = rt_option
36 if ( allocation_error ) &
37 write(0,*) "attempt to allocate data in members of subsurface io structure&
38 &that where already allocated. The allocated members where not changed"
40 end subroutine subsurface_static_data_init
42 subroutine subsurface_static_data_destroy(this)
44 class(subsurface_static_interface), intent(inout) :: this ! the type object being initialized
46 logical :: allocation_error = .false.
48 if ( allocation_error ) &
49 write(0,*) "attempt to deallocate data in members of subsurface io structure&
50 &that where not allocated. The unallocated members where not changed"
52 end subroutine subsurface_static_data_destroy
54 end module module_subsurface_static_data