Skip to content
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

GF radar reflectivity update for RRFS realtime runs #103

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
& imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, &
& iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, &
& idcor_hogan, idcor_oreopoulos, lcrick, lcnorm, &
& imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_gf, do_mynnedmf, &
& imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, do_mynnedmf, &
& lgfdlmprad, &
& uni_cld, lmfshal, lmfdeep2, cldcov, clouds1, &
& effrl, effri, effrr, effrs, effr_in, &
Expand Down
14 changes: 8 additions & 6 deletions physics/cu_c3_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2078,9 +2078,9 @@ subroutine cu_c3_deep_run( &

!> - Call rain_evap_below_cloudbase() to calculate evaporation below cloud base

call rain_evap_below_cloudbase(itf,ktf,its,ite, &
kts,kte,ierr,kbcon,xmb,psur,xland,qo_cup, &
po_cup,qes_cup,pwavo,edto,pwevo,pre,outt,outq) !,outbuoy)
! call rain_evap_below_cloudbase(itf,ktf,its,ite, &
! kts,kte,ierr,kbcon,xmb,psur,xland,qo_cup, &
! po_cup,qes_cup,pwavo,edto,pwevo,pre,outt,outq) !,outbuoy)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to just remove these lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we keep this just in case we need to tune with subcloud evaporation in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been recommending that folks remove code rather than comment it out because folks often forget why they left commented code in and it makes the code harder to read in the long run. Git saves the history, so one can always go back to a commit before this PR and put these lines back in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will remove these commented lines.

k=1
!$acc kernels
Expand Down Expand Up @@ -2137,7 +2137,7 @@ subroutine cu_c3_deep_run( &
do k = ktop(i), 1, -1
rain = pwo(i,k) + edto(i) * pwdo(i,k)
rn(i) = rn(i) + rain * xmb(i) * .001 * dtime
!if(po(i,k).gt.400.)then
if(k.gt.jmin(i))then
if(flg(i))then
q1=qo(i,k)+(outq(i,k))*dtime
t1=tn(i,k)+(outt(i,k))*dtime
Expand All @@ -2162,7 +2162,7 @@ subroutine cu_c3_deep_run( &
pre(i)=max(pre(i),0.)
delqev(i) = delqev(i) + .001*dp*qevap(i)/g
endif
!endif ! 400mb
endif
endif
enddo
! pre(i)=1000.*rn(i)/dtime
Expand Down Expand Up @@ -4429,7 +4429,7 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, &
!
!now do the rest
!
kklev(i)=maxloc(zu(i,:),1)
kklev(i)=maxloc(zu(i,2:ktop(i)),1)
!$acc loop seq
do k=kbcon(i)+1,ktop(i)
if(t(i,k) > 273.16) then
Expand Down Expand Up @@ -4489,6 +4489,8 @@ subroutine cup_up_moisture(name,ierr,z_cup,qc,qrc,pw,pwav, &
endif
if(k.gt.kbcon(i)+1)c1d(i,k)=clwdet*up_massdetr(i,k-1)
if(k.gt.kbcon(i)+1)c1d_b(i,k)=clwdet*up_massdetr(i,k-1)
c1d(i,k)=0.005
c1d_b(i,k)=0.005

grantfirl marked this conversation as resolved.
Show resolved Hide resolved
if(autoconv.eq.2) then
!
Expand Down
13 changes: 4 additions & 9 deletions physics/cu_c3_driver.F90
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
!
!> - Set tuning constants for radiation coupling
!
tun_rad_shall(:)=.01
tun_rad_mid(:)=.3 !.02
tun_rad_shall(:)=.012
tun_rad_mid(:)=.15 !.02
tun_rad_deep(:)=.3 !.065
edt(:)=0.
edtm(:)=0.
Expand Down Expand Up @@ -644,7 +644,6 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
enddo
!$acc end kernels
if (dx(its)<6500.) then
ichoice=10
imid_gf=0
endif
!
Expand Down Expand Up @@ -680,10 +679,6 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
do i=its,itf
if(xmbs(i).gt.0.)then
cutens(i)=1.
if (dx(i)<6500.) then
ierrm(i)=555
ierr (i)=555
endif
endif
enddo
!$acc end kernels
Expand Down Expand Up @@ -1041,8 +1036,8 @@ subroutine cu_c3_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
gdc(i,16,10)=pret(i)*3600.

maxupmf(i)=0.
if(forcing(i,6).gt.0.)then
maxupmf(i)=maxval(xmb(i)*zu(i,kts:ktf)/forcing(i,6))
if(forcing2(i,6).gt.0.)then
maxupmf(i)=maxval(xmb(i)*zu(i,kts:ktf)/forcing2(i,6))
endif

if(ktop(i).gt.2 .and.pret(i).gt.0.)dt_mf(i,ktop(i)-1)=ud_mf(i,ktop(i))
Expand Down
9 changes: 4 additions & 5 deletions physics/cu_c3_driver_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ subroutine cu_c3_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m
conv_act_m(i)=0.0
endif
! reflectivity parameterization for parameterized convection (reference:Unipost MDLFLD.f)
if(sqrt(garea(i)).lt.6500.)then
ze = 0.0
ze_conv = 0.0
dbz_sum = 0.0
cuprate = raincv(i) * 3600.0 / dt ! cu precip rate (mm/h)
ze_conv = 300.0 * cuprate**1.4
if (maxupmf(i).gt.0.05) then
cuprate = max(0.1,1.e3*raincv(i) * 3600.0 / dt) ! cu precip rate (mm/h)
if(cuprate .lt. 0.05) cuprate=0.
ze_conv = 300.0 * cuprate**1.5
if (maxupmf(i).gt.0.1 .and. cuprate.gt.0.) then
do k = 1, km
ze = 10._kind_phys ** (0.1 * refl_10cm(i,k))
dbz_sum = max(dbzmin, 10.0 * log10(ze + ze_conv))
refl_10cm(i,k) = dbz_sum
enddo
endif
endif
enddo
!$acc end kernels

Expand Down
10 changes: 6 additions & 4 deletions physics/cu_c3_sh.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module cu_c3_sh
use progsigma, only : progsigma_calc

!real(kind=kind_phys), parameter:: c1_shal=0.0015! .0005
real(kind=kind_phys), parameter:: c1_shal=0. !0.005! .0005
real(kind=kind_phys), parameter:: g =9.81
real(kind=kind_phys), parameter:: cp =1004.
real(kind=kind_phys), parameter:: xlv=2.5e6
real(kind=kind_phys), parameter:: r_v=461.
real(kind=kind_phys), parameter:: c0_shal=.001
real(kind=kind_phys) :: c0_shal=.004
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
real(kind=kind_phys) :: c1_shal=0. !0.005! .0005
real(kind=kind_phys), parameter:: fluxtune=1.5

contains
Expand Down Expand Up @@ -274,6 +274,8 @@ subroutine cu_c3_sh_run ( &
ktopx(i)=0
if(xland(i).gt.1.5 .or. xland(i).lt.0.5)then
xland1(i)=0
c0_shal=.001
c1_shal=.001
! ierr(i)=100
endif
pre(i)=0.
Expand Down Expand Up @@ -669,11 +671,11 @@ subroutine cu_c3_sh_run ( &
if(qco(i,k)>=trash ) then
dz=z_cup(i,k)-z_cup(i,k-1)
! cloud liquid water
c1d(i,k)=.02*up_massdetr(i,k-1)
c1d(i,k)=c1_shal! 0. !.02*up_massdetr(i,k-1)
qrco(i,k)= (qco(i,k)-trash)/(1.+(c0_shal+c1d(i,k))*dz)
if(qrco(i,k).lt.0.)then ! hli new test 02/12/19
qrco(i,k)=0.
c1d(i,k)=0.
!c1d(i,k)=0.
endif
pwo(i,k)=c0_shal*dz*qrco(i,k)*zuo(i,k)
clw_all(i,k)=qco(i,k)-trash !LB total cloud before rain and detrain
Expand Down
5 changes: 2 additions & 3 deletions physics/cu_gf_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
enddo
!$acc end kernels
if (dx(its)<6500.) then
! ichoice=10
imid_gf=0
endif
!
Expand Down Expand Up @@ -1015,8 +1014,8 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,&
gdc(i,16,10)=pret(i)*3600.

maxupmf(i)=0.
if(forcing(i,6).gt.0.)then
maxupmf(i)=maxval(xmb(i)*zu(i,kts:ktf)/forcing(i,6))
if(forcing2(i,6).gt.0.)then
maxupmf(i)=maxval(xmb(i)*zu(i,kts:ktf)/forcing2(i,6))
endif

if(ktop(i).gt.2 .and.pret(i).gt.0.)dt_mf(i,ktop(i)-1)=ud_mf(i,ktop(i))
Expand Down
9 changes: 4 additions & 5 deletions physics/cu_gf_driver_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ subroutine cu_gf_driver_post_run (im, km, t, q, prevst, prevsq, cactiv, cactiv_m
conv_act_m(i)=0.0
endif
! reflectivity parameterization for parameterized convection (reference:Unipost MDLFLD.f)
if(sqrt(garea(i)).lt.6500.)then
ze = 0.0
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
ze_conv = 0.0
dbz_sum = 0.0
cuprate = raincv(i) * 3600.0 / dt ! cu precip rate (mm/h)
ze_conv = 300.0 * cuprate**1.4
if (maxupmf(i).gt.0.05) then
cuprate = max(0.1,1.e3*raincv(i) * 3600.0 / dt) ! cu precip rate (mm/h)
if(cuprate .lt. 0.05) cuprate=0.
ze_conv = 300.0 * cuprate**1.5
if (maxupmf(i).gt.0.1 .and. cuprate.gt.0.) then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not cuprate always >0 after adjustment? Any reason to change cuprate and add the condition of cuprate>0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not cuprate always >0 after adjustment? Any reason to change cuprate and add the condition of cuprate>0?

In line 73, If the convective precipitation rate is very weak (<0.05 mm/h), the cuprate is reset to 0. Thus in the if condition of line 75, we exclude the case with weak convective updraft and weak convective precipitation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is in line 72, cuprate will be always >0.1 mm/h.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that. Yes, we have duplicated safeguards. I will update line 72 just as "cuprate = 1.e3*raincv(i) * 3600.0 / dt" in this PR soon.

do k = 1, km
ze = 10._kind_phys ** (0.1 * refl_10cm(i,k))
dbz_sum = max(dbzmin, 10.0 * log10(ze + ze_conv))
refl_10cm(i,k) = dbz_sum
enddo
endif
endif
enddo
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
!$acc end kernels

Expand Down
32 changes: 11 additions & 21 deletions physics/smoke_dust/dust_data_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,10 @@ module dust_data_mod
! Never used:
! real(kind_phys), parameter :: fengsha_alpha = 0.3
! real(kind_phys), parameter :: fengsha_gamma = 1.3

! -- FENGSHA threshold velocities based on Dale A. Gillette's data
integer, parameter :: fengsha_maxstypes = 13
! real(kind_phys), dimension(fengsha_maxstypes) :: dust_uthres = &
! (/ 0.065, & ! Sand - 1
! 0.20, & ! Loamy Sand - 2
! 0.52, & ! Sandy Loam - 3
! 0.50, & ! Silt Loam - 4
! 0.50, & ! Silt - 5
! 0.60, & ! Loam - 6
! 0.73, & ! Sandy Clay Loam - 7
! 0.73, & ! Silty Clay Loam - 8
! 0.80, & ! Clay Loam - 9
! 0.95, & ! Sandy Clay - 10
! 0.95, & ! Silty Clay - 11
! 1.00, & ! Clay - 12
! 9.999 /) ! Other - 13
! dust_uthres = 0.065, 0.18, 0.27, 0.30, 0.35, 0.38, 0.35, 0.41, 0.41,
! 0.45,0.50,0.45,9999.0

real(kind_phys), dimension(fengsha_maxstypes), parameter :: dust_uthres = &
(/ 0.065, & ! Sand - 1
0.18, & ! Loamy Sand - 2
Expand All @@ -76,12 +62,16 @@ module dust_data_mod
0.50, & ! Silty Clay - 11
0.45, & ! Clay - 12
9999.0 /) ! Other - 13
! -- FENGSHA uses precalculated drag partition from ASCAT. See: Prigent et al. (2012,2015)
integer, parameter :: dust_calcdrag = 1

real(kind_phys) :: dust_alpha = 2.2
! -- FENGSHA uses precalculated drag partition
integer, parameter :: dust_calcdrag = 1
! -- FENGSHA dust moisture parameterization 1:fecan - 2:shao
integer :: dust_moist_opt = 1

real(kind_phys) :: dust_alpha = 1.0
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
real(kind_phys) :: dust_gamma = 1.0

real(kind_phys) :: dust_moist_correction = 1.0
real(kind_phys) :: dust_drylimit_factor = 1.0

! -- sea salt parameters
integer, dimension(nsalt), parameter :: spoint = (/ 1, 2, 2, 2, 2, 2, 3, 3, 3 /) ! 1 Clay, 2 Silt, 3 Sand
Expand All @@ -93,7 +83,7 @@ module dust_data_mod
(/ 1., 0.2, 0.2, 0.2, 0.2, 0.2, 0.333, 0.333, 0.333 /)


! -- soil vagatation parameters
! -- soil vegatation parameters
integer, parameter :: max_soiltyp = 30
real(kind_phys), dimension(max_soiltyp), parameter :: &
maxsmc = (/ 0.421, 0.464, 0.468, 0.434, 0.406, 0.465, &
Expand Down
Loading
Loading