RK3.
214 real(RP),
intent(inout) :: DENS(KA,IA,JA)
215 real(RP),
intent(inout) :: MOMZ(KA,IA,JA)
216 real(RP),
intent(inout) :: MOMX(KA,IA,JA)
217 real(RP),
intent(inout) :: MOMY(KA,IA,JA)
218 real(RP),
intent(inout) :: RHOT(KA,IA,JA)
219 real(RP),
intent(inout) :: PROG(KA,IA,JA,VA)
221 real(RP),
intent(inout) :: mflx_hi(KA,IA,JA,3)
222 real(RP),
intent(inout) :: tflx_hi(KA,IA,JA,3)
224 real(RP),
intent(in) :: DENS_t(KA,IA,JA)
225 real(RP),
intent(in) :: MOMZ_t(KA,IA,JA)
226 real(RP),
intent(in) :: MOMX_t(KA,IA,JA)
227 real(RP),
intent(in) :: MOMY_t(KA,IA,JA)
228 real(RP),
intent(in) :: RHOT_t(KA,IA,JA)
230 real(RP),
intent(in) :: Rtot(KA,IA,JA)
231 real(RP),
intent(in) :: CVtot(KA,IA,JA)
232 real(RP),
intent(in) :: CORIOLI(IA,JA)
233 real(RP),
intent(in) :: num_diff(KA,IA,JA,5,3)
234 real(RP),
intent(in) :: wdamp_coef(KA)
235 real(RP),
intent(in) :: divdmp_coef
236 real(RP),
intent(in) :: DDIV(KA,IA,JA)
238 logical,
intent(in) :: FLAG_FCT_MOMENTUM
239 logical,
intent(in) :: FLAG_FCT_T
240 logical,
intent(in) :: FLAG_FCT_ALONG_STREAM
242 real(RP),
intent(in) :: CDZ (KA)
243 real(RP),
intent(in) :: FDZ (KA-1)
244 real(RP),
intent(in) :: FDX (IA-1)
245 real(RP),
intent(in) :: FDY (JA-1)
246 real(RP),
intent(in) :: RCDZ(KA)
247 real(RP),
intent(in) :: RCDX(IA)
248 real(RP),
intent(in) :: RCDY(JA)
249 real(RP),
intent(in) :: RFDZ(KA-1)
250 real(RP),
intent(in) :: RFDX(IA-1)
251 real(RP),
intent(in) :: RFDY(JA-1)
253 real(RP),
intent(in) :: PHI (KA,IA,JA)
254 real(RP),
intent(in) :: GSQRT(KA,IA,JA,7)
255 real(RP),
intent(in) :: J13G (KA,IA,JA,7)
256 real(RP),
intent(in) :: J23G (KA,IA,JA,7)
257 real(RP),
intent(in) :: J33G
258 real(RP),
intent(in) :: MAPF (IA,JA,2,4)
260 real(RP),
intent(in) :: REF_pres(KA,IA,JA)
261 real(RP),
intent(in) :: REF_dens(KA,IA,JA)
263 logical,
intent(in) :: BND_W
264 logical,
intent(in) :: BND_E
265 logical,
intent(in) :: BND_S
266 logical,
intent(in) :: BND_N
268 real(RP),
intent(in) :: dt
270 real(RP) :: DENS0(KA,IA,JA)
271 real(RP) :: MOMZ0(KA,IA,JA)
272 real(RP) :: MOMX0(KA,IA,JA)
273 real(RP) :: MOMY0(KA,IA,JA)
274 real(RP) :: RHOT0(KA,IA,JA)
275 real(RP) :: PROG0(KA,IA,JA,VA)
277 real(RP) :: mflx_hi_RK(KA,IA,JA,3,2)
278 real(RP) :: tflx_hi_RK(KA,IA,JA,3,2)
282 integer :: i, j, k, iv, n
285 call prof_rapstart(
"DYN_RK3_Prep",3)
288 dens_rk1(:,:,:) = undef
289 momz_rk1(:,:,:) = undef
290 momx_rk1(:,:,:) = undef
291 momy_rk1(:,:,:) = undef
292 rhot_rk1(:,:,:) = undef
293 if (
va > 0 ) prog_rk1(:,:,:,:) = undef
295 dens_rk2(:,:,:) = undef
296 momz_rk2(:,:,:) = undef
297 momx_rk2(:,:,:) = undef
298 momy_rk2(:,:,:) = undef
299 rhot_rk2(:,:,:) = undef
300 if (
va > 0 ) prog_rk2(:,:,:,:) = undef
302 mflx_hi_rk(:,:,:,:,:) = undef
303 tflx_hi_rk(:,:,:,:,:) = undef
307 mflx_hi( 1:
ks-1,:,:,:) = undef
308 mflx_hi(
ke+1:
ka ,:,:,:) = undef
322 if (
va > 0 ) prog0 = prog
327 mflx_hi_rk(k,
is-1,j,2,:) = mflx_hi(k,
is-1,j,2)
334 mflx_hi_rk(k,
ie,j,2,:) = mflx_hi(k,
ie,j,2)
341 mflx_hi_rk(k,i,
js-1,3,:) = mflx_hi(k,i,
js-1,3)
348 mflx_hi_rk(k,i,
je,3,:) = mflx_hi(k,i,
je,3)
353 call prof_rapend (
"DYN_RK3_Prep",3)
361 call prof_rapstart(
"DYN_RK3",3)
365 call atmos_dyn_tstep( dens_rk1, momz_rk1, momx_rk1, momy_rk1, rhot_rk1, &
367 mflx_hi_rk(:,:,:,:,1), tflx_hi_rk(:,:,:,:,1), &
368 dens0, momz0, momx0, momy0, rhot0, &
369 dens, momz, momx, momy, rhot, &
370 dens_t, momz_t, momx_t, momy_t, rhot_t, &
372 rtot, cvtot, corioli, &
373 num_diff, wdamp_coef, divdmp_coef, ddiv, &
374 flag_fct_momentum, flag_fct_t, &
375 flag_fct_along_stream, &
376 cdz, fdz, fdx, fdy, &
377 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
378 phi, gsqrt, j13g, j23g, j33g, mapf, &
379 ref_pres, ref_dens, &
380 bnd_w, bnd_e, bnd_s, bnd_n, &
383 call prof_rapend (
"DYN_RK3",3)
384 call prof_rapstart(
"DYN_RK3_BND",3)
388 dens0, momz0, momx0, momy0, rhot0, &
390 bnd_w, bnd_e, bnd_s, bnd_n )
392 call prof_rapend (
"DYN_RK3_BND",3)
394 call comm_vars8( dens_rk1(:,:,:), i_comm_dens_rk1 )
395 call comm_vars8( momz_rk1(:,:,:), i_comm_momz_rk1 )
396 call comm_vars8( momx_rk1(:,:,:), i_comm_momx_rk1 )
397 call comm_vars8( momy_rk1(:,:,:), i_comm_momy_rk1 )
398 call comm_vars8( rhot_rk1(:,:,:), i_comm_rhot_rk1 )
400 call comm_vars8( prog_rk1(:,:,:,iv), i_comm_prog_rk1(iv) )
403 call comm_wait ( dens_rk1(:,:,:), i_comm_dens_rk1, .false. )
404 call comm_wait ( momz_rk1(:,:,:), i_comm_momz_rk1, .false. )
405 call comm_wait ( momx_rk1(:,:,:), i_comm_momx_rk1, .false. )
406 call comm_wait ( momy_rk1(:,:,:), i_comm_momy_rk1, .false. )
407 call comm_wait ( rhot_rk1(:,:,:), i_comm_rhot_rk1, .false. )
409 call comm_wait ( prog_rk1(:,:,:,iv), i_comm_prog_rk1(iv), .false. )
414 call prof_rapstart(
"DYN_RK3",3)
418 call atmos_dyn_tstep( dens_rk2, momz_rk2, momx_rk2, momy_rk2, rhot_rk2, &
420 mflx_hi_rk(:,:,:,:,2), tflx_hi_rk(:,:,:,:,2), &
421 dens0, momz0, momx0, momy0, rhot0, &
422 dens_rk1, momz_rk1, momx_rk1, momy_rk1, rhot_rk1, &
423 dens_t, momz_t, momx_t, momy_t, rhot_t, &
425 rtot, cvtot, corioli, &
426 num_diff, wdamp_coef, divdmp_coef, ddiv, &
427 flag_fct_momentum, flag_fct_t, &
428 flag_fct_along_stream, &
429 cdz, fdz, fdx, fdy, &
430 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
431 phi, gsqrt, j13g, j23g, j33g, mapf, &
432 ref_pres, ref_dens, &
433 bnd_w, bnd_e, bnd_s, bnd_n, &
436 call prof_rapend (
"DYN_RK3",3)
437 call prof_rapstart(
"DYN_RK3_BND",3)
441 dens0, momz0, momx0, momy0, rhot0, &
443 bnd_w, bnd_e, bnd_s, bnd_n )
445 call prof_rapend (
"DYN_RK3_BND",3)
447 call comm_vars8( dens_rk2(:,:,:), i_comm_dens_rk2 )
448 call comm_vars8( momz_rk2(:,:,:), i_comm_momz_rk2 )
449 call comm_vars8( momx_rk2(:,:,:), i_comm_momx_rk2 )
450 call comm_vars8( momy_rk2(:,:,:), i_comm_momy_rk2 )
451 call comm_vars8( rhot_rk2(:,:,:), i_comm_rhot_rk2 )
453 call comm_vars8( prog_rk2(:,:,:,iv), i_comm_prog_rk2(iv) )
456 call comm_wait ( dens_rk2(:,:,:), i_comm_dens_rk2, .false. )
457 call comm_wait ( momz_rk2(:,:,:), i_comm_momz_rk2, .false. )
458 call comm_wait ( momx_rk2(:,:,:), i_comm_momx_rk2, .false. )
459 call comm_wait ( momy_rk2(:,:,:), i_comm_momy_rk2, .false. )
460 call comm_wait ( rhot_rk2(:,:,:), i_comm_rhot_rk2, .false. )
462 call comm_wait ( prog_rk2(:,:,:,iv), i_comm_prog_rk2(iv), .false. )
467 call prof_rapstart(
"DYN_RK3",3)
471 call atmos_dyn_tstep( dens, momz, momx, momy, rhot, &
474 dens0, momz0, momx0, momy0, rhot0, &
475 dens_rk2, momz_rk2, momx_rk2, momy_rk2, rhot_rk2, &
476 dens_t, momz_t, momx_t, momy_t, rhot_t, &
478 rtot, cvtot, corioli, &
479 num_diff, wdamp_coef, divdmp_coef, ddiv, &
480 flag_fct_momentum, flag_fct_t, &
481 flag_fct_along_stream, &
482 cdz, fdz, fdx, fdy, &
483 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
484 phi, gsqrt, j13g, j23g, j33g, mapf, &
485 ref_pres, ref_dens, &
486 bnd_w, bnd_e, bnd_s, bnd_n, &
489 if ( .NOT. flag_ws2002 )
then 493 dens(k,i,j) = ( dens_rk1(k,i,j) * 3.0_rp &
494 + dens(k,i,j) * 3.0_rp &
495 - dens0(k,i,j) * 2.0_rp ) / 4.0_rp
503 momz(k,i,j) = ( momz_rk1(k,i,j) * 3.0_rp &
504 + momz(k,i,j) * 3.0_rp &
505 - momz0(k,i,j) * 2.0_rp ) / 4.0_rp
513 momx(k,i,j) = ( momx_rk1(k,i,j) * 3.0_rp &
514 + momx(k,i,j) * 3.0_rp &
515 - momx0(k,i,j) * 2.0_rp ) / 4.0_rp
523 momy(k,i,j) = ( momy_rk1(k,i,j) * 3.0_rp &
524 + momy(k,i,j) * 3.0_rp &
525 - momy0(k,i,j) * 2.0_rp ) / 4.0_rp
533 rhot(k,i,j) = ( rhot_rk1(k,i,j) * 3.0_rp &
534 + rhot(k,i,j) * 3.0_rp &
535 - rhot0(k,i,j) * 2.0_rp ) / 4.0_rp
544 prog(k,i,j,iv) = ( prog_rk1(k,i,j,iv) * 3.0_rp &
545 + prog(k,i,j,iv) * 3.0_rp &
546 - prog0(k,i,j,iv) * 2.0_rp ) / 4.0_rp
556 mflx_hi(k,i,j,n) = ( mflx_hi_rk(k,i,j,n,1) &
557 + mflx_hi(k,i,j,n ) * 3.0_rp ) / 4.0_rp
567 tflx_hi(k,i,j,n) = ( tflx_hi_rk(k,i,j,n,1) &
568 + tflx_hi(k,i,j,n ) * 3.0_rp ) / 4.0_rp
576 call prof_rapend (
"DYN_RK3",3)
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
module Atmosphere / Dynamical scheme
integer, public ke
end point of inner domain: z, local
integer, public ka
of whole cells: z, local, with HALO
procedure(short), pointer, public atmos_dyn_tstep_short
integer, public js
start point of inner domain: y, local
module Atmosphere / Dynamics common
integer, public ks
start point of inner domain: z, local
subroutine, public atmos_dyn_copy_boundary(DENS, MOMZ, MOMX, MOMY, RHOT, PROG, DENS0, MOMZ0, MOMX0, MOMY0, RHOT0, PROG0, BND_W, BND_E, BND_S, BND_N)
integer, public ie
end point of inner domain: x, local