SCALE-RM
Functions/Subroutines | Variables
scale_topography Module Reference

module TOPOGRAPHY More...

Functions/Subroutines

subroutine, public topo_setup
 Setup. More...
 
subroutine, public topo_fillhalo (Zsfc)
 HALO Communication. More...
 
subroutine, public topo_write
 Write topography. More...
 

Variables

logical, public topo_exist = .false.
 topography exists? More...
 
real(rp), dimension(:,:), allocatable, public topo_zsfc
 absolute ground height [m] More...
 

Detailed Description

module TOPOGRAPHY

Description
Topography module
Author
Team SCALE

Function/Subroutine Documentation

◆ topo_setup()

subroutine, public scale_topography::topo_setup ( )

Setup.

Definition at line 58 of file scale_topography.F90.

References 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_process::prc_mpistop(), and topo_zsfc.

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

58  use scale_process, only: &
60  implicit none
61 
62  namelist / param_topo / &
63  topo_in_basename, &
64  topo_out_basename, &
65  topo_out_dtype
66 
67  integer :: ierr
68  !---------------------------------------------------------------------------
69 
70  if( io_l ) write(io_fid_log,*)
71  if( io_l ) write(io_fid_log,*) '++++++ Module[TOPOGRAPHY] / Categ[ATMOS-RM GRID] / Origin[SCALElib]'
72 
73  !--- read namelist
74  rewind(io_fid_conf)
75  read(io_fid_conf,nml=param_topo,iostat=ierr)
76  if( ierr < 0 ) then !--- missing
77  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
78  elseif( ierr > 0 ) then !--- fatal error
79  write(*,*) 'xxx Not appropriate names in namelist PARAM_TOPO. Check!'
80  call prc_mpistop
81  endif
82  if( io_lnml ) write(io_fid_log,nml=param_topo)
83 
84  allocate( topo_zsfc(ia,ja) )
85  topo_zsfc(:,:) = 0.0_rp
86 
87  ! read from file
88  call topo_read
89 
90  return
subroutine, public prc_mpistop
Abort MPI.
integer, public ia
of x whole cells (local, with HALO)
module PROCESS
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
integer, public ja
of y whole cells (local, with HALO)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ topo_fillhalo()

subroutine, public scale_topography::topo_fillhalo ( real(rp), dimension(ia,ja), intent(inout), optional  Zsfc)

HALO Communication.

Definition at line 96 of file scale_topography.F90.

References scale_grid::grid_cx, scale_grid::grid_cy, scale_grid_index::ia, scale_stdio::io_fid_log, scale_stdio::io_l, scale_grid_index::ja, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_precision::rp, topo_exist, and topo_zsfc.

Referenced by mod_cnvtopo::cnvtopo().

96  use scale_comm, only: &
97  comm_vars8, &
98  comm_wait
99  implicit none
100  real(RP), intent(inout), optional :: zsfc(ia,ja)
101  !---------------------------------------------------------------------------
102 
103  if ( present(zsfc) ) then
104  call comm_vars8( zsfc(:,:), 1 )
105  call comm_wait ( zsfc(:,:), 1 )
106  else
107  call comm_vars8( topo_zsfc(:,:), 1 )
108  call comm_wait ( topo_zsfc(:,:), 1 )
109  end if
110 
111  return
integer, public ia
of x whole cells (local, with HALO)
module COMMUNICATION
Definition: scale_comm.F90:23
integer, public ja
of y whole cells (local, with HALO)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ topo_write()

subroutine, public scale_topography::topo_write ( )

Write topography.

Definition at line 179 of file scale_topography.F90.

References scale_stdio::io_fid_log, scale_stdio::io_l, and topo_zsfc.

Referenced by mod_cnvtopo::cnvtopo(), and mod_mktopo::mktopo().

179  use scale_fileio, only: &
180  fileio_write
181  implicit none
182  !---------------------------------------------------------------------------
183 
184  if ( topo_out_basename /= '' ) then
185 
186  if( io_l ) write(io_fid_log,*)
187  if( io_l ) write(io_fid_log,*) '*** Output topography file ***'
188 
189  call fileio_write( topo_zsfc(:,:), topo_out_basename, topo_out_title, & ! [IN]
190  'TOPO', 'Topography', 'm', 'XY', topo_out_dtype, & ! [IN]
191  nozcoord=.true. )
192 
193  endif
194 
195  return
module FILE I/O (netcdf)
Here is the caller graph for this function:

Variable Documentation

◆ topo_exist

logical, public scale_topography::topo_exist = .false.

topography exists?

Definition at line 34 of file scale_topography.F90.

Referenced by scale_interpolation::interp_setup(), and topo_fillhalo().

34  logical, public :: topo_exist = .false.
logical, public topo_exist
topography exists?

◆ topo_zsfc

real(rp), dimension(:,:), allocatable, public scale_topography::topo_zsfc