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
NAMELIST
  • PARAM_LAND_GRID
    nametypedefault valuecomment
    LAND_GRID_IN_BASENAME character(len=H_LONG) ''
    LAND_GRID_OUT_BASENAME character(len=H_LONG) ''
    LDZ real(RP), dimension(100)

History Output
No history output

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_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, 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_nml ) write(io_fid_nml,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,*)
108  if( io_l ) write(io_fid_log,*) '*** Single layer. LDZ = ', ldz(1)
109  else
110  if( io_l ) write(io_fid_log,*)
111  if( io_l ) write(io_fid_log,'(1x,A)') &
112  '|====== Vertical Coordinate ======|'
113  if( io_l ) write(io_fid_log,'(1x,A)') &
114  '| k z zh dz k |'
115  if( io_l ) write(io_fid_log,'(1x,A)') &
116  '| [m] [m] [m] |'
117  k = lks-1
118  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
119  '| ',grid_lfz(k),' ',k,' | Atmosphere interface'
120  do k = lks, lke-1
121  if( io_l ) write(io_fid_log,'(1x,A,I4,F8.3,A,F8.3,A)') &
122  '|',k,grid_lcz(k),' ',grid_lcdz(k),' | '
123  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
124  '| ',grid_lfz(k),' |',k,' | '
125  enddo
126  k = lke
127  if( io_l ) write(io_fid_log,'(1x,A,I4,F8.3,A,F8.3,A)') &
128  '|',k,grid_lcz(k),' ',grid_lcdz(k),' | '
129  if( io_l ) write(io_fid_log,'(1x,A,F8.3,A,I4,A)') &
130  '| ',grid_lfz(k),' ',k,' | bedrock'
131  if( io_l ) write(io_fid_log,'(1x,A)') &
132  '|=================================|'
133  endif
134 
135  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_lcdz
z-length of control volume [m]
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_check_coordinates_name(), scale_fileio::fileio_write_axes(), scale_history::hist_setup(), land_grid_setup(), and mod_realinput::parentatomsetup().

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

◆ 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_write_axes(), scale_history::hist_setup(), and land_grid_setup().

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

◆ 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_fileio::fileio_write_axes(), scale_history::hist_setup(), land_grid_setup(), and mod_land_phy_driver::land_phy_driver().

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