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) :: divdmp_coef
235 real(RP),
intent(in) :: ddiv(
ka,
ia,
ja)
237 logical,
intent(in) :: flag_fct_momentum
238 logical,
intent(in) :: flag_fct_t
239 logical,
intent(in) :: flag_fct_along_stream
241 real(RP),
intent(in) :: cdz (
ka)
242 real(RP),
intent(in) :: fdz (
ka-1)
243 real(RP),
intent(in) :: fdx (
ia-1)
244 real(RP),
intent(in) :: fdy (
ja-1)
245 real(RP),
intent(in) :: rcdz(
ka)
246 real(RP),
intent(in) :: rcdx(
ia)
247 real(RP),
intent(in) :: rcdy(
ja)
248 real(RP),
intent(in) :: rfdz(
ka-1)
249 real(RP),
intent(in) :: rfdx(
ia-1)
250 real(RP),
intent(in) :: rfdy(
ja-1)
252 real(RP),
intent(in) :: phi (
ka,
ia,
ja)
253 real(RP),
intent(in) :: gsqrt(
ka,
ia,
ja,7)
254 real(RP),
intent(in) :: j13g (
ka,
ia,
ja,7)
255 real(RP),
intent(in) :: j23g (
ka,
ia,
ja,7)
256 real(RP),
intent(in) :: j33g
257 real(RP),
intent(in) :: mapf (
ia,
ja,2,4)
259 real(RP),
intent(in) :: ref_pres(
ka,
ia,
ja)
260 real(RP),
intent(in) :: ref_dens(
ka,
ia,
ja)
262 logical,
intent(in) :: bnd_w
263 logical,
intent(in) :: bnd_e
264 logical,
intent(in) :: bnd_s
265 logical,
intent(in) :: bnd_n
267 real(RP),
intent(in) :: dt
269 real(RP) :: dens0(
ka,
ia,
ja)
270 real(RP) :: momz0(
ka,
ia,
ja)
271 real(RP) :: momx0(
ka,
ia,
ja)
272 real(RP) :: momy0(
ka,
ia,
ja)
273 real(RP) :: rhot0(
ka,
ia,
ja)
276 real(RP) :: mflx_hi_rk(
ka,
ia,
ja,3,2)
277 real(RP) :: tflx_hi_rk(
ka,
ia,
ja,3,2)
281 integer :: i, j, k, iv, n
284 call prof_rapstart(
"DYN_RK3_Prep",3)
287 dens_rk1(:,:,:) = undef
288 momz_rk1(:,:,:) = undef
289 momx_rk1(:,:,:) = undef
290 momy_rk1(:,:,:) = undef
291 rhot_rk1(:,:,:) = undef
292 if (
va > 0 ) prog_rk1(:,:,:,:) = undef
294 dens_rk2(:,:,:) = undef
295 momz_rk2(:,:,:) = undef
296 momx_rk2(:,:,:) = undef
297 momy_rk2(:,:,:) = undef
298 rhot_rk2(:,:,:) = undef
299 if (
va > 0 ) prog_rk2(:,:,:,:) = undef
301 mflx_hi(:,:,:,:) = undef
302 tflx_hi(:,:,:,:) = undef
304 mflx_hi_rk(:,:,:,:,:) = undef
305 tflx_hi_rk(:,:,:,:,:) = undef
319 if (
va > 0 ) prog0 = prog
324 mflx_hi_rk(k,
is-1,j,2,:) = mflx_hi(k,
is-1,j,2)
331 mflx_hi_rk(k,
ie,j,2,:) = mflx_hi(k,
ie,j,2)
338 mflx_hi_rk(k,i,
js-1,3,:) = mflx_hi(k,i,
js-1,3)
345 mflx_hi_rk(k,i,
je,3,:) = mflx_hi(k,i,
je,3)
350 call prof_rapend (
"DYN_RK3_Prep",3)
358 call prof_rapstart(
"DYN_RK3",3)
362 call atmos_dyn_tstep( dens_rk1, momz_rk1, momx_rk1, momy_rk1, rhot_rk1, &
364 mflx_hi_rk(:,:,:,:,1), tflx_hi_rk(:,:,:,:,1), &
365 dens0, momz0, momx0, momy0, rhot0, &
366 dens, momz, momx, momy, rhot, &
367 dens_t, momz_t, momx_t, momy_t, rhot_t, &
369 rtot, cvtot, corioli, &
370 num_diff, divdmp_coef, ddiv, &
371 flag_fct_momentum, flag_fct_t, &
372 flag_fct_along_stream, &
373 cdz, fdz, fdx, fdy, &
374 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
375 phi, gsqrt, j13g, j23g, j33g, mapf, &
376 ref_pres, ref_dens, &
377 bnd_w, bnd_e, bnd_s, bnd_n, &
380 call prof_rapend (
"DYN_RK3",3)
381 call prof_rapstart(
"DYN_RK3_BND",3)
385 dens0, momz0, momx0, momy0, rhot0, &
387 bnd_w, bnd_e, bnd_s, bnd_n )
389 call prof_rapend (
"DYN_RK3_BND",3)
391 call comm_vars8( dens_rk1(:,:,:), i_comm_dens_rk1 )
392 call comm_vars8( momz_rk1(:,:,:), i_comm_momz_rk1 )
393 call comm_vars8( momx_rk1(:,:,:), i_comm_momx_rk1 )
394 call comm_vars8( momy_rk1(:,:,:), i_comm_momy_rk1 )
395 call comm_vars8( rhot_rk1(:,:,:), i_comm_rhot_rk1 )
397 call comm_vars8( prog_rk1(:,:,:,iv), i_comm_prog_rk1(iv) )
400 call comm_wait ( dens_rk1(:,:,:), i_comm_dens_rk1, .false. )
401 call comm_wait ( momz_rk1(:,:,:), i_comm_momz_rk1, .false. )
402 call comm_wait ( momx_rk1(:,:,:), i_comm_momx_rk1, .false. )
403 call comm_wait ( momy_rk1(:,:,:), i_comm_momy_rk1, .false. )
404 call comm_wait ( rhot_rk1(:,:,:), i_comm_rhot_rk1, .false. )
406 call comm_wait ( prog_rk1(:,:,:,iv), i_comm_prog_rk1(iv), .false. )
411 call prof_rapstart(
"DYN_RK3",3)
415 call atmos_dyn_tstep( dens_rk2, momz_rk2, momx_rk2, momy_rk2, rhot_rk2, &
417 mflx_hi_rk(:,:,:,:,2), tflx_hi_rk(:,:,:,:,2), &
418 dens0, momz0, momx0, momy0, rhot0, &
419 dens_rk1, momz_rk1, momx_rk1, momy_rk1, rhot_rk1, &
420 dens_t, momz_t, momx_t, momy_t, rhot_t, &
422 rtot, cvtot, corioli, &
423 num_diff, divdmp_coef, ddiv, &
424 flag_fct_momentum, flag_fct_t, &
425 flag_fct_along_stream, &
426 cdz, fdz, fdx, fdy, &
427 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
428 phi, gsqrt, j13g, j23g, j33g, mapf, &
429 ref_pres, ref_dens, &
430 bnd_w, bnd_e, bnd_s, bnd_n, &
433 call prof_rapend (
"DYN_RK3",3)
434 call prof_rapstart(
"DYN_RK3_BND",3)
438 dens0, momz0, momx0, momy0, rhot0, &
440 bnd_w, bnd_e, bnd_s, bnd_n )
442 call prof_rapend (
"DYN_RK3_BND",3)
444 call comm_vars8( dens_rk2(:,:,:), i_comm_dens_rk2 )
445 call comm_vars8( momz_rk2(:,:,:), i_comm_momz_rk2 )
446 call comm_vars8( momx_rk2(:,:,:), i_comm_momx_rk2 )
447 call comm_vars8( momy_rk2(:,:,:), i_comm_momy_rk2 )
448 call comm_vars8( rhot_rk2(:,:,:), i_comm_rhot_rk2 )
450 call comm_vars8( prog_rk2(:,:,:,iv), i_comm_prog_rk2(iv) )
453 call comm_wait ( dens_rk2(:,:,:), i_comm_dens_rk2, .false. )
454 call comm_wait ( momz_rk2(:,:,:), i_comm_momz_rk2, .false. )
455 call comm_wait ( momx_rk2(:,:,:), i_comm_momx_rk2, .false. )
456 call comm_wait ( momy_rk2(:,:,:), i_comm_momy_rk2, .false. )
457 call comm_wait ( rhot_rk2(:,:,:), i_comm_rhot_rk2, .false. )
459 call comm_wait ( prog_rk2(:,:,:,iv), i_comm_prog_rk2(iv), .false. )
464 call prof_rapstart(
"DYN_RK3",3)
468 call atmos_dyn_tstep( dens, momz, momx, momy, rhot, &
471 dens0, momz0, momx0, momy0, rhot0, &
472 dens_rk2, momz_rk2, momx_rk2, momy_rk2, rhot_rk2, &
473 dens_t, momz_t, momx_t, momy_t, rhot_t, &
475 rtot, cvtot, corioli, &
476 num_diff, divdmp_coef, ddiv, &
477 flag_fct_momentum, flag_fct_t, &
478 flag_fct_along_stream, &
479 cdz, fdz, fdx, fdy, &
480 rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, &
481 phi, gsqrt, j13g, j23g, j33g, mapf, &
482 ref_pres, ref_dens, &
483 bnd_w, bnd_e, bnd_s, bnd_n, &
486 if ( .NOT. flag_ws2002 )
then 490 dens(k,i,j) = ( dens_rk1(k,i,j) * 3.0_rp &
491 + dens(k,i,j) * 3.0_rp &
492 - dens0(k,i,j) * 2.0_rp ) / 4.0_rp
500 momz(k,i,j) = ( momz_rk1(k,i,j) * 3.0_rp &
501 + momz(k,i,j) * 3.0_rp &
502 - momz0(k,i,j) * 2.0_rp ) / 4.0_rp
510 momx(k,i,j) = ( momx_rk1(k,i,j) * 3.0_rp &
511 + momx(k,i,j) * 3.0_rp &
512 - momx0(k,i,j) * 2.0_rp ) / 4.0_rp
520 momy(k,i,j) = ( momy_rk1(k,i,j) * 3.0_rp &
521 + momy(k,i,j) * 3.0_rp &
522 - momy0(k,i,j) * 2.0_rp ) / 4.0_rp
530 rhot(k,i,j) = ( rhot_rk1(k,i,j) * 3.0_rp &
531 + rhot(k,i,j) * 3.0_rp &
532 - rhot0(k,i,j) * 2.0_rp ) / 4.0_rp
541 prog(k,i,j,iv) = ( prog_rk1(k,i,j,iv) * 3.0_rp &
542 + prog(k,i,j,iv) * 3.0_rp &
543 - prog0(k,i,j,iv) * 2.0_rp ) / 4.0_rp
553 mflx_hi(k,i,j,n) = ( mflx_hi_rk(k,i,j,n,1) &
554 + mflx_hi(k,i,j,n ) * 3.0_rp ) / 4.0_rp
564 tflx_hi(k,i,j,n) = ( tflx_hi_rk(k,i,j,n,1) &
565 + tflx_hi(k,i,j,n ) * 3.0_rp ) / 4.0_rp
573 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 ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (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
integer, public ja
of y whole cells (local, with HALO)