SCALE-RM
Functions/Subroutines | Variables
scale_urban_grid_cartesc Module Reference

module urban / grid / cartesianC More...

Functions/Subroutines

subroutine, public urban_grid_cartesc_setup
 Setup. More...
 

Variables

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

Detailed Description

module urban / grid / cartesianC

Description
Grid module for cartesian coordinate for urban
Author
Team SCALE
NAMELIST
  • PARAM_URBAN_GRID_CARTESC
    nametypedefault valuecomment
    URBAN_GRID_CARTESC_IN_BASENAME character(len=H_LONG) ''
    URBAN_GRID_CARTESC_IN_AGGREGATE logical
    UDZ real(RP), dimension(200)

History Output
No history output

Function/Subroutine Documentation

◆ urban_grid_cartesc_setup()

subroutine, public scale_urban_grid_cartesc::urban_grid_cartesc_setup ( )

Setup.

Definition at line 60 of file scale_urban_grid_cartesC.F90.

References scale_file::file_aggregate, scale_file::file_open(), scale_io::io_fid_conf, scale_prc::prc_abort(), scale_prc::prc_myrank, scale_urban_grid_cartesc_index::uke, scale_urban_grid_cartesc_index::ukmax, scale_urban_grid_cartesc_index::uks, urban_grid_cartesc_cdz, urban_grid_cartesc_cz, and urban_grid_cartesc_fz.

Referenced by mod_rm_driver::rm_driver(), and mod_rm_prep::rm_prep().

60  use scale_prc, only: &
61  prc_abort
62  use scale_file, only: &
64  implicit none
65 
66  namelist / param_urban_grid_cartesc / &
67  urban_grid_cartesc_in_basename, &
68  urban_grid_cartesc_in_aggregate, &
69  udz
70 
71  integer :: ierr
72  integer :: k
73  !---------------------------------------------------------------------------
74 
75  log_newline
76  log_info("URBAN_GRID_CARTESC_setup",*) 'Setup'
77 
78  if ( ukmax < 1 ) then
79  log_info("URBAN_GRID_CARTESC_setup",*) 'Skip because UKMAX < 1'
80  return
81  end if
82 
83  udz(:) = 0.0_rp
84 
85  urban_grid_cartesc_in_aggregate = file_aggregate
86 
87  !--- read namelist
88  rewind(io_fid_conf)
89  read(io_fid_conf,nml=param_urban_grid_cartesc,iostat=ierr)
90  if( ierr < 0 ) then !--- missing
91  log_info("URBAN_GRID_CARTESC_setup",*) 'Not found namelist. Default used.'
92  elseif( ierr > 0 ) then !--- fatal error
93  log_error("URBAN_GRID_CARTESC_setup",*) 'Not appropriate names in namelist PARAM_URBAN_GRID_CARTESC. Check!'
94  call prc_abort
95  endif
96  log_nml(param_urban_grid_cartesc)
97 
98  allocate( urban_grid_cartesc_cz(uks :uke) )
99  allocate( urban_grid_cartesc_fz(uks-1:uke) )
100  allocate( urban_grid_cartesc_cdz(uks :uke) )
101 
102  log_newline
103  log_info("URBAN_GRID_CARTESC_setup",*) 'Urban grid information '
104 
105  if ( urban_grid_cartesc_in_basename /= '' ) then
106  call urban_grid_cartesc_read
107  else
108  log_info("URBAN_GRID_CARTESC_setup",*) 'Not found input grid file. Grid position is calculated.'
109 
110  call urban_grid_cartesc_generate
111  endif
112 
113  if ( uke == uks ) then
114  log_newline
115  log_info("URBAN_GRID_CARTESC_setup",*) 'Single layer. LDZ = ', udz(1)
116  else
117  log_newline
118  log_info("URBAN_GRID_CARTESC_setup",'(1x,A)') 'Vertical Coordinate'
119  log_info_cont('(1x,A)') '| k z zh dz k |'
120  log_info_cont('(1x,A)') '| [m] [m] [m] |'
121  k = uks-1
122  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' ',k,' | Atmosphere interface'
123  do k = uks, uke-1
124  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,urban_grid_cartesc_cz(k),' ',urban_grid_cartesc_cdz(k),' | '
125  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' |',k,' | '
126  enddo
127  k = uke
128  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,urban_grid_cartesc_cz(k),' ',urban_grid_cartesc_cdz(k),' | '
129  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' ',k,' | bedrock'
130  log_info_cont('(1x,A)') '|=================================|'
131  endif
132 
133  return
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cz
center coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public urban_grid_cartesc_fz
face coordinate [m]: z, local=global
logical, public file_aggregate
Definition: scale_file.F90:171
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module file
Definition: scale_file.F90:15
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cdz
z-length of control volume [m]
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ urban_grid_cartesc_cz

real(rp), dimension (:), allocatable, public scale_urban_grid_cartesc::urban_grid_cartesc_cz

center coordinate [m]: z, local=global

Definition at line 35 of file scale_urban_grid_cartesC.F90.

Referenced by scale_file_cartesc::file_cartesc_set_coordinates_urban(), scale_file_cartesc::file_cartesc_write_axes(), scale_file_history_cartesc::file_history_cartesc_truncate_3d(), and urban_grid_cartesc_setup().

35  real(RP), public, allocatable :: urban_grid_cartesc_cz (:)
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cz
center coordinate [m]: z, local=global

◆ urban_grid_cartesc_fz

real(rp), dimension (:), allocatable, public scale_urban_grid_cartesc::urban_grid_cartesc_fz

face coordinate [m]: z, local=global

Definition at line 36 of file scale_urban_grid_cartesC.F90.

Referenced by scale_file_cartesc::file_cartesc_write_axes(), scale_file_history_cartesc::file_history_cartesc_truncate_3d(), and urban_grid_cartesc_setup().

36  real(RP), public, allocatable :: urban_grid_cartesc_fz (:)
real(rp), dimension(:), allocatable, public urban_grid_cartesc_fz
face coordinate [m]: z, local=global

◆ urban_grid_cartesc_cdz

real(rp), dimension (:), allocatable, public scale_urban_grid_cartesc::urban_grid_cartesc_cdz