SCALE-RM
Functions/Subroutines | Variables
scale_urban_grid Module Reference

module GRID (cartesian) for urban More...

Functions/Subroutines

subroutine, public urban_grid_setup
 Setup. More...
 

Variables

real(rp), dimension(:), allocatable, public grid_ucz
 center coordinate [m]: z, local=global More...
 
real(rp), dimension(:), allocatable, public grid_ufz
 face coordinate [m]: z, local=global More...
 
real(rp), dimension(:), allocatable, public grid_ucdz
 z-length of control volume [m] More...
 

Detailed Description

module GRID (cartesian) for urban

Description
Grid module for cartesian coordinate for urban
Author
Team SCALE
History
NAMELIST
  • PARAM_URBAN_GRID
    nametypedefault valuecomment
    URBAN_GRID_IN_BASENAME character(len=H_LONG) ''
    URBAN_GRID_OUT_BASENAME character(len=H_LONG) ''
    UDZ real(RP), dimension(200)

History Output
No history output

Function/Subroutine Documentation

◆ urban_grid_setup()

subroutine, public scale_urban_grid::urban_grid_setup ( )

Setup.

Definition at line 61 of file scale_urban_grid.F90.

References grid_ucdz, grid_ucz, grid_ufz, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_urban_grid_index::uke, and scale_urban_grid_index::uks.

Referenced by mod_rm_driver::scalerm(), and mod_rm_prep::scalerm_prep().

61  use scale_process, only: &
63  implicit none
64 
65  namelist / param_urban_grid / &
66  urban_grid_in_basename, &
67  urban_grid_out_basename, &
68  udz
69 
70  integer :: ierr
71  integer :: k
72  !---------------------------------------------------------------------------
73 
74  if( io_l ) write(io_fid_log,*)
75  if( io_l ) write(io_fid_log,*) '++++++ Module[GRID] / Categ[URBAN GRID] / Origin[SCALElib]'
76 
77  udz(:) = 0.0_rp
78 
79  !--- read namelist
80  rewind(io_fid_conf)
81  read(io_fid_conf,nml=param_urban_grid,iostat=ierr)
82  if( ierr < 0 ) then !--- missing
83  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
84  elseif( ierr > 0 ) then !--- fatal error
85  write(*,*) 'xxx Not appropriate names in namelist PARAM_URBAN_GRID. Check!'
86  call prc_mpistop
87  endif
88  if( io_nml ) write(io_fid_nml,nml=param_urban_grid)
89 
90  allocate( grid_ucz(uks :uke) )
91  allocate( grid_ufz(uks-1:uke) )
92  allocate( grid_ucdz(uks :uke) )
93 
94  if( io_l ) write(io_fid_log,*)
95  if( io_l ) write(io_fid_log,*) '*** Urban grid information ***'
96 
97  if ( urban_grid_in_basename /= '' ) then
98  call urban_grid_read
99  else
100  if( io_l ) write(io_fid_log,*) '*** Not found input grid file. Grid position is calculated.'
101 
102  call urban_grid_generate
103  endif
104 
105  if ( uke == uks ) then
106  if( io_l ) write(io_fid_log,*)
107  if( io_l ) write(io_fid_log,*) '*** Single layer. LDZ = ', udz(1)
108  else
109  if( io_l ) write(io_fid_log,*)
110  if( io_l ) write(io_fid_log,'(1x,A)') &
111  '|====== Vertical Coordinate ======|'
112  if( io_l ) write(io_fid_log,'(1x,A)') &
113  '| k z zh dz k |'
114  if( io_l ) write(io_fid_log,'(1x,A)') &
115  '| [m] [m] [m] |'
116  k = uks-1
117  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
118  '| ',grid_ufz(k),' ',k,' | Atmosphere interface'
119  do k = uks, uke-1
120  if( io_l ) write(io_fid_log,'(1x,A,I4,F8.3,A,F8.3,A)') &
121  '|',k,grid_ucz(k),' ',grid_ucdz(k),' | '
122  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
123  '| ',grid_ufz(k),' |',k,' | '
124  enddo
125  k = uke
126  if( io_l ) write(io_fid_log,'(1x,A,I4,F8.3,A,F8.3,A)') &
127  '|',k,grid_ucz(k),' ',grid_ucdz(k),' | '
128  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
129  '| ',grid_ufz(k),' ',k,' | bedrock'
130  if( io_l ) write(io_fid_log,'(1x,A)') &
131  '|=================================|'
132  endif
133 
134  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:), allocatable, public grid_ucdz
z-length of control volume [m]
real(rp), dimension(:), allocatable, public grid_ufz
face coordinate [m]: z, local=global
module PROCESS
real(rp), dimension(:), allocatable, public grid_ucz
center coordinate [m]: z, local=global
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ grid_ucz

real(rp), dimension (:), allocatable, public scale_urban_grid::grid_ucz

center coordinate [m]: z, local=global

Definition at line 36 of file scale_urban_grid.F90.

Referenced by scale_fileio::fileio_check_coordinates_name(), scale_fileio::fileio_write_axes(), scale_history::hist_setup(), and urban_grid_setup().

36  real(RP), public, allocatable :: GRID_UCZ (:)

◆ grid_ufz

real(rp), dimension (:), allocatable, public scale_urban_grid::grid_ufz

face coordinate [m]: z, local=global

Definition at line 37 of file scale_urban_grid.F90.

Referenced by scale_fileio::fileio_write_axes(), scale_history::hist_setup(), and urban_grid_setup().

37  real(RP), public, allocatable :: GRID_UFZ (:)

◆ grid_ucdz

real(rp), dimension (:), allocatable, public scale_urban_grid::grid_ucdz

z-length of control volume [m]

Definition at line 38 of file scale_urban_grid.F90.

Referenced by scale_fileio::fileio_write_axes(), scale_history::hist_setup(), and urban_grid_setup().

38  real(RP), public, allocatable :: GRID_UCDZ (:)