15 #include "inc_openmp.h" 18 #define PROFILE_START(name) call fapp_start(name, 1, 1) 19 #define PROFILE_STOP(name) call fapp_stop (name, 1, 1) 20 #elif defined(PROFILE_FINEPA) 21 #define PROFILE_START(name) call start_collection(name) 22 #define PROFILE_STOP(name) call stop_collection (name) 24 #define PROFILE_START(name) 25 #define PROFILE_STOP(name) 66 #define F2H(k,p,idx) (CDZ(k+p-1)*GSQRT(k+p-1,i,j,idx)/(CDZ(k)*GSQRT(k,i,j,idx)+CDZ(k+1)*GSQRT(k+1,i,j,idx))) 68 # define F2H(k,p,idx) 0.5_RP 75 integer,
private,
parameter :: nb = 1
76 integer,
private,
parameter :: va_fvm_hevi = 0
81 real(RP),
private,
allocatable :: advch_t(:,:,:,:)
82 real(RP),
private,
allocatable :: advcv_t(:,:,:,:)
83 real(RP),
private,
allocatable :: ddiv_t (:,:,:,:)
84 real(RP),
private,
allocatable :: pg_t (:,:,:,:)
85 real(RP),
private,
allocatable :: cf_t (:,:,:,:)
101 character(len=*),
intent(in) :: ATMOS_DYN_TYPE
102 integer,
intent(out) :: VA_out
103 character(len=H_SHORT),
intent(out) :: VAR_NAME(:)
104 character(len=H_MID),
intent(out) :: VAR_DESC(:)
105 character(len=H_SHORT),
intent(out) :: VAR_UNIT(:)
110 if ( atmos_dyn_type /=
'FVM-HEVI' .AND. atmos_dyn_type /=
'HEVI' )
then 111 write(*,*)
'xxx ATMOS_DYN_TYPE is not FVM-HEVI. Check!' 132 #elif defined(HEVI_LAPACK) 139 allocate( advch_t(
ka,
ia,
ja,5) )
140 allocate( advcv_t(
ka,
ia,
ja,5) )
141 allocate( ddiv_t(
ka,
ia,
ja,3) )
142 allocate( pg_t(
ka,
ia,
ja,3) )
143 allocate( cf_t(
ka,
ia,
ja,2) )
157 DENS_RK, MOMZ_RK, MOMX_RK, MOMY_RK, RHOT_RK, &
160 DENS0, MOMZ0, MOMX0, MOMY0, RHOT0, &
161 DENS, MOMZ, MOMX, MOMY, RHOT, &
162 DENS_t, MOMZ_t, MOMX_t, MOMY_t, RHOT_t, &
164 DPRES0, RT2P, CORIOLI, &
165 num_diff, divdmp_coef, DDIV, &
166 FLAG_FCT_MOMENTUM, FLAG_FCT_T, &
167 FLAG_FCT_ALONG_STREAM, &
168 CDZ, FDZ, FDX, FDY, &
169 RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, &
170 PHI, GSQRT, J13G, J23G, J33G, MAPF, &
171 REF_dens, REF_rhot, &
172 BND_W, BND_E, BND_S, BND_N, &
177 rdry => const_rdry, &
178 cvdry => const_cvdry, &
179 cpdry => const_cpdry, &
181 grav => const_grav, &
223 real(RP),
intent(out) :: DENS_RK(
ka,
ia,
ja)
224 real(RP),
intent(out) :: MOMZ_RK(
ka,
ia,
ja)
225 real(RP),
intent(out) :: MOMX_RK(
ka,
ia,
ja)
226 real(RP),
intent(out) :: MOMY_RK(
ka,
ia,
ja)
227 real(RP),
intent(out) :: RHOT_RK(
ka,
ia,
ja)
229 real(RP),
intent(out) :: PROG_RK(
ka,
ia,
ja,
va)
231 real(RP),
intent(inout) :: mflx_hi(
ka,
ia,
ja,3)
232 real(RP),
intent(out) :: tflx_hi(
ka,
ia,
ja,3)
234 real(RP),
intent(in),
target :: DENS0(
ka,
ia,
ja)
235 real(RP),
intent(in),
target :: MOMZ0(
ka,
ia,
ja)
236 real(RP),
intent(in),
target :: MOMX0(
ka,
ia,
ja)
237 real(RP),
intent(in),
target :: MOMY0(
ka,
ia,
ja)
238 real(RP),
intent(in),
target :: RHOT0(
ka,
ia,
ja)
240 real(RP),
intent(in) :: DENS(
ka,
ia,
ja)
241 real(RP),
intent(in) :: MOMZ(
ka,
ia,
ja)
242 real(RP),
intent(in) :: MOMX(
ka,
ia,
ja)
243 real(RP),
intent(in) :: MOMY(
ka,
ia,
ja)
244 real(RP),
intent(in) :: RHOT(
ka,
ia,
ja)
246 real(RP),
intent(in) :: DENS_t(
ka,
ia,
ja)
247 real(RP),
intent(in) :: MOMZ_t(
ka,
ia,
ja)
248 real(RP),
intent(in) :: MOMX_t(
ka,
ia,
ja)
249 real(RP),
intent(in) :: MOMY_t(
ka,
ia,
ja)
250 real(RP),
intent(in) :: RHOT_t(
ka,
ia,
ja)
252 real(RP),
intent(in) :: PROG0(
ka,
ia,
ja,
va)
253 real(RP),
intent(in) :: PROG (
ka,
ia,
ja,
va)
255 real(RP),
intent(in) :: DPRES0(
ka,
ia,
ja)
256 real(RP),
intent(in) :: RT2P(
ka,
ia,
ja)
257 real(RP),
intent(in) :: CORIOLI(1,
ia,
ja)
258 real(RP),
intent(in) :: num_diff(
ka,
ia,
ja,5,3)
259 real(RP),
intent(in) :: divdmp_coef
260 real(RP),
intent(in) :: DDIV(
ka,
ia,
ja)
262 logical,
intent(in) :: FLAG_FCT_MOMENTUM
263 logical,
intent(in) :: FLAG_FCT_T
264 logical,
intent(in) :: FLAG_FCT_ALONG_STREAM
266 real(RP),
intent(in) :: CDZ(
ka)
267 real(RP),
intent(in) :: FDZ(
ka-1)
268 real(RP),
intent(in) :: FDX(
ia-1)
269 real(RP),
intent(in) :: FDY(
ja-1)
270 real(RP),
intent(in) :: RCDZ(
ka)
271 real(RP),
intent(in) :: RCDX(
ia)
272 real(RP),
intent(in) :: RCDY(
ja)
273 real(RP),
intent(in) :: RFDZ(
ka-1)
274 real(RP),
intent(in) :: RFDX(
ia-1)
275 real(RP),
intent(in) :: RFDY(
ja-1)
277 real(RP),
intent(in) :: PHI (
ka,
ia,
ja)
278 real(RP),
intent(in) :: GSQRT (
ka,
ia,
ja,7)
279 real(RP),
intent(in) :: J13G (
ka,
ia,
ja,7)
280 real(RP),
intent(in) :: J23G (
ka,
ia,
ja,7)
281 real(RP),
intent(in) :: J33G
282 real(RP),
intent(in) :: MAPF (
ia,
ja,2,4)
283 real(RP),
intent(in) :: REF_dens(
ka,
ia,
ja)
284 real(RP),
intent(in) :: REF_rhot(
ka,
ia,
ja)
286 logical,
intent(in) :: BND_W
287 logical,
intent(in) :: BND_E
288 logical,
intent(in) :: BND_S
289 logical,
intent(in) :: BND_N
291 real(RP),
intent(in) :: dtrk
292 real(RP),
intent(in) :: dt
296 real(RP) :: POTT(
ka,
ia,
ja)
297 real(RP) :: DPRES(
ka,
ia,
ja)
299 real(RP) :: qflx_hi (
ka,
ia,
ja,3)
300 real(RP) :: qflx_J13(
ka,
ia,
ja)
301 real(RP) :: qflx_J23(
ka,
ia,
ja)
309 real(RP) :: advch_t(
ka,
ia,
ja,5)
310 real(RP) :: advcv_t(
ka,
ia,
ja,5)
311 real(RP) :: ddiv_t(
ka,
ia,
ja,3)
312 real(RP) :: pg_t(
ka,
ia,
ja,3)
313 real(RP) :: cf_t(
ka,
ia,
ja,2)
330 integer :: IIS, IIE, JJS, JJE
340 qflx_hi(:,:,:,:) = undef
341 qflx_j13(:,:,:) = undef
342 qflx_j23(:,:,:) = undef
355 if ( bnd_w ) ifs_off = 0
356 if ( bnd_s ) jfs_off = 0
364 profile_start(
"hevi_pres")
370 call check( __line__, dpres0(k,i,j) )
371 call check( __line__, rt2p(k,i,j) )
372 call check( __line__, rhot(k,i,j) )
373 call check( __line__, ref_rhot(k,i,j) )
375 dpres(k,i,j) = dpres0(k,i,j) + rt2p(k,i,j) * ( rhot(k,i,j) - ref_rhot(k,i,j) )
377 dpres(
ks-1,i,j) = dpres0(
ks-1,i,j) - dens(
ks,i,j) * ( phi(
ks-1,i,j) - phi(
ks+1,i,j) )
378 dpres(
ke+1,i,j) = dpres0(
ke+1,i,j) - dens(
ke,i,j) * ( phi(
ke+1,i,j) - phi(
ke-1,i,j) )
381 profile_stop(
"hevi_pres")
385 profile_start(
"hevi_mflx_z")
390 mflx_hi(
ks-1,i,j,
zdir) = 0.0_rp
393 call check( __line__, momx(k+1,i ,j) )
394 call check( __line__, momx(k+1,i-1,j) )
395 call check( __line__, momx(k ,i ,j) )
396 call check( __line__, momx(k ,i+1,j) )
397 call check( __line__, momy(k+1,i,j) )
398 call check( __line__, momy(k+1,i,j-1) )
399 call check( __line__, momy(k ,i,j) )
400 call check( __line__, momy(k ,i,j-1) )
402 mflx_hi(k,i,j,
zdir) = j13g(k,i,j,
i_xyw) * 0.25_rp / mapf(i,j,2,
i_xy) &
403 * ( momx(k+1,i,j)+momx(k+1,i-1,j) &
404 + momx(k ,i,j)+momx(k ,i-1,j) ) &
405 + j23g(k,i,j,
i_xyw) * 0.25_rp / mapf(i,j,1,
i_xy) &
406 * ( momy(k+1,i,j)+momy(k+1,i,j-1) &
407 + momy(k ,i,j)+momy(k ,i,j-1) ) &
408 + gsqrt(k,i,j,
i_xyw) / ( mapf(i,j,1,
i_xy)*mapf(i,j,2,
i_xy) ) * num_diff(k,i,j,
i_dens,
zdir)
410 mflx_hi(
ke ,i,j,
zdir) = 0.0_rp
414 k = iundef; i = iundef; j = iundef
416 profile_stop(
"hevi_mflx_z")
418 profile_start(
"hevi_mflx_x")
419 iss = max(iis-1,
is-ifs_off)
428 call check( __line__, momx(k,i,j) )
431 mflx_hi(k,i,j,
xdir) = gsqrt(k,i,j,
i_uyz) / mapf(i,j,2,
i_uy) &
432 * ( momx(k,i,j) + num_diff(k,i,j,
i_dens,
xdir) )
437 k = iundef; i = iundef; j = iundef
439 profile_stop(
"hevi_mflx_x")
443 do j = max(jjs-1,
js-jfs_off), min(jje,
jeh)
448 call check( __line__, momy(k,i,j) )
451 mflx_hi(k,i,j,
ydir) = gsqrt(k,i,j,
i_xvz) / mapf(i,j,1,
i_xv) &
452 * ( momy(k,i,j) + num_diff(k,i,j,
i_dens,
ydir) )
457 k = iundef; i = iundef; j = iundef
461 profile_start(
"hevi_sr")
467 call check( __line__, dens0(k,i,j) )
468 call check( __line__, mflx_hi(k ,i ,j ,
xdir) )
469 call check( __line__, mflx_hi(k ,i-1,j ,
xdir) )
470 call check( __line__, mflx_hi(k ,i ,j ,
ydir) )
471 call check( __line__, mflx_hi(k ,i ,j-1,
ydir) )
472 call check( __line__, dens_t(k,i,j) )
474 advch = - ( ( mflx_hi(k,i,j,
zdir)-mflx_hi(k-1,i ,j,
zdir) ) * rcdz(k) &
475 + ( mflx_hi(k,i,j,
xdir)-mflx_hi(k ,i-1,j,
xdir) ) * rcdx(i) &
476 + ( mflx_hi(k,i,j,
ydir)-mflx_hi(k ,i, j-1,
ydir) ) * rcdy(j) ) &
478 sr(k,i,j) = advch + dens_t(k,i,j)
480 if ( lhist ) advch_t(k,i,j,
i_dens) = advch
486 k = iundef; i = iundef; j = iundef
488 profile_stop(
"hevi_sr")
494 profile_start(
"hevi_momz_qflxhi_z")
497 gsqrt(:,:,:,
i_xyz), j33g, &
501 profile_stop(
"hevi_momz_qflxhi_z")
503 profile_start(
"hevi_momz_qflxj")
506 gsqrt(:,:,:,
i_xyz), j13g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
511 gsqrt(:,:,:,
i_xyz), j23g(:,:,:,
i_xyz), mapf(:,:,:,
i_xy), &
514 profile_stop(
"hevi_momz_qflxj")
517 profile_start(
"hevi_momz_qflxhi_x")
524 profile_stop(
"hevi_momz_qflxhi_x")
527 profile_start(
"hevi_momz_qflxhi_y")
534 profile_stop(
"hevi_momz_qflxhi_y")
537 profile_start(
"hevi_sw")
543 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
544 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
545 call check( __line__, qflx_j13(k ,i ,j) )
546 call check( __line__, qflx_j13(k-1,i ,j) )
547 call check( __line__, qflx_j23(k ,i ,j) )
548 call check( __line__, qflx_j23(k-1,i ,j) )
549 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
550 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
551 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
552 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
553 call check( __line__, ddiv(k ,i,j) )
554 call check( __line__, ddiv(k+1,i,j) )
555 call check( __line__, momz0(k,i,j) )
556 call check( __line__, momz_t(k,i,j) )
558 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) ) * rfdz(k)
559 advch = - ( ( qflx_j13(k,i,j) - qflx_j13(k-1,i ,j ) &
560 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j ) ) * rfdz(k) &
561 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k,i-1,j ,
xdir) ) * rcdx(i) &
562 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k,i ,j-1,
ydir) ) * rcdy(j) ) &
563 * mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy)
564 div = divdmp_coef / dtrk * ( ddiv(k+1,i,j)-ddiv(k,i,j) ) * fdz(k)
565 sw(k,i,j) = ( advcv + advch ) / gsqrt(k,i,j,
i_xyw) &
566 + div + momz_t(k,i,j)
571 ddiv_t(k,i,j,1) = div
577 profile_stop(
"hevi_sw")
579 k = iundef; i = iundef; j = iundef
590 call check( __line__, rhot(k,i,j) )
591 call check( __line__, dens(k,i,j) )
593 pott(k,i,j) = rhot(k,i,j) / dens(k,i,j)
598 k = iundef; i = iundef; j = iundef
603 mflx_hi(:,:,:,
zdir), pott, gsqrt(:,:,:,
i_xyw), &
610 mflx_hi(:,:,:,
xdir), pott, gsqrt(:,:,:,
i_uyz), &
617 mflx_hi(:,:,:,
ydir), pott, gsqrt(:,:,:,
i_xvz), &
623 profile_start(
"hevi_st")
629 call check( __line__, tflx_hi(k ,i ,j ,
zdir) )
630 call check( __line__, tflx_hi(k-1,i ,j ,
zdir) )
631 call check( __line__, tflx_hi(k ,i ,j ,
xdir) )
632 call check( __line__, tflx_hi(k ,i-1,j ,
xdir) )
633 call check( __line__, tflx_hi(k ,i ,j ,
ydir) )
634 call check( __line__, tflx_hi(k ,i ,j-1,
ydir) )
635 call check( __line__, rhot_t(k,i,j) )
637 advch = - ( ( tflx_hi(k,i,j,
zdir) - tflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k) &
638 + ( tflx_hi(k,i,j,
xdir) - tflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
639 + ( tflx_hi(k,i,j,
ydir) - tflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
641 st(k,i,j) = advch + rhot_t(k,i,j)
644 advch_t(k,i,j,
i_rhot) = advch
651 k = iundef; i = iundef; j = iundef
653 profile_stop(
"hevi_st")
657 profile_start(
"hevi_solver")
666 momz(:,i,j), pott(:,i,j), gsqrt(:,i,j,
i_xyz), &
670 a(k,i,j) = dtrk**2 * j33g * rcdz(k) * rt2p(k,i,j) * j33g / gsqrt(k,i,j,
i_xyz)
672 b = grav * dtrk**2 * j33g / ( cdz(
ks+1) + cdz(
ks) )
673 f1(
ks,i,j) = - ( pt(
ks+1,i,j) * rfdz(
ks) * a(
ks+1,i,j) + b ) / gsqrt(
ks,i,j,
i_xyw)
674 f2(
ks,i,j) = 1.0_rp + ( pt(
ks ,i,j) * rfdz(
ks) * ( a(
ks+1,i,j)+a(
ks,i,j) ) ) / gsqrt(
ks,i,j,
i_xyw)
676 b = grav * dtrk**2 * j33g / ( cdz(k+1) + cdz(k) )
677 f1(k,i,j) = - ( pt(k+1,i,j) * rfdz(k) * a(k+1,i,j) + b ) / gsqrt(k,i,j,
i_xyw)
678 f2(k,i,j) = 1.0_rp + ( pt(k ,i,j) * rfdz(k) * ( a(k+1,i,j)+a(k,i,j) ) ) / gsqrt(k,i,j,
i_xyw)
679 f3(k,i,j) = - ( pt(k-1,i,j) * rfdz(k) * a(k,i,j) - b ) / gsqrt(k,i,j,
i_xyw)
681 b = grav * dtrk**2 * j33g / ( cdz(
ke) + cdz(
ke-1) )
682 f2(
ke-1,i,j) = 1.0_rp + ( pt(
ke-1,i,j) * rfdz(
ke-1) * ( a(
ke,i,j)+a(
ke-1,i,j) ) ) / gsqrt(
ke-1,i,j,
i_xyw)
683 f3(
ke-1,i,j) = - ( pt(
ke-2,i,j) * rfdz(
ke-1) * a(
ke-1,i,j) - b ) / gsqrt(
ke-1,i,j,
i_xyw)
685 pg = - ( dpres(k+1,i,j) + rt2p(k+1,i,j)*dtrk*st(k+1,i,j) &
686 - dpres(k ,i,j) - rt2p(k ,i,j)*dtrk*st(k ,i,j) ) &
687 * rfdz(k) * j33g / gsqrt(k,i,j,
i_xyw) &
689 * ( f2h(k,1,
i_xyz) * ( dens(k+1,i,j) - ref_dens(k+1,i,j) + sr(k+1,i,j) * dtrk ) &
690 + f2h(k,2,
i_xyz) * ( dens(k ,i,j) - ref_dens(k ,i,j) + sr(k ,i,j) * dtrk ) )
691 c(k-
ks+1,i,j) = momz(k,i,j) + dtrk * ( pg + sw(k,i,j) )
693 if ( lhist ) pg_t(k,i,j,1) = pg
698 call solve_bicgstab( &
700 f1(:,i,j), f2(:,i,j), f3(:,i,j) )
701 #elif defined(HEVI_LAPACK) 707 f1(:,i,j), f2(:,i,j), f3(:,i,j) )
711 f1(:,i,j), f2(:,i,j), f3(:,i,j) )
715 #ifdef DEBUG_HEVI2HEVE 717 c(k-
ks+1,i,j) = momz(k,i,j)
718 mflx_hi(k,i,j,
zdir) = mflx_hi(k,i,j,
zdir) &
719 + j33g * momz(k,i,j) / ( mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) )
720 momz_rk(k,i,j) = momz0(k,i,j) &
722 - j33g * ( dpres(k+1,i,j)-dpres(k,i,j) ) * rfdz(k) / gsqrt(k,i,j,
i_xyw) &
723 - grav * ( f2h(k,2,
i_xyz)*(dens(k,i,j)-ref_dens(k,i,j))+f2h(k,1,
i_xyz)*(dens(k+1,i,j)-ref_dens(k+1,i,j)) ) &
727 mflx_hi(k,i,j,
zdir) = mflx_hi(k,i,j,
zdir) &
728 + j33g * c(k-
ks+1,i,j) / ( mapf(i,j,1,
i_xy) * mapf(i,j,2,
i_xy) )
730 momz_rk(k,i,j) = momz0(k,i,j) &
731 + ( c(k-
ks+1,i,j) - momz(k,i,j) )
734 momz_rk(
ks-1,i,j) = 0.0_rp
735 momz_rk(
ke ,i,j) = 0.0_rp
738 advcv = - c(1,i,j) * j33g * rcdz(
ks) / gsqrt(
ks,i,j,
i_xyz)
739 dens_rk(
ks,i,j) = dens0(
ks,i,j) + dtrk * ( advcv + sr(
ks,i,j) )
741 if ( lhist ) advcv_t(
ks,i,j,
i_dens) = advcv
743 advcv = - c(1,i,j)*pt(
ks,i,j) * j33g * rcdz(
ks) / gsqrt(
ks,i,j,
i_xyz)
744 rhot_rk(
ks,i,j) = rhot0(
ks,i,j) + dtrk * ( advcv + st(
ks,i,j) )
746 if ( lhist ) advcv_t(
ks,i,j,
i_rhot) = advcv
749 advcv = - ( c(k-
ks+1,i,j) - c(k-
ks,i,j) ) &
750 * j33g * rcdz(k) / gsqrt(k,i,j,
i_xyz)
751 dens_rk(k,i,j) = dens0(k,i,j) + dtrk * ( advcv + sr(k,i,j) )
753 if ( lhist ) advcv_t(k,i,j,
i_dens) = advcv
755 advcv = - ( c(k-
ks+1,i,j)*pt(k,i,j) - c(k-
ks,i,j)*pt(k-1,i,j) ) &
756 * j33g * rcdz(k) / gsqrt(k,i,j,
i_xyz)
757 rhot_rk(k,i,j) = rhot0(k,i,j) + dtrk * ( advcv + st(k,i,j) )
759 if ( lhist ) advcv_t(k,i,j,
i_rhot) = advcv
763 dens_rk(
ke,i,j) = dens0(
ke,i,j) + dtrk * ( advcv + sr(
ke,i,j) )
765 if ( lhist ) advcv_t(
ke,i,j,
i_dens) = advcv
767 advcv = c(
ke-
ks,i,j) * pt(
ke-1,i,j) * j33g * rcdz(
ke) / gsqrt(
ke,i,j,
i_xyz)
768 rhot_rk(
ke,i,j) = rhot0(
ke,i,j) + dtrk * ( advcv + st(
ke,i,j) )
770 if ( lhist ) advcv_t(
ke,i,j,
i_rhot) = advcv
774 call check_equation( &
776 dens(:,i,j), momz(:,i,j), rhot(:,i,j), dpres(:,i,j), &
778 sr(:,i,j), sw(:,i,j), st(:,i,j), &
779 j33g, gsqrt(:,i,j,:), &
787 k = iundef; i = iundef; j = iundef
790 profile_stop(
"hevi_solver")
795 profile_start(
"hevi_momx")
799 gsqrt(:,:,:,
i_uyw), j33g, &
805 gsqrt(:,:,:,
i_uyz), j13g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
810 gsqrt(:,:,:,
i_uyz), j23g(:,:,:,
i_uyw), mapf(:,:,:,
i_uy), &
838 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
839 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
840 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
841 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
842 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
843 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
844 call check( __line__, dpres(k,i+1,j) )
845 call check( __line__, dpres(k,i ,j) )
846 call check( __line__, corioli(1,i ,j) )
847 call check( __line__, corioli(1,i+1,j) )
848 call check( __line__, momy(k,i ,j ) )
849 call check( __line__, momy(k,i+1,j ) )
850 call check( __line__, momy(k,i ,j-1) )
851 call check( __line__, momy(k,i+1,j-1) )
852 call check( __line__, ddiv(k,i+1,j) )
853 call check( __line__, ddiv(k,i ,j) )
854 call check( __line__, momx0(k,i,j) )
856 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k)
857 advch = - ( ( qflx_j13(k,i,j) - qflx_j13(k-1,i ,j ) &
858 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j ) ) * rfdz(k) &
859 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rfdx(i) &
860 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rcdy(j) ) &
861 * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy)
862 pg = ( ( gsqrt(k,i+1,j,
i_xyz) * dpres(k,i+1,j) &
863 - gsqrt(k,i ,j,
i_xyz) * dpres(k,i ,j) &
865 + ( j13g(k ,i,j,
i_uyw) &
866 * 0.5_rp * ( f2h(k,1,
i_uyz) * ( dpres(k+1,i+1,j)+dpres(k+1,i,j) ) &
867 + f2h(k,2,
i_uyz) * ( dpres(k ,i+1,j)+dpres(k ,i,j) ) ) &
868 - j13g(k-1,i,j,
i_uyw) &
869 * 0.5_rp * ( f2h(k,1,
i_uyz) * ( dpres(k ,i+1,j)+dpres(k ,i,j) ) &
870 + f2h(k,2,
i_uyz) * ( dpres(k-1,i+1,j)+dpres(k-1,i,j) ) ) &
873 cf = 0.125_rp * ( corioli(1,i+1,j )+corioli(1,i,j ) ) &
874 * ( momy(k,i+1,j )+momy(k,i,j ) &
875 + momy(k,i+1,j-1)+momy(k,i,j-1) ) &
876 + 0.25_rp * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy) &
877 * ( momy(k,i,j) + momy(k,i,j-1) + momy(k,i+1,j) + momy(k,i+1,j-1) ) &
878 * ( ( momy(k,i,j) + momy(k,i,j-1) + momy(k,i+1,j) + momy(k,i+1,j-1) ) * 0.25_rp &
879 * ( 1.0_rp/mapf(i+1,j,2,
i_xy) - 1.0_rp/mapf(i,j,2,
i_xy) ) * rcdx(i) &
881 * ( 1.0_rp/mapf(i,j,1,
i_uv) - 1.0_rp/mapf(i,j-1,1,
i_uv) ) * rfdy(j) ) &
882 * 2.0_rp / ( dens(k,i+1,j) + dens(k,i,j) )
883 div = divdmp_coef / dtrk * ( ddiv(k,i+1,j)/mapf(i+1,j,2,
i_xy) - ddiv(k,i,j)/mapf(i,j,1,
i_xy) ) &
884 * mapf(i,j,1,
i_uy) * mapf(i,j,2,
i_uy) * fdx(i)
885 momx_rk(k,i,j) = momx0(k,i,j) &
886 + dtrk * ( ( advcv + advch - pg ) / gsqrt(k,i,j,
i_uyz) + cf + div + momx_t(k,i,j) )
891 pg_t(k,i,j,2) = - pg / gsqrt(k,i,j,
i_uyz)
893 ddiv_t(k,i,j,2) = div
899 profile_stop(
"hevi_momx")
901 k = iundef; i = iundef; j = iundef
905 profile_start(
"hevi_momy")
909 gsqrt(:,:,:,
i_xvw), j33g, &
915 gsqrt(:,:,:,
i_xvz), j13g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
920 gsqrt(:,:,:,
i_xvz), j23g(:,:,:,
i_xvw), mapf(:,:,:,
i_xv), &
943 do j = jjs, min(jje,
jeh)
947 call check( __line__, qflx_hi(k ,i ,j ,
zdir) )
948 call check( __line__, qflx_hi(k-1,i ,j ,
zdir) )
949 call check( __line__, qflx_hi(k ,i ,j ,
xdir) )
950 call check( __line__, qflx_hi(k ,i-1,j ,
xdir) )
951 call check( __line__, qflx_hi(k ,i ,j ,
ydir) )
952 call check( __line__, qflx_hi(k ,i ,j-1,
ydir) )
953 call check( __line__, dpres(k,i,j ) )
954 call check( __line__, dpres(k,i,j+1) )
955 call check( __line__, corioli(1,i,j ) )
956 call check( __line__, corioli(1,i,j+1) )
957 call check( __line__, momx(k,i ,j ) )
958 call check( __line__, momx(k,i ,j+1) )
959 call check( __line__, momx(k,i-1,j ) )
960 call check( __line__, momx(k,i-1,j+1) )
961 call check( __line__, ddiv(k,i,j+1) )
962 call check( __line__, ddiv(k,i,j ) )
963 call check( __line__, momy_t(k,i,j) )
964 call check( __line__, momy0(k,i,j) )
966 advcv = - ( qflx_hi(k,i,j,
zdir) - qflx_hi(k-1,i ,j ,
zdir) ) * rcdz(k)
967 advch = - ( ( qflx_j13(k,i,j) - qflx_j13(k-1,i ,j ) &
968 + qflx_j23(k,i,j) - qflx_j23(k-1,i ,j ) ) * rcdz(k) &
969 + ( qflx_hi(k,i,j,
xdir) - qflx_hi(k ,i-1,j ,
xdir) ) * rcdx(i) &
970 + ( qflx_hi(k,i,j,
ydir) - qflx_hi(k ,i ,j-1,
ydir) ) * rfdy(j) ) &
971 * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv)
972 pg = ( ( gsqrt(k,i,j+1,
i_xyz) * dpres(k,i,j+1) &
973 - gsqrt(k,i,j ,
i_xyz) * dpres(k,i,j ) &
975 + ( j23g(k ,i,j,
i_xvw) &
976 * 0.5_rp * ( f2h(k ,1,
i_xvz) * ( dpres(k+1,i,j+1)+dpres(k+1,i,j) ) &
977 + f2h(k ,2,
i_xvz) * ( dpres(k ,i,j+1)+dpres(k ,i,j) ) ) &
978 - j23g(k-1,i,j,
i_xvw) &
979 * 0.5_rp * ( f2h(k-1,1,
i_xvz) * ( dpres(k ,i,j+1)+dpres(k ,i,j) ) &
980 + f2h(k-1,2,
i_xvz) * ( dpres(k-1,i,j+1)+dpres(k-1,i,j) ) ) &
983 cf = - 0.125_rp * ( corioli(1,i ,j+1)+corioli(1,i ,j) ) &
984 * ( momx(k,i ,j+1)+momx(k,i ,j) &
985 + momx(k,i-1,j+1)+momx(k,i-1,j) ) &
986 - 0.25_rp * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv) &
987 * ( momx(k,i,j) + momx(k,i-1,j) + momx(k,i,j+1) + momx(k,i-1,j+1) ) &
989 * ( 1.0_rp/mapf(i,j,2,
i_uv) - 1.0_rp/mapf(i-1,j,2,
i_uv) ) * rcdx(i) &
990 - 0.25_rp * ( momx(k,i,j)+momx(k,i-1,j)+momx(k,i,j+1)+momx(k,i-1,j+1) ) &
991 * ( 1.0_rp/mapf(i,j+1,1,
i_xy) - 1.0_rp/mapf(i,j,1,
i_xy) ) * rfdy(j) ) &
992 * 2.0_rp / ( dens(k,i,j+1) + dens(k,i,j) )
993 div = divdmp_coef / dtrk * ( ddiv(k,i,j+1)/mapf(i,j+1,1,
i_xy) - ddiv(k,i,j)/mapf(i,j,1,
i_xy) ) &
994 * mapf(i,j,1,
i_xv) * mapf(i,j,2,
i_xv) * fdy(j)
995 momy_rk(k,i,j) = momy0(k,i,j) &
996 + dtrk * ( ( advcv + advch - pg ) / gsqrt(k,i,j,
i_xvz) + cf + div + momy_t(k,i,j) )
1000 advch_t(k,i,j,
i_momy) = advch / gsqrt(k,i,j,
i_xvz)
1001 pg_t(k,i,j,3) = - pg / gsqrt(k,i,j,
i_xvz)
1003 ddiv_t(k,i,j,3) = div
1009 profile_stop(
"hevi_momy")
1011 k = iundef; i = iundef; j = iundef
1023 call hist_in(advcv_t(:,:,:,
i_dens),
'DENS_t_advcv',
'tendency of density (vert. advection)',
'kg/m3/s' )
1024 call hist_in(advcv_t(:,:,:,
i_momz),
'MOMZ_t_advcv',
'tendency of momentum z (vert. advection)',
'kg/m2/s2', zdim=
'half')
1025 call hist_in(advcv_t(:,:,:,
i_momx),
'MOMX_t_advcv',
'tendency of momentum x (vert. advection)',
'kg/m2/s2', xdim=
'half')
1026 call hist_in(advcv_t(:,:,:,
i_momy),
'MOMY_t_advcv',
'tendency of momentum y (vert. advection)',
'kg/m2/s2', ydim=
'half')
1027 call hist_in(advcv_t(:,:,:,
i_rhot),
'RHOT_t_advcv',
'tendency of rho*theta (vert. advection)',
'K kg/m3/s' )
1029 call hist_in(advch_t(:,:,:,
i_dens),
'DENS_t_advch',
'tendency of density (horiz. advection)',
'kg/m3/s' )
1030 call hist_in(advch_t(:,:,:,
i_momz),
'MOMZ_t_advch',
'tendency of momentum z (horiz. advection)',
'kg/m2/s2', zdim=
'half')
1031 call hist_in(advch_t(:,:,:,
i_momx),
'MOMX_t_advch',
'tendency of momentum x (horiz. advection)',
'kg/m2/s2', xdim=
'half')
1032 call hist_in(advch_t(:,:,:,
i_momy),
'MOMY_t_advch',
'tendency of momentum y (horiz. advection)',
'kg/m2/s2', ydim=
'half')
1033 call hist_in(advch_t(:,:,:,
i_rhot),
'RHOT_t_advch',
'tendency of rho*theta (horiz. advection)',
'K kg/m3/s' )
1035 call hist_in(pg_t(:,:,:,1),
'MOMZ_t_pg',
'tendency of momentum z (pressure gradient)',
'kg/m2/s2', zdim=
'half')
1036 call hist_in(pg_t(:,:,:,2),
'MOMX_t_pg',
'tendency of momentum x (pressure gradient)',
'kg/m2/s2', xdim=
'half')
1037 call hist_in(pg_t(:,:,:,3),
'MOMY_t_pg',
'tendency of momentum y (pressure gradient)',
'kg/m2/s2', ydim=
'half')
1039 call hist_in(ddiv_t(:,:,:,1),
'MOMZ_t_ddiv',
'tendency of momentum z (divergence damping)',
'kg/m2/s2', zdim=
'half')
1040 call hist_in(ddiv_t(:,:,:,2),
'MOMX_t_ddiv',
'tendency of momentum x (divergence damping)',
'kg/m2/s2', xdim=
'half')
1041 call hist_in(ddiv_t(:,:,:,3),
'MOMY_t_ddiv',
'tendency of momentum y (divergence damping)',
'kg/m2/s2', ydim=
'half')
1043 call hist_in(cf_t(:,:,:,1),
'MOMX_t_cf',
'tendency of momentum x (coliolis force)',
'kg/m2/s2', xdim=
'half')
1044 call hist_in(cf_t(:,:,:,2),
'MOMY_t_cf',
'tendency of momentum y (coliolis force)',
'kg/m2/s2', ydim=
'half')
1050 #ifdef HEVI_BICGSTAB 1052 subroutine solve_bicgstab( &
1059 real(RP),
intent(inout) :: C(
kmax-1)
1060 real(RP),
intent(in) :: F1(
ka)
1061 real(RP),
intent(in) :: F2(
ka)
1062 real(RP),
intent(in) :: F3(
ka)
1064 real(RP) :: r0(
kmax-1)
1066 real(RP) :: M(3,
kmax-1)
1067 real(RP) :: p(
kmax-1)
1068 real(RP) :: ap(
kmax-1)
1069 real(RP) :: s(
kmax-1)
1070 real(RP) :: as(
kmax-1)
1071 real(RP) :: al, be, w
1073 real(RP),
pointer :: r(:)
1074 real(RP),
pointer :: rn(:)
1075 real(RP),
pointer :: swap(:)
1076 real(RP),
target :: v0(
kmax-1)
1077 real(RP),
target :: v1(
kmax-1)
1079 real(RP) :: norm, error, epsilon
1083 epsilon = 0.1_rp**(
rp-1)
1097 norm = norm + c(k)**2
1103 call mul_matrix( v1, m, c )
1113 r0r = r0r + r0(k)*r(k)
1118 error = error + r(k)**2
1122 if ( error/norm < epsilon )
then 1129 call mul_matrix( ap, m, p )
1132 al = al + r0(k)*ap(k)
1135 s(:) = r(:) - al*ap(:)
1136 call mul_matrix( as, m, s )
1140 be = be + as(k)*s(k)
1145 c(:) = c(:) + al*p(:) + w*s(:)
1146 rn(:) = s(:) - w*as(:)
1150 r0r = r0r + r0(k)*rn(k)
1153 p(:) = rn(:) + be * ( p(:) - w*ap(:) )
1160 if ( iter >=
kmax-1 )
then 1161 write(*,*)
'xxx [atmos_dyn_hevi] Bi-CGSTAB' 1162 write(*,*)
'xxx not converged', error, norm
1167 end subroutine solve_bicgstab
1169 subroutine mul_matrix(V, M, C)
1171 real(RP),
intent(out) :: V(
kmax-1)
1172 real(RP),
intent(in) :: M(3,
kmax-1)
1173 real(RP),
intent(in) :: C(
kmax-1)
1178 v(1) = m(3,1)*c(2) + m(2,1)*c(1)
1180 v(k) = m(3,k)*c(k+1) + m(2,k)*c(k) + m(1,k)*c(k-1)
1186 end subroutine mul_matrix
1188 #elif defined(HEVI_LAPACK) 1190 subroutine solve_lapack( &
1200 real(RP),
intent(inout) :: C(
kmax-1)
1201 real(RP),
intent(in) :: F1(
ka)
1202 real(RP),
intent(in) :: F2(
ka)
1203 real(RP),
intent(in) :: F3(
ka)
1205 integer ,
intent(in) :: i
1206 integer ,
intent(in) :: j
1209 real(RP) :: M(nb*3+1,
kmax-1)
1210 integer :: IPIV(
kmax-1)
1217 real(RP) :: C2(
kmax-1)
1225 m(nb+1,k-
ks+1) = f1(k-1)
1227 m(nb+2,k-
ks+1) = f2(k)
1229 m(nb+3,k-
ks+1) = f3(k+1)
1234 m(nb+3,1 ) = f3(
ks+1)
1243 if (k>1) m2(k-1,k) = m(nb+3,k-1)
1245 if (k<
kmax-1) m2(k+1,k) = m(nb+1,k+1)
1249 if (
rp ==
dp )
then 1250 call dgbsv(
kmax-1, nb, nb, 1, m, nb*3+1, ipiv, c,
kmax-1, info)
1252 call sgbsv(
kmax-1, nb, nb, 1, m, nb*3+1, ipiv, c,
kmax-1, info)
1256 if ( info /= 0 )
then 1257 write(*,*)
"DGBSV was failed", info
1263 if (k>1) sum = sum + m2(k-1,k)*c(k-1)
1264 sum = sum + m2(k,k)*c(k)
1265 if (k<
kmax-1) sum = sum + m2(k+1,k)*c(k+1)
1266 if ( abs(sum-c2(k)) > 1e-10_rp )
then 1267 write(*,*)
"sum is different" 1268 write(*,*) k+2, i, j, sum, c2(k)
1274 end subroutine solve_lapack
1284 real(RP),
intent(inout) :: C(
kmax-1)
1285 real(RP),
intent(in) :: F1(
ka)
1286 real(RP),
intent(in) :: F2(
ka)
1287 real(RP),
intent(in) :: F3(
ka)
1289 real(RP) :: e(
kmax-2)
1290 real(RP) :: f(
kmax-2)
1296 rdenom = 1.0_rp / f2(
ks)
1297 e(1) = - f1(
ks) * rdenom
1298 f(1) = c(1) * rdenom
1300 rdenom = 1.0_rp / ( f2(k+
ks-1) + f3(k+
ks-1) * e(k-1) )
1301 e(k) = - f1(k+
ks-1) * rdenom
1302 f(k) = ( c(k) - f3(k+
ks-1) * f(k-1) ) * rdenom
1307 / ( f2(
ke-1) + f3(
ke-1) * e(
kmax-2) )
1308 do k =
kmax-2, 1, -1
1309 c(k) = e(k) * c(k+1) + f(k)
1318 subroutine check_equation( &
1320 DENS, MOMZ, RHOT, DPRES, &
1338 real(RP),
intent(in) :: VECT(
kmax-1)
1339 real(RP),
intent(in) :: DENS(
ka)
1340 real(RP),
intent(in) :: MOMZ(
ka)
1341 real(RP),
intent(in) :: RHOT(
ka)
1342 real(RP),
intent(in) :: DPRES(
ka)
1343 real(RP),
intent(in) :: REF_dens(
ka)
1344 real(RP),
intent(in) :: Sr(
ka)
1345 real(RP),
intent(in) :: Sw(
ka)
1346 real(RP),
intent(in) :: St(
ka)
1347 real(RP),
intent(in) :: J33G
1348 real(RP),
intent(in) :: G(
ka,8)
1349 real(RP),
intent(in) :: RT2P(
ka)
1350 real(RP),
intent(in) :: dt
1351 integer ,
intent(in) :: i
1352 integer ,
intent(in) :: j
1354 real(RP),
parameter :: small = 1e-6_rp
1356 real(RP) :: MOMZ_N(
ka)
1357 real(RP) :: DENS_N(
ka)
1358 real(RP) :: RHOT_N(
ka)
1359 real(RP) :: DPRES_N(
ka)
1361 real(RP) :: POTT(
ka)
1364 real(RP) :: error, lhs, rhs
1369 momz_n(k) = vect(k-
ks+1)
1371 momz_n(:
ks-1) = 0.0_rp
1372 momz_n(
ke:) = 0.0_rp
1376 dens_n(k) = dens(k) &
1377 + dt * ( - j33g * ( momz_n(k) - momz_n(k-1) ) * rcdz(k) / g(k,
i_xyz) + sr(k) )
1379 dens_n(
ks) = dens(
ks) &
1380 + dt * ( - j33g * momz_n(
ks) * rcdz(
ks) / g(
ks,
i_xyz) + sr(
ks) )
1381 dens_n(
ke) = dens(
ke) &
1382 + dt * ( j33g * momz_n(
ke-1) * rcdz(
ke) / g(
ke,
i_xyz) + sr(
ke) )
1386 pott(k) = rhot(k) / dens(k)
1389 pt(k) = ( 7.0_rp * ( pott(k+1) + pott(k ) ) &
1390 - ( pott(k+2) + pott(k-1) ) ) / 12.0_rp
1393 pt(
ks ) = ( pott(
ks+1) + pott(
ks ) ) * 0.5_rp
1394 pt(
ke-1) = ( pott(
ke ) + pott(
ke-1) ) * 0.5_rp
1397 rhot_n(k) = rhot(k) &
1398 + dt * ( - j33g * ( momz_n(k)*pt(k) - momz_n(k-1)*pt(k-1) ) * rcdz(k) / g(k,
i_xyz) &
1401 rhot_n(
ks) = rhot(
ks) &
1402 + dt * ( - j33g * momz_n(
ks)*pt(
ks) * rcdz(
ks) / g(
ks,
i_xyz) + st(
ks) )
1403 rhot_n(
ke) = rhot(
ke) &
1404 + dt * ( j33g * momz_n(
ke-1)*pt(
ke-1) * rcdz(
ke) / g(
ke-1,
i_xyz) + st(
ke) )
1408 dpres_n(k) = dpres(k) + rt2p(k) * ( rhot_n(k) - rhot(k) )
1412 lhs = ( dens_n(k) - dens(k) ) / dt
1413 rhs = - j33g * ( momz_n(k) - momz_n(k-1) ) * rcdz(k) / g(k,
i_xyz) + sr(k)
1414 if ( abs(lhs) < small )
then 1417 error = ( lhs - rhs ) / lhs
1419 if ( abs(error) > small )
then 1420 write(*,*)
"HEVI: DENS error", k, i, j, error, lhs, rhs
1427 lhs = ( momz_n(k) - momz(k) ) / dt
1428 rhs = - j33g * ( dpres_n(k+1) - dpres_n(k) ) * rfdz(k) / g(k,
i_xyw) &
1429 - grav * ( dens_n(k+1) - ref_dens(k+1) + dens_n(k) - ref_dens(k) ) * 0.5_rp &
1431 if ( abs(lhs) < small )
then 1434 error = ( lhs - rhs ) / lhs
1436 if ( abs(error) > small )
then 1437 write(*,*)
"HEVI: MOMZ error", k, i, j, error, lhs, rhs
1438 write(*,*) momz_n(k), momz(k), dt
1439 write(*,*) - j33g * ( dpres(k+1) - dpres(k) ) * rfdz(k) / g(k,
i_xyw) &
1440 - grav * ( dens(k+1) -ref_dens(k+1) + dens(k) -ref_dens(k) ) * 0.5_rp &
1447 lhs = ( rhot_n(k) - rhot(k) ) / dt
1448 rhs = - j33g * ( momz_n(k)*pt(k) - momz_n(k-1)*pt(k-1) ) * rcdz(k) / g(k,
i_xyz) + st(k)
1449 if ( abs(lhs) < small )
then 1452 error = ( lhs - rhs ) / lhs
1454 if ( abs(error) > small )
then 1455 write(*,*)
"HEVI: RHOT error", k, i, j, error, lhs, rhs
1461 end subroutine check_equation
integer, parameter, public i_rhot
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
subroutine, public prc_mpistop
Abort MPI.
subroutine, public atmos_dyn_tstep_short_fvm_hevi_regist(ATMOS_DYN_TYPE, VA_out, VAR_NAME, VAR_DESC, VAR_UNIT)
Register.
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxx_xvz
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj23_uyz
integer, public iblock
block size for cache blocking: x
integer, parameter, public i_momx
logical, public io_l
output log or not? (this process)
subroutine, public atmos_dyn_tstep_short_fvm_hevi(DENS_RK, MOMZ_RK, MOMX_RK, MOMY_RK, RHOT_RK, PROG_RK, mflx_hi, tflx_hi, DENS0, MOMZ0, MOMX0, MOMY0, RHOT0, DENS, MOMZ, MOMX, MOMY, RHOT, DENS_t, MOMZ_t, MOMX_t, MOMY_t, RHOT_t, PROG0, PROG, DPRES0, RT2P, CORIOLI, num_diff, divdmp_coef, DDIV, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_ALONG_STREAM, CDZ, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, REF_dens, REF_rhot, BND_W, BND_E, BND_S, BND_N, dtrk, dt)
integer, parameter, public zdir
integer, parameter, public i_momz
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj23_xyw
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxx_xyz
integer, parameter, public ydir
integer, public ke
end point of inner domain: z, local
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj13_xyw
integer, parameter, public xdir
subroutine, public check(current_line, v)
Undefined value checker.
real(rp), dimension(:), allocatable, public grid_rcdz
reciprocal of center-dz
module Atmosphere / Dynamics RK
integer, parameter, public i_dens
integer, parameter, public i_momy
real(rp), public const_undef
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxx_xyw
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxy_xyw
integer, public ia
of x whole cells (local, with HALO)
procedure(flux_z), pointer, public atmos_dyn_fvm_fluxz_xvz
integer, public ka
of z whole cells (local, with HALO)
integer, parameter, public dp
integer, public jblock
block size for cache blocking: y
integer, public kmax
of computational cells: z
subroutine, public atmos_dyn_tstep_short_fvm_hevi_setup
Setup.
integer, public jhalo
of halo cells: y
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, public js
start point of inner domain: y, local
integer, parameter, public const_undef2
undefined value (INT2)
module Atmosphere / Dynamics common
procedure(valuew), pointer, public atmos_dyn_fvm_flux_valuew_z
integer, public ks
start point of inner domain: z, local
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj13_xvz
integer, public jeh
end point of inner domain: y, local (half level)
integer, public ieh
end point of inner domain: x, local (half level)
subroutine solve_direct(C, F1, F2, F3)
integer, public ie
end point of inner domain: x, local
real(rp), public const_eps
small number
procedure(flux_z), pointer, public atmos_dyn_fvm_fluxz_uyz
module scale_atmos_dyn_fvm_flux
subroutine, public atmos_dyn_fct(qflx_anti, phi_in, DENS0, DENS, qflx_hi, qflx_lo, mflx_hi, rdz, rdx, rdy, GSQRT, MAPF, dt, flag_vect)
Flux Correction Transport Limiter.
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj13_uyz
procedure(flux_j), pointer, public atmos_dyn_fvm_fluxj23_xvz
real(rp), dimension(:), allocatable, public grid_rfdz
reciprocal of face-dz
integer, public io_fid_log
Log file ID.
integer, parameter, public rp
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxz_xyz
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxx_uyz
procedure(flux_phi), pointer, public atmos_dyn_fvm_fluxy_xyz
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxy_uyz
procedure(flux_wz), pointer, public atmos_dyn_fvm_fluxz_xyw
integer, public ihalo
of halo cells: x
procedure(flux_mom), pointer, public atmos_dyn_fvm_fluxy_xvz
integer, public ja
of y whole cells (local, with HALO)