SCALE-RM
Functions/Subroutines | Variables
scale_land_grid Module Reference

module GRID (cartesian) for land More...

Functions/Subroutines

subroutine, public land_grid_setup
 Setup. More...
 

Variables

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

Detailed Description

module GRID (cartesian) for land

Description
Grid module for cartesian coordinate for land
Author
Team SCALE
History

Function/Subroutine Documentation

◆ land_grid_setup()

subroutine, public scale_land_grid::land_grid_setup ( )

Setup.

Definition at line 61 of file scale_land_grid.F90.

References scale_grid::grid_cbfx, scale_grid::grid_cbfy, scale_grid::grid_cbfz, grid_lcdz, grid_lcz, grid_lfz, scale_grid_index::ia, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_l, scale_stdio::io_lnml, scale_grid_index::ja, scale_grid_index::ka, scale_land_grid_index::lke, scale_land_grid_index::lks, scale_process::prc_mpistop(), and scale_process::prc_myrank.

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

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

Variable Documentation

◆ grid_lcz

real(rp), dimension (:), allocatable, public scale_land_grid::grid_lcz

center coordinate [m]: z, local=global

Definition at line 36 of file scale_land_grid.F90.

Referenced by scale_fileio::fileio_set_axes(), scale_fileio::fileio_write_axes(), scale_history::hist_switch(), land_grid_setup(), and mod_realinput::parentatomsetup().

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

◆ grid_lfz

real(rp), dimension (:), allocatable, public scale_land_grid::grid_lfz

face coordinate [m]: z, local=global

Definition at line 37 of file scale_land_grid.F90.

Referenced by scale_fileio::fileio_set_axes(), scale_fileio::fileio_write_axes(), scale_history::hist_switch(), and land_grid_setup().

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

◆ grid_lcdz

real(rp), dimension (:), allocatable, public scale_land_grid::grid_lcdz

z-length of control volume [m]

Definition at line 38 of file scale_land_grid.F90.

Referenced by scale_history::hist_switch(), land_grid_setup(), and mod_land_phy_driver::land_phy_driver().

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