SCALE-RM
Functions/Subroutines | Variables
mod_copytopo Module Reference

module Copy topography More...

Functions/Subroutines

subroutine, public copytopo (topo_cd)
 Setup and Main. More...
 

Variables

integer, public cnvtopo_type = -1
 
integer, parameter, public i_ignore = 0
 
integer, parameter, public i_gtopo30 = 1
 
integer, parameter, public i_dem50m = 2
 
integer, parameter, public i_gmted2010 = 3
 

Detailed Description

module Copy topography

Description
subroutines for preparing topography data (copy from parent domain)
Author
Team SCALE
NAMELIST
  • PARAM_COPYTOPO
    nametypedefault valuecomment
    COPYTOPO_IN_BASENAME character(len=H_LONG) ''
    COPYTOPO_TRANSITION_DX real(RP) -1.0_RP thickness of transition region [m]: x
    COPYTOPO_TRANSITION_DY real(RP) -1.0_RP thickness of transition region [m]: y
    COPYTOPO_TRANSFACT real(RP) -1.0_RP stretch factor of transition region
    COPYTOPO_FRACX real(RP) 1.0_RP fraction of transition region (x) (0-1)
    COPYTOPO_FRACY real(RP) 1.0_RP fraction of transition region (y) (0-1)
    COPYTOPO_TAUX real(RP) 1.0_RP maximum value for mixing tau (x) [s]
    COPYTOPO_TAUY real(RP) 1.0_RP maximum value for mixing tau (y) [s]
    COPYTOPO_ENTIRE_REGION logical .false. copy parent topo over an entire region
    COPYTOPO_LINEAR_H logical .true. linear or non-linear profile of relax region
    COPYTOPO_EXP_H real(RP) 2.0_RP factor of non-linear profile of relax region

History Output
No history output

Function/Subroutine Documentation

◆ copytopo()

subroutine, public mod_copytopo::copytopo ( real(rp), dimension(:,:), intent(inout)  topo_cd)

Setup and Main.

Definition at line 84 of file mod_copytopo.f90.

References scale_grid::buffer_dx, scale_grid::buffer_dy, scale_grid::bufffact, scale_const::const_d2r, scale_const::const_eps, scale_const::const_radius, scale_grid::dx, scale_grid::dy, scale_grid::grid_cbfxg, scale_grid::grid_cbfyg, scale_grid::grid_cxg, scale_grid::grid_cyg, scale_grid::grid_fxg, scale_grid::grid_fyg, scale_grid_index::ia, scale_grid_index::iag, scale_grid_index::ihalo, scale_grid_index::imax, scale_interpolation_nest::intrpnest_domain_compatibility(), scale_interpolation_nest::intrpnest_interp_2d, scale_interpolation_nest::intrpnest_interp_fact_latlon(), 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::jag, scale_grid_index::jhalo, scale_grid_index::jmax, scale_grid_nest::nest_domain_shape(), scale_grid_nest::nest_interp_level, scale_grid_nest::nest_tile_id, scale_grid_nest::nest_tile_num_x, scale_grid_nest::nest_tile_num_y, scale_grid_nest::parent_imax, scale_grid_nest::parent_jmax, scale_rm_process::prc_2drank, scale_process::prc_mpistop(), scale_process::prc_myrank, scale_rm_process::prc_num_x, scale_rm_process::prc_num_y, scale_grid_real::real_lat, and scale_grid_real::real_lon.

Referenced by mod_cnvtopo::cnvtopo().

84  use scale_process, only: &
86  use scale_grid, only: &
87  dx, &
88  dy, &
89  buffer_dx, &
90  buffer_dy, &
91  bufffact
92  use scale_grid_nest, only: &
94  implicit none
95 
96  real(RP), intent(inout) :: topo_cd(:,:)
97 
98  namelist / param_copytopo / &
99  copytopo_in_basename, &
100  copytopo_transition_dx, &
101  copytopo_transition_dy, &
102  copytopo_transfact, &
103  copytopo_fracx, &
104  copytopo_fracy, &
105  copytopo_taux, &
106  copytopo_tauy, &
107  copytopo_entire_region, &
108  copytopo_linear_h, &
109  copytopo_exp_h
110 
111  integer :: ierr
112  !---------------------------------------------------------------------------
113 
114  if( io_l ) write(io_fid_log,*)
115  if( io_l ) write(io_fid_log,*) '+++ Module[COPYTOPO]/Categ[COPYTOPO]'
116 
117  !--- read namelist
118  rewind(io_fid_conf)
119  read(io_fid_conf,nml=param_copytopo,iostat=ierr)
120  if( ierr < 0 ) then !--- missing
121  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
122  elseif( ierr > 0 ) then !--- fatal error
123  write(*,*) 'xxx Not appropriate names in namelist PARAM_COPYTOPO. Check!'
124  call prc_mpistop
125  endif
126  if( io_nml ) write(io_fid_nml,nml=param_copytopo)
127 
128  if ( copytopo_transition_dx < 0.0_rp ) then
129  copytopo_transition_dx = buffer_dx
130  end if
131  if ( copytopo_transition_dy < 0.0_rp ) then
132  copytopo_transition_dy = buffer_dy
133  end if
134  if ( copytopo_transfact < 0.0_rp ) then
135  copytopo_transfact = bufffact
136  end if
137 
138  allocate( ctrx(ia) )
139  allocate( ctry(ja) )
140  allocate( copytopo_alpha(ia,ja) )
141  allocate( topo_pd(ia,ja) )
142  copytopo_alpha(:,:) = 0.0_rp
143 
144  itp_nh = int( nest_interp_level )
145 
146  ! copy topography from parent domain to transition region
147  call copytopo_transgrid
148 
149  call copytopo_setalpha
150 
151  call copytopo_input_data( topo_pd ) ! (out)
152 
153  call copytopo_mix_data( topo_cd, & ! (inout)
154  topo_pd ) ! (in)
155 
156  return
real(rp), public buffer_dx
thickness of buffer region [m]: x
real(rp), public dy
length in the main region [m]: y
subroutine, public prc_mpistop
Abort MPI.
module GRID (nesting system)
real(rp), public dx
length in the main region [m]: x
integer, public nest_interp_level
horizontal interpolation level
module PROCESS
module GRID (cartesian)
real(rp), public buffer_dy
thickness of buffer region [m]: y
real(rp), public bufffact
default strech factor for dx/dy/dz of buffer region
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cnvtopo_type

integer, public mod_copytopo::cnvtopo_type = -1

Definition at line 36 of file mod_copytopo.f90.

36  integer, public :: CNVTOPO_TYPE = -1

◆ i_ignore

integer, parameter, public mod_copytopo::i_ignore = 0

Definition at line 38 of file mod_copytopo.f90.

38  integer, public, parameter :: I_IGNORE = 0

◆ i_gtopo30

integer, parameter, public mod_copytopo::i_gtopo30 = 1

Definition at line 39 of file mod_copytopo.f90.

39  integer, public, parameter :: I_GTOPO30 = 1

◆ i_dem50m

integer, parameter, public mod_copytopo::i_dem50m = 2

Definition at line 40 of file mod_copytopo.f90.

40  integer, public, parameter :: I_DEM50M = 2

◆ i_gmted2010

integer, parameter, public mod_copytopo::i_gmted2010 = 3

Definition at line 41 of file mod_copytopo.f90.

41  integer, public, parameter :: I_GMTED2010 = 3