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, FILL_BND)
 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_AGGREGATE logical > switch to use aggregated 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_AGGREGATE logical > switch to use aggregated 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 62 of file scale_topography.F90.

References scale_file::file_aggregate, scale_atmos_grid_cartesc_index::ia, scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::ja, scale_prc::prc_abort(), and topo_zsfc.

Referenced by mod_rm_driver::rm_driver(), and mod_rm_prep::rm_prep().

62  use scale_file, only: &
64  use scale_prc, only: &
65  prc_abort
66  implicit none
67 
68  namelist / param_topo / &
69  topo_in_basename, &
70  topo_in_aggregate, &
71  topo_in_check_coordinates, &
72  topo_out_basename, &
73  topo_out_aggregate, &
74  topo_out_dtype
75 
76  integer :: ierr
77  !---------------------------------------------------------------------------
78 
79  log_newline
80  log_info("TOPO_setup",*) 'Setup'
81 
82  topo_in_aggregate = file_aggregate
83  topo_out_aggregate = file_aggregate
84 
85  !--- read namelist
86  rewind(io_fid_conf)
87  read(io_fid_conf,nml=param_topo,iostat=ierr)
88  if( ierr < 0 ) then !--- missing
89  log_info("TOPO_setup",*) 'Not found namelist. Default used.'
90  elseif( ierr > 0 ) then !--- fatal error
91  log_error("TOPO_setup",*) 'Not appropriate names in namelist PARAM_TOPO. Check!'
92  call prc_abort
93  endif
94  log_nml(param_topo)
95 
96  allocate( topo_zsfc(ia,ja) )
97  topo_zsfc(:,:) = 0.0_rp
98 
99  ! read from file
100  call topo_read
101 
102  return
integer, public ia
of whole cells: x, local, with HALO
logical, public file_aggregate
Definition: scale_file.F90:171
integer, public ja
of whole cells: y, local, with HALO
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module file
Definition: scale_file.F90:15
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
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,
logical, intent(in), optional  FILL_BND 
)

HALO Communication.

Definition at line 108 of file scale_topography.F90.

References scale_file_cartesc::file_cartesc_close(), scale_file_cartesc::file_cartesc_flush(), scale_file_cartesc::file_cartesc_open(), scale_prc::prc_abort(), topo_exist, and topo_zsfc.

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

108  use scale_comm_cartesc, only: &
109  comm_vars8, &
110  comm_wait
111  implicit none
112 
113  real(RP), intent(inout), optional :: zsfc(ia,ja)
114  logical, intent(in), optional :: fill_bnd
115 
116  logical :: fill_bnd_
117  !---------------------------------------------------------------------------
118 
119  fill_bnd_ = .false.
120  if ( present(fill_bnd) ) fill_bnd_ = fill_bnd
121 
122  if ( present(zsfc) ) then
123  call comm_vars8( zsfc(:,:), 1 )
124  call comm_wait ( zsfc(:,:), 1, fill_bnd_ )
125  else
126  call comm_vars8( topo_zsfc(:,:), 1 )
127  call comm_wait ( topo_zsfc(:,:), 1, fill_bnd_ )
128  end if
129 
130  return
integer, public ia
of whole cells: x, local, with HALO
integer, public ja
of whole cells: y, local, with HALO
module COMMUNICATION
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
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 181 of file scale_topography.F90.

References topo_fillhalo(), and topo_zsfc.

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

181  use scale_file_cartesc, only: &
182  file_cartesc_write
183  implicit none
184  !---------------------------------------------------------------------------
185 
186  if ( topo_out_basename /= '' ) then
187 
188  log_newline
189  log_info("TOPO_write",*) 'Output topography file '
190 
191  call topo_fillhalo( fill_bnd=.false. )
192 
193  call file_cartesc_write( topo_zsfc(:,:), topo_out_basename, topo_out_title, & ! [IN]
194  'TOPO', 'Topography', 'm', 'XY', topo_out_dtype, & ! [IN]
195  standard_name="surface_altitude", & ! [IN]
196  haszcoord=.false., aggregate=topo_out_aggregate ) ! [IN]
197 
198  endif
199 
200  return
module file / cartesianC
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ topo_exist

logical, public scale_topography::topo_exist = .false.

topography exists?

Definition at line 35 of file scale_topography.F90.

Referenced by scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_setup(), and topo_fillhalo().

35  logical, public :: topo_exist = .false.

◆ topo_zsfc

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