SCALE-RM
scale_urban_grid_index.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  !-----------------------------------------------------------------------------
19  implicit none
20  private
21  !-----------------------------------------------------------------------------
22  !
23  !++ Public procedure
24  !
25  public :: urban_grid_index_setup
26 
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public parameters & variables
30  !
31  integer, public :: ukmax = 1 ! # of computational cells: z for urban
32 
33  integer, public :: uks ! start point of inner domain: z for urban, local
34  integer, public :: uke ! end point of inner domain: z for urban, local
35 
36  !-----------------------------------------------------------------------------
37  !
38  !++ Private procedure
39  !
40  !-----------------------------------------------------------------------------
41  !
42  !++ Private parameters & variables
43  !
44  !-----------------------------------------------------------------------------
45 contains
46  !-----------------------------------------------------------------------------
48  subroutine urban_grid_index_setup
49  use scale_process, only: &
51  implicit none
52 
53  namelist / param_urban_index / &
54  ukmax
55 
56  integer :: ierr
57  !---------------------------------------------------------------------------
58 
59  if( io_l ) write(io_fid_log,*)
60  if( io_l ) write(io_fid_log,*) '++++++ Module[GRID_INDEX] / Categ[URBAN GRID] / Origin[SCALElib]'
61 
62  !--- read namelist
63  rewind(io_fid_conf)
64  read(io_fid_conf,nml=param_urban_index,iostat=ierr)
65  if( ierr < 0 ) then !--- missing
66  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
67  elseif( ierr > 0 ) then !--- fatal error
68  write(*,*) 'xxx Not appropriate names in namelist PARAM_URBAN_INDEX. Check!'
69  call prc_mpistop
70  endif
71  if( io_nml ) write(io_fid_nml,nml=param_urban_index)
72 
73  uks = 1
74  uke = ukmax
75 
76  if( io_l ) write(io_fid_log,*)
77  if( io_l ) write(io_fid_log,*) '*** Urban grid index information ***'
78  if( io_l ) write(io_fid_log,'(1x,A,I6,A,I6,A,I6)') '*** z-axis levels :', ukmax
79 
80  return
81  end subroutine urban_grid_index_setup
82 
83 end module scale_urban_grid_index
subroutine, public prc_mpistop
Abort MPI.
subroutine, public urban_grid_index_setup
Setup.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:61
module STDIO
Definition: scale_stdio.F90:12
logical, public io_nml
output log or not? (for namelist, this process)
Definition: scale_stdio.F90:62
module PROCESS
module profiler
Definition: scale_prof.F90:10
module PRECISION
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
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
module urban grid index