14 #include "inc_openmp.h" 70 thermodyn_qd => atmos_thermodyn_qd, &
71 thermodyn_r => atmos_thermodyn_r, &
72 thermodyn_temp_pres => atmos_thermodyn_temp_pres
84 real(RP),
intent(out) :: pott(
ka,
ia,
ja)
85 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
86 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
87 real(RP),
intent(out) :: phyd(
ka,
ia,
ja)
88 real(RP),
intent(out) :: w (
ka,
ia,
ja)
89 real(RP),
intent(out) :: u (
ka,
ia,
ja)
90 real(RP),
intent(out) :: v (
ka,
ia,
ja)
91 real(RP),
intent(out) :: n2 (
ka,
ia,
ja)
92 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
93 real(RP),
intent(in) :: momz(
ka,
ia,
ja)
94 real(RP),
intent(in) :: momx(
ka,
ia,
ja)
95 real(RP),
intent(in) :: momy(
ka,
ia,
ja)
96 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
97 real(RP),
intent(in) :: qtrc(
ka,
ia,
ja,
qa)
102 real(RP) :: qdry, rtot
109 call thermodyn_temp_pres( temp(:,:,:), &
121 ph(
ke) = pres(
ke,i,j) - dens(
ke,i,j) * grav * ( fz(
ke,i,j) - cz(
ke,i,j) )
123 ph(k-1) = ph(k) + dens(k,i,j) * grav * ( fz(k,i,j) - fz(k-1,i,j) )
124 phyd(k,i,j) = ( ph(k) + ph(k-1) ) * 0.5_rp
135 w(k,i,j) = 0.5_rp * ( momz(k-1,i,j)+momz(k,i,j) ) / dens(k,i,j)
146 momws = momz(
ks,i,j) &
147 + ( j13g(
ks,i,j,
i_xyw) * ( momx(
ks,i,j) + momx(
ks,i-1,j) + momx(
ks+1,i,j) + momx(
ks+1,i-1,j) ) &
148 + j23g(
ks,i,j,
i_xyw) * ( momy(
ks,i,j) + momy(
ks,i,j-1) + momy(
ks+1,i,j) + momy(
ks+1,i,j-1) ) ) &
149 * 0.25_rp / gsqrt(
ks,i,j,
i_xyw)
152 w(
ks,i,j) = momws * 0.5_rp &
153 - ( j13g(
ks,i,j,
i_xyz) * ( momx(
ks,i,j) + momx(
ks,i-1,j) ) &
154 + j23g(
ks,i,j,
i_xyz) * ( momy(
ks,i,j) + momy(
ks,i,j-1) ) ) &
155 * 0.5_rp / ( dens(
ks,i,j) * gsqrt(
ks,i,j,
i_xyz) )
162 w(
ke,i,j) = 0.5_rp * ( momz(
ke-1,i,j) ) / dens(
ke,i,j)
171 u(k,i,j) = 0.5_rp * ( momx(k,i-1,j)+momx(k,i,j) ) / dens(k,i,j)
179 u(k,1,j) = momx(k,1,j) / dens(k,1,j)
188 v(k,i,j) = 0.5_rp * ( momy(k,i,j-1)+momy(k,i,j) ) / dens(k,i,j)
196 v(k,i,1) = momy(k,i,1) / dens(k,i,1)
203 w( 1:
ks-1,i,j) = w(
ks,i,j)
204 u( 1:
ks-1,i,j) = u(
ks,i,j)
205 v( 1:
ks-1,i,j) = v(
ks,i,j)
206 w(
ke+1:
ka, i,j) = w(
ke,i,j)
207 u(
ke+1:
ka, i,j) = u(
ke,i,j)
208 v(
ke+1:
ka, i,j) = v(
ke,i,j)
212 call comm_vars8( w(:,:,:), 1 )
213 call comm_vars8( u(:,:,:), 2 )
214 call comm_vars8( v(:,:,:), 3 )
215 call comm_wait ( w(:,:,:), 1, .false. )
216 call comm_wait ( u(:,:,:), 2, .false. )
217 call comm_wait ( v(:,:,:), 3, .false. )
224 pott(k,i,j) = rhot(k,i,j) / dens(k,i,j)
235 q(iq) = qtrc(k,i,j,iq)
238 call thermodyn_r ( rtot, q(:),
tracer_r(:), qdry )
239 rpt(k) = rtot * pott(k,i,j)
242 n2(
ks,i,j) = grav * ( rpt(
ks+1) - rpt(
ks) ) / ( ( cz(
ks+1,i,j) - cz(
ks,i,j) ) * rpt(
ks) )
244 n2(k,i,j) = grav * ( rpt(k+1) - rpt(k-1) ) / ( ( cz(k+1,i,j) - cz(k-1,i,j) ) * rpt(k) )
246 n2(
ke,i,j) = grav * ( rpt(
ke) - rpt(
ke-1) ) / ( ( cz(
ke,i,j) - cz(
ke-1,i,j) ) * rpt(
ke) )
real(rp), dimension(:,:,:,:), allocatable, public gtrans_j23g
(2,3) element of Jacobian matrix * {G}^1/2
real(rp), dimension(qa_max), public tracer_r
integer, public ke
end point of inner domain: z, local
real(rp), dimension(:,:,:), allocatable, public real_fz
geopotential height [m] (cell face )
real(rp), dimension(:,:,:), allocatable, public real_cz
geopotential height [m] (cell center)
real(rp), dimension(qa_max), public tracer_cv
integer, public ia
of whole cells: x, local, with HALO
integer, public ka
of whole cells: z, local, with HALO
module ATMOSPHERE / Diagnostic
real(rp), public const_grav
standard acceleration of gravity [m/s2]
subroutine, public atmos_diagnostic_get(POTT, TEMP, PRES, PHYD, W, U, V, N2, DENS, MOMZ, MOMX, MOMY, RHOT, QTRC)
real(rp), dimension(:,:,:,:), allocatable, public gtrans_j13g
(1,3) element of Jacobian matrix * {G}^1/2
integer, public ks
start point of inner domain: z, local
real(rp), dimension(:,:,:,:), allocatable, public gtrans_gsqrt
transformation metrics from Z to Xi, {G}^1/2
module ATMOSPHERE / Thermodynamics
real(rp), dimension(qa_max), public tracer_mass
integer, public ja
of whole cells: y, local, with HALO