SCALE-RM
mod_land_admin.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
11  !-----------------------------------------------------------------------------
12  !
13  !++ used modules
14  !
15  use scale_precision
16  use scale_stdio
17  use scale_prof
18  use scale_debug
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: land_admin_setup
27  public :: land_admin_getscheme
28 
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public parameters & variables
32  !
33  logical, public :: land_do = .true. ! main switch for the model
34 
35  character(len=H_SHORT), public :: land_type = 'NONE'
36 
37  logical, public :: land_sw
38 
39  !-----------------------------------------------------------------------------
40  !
41  !++ Private procedure
42  !
43  !-----------------------------------------------------------------------------
44  !
45  !++ Private parameters & variables
46  !
47  !-----------------------------------------------------------------------------
48 contains
49  !-----------------------------------------------------------------------------
51  subroutine land_admin_setup
52  use scale_process, only: &
54  implicit none
55 
56  namelist / param_land / &
57  land_do, &
58  land_type
59 
60  integer :: ierr
61  !---------------------------------------------------------------------------
62 
63  if( io_l ) write(io_fid_log,*)
64  if( io_l ) write(io_fid_log,*) '++++++ Module[ADMIN] / Categ[LAND] / Origin[SCALE-RM]'
65 
66  !--- read namelist
67  rewind(io_fid_conf)
68  read(io_fid_conf,nml=param_land,iostat=ierr)
69  if( ierr < 0 ) then !--- missing
70  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
71  elseif( ierr > 0 ) then !--- fatal error
72  write(*,*) 'xxx Not appropriate names in namelist PARAM_LAND. Check!'
73  call prc_mpistop
74  endif
75  if( io_nml ) write(io_fid_nml,nml=param_land)
76 
77  !-----< module component check >-----
78 
79  if( io_l ) write(io_fid_log,*)
80  if( io_l ) write(io_fid_log,*) '*** Land model components ***'
81 
82  if ( land_type == 'OFF' .OR. land_type == 'NONE' ) then
83  land_do = .false. ! force off
84  endif
85 
86  if ( land_do ) then
87  if( io_l ) write(io_fid_log,*) '*** Land model : ON'
88  else
89  if( io_l ) write(io_fid_log,*) '*** Land model : OFF'
90  endif
91 
92  if ( land_type /= 'OFF' .AND. land_type /= 'NONE' ) then
93  if( io_l ) write(io_fid_log,*) '*** + Land physics : ON, ', trim(land_type)
94  land_sw = .true.
95  else
96  if( io_l ) write(io_fid_log,*) '*** + Land physics : OFF'
97  land_sw = .false.
98  endif
99 
100  return
101  end subroutine land_admin_setup
102 
103  !-----------------------------------------------------------------------------
105  subroutine land_admin_getscheme( &
106  scheme_name )
107  use scale_process, only: &
109  implicit none
110 
111  character(len=H_SHORT), intent(out) :: scheme_name
112  !---------------------------------------------------------------------------
113 
114  scheme_name = land_type
115 
116  return
117  end subroutine land_admin_getscheme
118 
119 end module mod_land_admin
module Land admin
module DEBUG
Definition: scale_debug.F90:13
subroutine, public prc_mpistop
Abort MPI.
character(len=h_short), public land_type
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:61
module STDIO
Definition: scale_stdio.F90:12
subroutine, public land_admin_setup
Setup.
logical, public io_nml
output log or not? (for namelist, this process)
Definition: scale_stdio.F90:62
subroutine, public land_admin_getscheme(scheme_name)
Get name of scheme for each component.
module PROCESS
module profiler
Definition: scale_prof.F90:10
module PRECISION
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
logical, public land_sw
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
integer, public io_fid_nml
Log file ID (only for output namelist)
Definition: scale_stdio.F90:57
logical, public land_do