SCALE-RM
Functions/Subroutines | Variables
scale_atmos_grid_cartesc_metric Module Reference

module Atmosphere Grid CartesianC metirc More...

Functions/Subroutines

subroutine, public atmos_grid_cartesc_metric_setup
 Setup. More...
 
subroutine atmos_grid_cartesc_metric_rotcoef
 Calculate rotation coeffient. More...
 

Variables

real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_mapf
 map factor More...
 
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_metric_rotc
 rotation coefficient More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_gsqrt
 transformation metrics from Z to Xi, {G}^1/2 More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j13g
 (1,3) element of Jacobian matrix * {G}^1/2 More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j23g
 (2,3) element of Jacobian matrix * {G}^1/2 More...
 
real(rp), public atmos_grid_cartesc_metric_j33g
 (3,3) element of Jacobian matrix * {G}^1/2 More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_limyz
 flux limiter y-z face More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_limxz
 flux limiter x-z face More...
 
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_limxy
 flux limiter x-y face More...
 

Detailed Description

module Atmosphere Grid CartesianC metirc

Description
Map projection and Terrain-following metrics for the CaresianC grid
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_GRID_CARTESC_METRIC
    nametypedefault valuecomment
    ATMOS_GRID_CARTESC_METRIC_OUT_BASENAME character(len=H_LONG) '' basename of the output file
    ATMOS_GRID_CARTESC_METRIC_OUT_DTYPE character(len=H_SHORT) 'DEFAULT' REAL4 or REAL8
    ATMOS_GRID_CARTESC_METRIC_TOPO_TYPE character(len=H_SHORT) 'TERRAINFOLLOWING' topographical shceme
    ATMOS_GRID_CARTESC_METRIC_THINWALL_XDIV integer 50 number dividing quarter-cell (x)
    ATMOS_GRID_CARTESC_METRIC_THINWALL_YDIV integer 50 number dividing quarter-cell (y)

History Output
No history output

Function/Subroutine Documentation

◆ atmos_grid_cartesc_metric_setup()

subroutine, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_setup

Setup.

Definition at line 72 of file scale_atmos_grid_cartesC_metric.F90.

72  use scale_prc, only: &
73  prc_abort
74  use scale_prc_cartesc, only: &
75  prc_twod
76  implicit none
77 
78  namelist / param_atmos_grid_cartesc_metric / &
79  atmos_grid_cartesc_metric_out_basename, &
80  atmos_grid_cartesc_metric_out_dtype, &
81  atmos_grid_cartesc_metric_topo_type, &
82  atmos_grid_cartesc_metric_thinwall_xdiv, &
83  atmos_grid_cartesc_metric_thinwall_ydiv
84 
85  integer :: ierr
86  !---------------------------------------------------------------------------
87 
88  log_newline
89  log_info("ATMOS_GRID_CARTESC_METRIC_setup",*) 'Setup'
90 
91  !--- read namelist
92  rewind(io_fid_conf)
93  read(io_fid_conf,nml=param_atmos_grid_cartesc_metric,iostat=ierr)
94  if( ierr < 0 ) then !--- missing
95  log_info("ATMOS_GRID_CARTESC_METRIC_setup",*) 'Not found namelist. Default used.'
96  elseif( ierr > 0 ) then !--- fatal error
97  log_error("ATMOS_GRID_CARTESC_METRIC_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_GRID_CARTESC_METRIC. Check!'
98  call prc_abort
99  endif
100  log_nml(param_atmos_grid_cartesc_metric)
101 
102  allocate( atmos_grid_cartesc_metric_mapf(ia,ja,2,4) )
103 
104  allocate( atmos_grid_cartesc_metric_rotc(ia,ja,2) )
105 
106  if ( prc_twod ) then
107  allocate( atmos_grid_cartesc_metric_gsqrt(ka,ia,ja,4) )
108  allocate( atmos_grid_cartesc_metric_j13g(ka,ia,ja,4) )
109  allocate( atmos_grid_cartesc_metric_j23g(ka,ia,ja,4) )
110  else
111  allocate( atmos_grid_cartesc_metric_gsqrt(ka,ia,ja,7) )
112  allocate( atmos_grid_cartesc_metric_j13g(ka,ia,ja,7) )
113  allocate( atmos_grid_cartesc_metric_j23g(ka,ia,ja,7) )
114  end if
115 
116  atmos_grid_cartesc_metric_gsqrt(:,:,:,:) = 1.0_rp
117  atmos_grid_cartesc_metric_j13g(:,:,:,:) = 0.0_rp
118  atmos_grid_cartesc_metric_j23g(:,:,:,:) = 0.0_rp
119  atmos_grid_cartesc_metric_j33g = 1.0_rp
120 
121  allocate( atmos_grid_cartesc_metric_limyz(ka,ia,ja,7) )
122  allocate( atmos_grid_cartesc_metric_limxz(ka,ia,ja,7) )
123  allocate( atmos_grid_cartesc_metric_limxy(ka,ia,ja,7) )
124  atmos_grid_cartesc_metric_limyz(:,:,:,:) = 1.0_rp
125  atmos_grid_cartesc_metric_limxz(:,:,:,:) = 1.0_rp
126  atmos_grid_cartesc_metric_limxy(:,:,:,:) = 1.0_rp
127 
128  ! calc metrics for orthogonal curvelinear coordinate
129  call atmos_grid_cartesc_metric_mapfactor
130 
131  ! calc coeficient for rotaion of velocity vector
132  call atmos_grid_cartesc_metric_rotcoef
133 
134  ! calc metrics for terrain-following,step-mountain,thin-wall coordinate
135  log_newline
136  log_info("ATMOS_GRID_CARTESC_METRIC_setup",*) 'Terrain coordinate type : ', trim(atmos_grid_cartesc_metric_topo_type)
137  select case(atmos_grid_cartesc_metric_topo_type)
138  case('TERRAINFOLLOWING')
139  log_info_cont(*) '=> Terrain-following method'
140  call atmos_grid_cartesc_metric_terrainfollowing
141  case('STEPMOUNTAIN')
142  log_info_cont(*) '=> Step-mountain method'
143  call atmos_grid_cartesc_metric_thin_wall
144  call atmos_grid_cartesc_metric_step_mountain
145  case('THINWALL')
146  log_info_cont(*) '=> Thin-wall approximation method'
147  call atmos_grid_cartesc_metric_thin_wall
148  case default
149  log_error("ATMOS_GRID_CARTESC_METRIC_setup",*) 'Unsupported ATMOS_GRID_CARTESC_METRIC_TOPO_type. STOP'
150  call prc_abort
151  end select
152 
153  ! output metrics (for debug)
154  call atmos_grid_cartesc_metric_write
155 
156  return

References atmos_grid_cartesc_metric_gsqrt, atmos_grid_cartesc_metric_j13g, atmos_grid_cartesc_metric_j23g, atmos_grid_cartesc_metric_j33g, atmos_grid_cartesc_metric_limxy, atmos_grid_cartesc_metric_limxz, atmos_grid_cartesc_metric_limyz, atmos_grid_cartesc_metric_mapf, atmos_grid_cartesc_metric_rotc, atmos_grid_cartesc_metric_rotcoef(), scale_atmos_grid_cartesc::atmos_grid_cartesc_rcdx, scale_atmos_grid_cartesc::atmos_grid_cartesc_rcdy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latuv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latuy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_latxv, scale_atmos_grid_cartesc_index::i_uv, scale_atmos_grid_cartesc_index::i_uy, scale_atmos_grid_cartesc_index::i_xv, scale_atmos_grid_cartesc_index::i_xy, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_io::io_fid_conf, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_atmos_grid_cartesc_index::ka, scale_prc::prc_abort(), scale_prc_cartesc::prc_twod, and scale_topography::topography_calc_tan_slope().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_grid_cartesc_metric_rotcoef()

subroutine scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_rotcoef

Calculate rotation coeffient.

Definition at line 200 of file scale_atmos_grid_cartesC_metric.F90.

200  use scale_mapprojection, only: &
201  mapprojection_rotcoef
202  use scale_atmos_grid_cartesc_real, only: &
205  implicit none
206  !---------------------------------------------------------------------------
207 
208  call mapprojection_rotcoef( ia, 1, ia, ja, 1, ja, &
209  atmos_grid_cartesc_real_lon(:,:), & ! [IN]
210  atmos_grid_cartesc_real_lat(:,:), & ! [IN]
211  atmos_grid_cartesc_metric_rotc(:,:,1), & ! [OUT]
212  atmos_grid_cartesc_metric_rotc(:,:,2) ) ! [OUT]
213 
214  return

References scale_atmos_grid_cartesc::atmos_grid_cartesc_cx, scale_atmos_grid_cartesc::atmos_grid_cartesc_cy, scale_atmos_grid_cartesc::atmos_grid_cartesc_cz, scale_atmos_grid_cartesc::atmos_grid_cartesc_fx, scale_atmos_grid_cartesc::atmos_grid_cartesc_fy, scale_atmos_grid_cartesc::atmos_grid_cartesc_fz, atmos_grid_cartesc_metric_gsqrt, atmos_grid_cartesc_metric_j13g, atmos_grid_cartesc_metric_j23g, atmos_grid_cartesc_metric_j33g, atmos_grid_cartesc_metric_limxy, atmos_grid_cartesc_metric_limxz, atmos_grid_cartesc_metric_limyz, atmos_grid_cartesc_metric_mapf, atmos_grid_cartesc_metric_rotc, scale_atmos_grid_cartesc::atmos_grid_cartesc_rcdx, scale_atmos_grid_cartesc::atmos_grid_cartesc_rcdy, scale_atmos_grid_cartesc::atmos_grid_cartesc_rcdz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_basepoint_lat, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_basepoint_lon, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czuv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czuy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_czxv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzuv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzuy, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fzxv, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon, scale_atmos_grid_cartesc::atmos_grid_cartesc_rfdx, scale_atmos_grid_cartesc::atmos_grid_cartesc_rfdy, scale_atmos_grid_cartesc::atmos_grid_cartesc_rfdz, scale_const::const_radius, scale_atmos_grid_cartesc_index::i_fxy, scale_atmos_grid_cartesc_index::i_fxz, scale_atmos_grid_cartesc_index::i_fyz, scale_atmos_grid_cartesc_index::i_uv, scale_atmos_grid_cartesc_index::i_uvz, scale_atmos_grid_cartesc_index::i_uy, scale_atmos_grid_cartesc_index::i_uyw, scale_atmos_grid_cartesc_index::i_uyz, scale_atmos_grid_cartesc_index::i_xv, scale_atmos_grid_cartesc_index::i_xvw, scale_atmos_grid_cartesc_index::i_xvz, scale_atmos_grid_cartesc_index::i_xy, scale_atmos_grid_cartesc_index::i_xyw, scale_atmos_grid_cartesc_index::i_xyz, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, scale_prc::prc_abort(), scale_prc_cartesc::prc_twod, scale_topography::topography_zsfc, and scale_vector::vectr_distance().

Referenced by atmos_grid_cartesc_metric_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ atmos_grid_cartesc_metric_mapf

real(rp), dimension (:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_mapf

◆ atmos_grid_cartesc_metric_rotc

real(rp), dimension (:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_rotc

◆ atmos_grid_cartesc_metric_gsqrt

real(rp), dimension(:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_gsqrt

◆ atmos_grid_cartesc_metric_j13g

real(rp), dimension (:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_j13g

◆ atmos_grid_cartesc_metric_j23g

real(rp), dimension (:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_j23g

◆ atmos_grid_cartesc_metric_j33g

real(rp), public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_j33g

◆ atmos_grid_cartesc_metric_limyz

real(rp), dimension(:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_limyz

flux limiter y-z face

Definition at line 42 of file scale_atmos_grid_cartesC_metric.F90.

42  real(RP), public, allocatable :: ATMOS_GRID_CARTESC_METRIC_LIMYZ(:,:,:,:)

Referenced by atmos_grid_cartesc_metric_rotcoef(), and atmos_grid_cartesc_metric_setup().

◆ atmos_grid_cartesc_metric_limxz

real(rp), dimension(:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_limxz

flux limiter x-z face

Definition at line 43 of file scale_atmos_grid_cartesC_metric.F90.

43  real(RP), public, allocatable :: ATMOS_GRID_CARTESC_METRIC_LIMXZ(:,:,:,:)

Referenced by atmos_grid_cartesc_metric_rotcoef(), and atmos_grid_cartesc_metric_setup().

◆ atmos_grid_cartesc_metric_limxy

real(rp), dimension(:,:,:,:), allocatable, public scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_limxy

flux limiter x-y face

Definition at line 44 of file scale_atmos_grid_cartesC_metric.F90.

44  real(RP), public, allocatable :: ATMOS_GRID_CARTESC_METRIC_LIMXY(:,:,:,:)

Referenced by atmos_grid_cartesc_metric_rotcoef(), and atmos_grid_cartesc_metric_setup().

scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:48
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_mapprojection
module Map projection
Definition: scale_mapprojection.F90:12
scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_gsqrt
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_gsqrt
transformation metrics from Z to Xi, {G}^1/2
Definition: scale_atmos_grid_cartesC_metric.F90:37
scale_prc_cartesc
module process / cartesC
Definition: scale_prc_cartesC.F90:11
scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_j23g
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j23g
(2,3) element of Jacobian matrix * {G}^1/2
Definition: scale_atmos_grid_cartesC_metric.F90:39
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:52
scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_j13g
real(rp), dimension(:,:,:,:), allocatable, public atmos_grid_cartesc_metric_j13g
(1,3) element of Jacobian matrix * {G}^1/2
Definition: scale_atmos_grid_cartesC_metric.F90:38
scale_prc_cartesc::prc_twod
logical, public prc_twod
2D experiment
Definition: scale_prc_cartesC.F90:55