-
Notifications
You must be signed in to change notification settings - Fork 169
add semi-Lagrangian sedimentation of graupel into Thompson MP #770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
044c30f
ef3bac3
4db27ba
bd4710a
35cf7eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1908,12 +1908,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & | |
|
|
||
| DOUBLE PRECISION, PARAMETER:: zeroD0 = 0.0d0 | ||
| REAL, PARAMETER :: decfl = 8.0 | ||
| REAL :: dtcfl,rainsfc | ||
| REAL :: dtcfl,rainsfc,graulsfc | ||
| INTEGER :: niter | ||
|
|
||
| REAL, DIMENSION(kts:kte):: temp, pres, qv | ||
| REAL, DIMENSION(kts:kte):: rc, ri, rr, rs, rg, ni, nr, nc, nwfa, nifa | ||
| REAL, DIMENSION(kts:kte):: rr_tmp,nr_tmp | ||
| REAL, DIMENSION(kts:kte):: rr_tmp, nr_tmp, rg_tmp | ||
| REAL, DIMENSION(kts:kte):: rho, rhof, rhof2 | ||
| REAL, DIMENSION(kts:kte):: qvs, qvsi, delQvs | ||
| REAL, DIMENSION(kts:kte):: satw, sati, ssatw, ssati | ||
|
|
@@ -1927,7 +1927,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & | |
|
|
||
| REAL, DIMENSION(kts:kte):: sed_r, sed_s, sed_g, sed_i, sed_n,sed_c | ||
|
|
||
| REAL:: rgvm, delta_tp, orho, lfus2 | ||
| REAL:: rgvm, delta_tp, orho, lfus2, orhodt | ||
| REAL, DIMENSION(5):: onstep | ||
| DOUBLE PRECISION:: N0_exp, N0_min, lam_exp, lamc, lamr, lamg | ||
| DOUBLE PRECISION:: lami, ilami, ilamc | ||
|
|
@@ -3937,11 +3937,12 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & | |
| do n = 1, niter | ||
| rr_tmp(:) = rr(:) | ||
| nr_tmp(:) = nr(:) | ||
| call nislfv_rain_ppm(kte,dzq,vtrk,rr,rainsfc,dtcfl,R1) | ||
| call nislfv_rain_ppm(kte,dzq,vtnrk,nr,vtr,dtcfl,R2) | ||
| call nislfv_precip_ppm(kte,dzq,vtrk,rr,rainsfc,dtcfl,R1) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While you changed "rain" to "precip" I really don't understand "nislfv" nor "ppm" and would appreciate something better. These are jumbled letters to me and others. Got anything else?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nislfv and ppm are described in the description section of the routine.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know it's documented somehow, but I see it as an improvement to use something like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you suggest using? Any idea?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Songyou184 What do you think about the names?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I did give you my suggested name of subroutine in my comment. It is: |
||
| call nislfv_precip_ppm(kte,dzq,vtnrk,nr,vtr,dtcfl,R2) | ||
| do k = kts, kte | ||
| qrten(k) = qrten(k) + (rr(k) - rr_tmp(k))/rho(k)/dt | ||
| nrten(k) = nrten(k) + (nr(k) - nr_tmp(k))/rho(k)/dt | ||
| orhodt = 1./(rho(k)*dt) | ||
| qrten(k) = qrten(k) + (rr(k) - rr_tmp(k)) * orhodt | ||
| nrten(k) = nrten(k) + (nr(k) - nr_tmp(k)) * orhodt | ||
| enddo | ||
| pptrain = pptrain + rainsfc | ||
|
|
||
|
|
@@ -4054,28 +4055,63 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & | |
|
|
||
| if (ANY(L_qg .eqv. .true.)) then | ||
| nstep = NINT(1./onstep(4)) | ||
| do n = 1, nstep | ||
| do k = kte, kts, -1 | ||
| sed_g(k) = vtgk(k)*rg(k) | ||
| enddo | ||
| k = kte | ||
| odzq = 1./dzq(k) | ||
| orho = 1./rho(k) | ||
| qgten(k) = qgten(k) - sed_g(k)*odzq*onstep(4)*orho | ||
| rg(k) = MAX(R1, rg(k) - sed_g(k)*odzq*DT*onstep(4)) | ||
| do k = ksed1(4), kts, -1 | ||
| odzq = 1./dzq(k) | ||
| orho = 1./rho(k) | ||
| qgten(k) = qgten(k) + (sed_g(k+1)-sed_g(k)) & | ||
| *odzq*onstep(4)*orho | ||
| rg(k) = MAX(R1, rg(k) + (sed_g(k+1)-sed_g(k)) & | ||
| if(.not. sedi_semi) then | ||
| do n = 1, nstep | ||
| do k = kte, kts, -1 | ||
| sed_g(k) = vtgk(k)*rg(k) | ||
| enddo | ||
| k = kte | ||
| odzq = 1./dzq(k) | ||
| orho = 1./rho(k) | ||
| qgten(k) = qgten(k) - sed_g(k)*odzq*onstep(4)*orho | ||
| rg(k) = MAX(R1, rg(k) - sed_g(k)*odzq*DT*onstep(4)) | ||
| do k = ksed1(4), kts, -1 | ||
| odzq = 1./dzq(k) | ||
| orho = 1./rho(k) | ||
| qgten(k) = qgten(k) + (sed_g(k+1)-sed_g(k)) & | ||
| *odzq*onstep(4)*orho | ||
| rg(k) = MAX(R1, rg(k) + (sed_g(k+1)-sed_g(k)) & | ||
| *odzq*DT*onstep(4)) | ||
| enddo | ||
| enddo | ||
|
|
||
| if (rg(kts).gt.R1*10.) & | ||
| pptgraul = pptgraul + sed_g(kts)*DT*onstep(4) | ||
| enddo | ||
| endif | ||
| if (rg(kts).gt.R1*10.) & | ||
| pptgraul = pptgraul + sed_g(kts)*DT*onstep(4) | ||
| enddo | ||
| else ! if(.not. sedi_semi) then | ||
| niter = 1 | ||
| dtcfl = dt | ||
| if(SEDI_SEMI_DECFL) then | ||
| niter = int(nstep/decfl) + 1 | ||
| dtcfl = dt/niter | ||
| endif | ||
|
|
||
| do n = 1, niter | ||
| rg_tmp(:) = rg(:) | ||
| call nislfv_precip_ppm(kte,dzq,vtgk,rg,graulsfc,dtcfl,R1) | ||
| do k = kts, kte | ||
| orhodt = 1./(rho(k)*dt) | ||
| qgten(k) = qgten(k) + (rg(k) - rg_tmp(k))*orhodt | ||
| enddo | ||
| pptgraul = pptgraul + graulsfc | ||
| if(sedi_semi_update) then | ||
| do k = kte+1, kts, -1 | ||
| vtgk(k) = 0. | ||
| enddo | ||
| do k = kte, kts, -1 | ||
| vtg = 0. | ||
| if (rg(k).gt. R1) then | ||
| vtg = rhof(k)*av_g*cgg(6)*ogg3 * ilamg(k)**bv_g | ||
| if (temp(k).gt. T_0) then | ||
| vtgk(k) = MAX(vtg, vtrk(k)) | ||
| else | ||
| vtgk(k) = vtg | ||
| endif | ||
| endif | ||
| enddo | ||
| endif | ||
| enddo | ||
| endif ! if(.not. sedi_semi) then | ||
| endif | ||
|
|
||
| !+---+-----------------------------------------------------------------+ | ||
| !> - Instantly melt any cloud ice into cloud water if above 0C and | ||
|
|
@@ -6102,7 +6138,7 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, & | |
| end subroutine calc_refl10cm | ||
| ! | ||
| !------------------------------------------------------------------- | ||
| SUBROUTINE nislfv_rain_ppm(km,dzl,wwl,rql,precip,dt,R1) | ||
| SUBROUTINE nislfv_precip_ppm(km,dzl,wwl,rql,precip,dt,R1) | ||
| !------------------------------------------------------------------- | ||
| ! | ||
| ! for non-iteration semi-Lagrangain forward advection for cloud | ||
|
|
@@ -6320,7 +6356,7 @@ SUBROUTINE nislfv_rain_ppm(km,dzl,wwl,rql,precip,dt,R1) | |
| ! | ||
| ! ---------------------------------- | ||
| ! | ||
| END SUBROUTINE nislfv_rain_ppm | ||
| END SUBROUTINE nislfv_precip_ppm | ||
| !+---+-----------------------------------------------------------------+ | ||
| !+---+-----------------------------------------------------------------+ | ||
| !+---+-----------------------------------------------------------------+ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.