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
NAMELIST
  • PARAM_TOPO
    nametypedefault valuecomment
    TOPO_IN_BASENAME character(len=H_LONG) '' basename of the input file
    TOPO_IN_CHECK_COORDINATES logical .false. > switch for check of coordinates
    TOPO_OUT_BASENAME character(len=H_LONG) '' basename of the output file
    TOPO_OUT_DTYPE character(len=H_SHORT) 'DEFAULT' REAL4 or REAL8

History Output
No history output

Function/Subroutine Documentation

◆ topo_setup()

subroutine, public scale_topography::topo_setup ( )

Setup.

Definition at line 59 of file scale_topography.F90.

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

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

59  use scale_process, only: &
61  implicit none
62 
63  namelist / param_topo / &
64  topo_in_basename, &
65  topo_in_check_coordinates, &
66  topo_out_basename, &
67  topo_out_dtype
68 
69  integer :: ierr
70  !---------------------------------------------------------------------------
71 
72  if( io_l ) write(io_fid_log,*)
73  if( io_l ) write(io_fid_log,*) '++++++ Module[TOPOGRAPHY] / Categ[ATMOS-RM GRID] / Origin[SCALElib]'
74 
75  !--- read namelist
76  rewind(io_fid_conf)
77  read(io_fid_conf,nml=param_topo,iostat=ierr)
78  if( ierr < 0 ) then !--- missing
79  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
80  elseif( ierr > 0 ) then !--- fatal error
81  write(*,*) 'xxx Not appropriate names in namelist PARAM_TOPO. Check!'
82  call prc_mpistop
83  endif
84  if( io_nml ) write(io_fid_nml,nml=param_topo)
85 
86  allocate( topo_zsfc(ia,ja) )
87  topo_zsfc(:,:) = 0.0_rp
88 
89  ! read from file
90  call topo_read
91 
92  return
subroutine, public prc_mpistop
Abort MPI.
module PROCESS
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 98 of file scale_topography.F90.

References scale_fileio::fileio_close(), scale_fileio::fileio_flush(), scale_fileio::fileio_open(), scale_stdio::io_fid_log, scale_stdio::io_l, scale_process::prc_mpistop(), topo_exist, and topo_zsfc.

Referenced by mod_cnvtopo::cnvtopo(), and mod_cnvtopo::cnvtopo_hypdiff().

98  use scale_comm, only: &
99  comm_vars8, &
100  comm_wait
101  implicit none
102  real(RP), intent(inout), optional :: Zsfc(IA,JA)
103  !---------------------------------------------------------------------------
104 
105  if ( present(zsfc) ) then
106  call comm_vars8( zsfc(:,:), 1 )
107  call comm_wait ( zsfc(:,:), 1 )
108  else
109  call comm_vars8( topo_zsfc(:,:), 1 )
110  call comm_wait ( topo_zsfc(:,:), 1 )
111  end if
112 
113  return
module COMMUNICATION
Definition: scale_comm.F90:23
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 164 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().

164  use scale_fileio, only: &
165  fileio_write
166  implicit none
167  !---------------------------------------------------------------------------
168 
169  if ( topo_out_basename /= '' ) then
170 
171  if( io_l ) write(io_fid_log,*)
172  if( io_l ) write(io_fid_log,*) '*** Output topography file ***'
173 
174  call fileio_write( topo_zsfc(:,:), topo_out_basename, topo_out_title, & ! [IN]
175  'TOPO', 'Topography', 'm', 'XY', topo_out_dtype, & ! [IN]
176  nozcoord=.true. )
177 
178  endif
179 
180  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.

◆ topo_zsfc

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