SCALE-RM
mod_urban_admin.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: urban_admin_setup
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  logical, public :: urban_do = .true. ! main switch for the model
33  logical, public :: urban_land = .false. ! urban is handled as a land use type
34 
35  character(len=H_SHORT), public :: urban_dyn_type = 'NONE'
36  ! 'OFF'
37  ! 'LAND'
38  ! 'KUSAKA01'
39  character(len=H_SHORT), public :: urban_sfc_type = 'NONE'
40  ! 'KUSAKA01'
41 
42  !-----------------------------------------------------------------------------
43  !
44  !++ Private procedure
45  !
46  !-----------------------------------------------------------------------------
47  !
48  !++ Private parameters & variables
49  !
50  !-----------------------------------------------------------------------------
51 contains
52  !-----------------------------------------------------------------------------
54  subroutine urban_admin_setup
55  use scale_prc, only: &
56  prc_abort
57  implicit none
58 
59  namelist / param_urban / &
61  integer :: ierr
62  !---------------------------------------------------------------------------
63 
64  log_newline
65  log_info("URBAN_ADMIN_setup",*) 'Setup'
66 
67  !--- read namelist
68  rewind(io_fid_conf)
69  read(io_fid_conf,nml=param_urban,iostat=ierr)
70  if( ierr < 0 ) then !--- missing
71  log_info("URBAN_ADMIN_setup",*) 'Not found namelist. Default used.'
72  elseif( ierr > 0 ) then !--- fatal error
73  log_error("URBAN_ADMIN_setup",*) 'Not appropriate names in namelist PARAM_URBAN. Check!'
74  call prc_abort
75  endif
76  log_nml(param_urban)
77 
78  !-----< module component check >-----
79 
80  log_newline
81  log_info("URBAN_ADMIN_setup",*) 'Urban model components '
82 
83  if ( urban_dyn_type == 'LAND' ) then
84  log_info_cont(*) 'Urban model : OFF (Land model is used for urban)'
85  urban_do = .false.
86  urban_land = .true.
87  else if ( urban_dyn_type /= 'OFF' .AND. urban_dyn_type /= 'NONE' ) then
88  log_info_cont(*) 'Urban model : ON, ', trim(urban_dyn_type)
89  urban_do = .true.
90  else
91  log_info_cont(*) 'Urban model : OFF'
92  urban_do = .false.
93  endif
94 
95  return
96  end subroutine urban_admin_setup
97 
98 end module mod_urban_admin
mod_urban_admin::urban_do
logical, public urban_do
Definition: mod_urban_admin.F90:32
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_urban_admin::urban_admin_setup
subroutine, public urban_admin_setup
Setup.
Definition: mod_urban_admin.F90:55
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_urban_admin::urban_land
logical, public urban_land
Definition: mod_urban_admin.F90:33
scale_io
module STDIO
Definition: scale_io.F90:10
mod_urban_admin::urban_dyn_type
character(len=h_short), public urban_dyn_type
Definition: mod_urban_admin.F90:35
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_urban_admin::urban_sfc_type
character(len=h_short), public urban_sfc_type
Definition: mod_urban_admin.F90:39
mod_urban_admin
module Urban admin
Definition: mod_urban_admin.F90:11
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57