FE-Project
Loading...
Searching...
No Matches
scale_atm_phy_mp_lscond Module Reference

module FElib / Atmosphere / Physics cloud microphysics / Large-scale condensation More...

Functions/Subroutines

subroutine, public atmos_phy_mp_lscond_setup
 Setup a module for a large-scale condensation scheme.
subroutine, public atmos_phy_mp_lscond_adjustment (ka, ks, ke, ia, is, ie, ja, js, je, dens, pres, dt, temp, qtrc, cptot, cvtot, rhoe_t, evaporate)
 Calculate a state after the saturation process.
subroutine, public atmos_phy_mp_lscond_precipitation (dens, rhoq, cptot, cvtot, rhoe, sflx_rain, sflx_snow, esflx, temp, dt, qha, qla, qia, lcmesh, elem, elem1d)
 Calculate a state after the precipitation process.
subroutine, public atmos_phy_mp_lscond_precipitation_momentum (momu_t, momv_t, momz_t, dens, momu, momv, momz, dens_new, rdt_mp, lcmesh, elem)
 Calculate a tendency of momentum due to the precipitation process.

Variables

integer, parameter, public atmos_phy_mp_lscond_ntracers = QA_MP
integer, parameter, public atmos_phy_mp_lscond_nwaters = 1
integer, parameter, public atmos_phy_mp_lscond_nices = 0
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_lscond_tracer_names = (/ 'QV', 'QC' /)
character(len=h_mid), dimension(qa_mp), parameter, public atmos_phy_mp_lscond_tracer_descriptions = (/ 'Ratio of Water Vapor mass to total mass (Specific humidity)', 'Ratio of Cloud Water mass to total mass ' /)
character(len=h_short), dimension(qa_mp), parameter, public atmos_phy_mp_lscond_tracer_units = (/ 'kg/kg', 'kg/kg' /)

Detailed Description

module FElib / Atmosphere / Physics cloud microphysics / Large-scale condensation

Description
A module to provide a large-scale condensation scheme
Reference
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ atmos_phy_mp_lscond_setup()

subroutine, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_setup

Setup a module for a large-scale condensation scheme.

Definition at line 97 of file scale_atm_phy_mp_lscond.F90.

98 use scale_prc, only: &
99 prc_abort
100 implicit none
101 !---------------------------------------------------------------------------
102
103 log_newline
104 log_info("ATMOS_PHY_MP_lscond_setup",*) 'Setup'
105 log_info("ATMOS_PHY_MP_lscond_setup",*) 'large-scale condensation'
106
107 if( couple_aerosol ) then
108 log_error("ATMOS_PHY_MP_lscond_setup",*) 'MP_aerosol_couple should be .false. for large-scale condensation type MP!'
109 call prc_abort
110 endif
111
112 return

◆ atmos_phy_mp_lscond_adjustment()

subroutine, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_adjustment ( integer, intent(in) ka,
integer, intent(in) ks,
integer, intent(in) ke,
integer, intent(in) ia,
integer, intent(in) is,
integer, intent(in) ie,
integer, intent(in) ja,
integer, intent(in) js,
integer, intent(in) je,
real(rp), dimension(ka,ia,ja), intent(in) dens,
real(rp), dimension(ka,ia,ja), intent(in) pres,
real(rp), intent(in) dt,
real(rp), dimension(ka,ia,ja), intent(inout) temp,
real(rp), dimension(ka,ia,ja,qa_mp), intent(inout) qtrc,
real(rp), dimension(ka,ia,ja), intent(inout) cptot,
real(rp), dimension(ka,ia,ja), intent(inout) cvtot,
real(rp), dimension(ka,ia,ja), intent(out) rhoe_t,
real(rp), dimension(ka,ia,ja), intent(out) evaporate )

Calculate a state after the saturation process.

Definition at line 118 of file scale_atm_phy_mp_lscond.F90.

124
125 use scale_atmos_saturation, only: &
126 atmos_saturation_pres2qsat_liq
127 use scale_const, only: &
128 cl => const_cl
129 implicit none
130 integer, intent(in) :: KA, KS, KE
131 integer, intent(in) :: IA, IS, IE
132 integer, intent(in) :: JA, JS, JE
133 real(RP), intent(in) :: DENS(KA,IA,JA)
134 real(RP), intent(in) :: PRES(KA,IA,JA)
135 real(RP), intent(in) :: dt
136 real(RP), intent(inout) :: TEMP(KA,IA,JA)
137 real(RP), intent(inout) :: QTRC(KA,IA,JA,QA_MP)
138 real(RP), intent(inout) :: CPtot(KA,IA,JA)
139 real(RP), intent(inout) :: CVtot(KA,IA,JA)
140 real(RP), intent(out) :: RHOE_t(KA,IA,JA)
141 real(RP), intent(out) :: EVAPORATE(KA,IA,JA)
142
143 real(RP) :: Qsat(KA,IA,JA)
144 real(RP) :: d_qc(KA)
145 real(RP) :: d_cv(KA)
146 real(RP) :: d_cp(KA)
147 real(RP) :: d_e(KA)
148 real(RP) :: cptot_(KA)
149 real(RP) :: cvtot_(KA)
150 real(RP) :: coef1(KA)
151 real(RP) :: coef2
152
153 integer :: i, j
154
155 real(RP) :: rdt
156 !----------------------------------------------
157
158 call atmos_saturation_pres2qsat_liq( &
159 ka, ks, ke, ia, is, ie, ja, js, je, & ! (in)
160 temp, pres, & ! (in)
161 qsat ) ! (out)
162
163
164 coef2 = rvap / lhv
165 rdt = 1.0_rp / dt
166
167 !$omp parallel do private(i,j, d_qc, d_cv, d_cp, d_e, cptot_, cvtot_, coef1) collapse(2)
168 do j=js, je
169 do i=is, ie
170 ! coef1 = LHV**2 / ( CVDry * Rvap )
171 coef1(:) = lhv * ( lhv + ( cv_vapor - cv_water ) * temp(:,i,j) ) / ( cvtot(:,i,j) * rvap )
172
173 d_qc(:) = max( ( qtrc(:,i,j,i_qv) - qsat(:,i,j) ) / ( 1.0_rp + coef1 / temp(:,i,j)**2 * ( 1.0_rp - coef2 * temp(:,i,j) ) * qsat(:,i,j) ), &
174 0.0_rp )
175
176 qtrc(:,i,j,i_qv) = qtrc(:,i,j,i_qv) - d_qc(:)
177 qtrc(:,i,j,i_qc) = qtrc(:,i,j,i_qc) + d_qc(:)
178
179 d_cp(:) = - cp_vapor * d_qc(:) &
180 + cp_water * d_qc(:)
181 cptot_(:) = cptot(:,i,j) + d_cp(:)
182
183 d_cv(:) = - cv_vapor * d_qc(:) &
184 + cv_water * d_qc(:)
185 cvtot_(:) = cvtot(:,i,j) + d_cv(:)
186
187 d_e(:) = lhv * d_qc(:)
188 rhoe_t(:,i,j) = dens(:,i,j) * d_e(:) * rdt
189
190
191 temp(:,i,j) = ( temp(:,i,j) * cvtot(:,i,j) + d_e(:) ) / cvtot_(:)
192 cptot(:,i,j) = cptot_(:)
193 cvtot(:,i,j) = cvtot_(:)
194 end do
195 end do
196
197 return

◆ atmos_phy_mp_lscond_precipitation()

subroutine, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_precipitation ( real(rp), dimension (elem%np,lcmesh%nez,lcmesh%ne2d), intent(inout) dens,
real(rp), dimension (elem%np,lcmesh%nez,lcmesh%ne2d,qha), intent(inout) rhoq,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(inout) cptot,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(inout) cvtot,
real(rp), dimension (elem%np,lcmesh%nez,lcmesh%ne2d), intent(inout) rhoe,
real(rp), dimension(elem%nfp_v,lcmesh%ne2da), intent(inout) sflx_rain,
real(rp), dimension(elem%nfp_v,lcmesh%ne2da), intent(inout) sflx_snow,
real(rp), dimension (elem%nfp_v,lcmesh%ne2da), intent(inout) esflx,
real(rp), dimension (elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) temp,
real(rp), intent(in) dt,
integer, intent(in) qha,
integer, intent(in) qla,
integer, intent(in) qia,
class(localmesh3d), intent(in) lcmesh,
class(elementbase3d), intent(in) elem,
class(elementbase1d), intent(in) elem1d )

Calculate a state after the precipitation process.

Parameters
[in]qhahydrometeor (water + ice)

Definition at line 203 of file scale_atm_phy_mp_lscond.F90.

208
209 use scale_const, only: &
210 undef => const_undef8
211 implicit none
212
213 class(LocalMesh3D), intent(in) :: lcmesh
214 class(ElementBase3D), intent(in) :: elem
215 integer, intent(in) :: QHA !< hydrometeor (water + ice)
216 real(RP), intent(inout) :: DENS (elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
217 real(RP), intent(inout) :: RHOQ (elem%Np,lcmesh%NeZ,lcmesh%Ne2D,QHA)
218 real(RP), intent(inout) :: CPtot(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
219 real(RP), intent(inout) :: CVtot(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
220 real(RP), intent(inout) :: RHOE (elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
221 real(RP), intent(inout) :: sflx_rain(elem%Nfp_v,lcmesh%Ne2DA)
222 real(RP), intent(inout) :: sflx_snow(elem%Nfp_v,lcmesh%Ne2DA)
223 real(RP), intent(inout) :: esflx (elem%Nfp_v,lcmesh%Ne2DA)
224 real(RP), intent(in) :: TEMP (elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
225 real(RP), intent(in) :: dt
226 integer, intent(in) :: QLA, QIA
227 class(ElementBase1D), intent(in) :: elem1D
228
229 real(RP) :: RHOCP(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
230 real(RP) :: RHOCV(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
231
232 real(RP) :: dDENS(elem%Np)
233 real(RP) :: dInternalEn(elem%Np)
234
235 real(RP) :: vint_weight(elem%Nnode_v,elem%Nnode_h1D**2)
236 real(RP) :: condens_vint_lc(elem%Nnode_h1D**2)
237 real(RP) :: ien_vint_lc(elem%Nnode_h1D**2)
238
239 real(RP) :: eflx(elem%Np)
240 real(RP) :: CP(QHA)
241 real(RP) :: CV(QHA)
242
243 integer :: ke2D
244 integer :: p2D
245
246 integer :: ke_z
247 integer :: ke
248 integer :: iq
249
250 real(RP) :: rdt
251 !-------------------------------------------------------
252
253 do iq = 1, qha
254 if ( iq > qla + qia ) then
255 cp(iq) = undef
256 cv(iq) = undef
257 else if ( iq > qla ) then ! ice water
258 cp(iq) = cp_ice
259 cv(iq) = cv_ice
260 else ! liquid water
261 cp(iq) = cp_water
262 cv(iq) = cv_water
263 end if
264 end do
265
266 rdt = 1.0_rp / dt
267
268 !$omp parallel do collapse(2)
269 do ke2d = 1, lcmesh%Ne2D
270 do ke_z = 1, lcmesh%NeZ
271 rhocp(:,ke_z,ke2d) = cptot(:,ke_z,ke2d) * dens(:,ke_z,ke2d)
272 rhocv(:,ke_z,ke2d) = cvtot(:,ke_z,ke2d) * dens(:,ke_z,ke2d)
273 end do
274 end do
275
276 do iq = 1, qha
277 !$omp parallel do private(ke2D,ke_z,ke,p2D, &
278 !$omp dDENS, vint_weight, condens_vint_lc, dInternalEn, ien_vint_lc)
279 do ke2d = 1, lcmesh%Ne2D
280 do ke_z = 1, lcmesh%NeZ
281 ke = ke2d + (ke_z-1)*lcmesh%Ne2D
282
283 ddens(:) = - rhoq(:,ke_z,ke2d,iq)
284 rhoq(:,ke_z,ke2d,iq) = 0.0_rp
285
286 do p2d=1, elem%Nnode_h1D**2
287 vint_weight(:,p2d) = 0.5_rp * elem1d%IntWeight_lgl(:) * ( lcmesh%zlev(elem%Colmask(elem%Nnode_v,p2d),ke) - lcmesh%zlev(elem%Colmask(1,p2d),ke) )
288 end do
289
290 do p2d=1, elem%Nnode_h1D**2
291 condens_vint_lc(p2d) = sum( vint_weight(:,p2d) * ddens(elem%Colmask(:,p2d)) )
292 end do
293
294 if ( iq > qla ) then ! ice water
295 sflx_snow(:,ke2d) = sflx_snow(:,ke2d) &
296 + condens_vint_lc(:) * rdt
297 else ! liquid water
298 sflx_rain(:,ke2d) = sflx_rain(:,ke2d) &
299 + condens_vint_lc(:) * rdt
300 end if
301
302 !--- update density
303
304 rhocp(:,ke_z,ke2d) = rhocp(:,ke_z,ke2d) + cp(iq) * ddens(:)
305 rhocv(:,ke_z,ke2d) = rhocv(:,ke_z,ke2d) + cv(iq) * ddens(:)
306 dens(:,ke_z,ke2d) = dens(:,ke_z,ke2d) + ddens(:)
307
308 !--- update internal energy
309
310 dinternalen(:) = cp(iq) * ddens(:) * temp(:,ke_z,ke2d)
311
312 do p2d=1, elem%Nnode_h1D**2
313 ien_vint_lc(p2d) = sum( vint_weight(:,p2d) * dinternalen(elem%Colmask(:,p2d)) )
314 end do
315 esflx(:,ke2d) = esflx(:,ke2d) &
316 + ien_vint_lc(:) * rdt
317
318 rhoe(:,ke_z,ke2d) = rhoe(:,ke_z,ke2d) + dinternalen(:)
319 end do
320 end do
321 end do
322
323 !$omp parallel do collapse(2)
324 do ke2d = 1, lcmesh%Ne2D
325 do ke_z = 1, lcmesh%NeZ
326 cptot(:,ke_z,ke2d) = rhocp(:,ke_z,ke2d) / dens(:,ke_z,ke2d)
327 cvtot(:,ke_z,ke2d) = rhocv(:,ke_z,ke2d) / dens(:,ke_z,ke2d)
328 end do
329 end do
330
331 return

◆ atmos_phy_mp_lscond_precipitation_momentum()

subroutine, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_precipitation_momentum ( real(rp), dimension(elem%np,lcmesh%nea), intent(out) momu_t,
real(rp), dimension(elem%np,lcmesh%nea), intent(out) momv_t,
real(rp), dimension(elem%np,lcmesh%nea), intent(out) momz_t,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) dens,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) momu,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) momv,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) momz,
real(rp), dimension(elem%np,lcmesh%nez,lcmesh%ne2d), intent(in) dens_new,
real(rp), intent(in) rdt_mp,
class(localmesh3d), intent(in) lcmesh,
class(elementbase3d), intent(in) elem )

Calculate a tendency of momentum due to the precipitation process.

Definition at line 337 of file scale_atm_phy_mp_lscond.F90.

341 implicit none
342
343 class(LocalMesh3D), intent(in) :: lcmesh
344 class(ElementBase3D), intent(in) :: elem
345 real(RP), intent(out) :: MOMU_t(elem%Np,lcmesh%NeA)
346 real(RP), intent(out) :: MOMV_t(elem%Np,lcmesh%NeA)
347 real(RP), intent(out) :: MOMZ_t(elem%Np,lcmesh%NeA)
348 real(RP), intent(in) :: DENS(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
349 real(RP), intent(in) :: MOMU(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
350 real(RP), intent(in) :: MOMV(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
351 real(RP), intent(in) :: MOMZ(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
352 real(RP), intent(in) :: DENS_new(elem%Np,lcmesh%NeZ,lcmesh%Ne2D)
353 real(RP), intent(in) :: rdt_MP
354
355 integer :: ke2D
356 integer :: ke_z
357 integer :: ke
358 real(RP) :: coef(elem%Np)
359 !----------------------------------------------------------
360
361 !$omp parallel do collapse(2) private( &
362 !$omp ke2D, ke_z, ke, coef )
363 do ke2d = 1, lcmesh%Ne2D
364 do ke_z = 1, lcmesh%NeZ
365 ke = ke2d + (ke_z-1)*lcmesh%Ne2D
366 coef(:) = ( dens_new(:,ke_z,ke2d) / dens(:,ke_z,ke2d) - 1.0_rp ) * rdt_mp
367
368 momu_t(:,ke) = coef(:) * momu(:,ke_z,ke2d)
369 momv_t(:,ke) = coef(:) * momv(:,ke_z,ke2d)
370 momz_t(:,ke) = coef(:) * momz(:,ke_z,ke2d)
371 end do
372 end do
373 return

Variable Documentation

◆ atmos_phy_mp_lscond_ntracers

integer, parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_ntracers = QA_MP

Definition at line 59 of file scale_atm_phy_mp_lscond.F90.

59 integer, parameter, public :: ATMOS_PHY_MP_lscond_ntracers = qa_mp

◆ atmos_phy_mp_lscond_nwaters

integer, parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_nwaters = 1

Definition at line 60 of file scale_atm_phy_mp_lscond.F90.

60 integer, parameter, public :: ATMOS_PHY_MP_lscond_nwaters = 1

◆ atmos_phy_mp_lscond_nices

integer, parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_nices = 0

Definition at line 61 of file scale_atm_phy_mp_lscond.F90.

61 integer, parameter, public :: ATMOS_PHY_MP_lscond_nices = 0

◆ atmos_phy_mp_lscond_tracer_names

character(len=h_short), dimension(qa_mp), parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_tracer_names = (/ 'QV', 'QC' /)

Definition at line 62 of file scale_atm_phy_mp_lscond.F90.

62 character(len=H_SHORT), parameter, public :: ATMOS_PHY_MP_lscond_tracer_names(QA_MP) = (/ &
63 'QV', &
64 'QC' /)

◆ atmos_phy_mp_lscond_tracer_descriptions

character(len=h_mid), dimension(qa_mp), parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_tracer_descriptions = (/ 'Ratio of Water Vapor mass to total mass (Specific humidity)', 'Ratio of Cloud Water mass to total mass ' /)

Definition at line 65 of file scale_atm_phy_mp_lscond.F90.

65 character(len=H_MID) , parameter, public :: ATMOS_PHY_MP_lscond_tracer_descriptions(QA_MP) = (/ &
66 'Ratio of Water Vapor mass to total mass (Specific humidity)', &
67 'Ratio of Cloud Water mass to total mass ' /)

◆ atmos_phy_mp_lscond_tracer_units

character(len=h_short), dimension(qa_mp), parameter, public scale_atm_phy_mp_lscond::atmos_phy_mp_lscond_tracer_units = (/ 'kg/kg', 'kg/kg' /)

Definition at line 68 of file scale_atm_phy_mp_lscond.F90.

68 character(len=H_SHORT), parameter, public :: ATMOS_PHY_MP_lscond_tracer_units(QA_MP) = (/ &
69 'kg/kg', &
70 'kg/kg' /)