SCALE-RM
Functions/Subroutines
scale_atmos_dyn_tinteg_large_rk3 Module Reference

module Atmosphere / Dyn Tinteg More...

Functions/Subroutines

subroutine, public atmos_dyn_tinteg_large_rk3_setup (tinteg_type)
 Setup. More...
 
subroutine, public atmos_dyn_tinteg_large_rk3 (DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, num_diff, num_diff_q, DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, CORIOLI, CDZ, CDX, CDY, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, AQ_R, AQ_CV, AQ_CP, AQ_MASS, REF_dens, REF_pott, REF_qv, REF_pres, BND_W, BND_E, BND_S, BND_N, TwoD, ND_COEF, ND_COEF_Q, ND_LAPLACIAN_NUM, ND_SFC_FACT, ND_USE_RS, BND_QA, BND_IQ, BND_SMOOTHER_FACT, DAMP_DENS, DAMP_VELZ, DAMP_VELX, DAMP_VELY, DAMP_POTT, DAMP_QTRC, DAMP_alpha_DENS, DAMP_alpha_VELZ, DAMP_alpha_VELX, DAMP_alpha_VELY, DAMP_alpha_POTT, DAMP_alpha_QTRC, MFLUX_OFFSET_X, MFLUX_OFFSET_Y, wdamp_coef, divdmp_coef, FLAG_TRACER_SPLIT_TEND, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, FLAG_FCT_ALONG_STREAM, USE_AVERAGE, I_QV, DTL, DTS)
 RK3. More...
 

Detailed Description

module Atmosphere / Dyn Tinteg

Description
Temporal integration in Dynamical core for Atmospheric process three stage Runge-Kutta scheme
Author
Team SCALE

Function/Subroutine Documentation

◆ atmos_dyn_tinteg_large_rk3_setup()

subroutine, public scale_atmos_dyn_tinteg_large_rk3::atmos_dyn_tinteg_large_rk3_setup ( character(len=*)  tinteg_type)

Setup.

Definition at line 64 of file scale_atmos_dyn_tinteg_large_rk3.F90.

64  use scale_prc, only: &
65  prc_abort
66  implicit none
67 
68  character(len=*) :: tinteg_type
69 
70  integer :: iv
71  !---------------------------------------------------------------------------
72 
73  if ( tinteg_type /= 'RK3' ) then
74  log_error("ATMOS_DYN_Tinteg_large_rk3_setup",*) 'TINTEG_LARGE_TYPE is not RK3. Check!'
75  call prc_abort
76  end if
77 
78  return

References scale_prc::prc_abort().

Referenced by scale_atmos_dyn_tinteg_large::atmos_dyn_tinteg_large_setup().

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

◆ atmos_dyn_tinteg_large_rk3()

subroutine, public scale_atmos_dyn_tinteg_large_rk3::atmos_dyn_tinteg_large_rk3 ( real(rp), dimension(ka,ia,ja), intent(inout)  DENS,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMZ,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMX,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMY,
real(rp), dimension(ka,ia,ja), intent(inout)  RHOT,
real(rp), dimension(ka,ia,ja,qa), intent(inout)  QTRC,
real(rp), dimension(ka,ia,ja,va), intent(inout)  PROG,
real(rp), dimension(ka,ia,ja), intent(inout)  DENS_av,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMZ_av,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMX_av,
real(rp), dimension(ka,ia,ja), intent(inout)  MOMY_av,
real(rp), dimension(ka,ia,ja), intent(inout)  RHOT_av,
real(rp), dimension(ka,ia,ja,qa), intent(inout)  QTRC_av,
real(rp), dimension(ka,ia,ja,5,3), intent(out)  num_diff,
real(rp), dimension(ka,ia,ja,3), intent(out)  num_diff_q,
real(rp), dimension(ka,ia,ja), intent(in)  DENS_tp,
real(rp), dimension(ka,ia,ja), intent(in)  MOMZ_tp,
real(rp), dimension(ka,ia,ja), intent(in)  MOMX_tp,
real(rp), dimension(ka,ia,ja), intent(in)  MOMY_tp,
real(rp), dimension(ka,ia,ja), intent(in)  RHOT_tp,
real(rp), dimension(ka,ia,ja,qa), intent(in)  RHOQ_tp,
real(rp), dimension(ia,ja), intent(in)  CORIOLI,
real(rp), dimension (ka), intent(in)  CDZ,
real(rp), dimension (ia), intent(in)  CDX,
real(rp), dimension (ja), intent(in)  CDY,
real(rp), dimension (ka-1), intent(in)  FDZ,
real(rp), dimension (ia-1), intent(in)  FDX,
real(rp), dimension (ja-1), intent(in)  FDY,
real(rp), dimension(ka), intent(in)  RCDZ,
real(rp), dimension(ia), intent(in)  RCDX,
real(rp), dimension(ja), intent(in)  RCDY,
real(rp), dimension(ka-1), intent(in)  RFDZ,
real(rp), dimension(ia-1), intent(in)  RFDX,
real(rp), dimension(ja-1), intent(in)  RFDY,
real(rp), dimension (ka,ia,ja), intent(in)  PHI,
real(rp), dimension(ka,ia,ja,7), intent(in)  GSQRT,
real(rp), dimension (ka,ia,ja,7), intent(in)  J13G,
real(rp), dimension (ka,ia,ja,7), intent(in)  J23G,
real(rp), intent(in)  J33G,
real(rp), dimension (ia,ja,2,4), intent(in)  MAPF,
real(rp), dimension (qa), intent(in)  AQ_R,
real(rp), dimension (qa), intent(in)  AQ_CV,
real(rp), dimension (qa), intent(in)  AQ_CP,
real(rp), dimension(qa), intent(in)  AQ_MASS,
real(rp), dimension(ka,ia,ja), intent(in)  REF_dens,
real(rp), dimension(ka,ia,ja), intent(in)  REF_pott,
real(rp), dimension (ka,ia,ja), intent(in)  REF_qv,
real(rp), dimension(ka,ia,ja), intent(in)  REF_pres,
logical, intent(in)  BND_W,
logical, intent(in)  BND_E,
logical, intent(in)  BND_S,
logical, intent(in)  BND_N,
logical, intent(in)  TwoD,
real(rp), intent(in)  ND_COEF,
real(rp), intent(in)  ND_COEF_Q,
integer, intent(in)  ND_LAPLACIAN_NUM,
real(rp), intent(in)  ND_SFC_FACT,
logical, intent(in)  ND_USE_RS,
integer, intent(in)  BND_QA,
integer, dimension(qa), intent(in)  BND_IQ,
real(rp), intent(in)  BND_SMOOTHER_FACT,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_DENS,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_VELZ,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_VELX,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_VELY,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_POTT,
real(rp), dimension(ka,ia,ja,bnd_qa), intent(in)  DAMP_QTRC,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_alpha_DENS,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_alpha_VELZ,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_alpha_VELX,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_alpha_VELY,
real(rp), dimension(ka,ia,ja), intent(in)  DAMP_alpha_POTT,
real(rp), dimension(ka,ia,ja,bnd_qa), intent(in)  DAMP_alpha_QTRC,
real(rp), dimension(ka,ja,2), intent(in)  MFLUX_OFFSET_X,
real(rp), dimension(ka,ia,2), intent(in)  MFLUX_OFFSET_Y,
real(rp), dimension(ka), intent(in)  wdamp_coef,
real(rp), intent(in)  divdmp_coef,
logical, intent(in)  FLAG_TRACER_SPLIT_TEND,
logical, intent(in)  FLAG_FCT_MOMENTUM,
logical, intent(in)  FLAG_FCT_T,
logical, intent(in)  FLAG_FCT_TRACER,
logical, intent(in)  FLAG_FCT_ALONG_STREAM,
logical, intent(in)  USE_AVERAGE,
integer, intent(in)  I_QV,
real(dp), intent(in)  DTL,
real(dp), intent(in)  DTS 
)

RK3.

Parameters
[in]phigeopotential
[in]gsqrtvertical metrics {G}^1/2
[in]j13g(1,3) element of Jacobian matrix
[in]j23g(2,3) element of Jacobian matrix
[in]j33g(3,3) element of Jacobian matrix
[in]mapfmap factor
[in]ref_presreference pressure

Definition at line 112 of file scale_atmos_dyn_tinteg_large_rk3.F90.

112 
113  use scale_atmos_dyn_tstep_large, only: &
115 
116  implicit none
117 
118  real(RP), intent(inout) :: DENS(KA,IA,JA)
119  real(RP), intent(inout) :: MOMZ(KA,IA,JA)
120  real(RP), intent(inout) :: MOMX(KA,IA,JA)
121  real(RP), intent(inout) :: MOMY(KA,IA,JA)
122  real(RP), intent(inout) :: RHOT(KA,IA,JA)
123  real(RP), intent(inout) :: QTRC(KA,IA,JA,QA)
124 
125  real(RP), intent(inout) :: PROG(KA,IA,JA,VA)
126 
127  real(RP), intent(inout) :: DENS_av(KA,IA,JA)
128  real(RP), intent(inout) :: MOMZ_av(KA,IA,JA)
129  real(RP), intent(inout) :: MOMX_av(KA,IA,JA)
130  real(RP), intent(inout) :: MOMY_av(KA,IA,JA)
131  real(RP), intent(inout) :: RHOT_av(KA,IA,JA)
132  real(RP), intent(inout) :: QTRC_av(KA,IA,JA,QA)
133 
134  real(RP), intent(out) :: num_diff(KA,IA,JA,5,3)
135  real(RP), intent(out) :: num_diff_q(KA,IA,JA,3)
136 
137  real(RP), intent(in) :: DENS_tp(KA,IA,JA)
138  real(RP), intent(in) :: MOMZ_tp(KA,IA,JA)
139  real(RP), intent(in) :: MOMX_tp(KA,IA,JA)
140  real(RP), intent(in) :: MOMY_tp(KA,IA,JA)
141  real(RP), intent(in) :: RHOT_tp(KA,IA,JA)
142  real(RP), intent(in) :: RHOQ_tp(KA,IA,JA,QA)
143 
144  real(RP), intent(in) :: CORIOLI(IA,JA)
145 
146  real(RP), intent(in) :: CDZ (KA)
147  real(RP), intent(in) :: CDX (IA)
148  real(RP), intent(in) :: CDY (JA)
149  real(RP), intent(in) :: FDZ (KA-1)
150  real(RP), intent(in) :: FDX (IA-1)
151  real(RP), intent(in) :: FDY (JA-1)
152  real(RP), intent(in) :: RCDZ(KA)
153  real(RP), intent(in) :: RCDX(IA)
154  real(RP), intent(in) :: RCDY(JA)
155  real(RP), intent(in) :: RFDZ(KA-1)
156  real(RP), intent(in) :: RFDX(IA-1)
157  real(RP), intent(in) :: RFDY(JA-1)
158 
159  real(RP), intent(in) :: PHI (KA,IA,JA)
160  real(RP), intent(in) :: GSQRT(KA,IA,JA,7)
161  real(RP), intent(in) :: J13G (KA,IA,JA,7)
162  real(RP), intent(in) :: J23G (KA,IA,JA,7)
163  real(RP), intent(in) :: J33G
164  real(RP), intent(in) :: MAPF (IA,JA,2,4)
165 
166  real(RP), intent(in) :: AQ_R (QA)
167  real(RP), intent(in) :: AQ_CV (QA)
168  real(RP), intent(in) :: AQ_CP (QA)
169  real(RP), intent(in) :: AQ_MASS(QA)
170 
171  real(RP), intent(in) :: REF_dens(KA,IA,JA)
172  real(RP), intent(in) :: REF_pott(KA,IA,JA)
173  real(RP), intent(in) :: REF_qv (KA,IA,JA)
174  real(RP), intent(in) :: REF_pres(KA,IA,JA)
175 
176  logical, intent(in) :: BND_W
177  logical, intent(in) :: BND_E
178  logical, intent(in) :: BND_S
179  logical, intent(in) :: BND_N
180  logical, intent(in) :: TwoD
181 
182  real(RP), intent(in) :: ND_COEF
183  real(RP), intent(in) :: ND_COEF_Q
184  integer, intent(in) :: ND_LAPLACIAN_NUM
185  real(RP), intent(in) :: ND_SFC_FACT
186  logical, intent(in) :: ND_USE_RS
187 
188  integer, intent(in) :: BND_QA
189  integer, intent(in) :: BND_IQ(QA)
190  real(RP), intent(in) :: BND_SMOOTHER_FACT
191 
192  real(RP), intent(in) :: DAMP_DENS(KA,IA,JA)
193  real(RP), intent(in) :: DAMP_VELZ(KA,IA,JA)
194  real(RP), intent(in) :: DAMP_VELX(KA,IA,JA)
195  real(RP), intent(in) :: DAMP_VELY(KA,IA,JA)
196  real(RP), intent(in) :: DAMP_POTT(KA,IA,JA)
197  real(RP), intent(in) :: DAMP_QTRC(KA,IA,JA,BND_QA)
198 
199  real(RP), intent(in) :: DAMP_alpha_DENS(KA,IA,JA)
200  real(RP), intent(in) :: DAMP_alpha_VELZ(KA,IA,JA)
201  real(RP), intent(in) :: DAMP_alpha_VELX(KA,IA,JA)
202  real(RP), intent(in) :: DAMP_alpha_VELY(KA,IA,JA)
203  real(RP), intent(in) :: DAMP_alpha_POTT(KA,IA,JA)
204  real(RP), intent(in) :: DAMP_alpha_QTRC(KA,IA,JA,BND_QA)
205  real(RP), intent(in) :: MFLUX_OFFSET_X(KA,JA,2)
206  real(RP), intent(in) :: MFLUX_OFFSET_Y(KA,IA,2)
207 
208  real(RP), intent(in) :: wdamp_coef(KA)
209  real(RP), intent(in) :: divdmp_coef
210 
211  logical, intent(in) :: FLAG_TRACER_SPLIT_TEND
212  logical, intent(in) :: FLAG_FCT_MOMENTUM
213  logical, intent(in) :: FLAG_FCT_T
214  logical, intent(in) :: FLAG_FCT_TRACER
215  logical, intent(in) :: FLAG_FCT_ALONG_STREAM
216 
217  logical, intent(in) :: USE_AVERAGE
218 
219  integer, intent(in) :: I_QV
220 
221  real(DP), intent(in) :: DTL
222  real(DP), intent(in) :: DTS
223 
224  ! for time integartion
225  real(RP) :: DENS0 (KA,IA,JA)
226  real(RP) :: MOMZ0 (KA,IA,JA)
227  real(RP) :: MOMX0 (KA,IA,JA)
228  real(RP) :: MOMY0 (KA,IA,JA)
229  real(RP) :: RHOT0 (KA,IA,JA)
230  real(RP) :: QTRC0 (KA,IA,JA,QA)
231  real(RP) :: PROG0 (KA,IA,JA,VA)
232 
233  real(DP) :: dtrk
234 
235  logical :: last
236 
237  integer :: n, iq
238 
239  !---------------------------------------------------------------------------
240 
241  call prof_rapstart("DYN_Large_RK3_Prep", 3)
242 
243  !##### SAVE #####
244 !OCL XFILL
245  dens0(:,:,:) = dens(:,:,:)
246 !OCL XFILL
247  momz0(:,:,:) = momz(:,:,:)
248 !OCL XFILL
249  momx0(:,:,:) = momx(:,:,:)
250 !OCL XFILL
251  momy0(:,:,:) = momy(:,:,:)
252 !OCL XFILL
253  rhot0(:,:,:) = rhot(:,:,:)
254 !OCL XFILL
255  qtrc0(:,:,:,:) = qtrc(:,:,:,:)
256 
257  if ( va > 0 ) then
258 !OCL XFILL
259  prog0(:,:,:,:) = prog(:,:,:,:)
260  end if
261 
262  call prof_rapend ("DYN_Large_RK3_Prep", 3)
263 
264  !------------------------------------------------------------------------
265  ! Start RK
266  !------------------------------------------------------------------------
267 
268  call prof_rapstart("DYN_Large_RK3", 3)
269 
270  do n = 1, 3
271 
272  dtrk = dtl / real( 4-n, kind=dp )
273  last = n == 3
274 
275  if ( n > 1 ) then
276  dens = dens0
277  momz = momz0
278  momx = momx0
279  momy = momy0
280  rhot = rhot0
281  if ( va > 0 ) prog = prog0
282  end if
283 
284  call atmos_dyn_tstep_large( &
285  dens, momz, momx, momy, rhot, qtrc, prog, & ! (inout)
286  dens_av, momz_av, momx_av, momy_av, rhot_av, qtrc_av, & ! (inout)
287  num_diff, num_diff_q, & ! (out)
288  qtrc0, & ! (in)
289  dens_tp, momz_tp, momx_tp, momy_tp, rhot_tp, rhoq_tp, & ! (in)
290  corioli, & ! (in)
291  cdz, cdx, cdy, fdz, fdx, fdy, & ! (in)
292  rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, & ! (in)
293  phi, gsqrt, & ! (in)
294  j13g, j23g, j33g, mapf, & ! (in)
295  aq_r, aq_cv, aq_cp, aq_mass, & ! (in)
296  ref_dens, ref_pott, ref_qv, ref_pres, & ! (in)
297  bnd_w, bnd_e, bnd_s, bnd_n, twod, & ! (in)
298  nd_coef, nd_coef_q, nd_laplacian_num, nd_sfc_fact, nd_use_rs, & ! (in)
299  bnd_qa, bnd_iq, bnd_smoother_fact, & ! (in)
300  damp_dens, damp_velz, damp_velx, & ! (in)
301  damp_vely, damp_pott, damp_qtrc, & ! (in)
302  damp_alpha_dens, damp_alpha_velz, damp_alpha_velx, & ! (in)
303  damp_alpha_vely, damp_alpha_pott, damp_alpha_qtrc, & ! (in)
304  mflux_offset_x, mflux_offset_y, & ! (in)
305  wdamp_coef, divdmp_coef, & ! (in)
306  flag_tracer_split_tend, & ! (in)
307  flag_fct_momentum, flag_fct_t, flag_fct_tracer, & ! (in)
308  flag_fct_along_stream, & ! (in)
309  use_average .AND. last, & ! (in)
310  i_qv, & ! (in)
311  dtrk, dts, last ) ! (in)
312 
313  end do
314 
315  call prof_rapend ("DYN_Large_RK3", 3)
316 
317  return

References scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large, scale_precision::dp, scale_prof::prof_rapend(), scale_prof::prof_rapstart(), and scale_index::va.

Referenced by scale_atmos_dyn_tinteg_large::atmos_dyn_tinteg_large_setup().

Here is the call graph for this function:
Here is the caller graph for this function:
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large
procedure(large), pointer, public atmos_dyn_tstep_large
Definition: scale_atmos_dyn_tstep_large.F90:181
scale_index::va
integer, public va
Definition: scale_index.F90:35
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::dp
integer, parameter, public dp
Definition: scale_precision.F90:32
scale_atmos_dyn_tstep_large
module Atmosphere / Dynamical scheme
Definition: scale_atmos_dyn_tstep_large.F90:12