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...
 
subroutine, public urban_grid_cartesc_finalize
 Finalize. 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 61 of file scale_urban_grid_cartesC.F90.

61  use scale_prc, only: &
62  prc_abort
63  use scale_file, only: &
65  implicit none
66 
67  namelist / param_urban_grid_cartesc / &
68  urban_grid_cartesc_in_basename, &
69  urban_grid_cartesc_in_aggregate, &
70  udz
71 
72  integer :: ierr
73  integer :: k
74  !---------------------------------------------------------------------------
75 
76  log_newline
77  log_info("URBAN_GRID_CARTESC_setup",*) 'Setup'
78 
79  if ( ukmax < 1 ) then
80  log_info("URBAN_GRID_CARTESC_setup",*) 'Skip because UKMAX < 1'
81  return
82  end if
83 
84  udz(:) = 0.0_rp
85 
86  urban_grid_cartesc_in_aggregate = file_aggregate
87 
88  !--- read namelist
89  rewind(io_fid_conf)
90  read(io_fid_conf,nml=param_urban_grid_cartesc,iostat=ierr)
91  if( ierr < 0 ) then !--- missing
92  log_info("URBAN_GRID_CARTESC_setup",*) 'Not found namelist. Default used.'
93  elseif( ierr > 0 ) then !--- fatal error
94  log_error("URBAN_GRID_CARTESC_setup",*) 'Not appropriate names in namelist PARAM_URBAN_GRID_CARTESC. Check!'
95  call prc_abort
96  endif
97  log_nml(param_urban_grid_cartesc)
98 
99  allocate( urban_grid_cartesc_cz(uks :uke) )
100  allocate( urban_grid_cartesc_fz(uks-1:uke) )
101  allocate( urban_grid_cartesc_cdz(uks :uke) )
102  !$acc enter data create(URBAN_GRID_CARTESC_CZ,URBAN_GRID_CARTESC_FZ,URBAN_GRID_CARTESC_CDZ)
103 
104  log_newline
105  log_info("URBAN_GRID_CARTESC_setup",*) 'Urban grid information '
106 
107  if ( urban_grid_cartesc_in_basename /= '' ) then
108  call urban_grid_cartesc_read
109  else
110  log_info("URBAN_GRID_CARTESC_setup",*) 'Not found input grid file. Grid position is calculated.'
111 
112  call urban_grid_cartesc_generate
113  endif
114 
115  if ( uke == uks ) then
116  log_newline
117  log_info("URBAN_GRID_CARTESC_setup",*) 'Single layer. LDZ = ', udz(1)
118  else
119  log_newline
120  log_info("URBAN_GRID_CARTESC_setup",'(1x,A)') 'Vertical Coordinate'
121  log_info_cont('(1x,A)') '| k z zh dz k |'
122  log_info_cont('(1x,A)') '| [m] [m] [m] |'
123  k = uks-1
124  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' ',k,' | Atmosphere interface'
125  do k = uks, uke-1
126  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,urban_grid_cartesc_cz(k),' ',urban_grid_cartesc_cdz(k),' | '
127  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' |',k,' | '
128  enddo
129  k = uke
130  log_info_cont('(1x,A,I4,F8.3,A,F8.3,A)') '|',k,urban_grid_cartesc_cz(k),' ',urban_grid_cartesc_cdz(k),' | '
131  log_info_cont('(1x,A,F8.3,A,I4,A)') '| ',urban_grid_cartesc_fz(k),' ',k,' | bedrock'
132  log_info_cont('(1x,A)') '|=================================|'
133  endif
134 
135  !$acc update device(URBAN_GRID_CARTESC_CZ,URBAN_GRID_CARTESC_FZ,URBAN_GRID_CARTESC_CDZ)
136 
137  return

References scale_file::file_aggregate, scale_io::io_fid_conf, scale_prc::prc_abort(), 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ urban_grid_cartesc_finalize()

subroutine, public scale_urban_grid_cartesc::urban_grid_cartesc_finalize

Finalize.

Definition at line 143 of file scale_urban_grid_cartesC.F90.

143  implicit none
144  !---------------------------------------------------------------------------
145 
146  log_newline
147  log_info("URBAN_GRID_CARTESC_finalize",*) 'Finalize'
148 
149  !$acc exit data delete(URBAN_GRID_CARTESC_CZ,URBAN_GRID_CARTESC_FZ,URBAN_GRID_CARTESC_CDZ)
150  deallocate( urban_grid_cartesc_cz )
151  deallocate( urban_grid_cartesc_fz )
152  deallocate( urban_grid_cartesc_cdz )
153 
154  return

References scale_file::file_open(), scale_prc::prc_myrank, scale_urban_grid_cartesc_index::uke, 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().

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

◆ 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 37 of file scale_urban_grid_cartesC.F90.

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

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

◆ urban_grid_cartesc_cdz

real(rp), dimension (:), allocatable, public scale_urban_grid_cartesc::urban_grid_cartesc_cdz
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_urban_grid_cartesc::urban_grid_cartesc_cdz
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cdz
z-length of control volume [m]
Definition: scale_urban_grid_cartesC.F90:38
scale_urban_grid_cartesc::urban_grid_cartesc_cz
real(rp), dimension(:), allocatable, public urban_grid_cartesc_cz
center coordinate [m]: z, local=global
Definition: scale_urban_grid_cartesC.F90:36
scale_file
module file
Definition: scale_file.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_file::file_aggregate
logical, public file_aggregate
Definition: scale_file.F90:196
scale_urban_grid_cartesc::urban_grid_cartesc_fz
real(rp), dimension(:), allocatable, public urban_grid_cartesc_fz
face coordinate [m]: z, local=global
Definition: scale_urban_grid_cartesC.F90:37