30 subroutine mp_nssl_init(ncol, nlev, errflg, errmsg, threads, restart, &
31 fn_nml, input_nml_file, mpirank, mpiroot, &
32 mpicomm, qc, qr, qi, qs, qh, &
33 ccw, crw, cci, csw, chw, vh, &
34 con_g, con_rd, con_cp, con_rv, &
35 con_t0c, con_cliq, con_csol, con_eps, &
36 imp_physics, imp_physics_nssl, &
37 nssl_cccn, nssl_alphah, nssl_alphahl, &
38 nssl_alphar, nssl_ehw0, nssl_ehlw0, &
39 nssl_ccn_on, nssl_hail_on, nssl_invertccn, nssl_3moment )
47 integer,
intent(in) :: ncol
48 integer,
intent(in) :: nlev
49 character(len=*),
intent( out) :: errmsg
50 integer,
intent( out) :: errflg
51 integer,
intent(in) :: threads
52 logical,
intent(in) :: restart
53 character(len=*),
intent(in) :: fn_nml
54 character(len=*),
intent(in) :: input_nml_file(:)
55 real(kind_phys),
intent(in) :: con_g, con_rd, con_cp, con_rv, &
56 con_t0c, con_cliq, con_csol, con_eps
58 integer,
intent(in) :: mpirank
59 integer,
intent(in) :: mpiroot
60 type(mpi_comm),
intent(in) :: mpicomm
61 integer,
intent(in) :: imp_physics
62 integer,
intent(in) :: imp_physics_nssl
63 real(kind_phys),
intent(in) :: nssl_cccn, nssl_alphah, nssl_alphahl
64 real(kind_phys),
intent(in) :: nssl_alphar, nssl_ehw0, nssl_ehlw0
65 logical,
intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_invertccn, nssl_3moment
67 real(kind_phys),
intent(inout) :: qc (:,:)
68 real(kind_phys),
intent(inout) :: qr (:,:)
69 real(kind_phys),
intent(inout) :: qi (:,:)
70 real(kind_phys),
intent(inout) :: qs (:,:)
71 real(kind_phys),
intent(inout) :: qh (:,:)
72 real(kind_phys),
intent(inout) :: ccw(:,:)
73 real(kind_phys),
intent(inout) :: crw(:,:)
74 real(kind_phys),
intent(inout) :: cci(:,:)
75 real(kind_phys),
intent(inout) :: csw(:,:)
76 real(kind_phys),
intent(inout) :: chw(:,:)
77 real(kind_phys),
intent(inout) :: vh (:,:)
80 integer :: ims,ime, jms,jme, kms,kme, nx, nz, i,k
81 real(kind_phys) :: nssl_params(20)
83 real(kind_phys),
parameter :: qmin = 1.e-12
85 logical :: missing_vars = .false.
93 if ( is_initialized )
return
95 IF ( .not. is_initialized )
THEN
96 if (mpirank==mpiroot)
then
97 write(0,*)
' ----------------------------------------------------------------------------------------------------------------'
98 write(0,*)
' --- CCPP NSSL MP scheme init ---'
99 write(0,*)
' ----------------------------------------------------------------------------------------------------------------'
100 write(6,*)
' ----------------------------------------------------------------------------------------------------------------'
101 write(6,*)
' --- CCPP NSSL MP scheme init ---'
102 write(6,*)
' ----------------------------------------------------------------------------------------------------------------'
106 if ( imp_physics /= imp_physics_nssl )
then
107 write(errmsg,
'(*(a))')
"Logic error: namelist choice of microphysics is different from NSSL"
114 con_g, con_rd, con_cp, con_rv, con_t0c, con_cliq, con_csol, con_eps )
132 nssl_params(4) = 4.e5
133 nssl_params(5) = 4.e4
134 nssl_params(6) = 4.e5
135 nssl_params(7) = 4.e6
136 nssl_params(8) = 500.
137 nssl_params(9) = 800.
138 nssl_params(10) = 100.
140 nssl_qccn = nssl_cccn/1.225
145 IF ( nssl_hail_on )
THEN
151 IF ( nssl_3moment )
THEN
158 CALL nssl_2mom_init(ims,ime, jms,jme, kms,kme,nssl_params,ipctmp=ipc,mixphase=0, &
159 namelist_filename=fn_nml,internal_nml=input_nml_file, &
160 ihvol=ihailv,nssl_ehw0=nssl_ehw0, &
161 nssl_ehlw0=nssl_ehlw0,errmsg=errmsg, &
162 nssl_alphar=nssl_alphar, &
163 nssl_alphah=nssl_alphah, &
164 nssl_alphahl=nssl_alphahl, &
165 nssl_cccn=nssl_cccn, &
166 nssl_ccn_on=nssl_ccn_on, &
167 errflg=errflg,myrank=mpirank,mpiroot=mpiroot)
173 missing_vars = .false.
174 IF ( any( qc > qmin .and. ccw == 0.0 ) ) missing_vars = .true.
175 IF ( .not. missing_vars .and. any( qi > qmin .and. cci == 0.0 ) ) missing_vars = .true.
176 IF ( .not. missing_vars .and. any( qs > qmin .and. csw == 0.0 ) ) missing_vars = .true.
177 IF ( .not. missing_vars .and. any( qr > qmin .and. crw == 0.0 ) ) missing_vars = .true.
178 IF ( .not. missing_vars .and. any( qh > qmin .and. (chw == 0.0 .or. vh == 0.0) ) ) missing_vars = .true.
180 call mpi_allreduce(missing_vars, missing_vars_global, 1, mpi_logical, mpi_lor, mpicomm, ierr)
182 is_initialized = .true.
188 is_initialized = .true.
204 spechum, cccn, cccna, qc, qr, qi, qs, qh, qhl, &
205 ccw, crw, cci, csw, chw, chl, vh, vhl, &
207 tgrs, prslk, prsl, phii, omega, dtp, &
208 prcp, rain, graupel, ice, snow, sr, &
209 refl_10cm, do_radar_ref, first_time_step, restart, &
210 re_cloud, re_ice, re_snow, re_rain, &
211 nleffr, nieffr, nseffr, nreffr, &
212 imp_physics, convert_dry_rho, &
213 imp_physics_nssl, nssl_ccn_on, &
214 nssl_hail_on, nssl_invertccn, nssl_3moment, &
215 ntccn, ntccna, ten_t, ten_qv, ten_qc, ten_qr, ten_qi, &
216 ten_qs, ten_qh, ten_qhl, ten_cccn, ten_ccw, ten_crw, &
217 ten_cci, ten_csw, ten_chw, ten_chl, ten_vh, ten_vhl, &
218 ten_zrw, ten_zhw, ten_zhl, errflg, errmsg)
223 integer,
intent(in) :: ncol, nlev
224 real(kind_phys),
intent(in ) :: con_g
225 real(kind_phys),
intent(in ) :: con_rd
226 integer,
intent(in) :: mpirank
228 logical,
intent(in ) :: convert_dry_rho
229 real(kind_phys),
intent(in ) :: spechum(:,:)
230 real(kind_phys),
intent(in ),
optional :: cccn(:,:)
231 real(kind_phys),
intent(in ),
optional :: cccna(:,:)
232 real(kind_phys),
intent(in ) :: qc (:,:)
233 real(kind_phys),
intent(in ) :: qr (:,:)
234 real(kind_phys),
intent(in ) :: qi (:,:)
235 real(kind_phys),
intent(in ) :: qs (:,:)
236 real(kind_phys),
intent(in ) :: qh (:,:)
237 real(kind_phys),
intent(in ),
optional :: qhl(:,:)
238 real(kind_phys),
intent(in ) :: ccw(:,:)
239 real(kind_phys),
intent(in ) :: crw(:,:)
240 real(kind_phys),
intent(in ) :: cci(:,:)
241 real(kind_phys),
intent(in ) :: csw(:,:)
242 real(kind_phys),
intent(in ) :: chw(:,:)
243 real(kind_phys),
intent(in ),
optional :: chl(:,:)
244 real(kind_phys),
intent(in ) :: vh (:,:)
245 real(kind_phys),
intent(in ),
optional :: vhl(:,:)
246 real(kind_phys),
intent(in ),
optional :: zrw(:,:)
247 real(kind_phys),
intent(in ),
optional :: zhw(:,:)
248 real(kind_phys),
intent(in ),
optional :: zhl(:,:)
250 real(kind_phys),
intent(in ) :: tgrs (:,:)
251 real(kind_phys),
intent(in ) :: prsl (:,:)
252 real(kind_phys),
intent(in ) :: prslk(:,:)
253 real(kind_phys),
intent(in ) :: phii (:,:)
254 real(kind_phys),
intent(in ) :: omega(:,:)
255 real(kind_phys),
intent(in ) :: dtp
257 real(kind_phys),
intent( out) :: prcp (:)
258 real(kind_phys),
intent( out) :: rain (:)
259 real(kind_phys),
intent( out) :: graupel(:)
260 real(kind_phys),
intent( out) :: ice (:)
261 real(kind_phys),
intent( out) :: snow (:)
262 real(kind_phys),
intent( out) :: sr (:)
264 real(kind_phys),
intent(inout) :: refl_10cm(:,:)
265 logical,
intent(in ) :: do_radar_ref, first_time_step
266 logical,
intent(in) :: restart
268 real(kind_phys),
intent(inout),
optional :: re_cloud(:,:)
269 real(kind_phys),
intent(inout),
optional :: re_ice(:,:)
270 real(kind_phys),
intent(inout),
optional :: re_snow(:,:)
271 real(kind_phys),
intent(inout),
optional :: re_rain(:,:)
272 integer,
intent(in) :: nleffr, nieffr, nseffr, nreffr
273 integer,
intent(in) :: imp_physics
274 integer,
intent(in) :: imp_physics_nssl
275 logical,
intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_invertccn, nssl_3moment
276 integer,
intent(in) :: ntccn, ntccna
278 real(kind_phys),
intent( out) :: ten_t(:,:)
279 real(kind_phys),
intent( out) :: ten_qv(:,:)
280 real(kind_phys),
intent( out) :: ten_qc(:,:)
281 real(kind_phys),
intent( out) :: ten_qr(:,:)
282 real(kind_phys),
intent( out) :: ten_qi(:,:)
283 real(kind_phys),
intent( out) :: ten_qs(:,:)
284 real(kind_phys),
intent( out) :: ten_qh(:,:)
285 real(kind_phys),
intent( out),
optional :: ten_qhl(:,:)
286 real(kind_phys),
intent( out),
optional :: ten_cccn(:,:)
287 real(kind_phys),
intent( out) :: ten_ccw(:,:)
288 real(kind_phys),
intent( out) :: ten_crw(:,:)
289 real(kind_phys),
intent( out) :: ten_cci(:,:)
290 real(kind_phys),
intent( out) :: ten_csw(:,:)
291 real(kind_phys),
intent( out) :: ten_chw(:,:)
292 real(kind_phys),
intent( out),
optional :: ten_chl(:,:)
293 real(kind_phys),
intent( out) :: ten_vh(:,:)
294 real(kind_phys),
intent( out),
optional :: ten_vhl(:,:)
295 real(kind_phys),
intent( out),
optional :: ten_zrw(:,:)
296 real(kind_phys),
intent( out),
optional :: ten_zhw(:,:)
297 real(kind_phys),
intent( out),
optional :: ten_zhl(:,:)
299 integer,
intent(out) :: errflg
300 character(len=*),
intent(out) :: errmsg
305 real(kind_phys) :: new_t(1:ncol,1:nlev)
307 real(kind_phys) :: rho(1:ncol,1:nlev)
309 real(kind_phys) :: qv_mp(1:ncol,1:nlev)
310 real(kind_phys) :: qc_mp(1:ncol,1:nlev)
311 real(kind_phys) :: qr_mp(1:ncol,1:nlev)
312 real(kind_phys) :: qi_mp(1:ncol,1:nlev)
313 real(kind_phys) :: qs_mp(1:ncol,1:nlev)
314 real(kind_phys) :: qh_mp(1:ncol,1:nlev)
315 real(kind_phys) :: qhl_mp(1:ncol,1:nlev)
316 real(kind_phys) :: nc_mp(1:ncol,1:nlev)
317 real(kind_phys) :: nr_mp(1:ncol,1:nlev)
318 real(kind_phys) :: ni_mp(1:ncol,1:nlev)
319 real(kind_phys) :: ns_mp(1:ncol,1:nlev)
320 real(kind_phys) :: nh_mp(1:ncol,1:nlev)
321 real(kind_phys) :: nhl_mp(1:ncol,1:nlev)
322 real(kind_phys) :: cn_mp(1:ncol,1:nlev)
323 real(kind_phys) :: cna_mp(1:ncol,1:nlev)
324 real(kind_phys) :: cccn_mp(1:ncol,1:nlev)
325 real(kind_phys) :: cccna_mp(1:ncol,1:nlev)
326 real(kind_phys) :: vh_mp(1:ncol,1:nlev)
329 real(kind_phys) :: vhl_mp(1:ncol,1:nlev)
330 real(kind_phys) :: zrw_mp(1:ncol,1:nlev)
331 real(kind_phys) :: zhw_mp(1:ncol,1:nlev)
332 real(kind_phys) :: zhl_mp(1:ncol,1:nlev)
334 real(kind_phys) :: w(1:ncol,1:nlev)
335 real(kind_phys) :: dz(1:ncol,1:nlev)
338 real(kind_phys) :: rain_mp(1:ncol)
339 real(kind_phys) :: graupel_mp(1:ncol)
340 real(kind_phys) :: ice_mp(1:ncol)
341 real(kind_phys) :: snow_mp(1:ncol)
342 real(kind_phys) :: delta_rain_mp(1:ncol)
343 real(kind_phys) :: delta_graupel_mp(1:ncol)
344 real(kind_phys) :: delta_ice_mp(1:ncol)
345 real(kind_phys) :: delta_snow_mp(1:ncol)
347 real(kind_phys) :: xrain_mp(1:ncol)
348 real(kind_phys) :: xgraupel_mp(1:ncol)
349 real(kind_phys) :: xice_mp(1:ncol)
350 real(kind_phys) :: xsnow_mp(1:ncol)
351 real(kind_phys) :: xdelta_rain_mp(1:ncol)
352 real(kind_phys) :: xdelta_graupel_mp(1:ncol)
353 real(kind_phys) :: xdelta_ice_mp(1:ncol)
354 real(kind_phys) :: xdelta_snow_mp(1:ncol)
358 integer :: do_radar_ref_mp
360 logical :: do_effective_radii
361 real(kind_phys) :: re_cloud_mp(1:ncol,1:nlev)
362 real(kind_phys) :: re_ice_mp(1:ncol,1:nlev)
363 real(kind_phys) :: re_snow_mp(1:ncol,1:nlev)
364 real(kind_phys) :: re_rain_mp(1:ncol,1:nlev)
370 integer :: ids,ide, jds,jde, kds,kde, &
371 ims,ime, jms,jme, kms,kme, &
372 its,ite, jts,jte, kts,kte, i,j,k
375 real(kind_phys),
parameter :: dtpmax = 60.
376 real(kind_phys) :: dtptmp
377 integer,
parameter :: ndebug = 0
379 real(kind_phys) :: cwmas
381 real(kind_phys),
allocatable :: an(:,:,:,:)
393 if (nssl_hail_on)
then
398 if (nssl_ccn_on) ten_cccn = 0.0
405 if ( nssl_3moment )
then
408 if (nssl_hail_on)
then
417 IF ( ndebug >= 1 )
write(0,*)
'In physics nssl_run'
421 if (.not.is_initialized)
then
422 write(errmsg, fmt=
'((a))')
'mp_nssl_run called before mp_nssl_init'
427 invertccn = nssl_invertccn
431 qv_mp = spechum/(1.0_kind_phys-spechum)
432 IF ( convert_dry_rho )
THEN
433 qc_mp = qc/(1.0_kind_phys-spechum)
434 qr_mp = qr/(1.0_kind_phys-spechum)
435 qi_mp = qi/(1.0_kind_phys-spechum)
436 qs_mp = qs/(1.0_kind_phys-spechum)
437 qh_mp = qh/(1.0_kind_phys-spechum)
439 IF ( nssl_ccn_on ) cccn_mp = cccn/(1.0_kind_phys-spechum)
441 nc_mp = ccw/(1.0_kind_phys-spechum)
442 nr_mp = crw/(1.0_kind_phys-spechum)
443 ni_mp = cci/(1.0_kind_phys-spechum)
444 ns_mp = csw/(1.0_kind_phys-spechum)
445 nh_mp = chw/(1.0_kind_phys-spechum)
446 vh_mp = vh/(1.0_kind_phys-spechum)
447 IF ( nssl_3moment )
THEN
448 zrw_mp = zrw/(1.0_kind_phys-spechum)
449 zhw_mp = zhw/(1.0_kind_phys-spechum)
451 IF ( nssl_hail_on )
THEN
452 qhl_mp = qhl/(1.0_kind_phys-spechum)
453 nhl_mp = chl/(1.0_kind_phys-spechum)
454 vhl_mp = vhl/(1.0_kind_phys-spechum)
455 IF ( nssl_3moment )
THEN
456 zhl_mp = zhl/(1.0_kind_phys-spechum)
466 IF ( nssl_ccn_on ) cccn_mp = cccn
474 IF ( nssl_3moment )
THEN
478 IF ( nssl_hail_on )
THEN
482 IF ( nssl_3moment )
THEN
489 IF ( nssl_hail_on )
THEN
499 write(6,*)
'nsslrun: qc,max ccw = ',mpirank,maxval(qc_mp),maxval(nc_mp),sum(nc_mp)
500 IF ( mpirank == 1 )
THEN
503 IF ( qc_mp(i,k) > 1.e-6 .and. nc_mp(i,k) <= 1.e-9 )
THEN
504 write(6,*)
'i,k,qc,nc,ccn = ',i,k,qc_mp(i,k),nc_mp(i,k),cccn_mp(i,k)
518 rho = prsl/(con_rd*tgrs)
521 w = -omega/(rho*con_g)
524 dz = (phii(:,2:nlev+1) - phii(:,1:nlev)) / con_g
541 xdelta_graupel_mp = 0
544 IF ( ndebug > 1 )
THEN
545 write(*,*)
'Max q before micro'
546 write(*,*)
'qc = ',1000.*maxval(qc_mp)
547 write(*,*)
'qr = ',1000.*maxval(qr_mp)
548 write(*,*)
'qi = ',1000.*maxval(qi_mp)
549 write(*,*)
'qs = ',1000.*maxval(qs_mp)
550 write(*,*)
'qh = ',1000.*maxval(qh_mp)
551 IF ( nssl_hail_on )
write(*,*)
'qhl = ',1000.*maxval(qhl_mp)
552 write(*,*)
'ccw = ',1.e-6*maxval(ccw*rho)
556 if (do_radar_ref)
then
564 do_effective_radii = .false.
565 IF ( nleffr > 0 .and. nieffr > 0 .and. nseffr > 0 .and. nreffr > 0 )
THEN
567 do_effective_radii = .true.
572 else if (nleffr < 1 .and. nieffr < 1 .and. nseffr < 1 .and. nreffr < 1 )
then
573 do_effective_radii = .false.
579 write(errmsg,fmt=
'(*(a))')
'Logic error in mp_nssl_run:', &
580 ' hydrometeor radius calculation logic problem'
611 IF ( ndebug >= 1 )
write(0,*)
'call nssl_2mom_driver'
613 IF ( dtp > 1.25001*dtpmax )
THEN
614 ntmul = max(2, nint( dtp/dtpmax ) )
621 IF ( first_time_step .and. ( .not. restart .or. missing_vars_global ) )
THEN
623 IF ( nssl_ccn_on )
THEN
624 IF ( invertccn )
THEN
638 allocate( an(ncol,1,nlev,na) )
641 cwmas = 1000.*0.523599*(2.*9.e-6)**3
643 call calcnfromq(nx=ncol,ny=1,nz=nlev,an=an,na=na,nor=0,norz=0,dn=rho, &
644 & qcw=qc_mp,qci=qi_mp, &
645 & ccw=nc_mp,cci=ni_mp, &
646 & cccn=cccn_mp,qv=qv_mp, invertccn_flag=nssl_invertccn, cwmasin=cwmas )
649 write(6,*)
'nsslrun2: qc,max ccw = ',mpirank,maxval(qc_mp),maxval(nc_mp),sum(nc_mp)
650 IF ( mpirank == 1 )
THEN
653 IF ( qc_mp(i,k) > 1.e-6 .and. nc_mp(i,k) <= 1.e-9 )
THEN
654 write(6,*)
'i2,k,qc,nc,ccn = ',i,k,qc_mp(i,k),nc_mp(i,k),cccn_mp(i,k)
665 IF ( nssl_ccn_on )
THEN
666 IF ( invertccn )
THEN
669 cn_mp = nssl_qccn - cccn_mp
670 cn_mp = max(0.0_kind_phys, cn_mp)
675 IF ( ntccna > 0 )
THEN
686 itimestep = itimestep + 1
690 IF ( nssl_ccn_on )
THEN
693 itimestep=itimestep, &
716 cna=cna_mp, f_cna=.false. , &
723 rainnc=xrain_mp, rainncv=xdelta_rain_mp, &
724 snownc=xsnow_mp, snowncv=xdelta_snow_mp, &
725 grplnc=xgraupel_mp, &
726 grplncv=xdelta_graupel_mp, &
729 diagflag = diagflag, &
730 errmsg=errmsg,errflg=errflg, &
731 re_cloud=re_cloud_mp, &
733 re_snow=re_snow_mp, &
734 re_rain=re_rain_mp, &
739 ids=ids,ide=ide, jds=jds,jde=jde, kds=kds,kde=kde, &
740 ims=ims,ime=ime, jms=jms,jme=jme, kms=kms,kme=kme, &
741 its=its,ite=ite, jts=jts,jte=jte, kts=kts,kte=kte &
747 itimestep=itimestep, &
777 rainnc=xrain_mp, rainncv=xdelta_rain_mp, &
778 snownc=xsnow_mp, snowncv=xdelta_snow_mp, &
779 grplnc=xgraupel_mp, &
780 grplncv=xdelta_graupel_mp, &
783 diagflag = diagflag, &
784 errmsg=errmsg,errflg=errflg, &
785 re_cloud=re_cloud_mp, &
787 re_snow=re_snow_mp, &
788 re_rain=re_rain_mp, &
793 ids=ids,ide=ide, jds=jds,jde=jde, kds=kds,kde=kde, &
794 ims=ims,ime=ime, jms=jms,jme=jme, kms=kms,kme=kme, &
795 its=its,ite=ite, jts=jts,jte=jte, kts=kts,kte=kte &
801 delta_rain_mp(i) = delta_rain_mp(i) + xdelta_rain_mp(i)
802 delta_graupel_mp(i) = delta_graupel_mp(i) + xdelta_graupel_mp(i)
803 delta_ice_mp(i) = delta_ice_mp(i) + xdelta_ice_mp(i)
804 delta_snow_mp(i) = delta_snow_mp(i) + xdelta_snow_mp(i)
812 IF ( nssl_ccn_on )
THEN
813 IF ( invertccn )
THEN
814 cccn_mp = max(0.0_kind_phys, nssl_qccn - cn_mp )
827 IF ( ndebug > 1 )
write(0,*)
'done nssl_2mom_driver'
829 if (errflg/=0)
return
831 IF ( ndebug > 1 )
THEN
832 write(*,*)
'Max q after micro'
833 write(*,*)
'qc = ',1000.*maxval(qc_mp)
834 write(*,*)
'qr = ',1000.*maxval(qr_mp)
835 write(*,*)
'qi = ',1000.*maxval(qi_mp)
836 write(*,*)
'qs = ',1000.*maxval(qs_mp)
837 write(*,*)
'qh = ',1000.*maxval(qh_mp)
838 IF ( nssl_hail_on )
THEN
839 write(*,*)
'qhl = ',1000.*maxval(qhl_mp)
841 write(*,*)
'ccw = ',1.e-6*maxval(ccw*rho)
842 IF ( 1000.*maxval(qc_mp) > 0.5 .or. 1000.*maxval(qi_mp) > 0.09 .or. 1000.*maxval(qs_mp) > 0.1 )
THEN
843 IF ( nssl_ccn_on )
THEN
844 write(*,*)
'qc, ccn, ccw, tt, qi+qs by height'
846 write(*,*) qc_mp(1,k)*1000., cccn(1,k)*rho(1,k)*1.e-6, ccw(1,k)*rho(1,k)*1.e-6, new_t(1,k), (qs_mp(1,k)+qi_mp(1,k))*1000.
849 write(*,*)
'qc, ccn, ccw, tt, qi+qs by height'
851 write(*,*) qc_mp(1,k)*1000., cccn(1,k)*rho(1,k)*1.e-6, 0.0, new_t(1,k), (qs_mp(1,k)+qi_mp(1,k))*1000.
858 ten_t = (new_t - tgrs)/dtp
860 ten_qv = (qv_mp/(1.0_kind_phys+qv_mp) - spechum)/dtp
861 IF ( convert_dry_rho )
THEN
862 ten_qc = (qc_mp/(1.0_kind_phys+qv_mp) - qc)/dtp
863 ten_qr = (qr_mp/(1.0_kind_phys+qv_mp) - qr)/dtp
864 ten_qi = (qi_mp/(1.0_kind_phys+qv_mp) - qi)/dtp
865 ten_qs = (qs_mp/(1.0_kind_phys+qv_mp) - qs)/dtp
866 ten_qh = (qh_mp/(1.0_kind_phys+qv_mp) - qh)/dtp
867 IF ( nssl_ccn_on ) ten_cccn = (cccn_mp/(1.0_kind_phys+qv_mp) - cccn)/dtp
869 ten_ccw = (nc_mp/(1.0_kind_phys+qv_mp) - ccw)/dtp
870 ten_crw = (nr_mp/(1.0_kind_phys+qv_mp) - crw)/dtp
871 ten_cci = (ni_mp/(1.0_kind_phys+qv_mp) - cci)/dtp
872 ten_csw = (ns_mp/(1.0_kind_phys+qv_mp) - csw)/dtp
873 ten_chw = (nh_mp/(1.0_kind_phys+qv_mp) - chw)/dtp
874 ten_vh = (vh_mp/(1.0_kind_phys+qv_mp) - vh)/dtp
875 IF ( nssl_3moment )
THEN
876 ten_zrw = (zrw_mp/(1.0_kind_phys+qv_mp) - zrw)/dtp
877 ten_zhw = (zhw_mp/(1.0_kind_phys+qv_mp) - zhw)/dtp
879 IF ( nssl_hail_on )
THEN
880 ten_qhl = (qhl_mp/(1.0_kind_phys+qv_mp) - qhl)/dtp
881 ten_chl = (nhl_mp/(1.0_kind_phys+qv_mp) - chl)/dtp
882 ten_vhl = (vhl_mp/(1.0_kind_phys+qv_mp) - vhl)/dtp
883 IF ( nssl_3moment )
THEN
884 ten_zhl = (zhl_mp/(1.0_kind_phys+qv_mp) - zhl)/dtp
889 ten_qc = (qc_mp - qc)/dtp
890 ten_qr = (qr_mp - qr)/dtp
891 ten_qi = (qi_mp - qi)/dtp
892 ten_qs = (qs_mp - qs)/dtp
893 ten_qh = (qh_mp - qh)/dtp
894 IF ( nssl_ccn_on ) ten_cccn = (cccn_mp - cccn)/dtp
896 ten_ccw = (nc_mp - ccw)/dtp
897 ten_crw = (nr_mp - crw)/dtp
898 ten_cci = (ni_mp - cci)/dtp
899 ten_csw = (ns_mp - csw)/dtp
900 ten_chw = (nh_mp - chw)/dtp
901 ten_vh = (vh_mp - vh)/dtp
902 IF ( nssl_3moment )
THEN
903 ten_zrw = (zrw_mp - zrw)/dtp
904 ten_zhw = (zhw_mp - zhw)/dtp
906 IF ( nssl_hail_on )
THEN
907 ten_qhl = (qhl_mp - qhl)/dtp
908 ten_chl = (nhl_mp - chl)/dtp
909 ten_vhl = (vhl_mp - vhl)/dtp
910 IF ( nssl_3moment )
THEN
911 ten_zhl = (zhl_mp - zhl)/dtp
922 prcp = max(0.0, delta_rain_mp/1000.0_kind_phys)
923 graupel = max(0.0, delta_graupel_mp/1000.0_kind_phys)
924 ice = max(0.0, delta_ice_mp/1000.0_kind_phys)
925 snow = max(0.0, delta_snow_mp/1000.0_kind_phys)
926 rain = max(0.0, (delta_rain_mp - (delta_graupel_mp + delta_ice_mp + delta_snow_mp))/1000.0_kind_phys)
930 if (do_effective_radii)
then
932 re_cloud = re_cloud_mp*1.0e6_kind_phys
933 re_ice = re_ice_mp*1.0e6_kind_phys
934 re_snow = re_snow_mp*1.0e6_kind_phys
935 re_rain = re_rain_mp*1.0e6_kind_phys
938 IF ( ndebug >= 1 )
write(0,*)
'mp_nssl: end'
subroutine, public nssl_2mom_driver(qv, qc, qr, qi, qs, qh, qhl, ccw, crw, cci, csw, chw, chl, cn, vhw, vhl, cna, cni, f_cn, f_cna, f_cina, f_qc, f_qr, f_qi, f_qs, f_qh, f_qhl, cn_nu, cn_co, cinp, f_cnnu, f_cnco, f_cinp, cna_co, cna_nu, f_cnaco, f_cnanu, cnuf, f_cnuf, cn_ac, f_cnac, zrw, zhw, zhl, f_zrw, f_zhw, f_zhl, f_vhw, f_vhl, qsw, qhw, qhlw, tt, th, pii, p, w, dn, dz, dtp, itimestep, is_theta_or_temp, ntmul, ntcnt, lastloop, rainnc, rainncv, dx, dy, axtra, snownc, snowncv, grplnc, grplncv, sr, hailnc, hailncv, hail_maxk1, hail_max2d, nwp_diagnostics, tkediss, re_cloud, re_ice, re_snow, re_rain, re_graup, re_hail, has_reqc, has_reqi, has_reqs, has_reqr, has_reqg, has_reqh, rainncw2, rainnci2, dbz, vzf, compdbz, rscghis_2d, rscghis_2dp, rscghis_2dn, scr, scw, sci, scs, sch, schl, sctot, elec_physics, induc, elecz, scion, sciona, f_scion, f_sciona, noninduc, noninducp, noninducn, ssat3d, ssati, nssl_ssat_output, pcc2, pre2, depsubr, mnucf2, melr2, ctr2, rim1_2, rim2_2, rim3_2, nctr2, nnuccd2, nnucf2, effc2, effr2, effi2, effs2, effg2, fc2, fr2, fi2, fs2, fg2, fnc2, fnr2, fni2, fns2, fng2, ipelectmp, isedonly_in, diagflag, ke_diag, errmsg, errflg, nssl_progn, wetscav_on, rainprod, evapprod, cu_used, qrcuten, qscuten, qicuten, qccuten, ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, its, ite, jts, jte, kts, kte)
Driver subroutine that copies state data to local 2D arrays for microphysics calls.
subroutine, public mp_nssl_run(ncol, nlev, con_g, con_rd, mpirank, spechum, cccn, cccna, qc, qr, qi, qs, qh, qhl, ccw, crw, cci, csw, chw, chl, vh, vhl, zrw, zhw, zhl, tgrs, prslk, prsl, phii, omega, dtp, prcp, rain, graupel, ice, snow, sr, refl_10cm, do_radar_ref, first_time_step, restart, re_cloud, re_ice, re_snow, re_rain, nleffr, nieffr, nseffr, nreffr, imp_physics, convert_dry_rho, imp_physics_nssl, nssl_ccn_on, nssl_hail_on, nssl_invertccn, nssl_3moment, ntccn, ntccna, ten_t, ten_qv, ten_qc, ten_qr, ten_qi, ten_qs, ten_qh, ten_qhl, ten_cccn, ten_ccw, ten_crw, ten_cci, ten_csw, ten_chw, ten_chl, ten_vh, ten_vhl, ten_zrw, ten_zhw, ten_zhl, errflg, errmsg)