Skip to content

Commit

Permalink
Merge pull request NCAR#99 from climbfuji/gsl_develop_hannah_and_joe_…
Browse files Browse the repository at this point in the history
…changes_combined_20210712

Wrapper PR for NCAR#97 (Update of GF aerosol treatment and tunings) and NCAR#98 (Updates to MYNN-EDMF)
  • Loading branch information
DomHeinzeller authored Jul 19, 2021
2 parents 40ad71e + 8825827 commit 9edfe02
Show file tree
Hide file tree
Showing 11 changed files with 2,265 additions and 1,140 deletions.
5 changes: 5 additions & 0 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,11 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%in_nm' , Tbd%in_nm)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ccn_nm' , Tbd%ccn_nm)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%aer_nm' , Tbd%aer_nm)
if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%cactiv' , Tbd%cactiv)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%cactiv_m' , Tbd%cactiv_m)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%aod_gf' , Tbd%aod_gf)
end if
! Diag
!call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%fluxr ', Diag%fluxr)
!do n=1,size(Diag%fluxr(1,:))
Expand Down
185 changes: 112 additions & 73 deletions physics/cu_gf_deep.F90

Large diffs are not rendered by default.

169 changes: 110 additions & 59 deletions physics/cu_gf_driver.F90

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions physics/cu_gf_driver.meta
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,22 @@
kind = kind_phys
intent = in
optional = F
[flag_init]
standard_name = flag_for_first_time_step
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[cactiv]
standard_name = conv_activity_counter
long_name = convective activity memory
Expand All @@ -127,6 +143,14 @@
type = integer
intent = inout
optional = F
[cactiv_m]
standard_name = mid_conv_activity_counter
long_name = mid-level cloud convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = inout
optional = F
[forcet]
standard_name = temperature_tendency_due_to_dynamics
long_name = temperature tendency due to dynamics only
Expand Down Expand Up @@ -303,6 +327,15 @@
kind = kind_phys
intent = in
optional = F
[aod_gf]
standard_name = aod_gf_deep
long_name = aerosol optical depth used in Grell-Freitas Convective Parameterization
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
optional = F
[cliw]
standard_name = ice_water_mixing_ratio_convective_transport_tracer
long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array
Expand Down
9 changes: 8 additions & 1 deletion physics/cu_gf_driver_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ end subroutine cu_gf_driver_post_finalize
!> \section arg_table_cu_gf_driver_post_run Argument Table
!! \htmlinclude cu_gf_driver_post_run.html
!!
subroutine cu_gf_driver_post_run (im, t, q, prevst, prevsq, cactiv, conv_act, errmsg, errflg)
subroutine cu_gf_driver_post_run (im, t, q, prevst, prevsq, cactiv, cactiv_m, conv_act, conv_act_m, errmsg, errflg)

use machine, only: kind_phys

Expand All @@ -33,7 +33,9 @@ subroutine cu_gf_driver_post_run (im, t, q, prevst, prevsq, cactiv, conv_act, er
real(kind_phys), intent(out) :: prevst(:,:)
real(kind_phys), intent(out) :: prevsq(:,:)
integer, intent(in) :: cactiv(:)
integer, intent(in) :: cactiv_m(:)
real(kind_phys), intent(out) :: conv_act(:)
real(kind_phys), intent(out) :: conv_act_m(:)
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand All @@ -53,6 +55,11 @@ subroutine cu_gf_driver_post_run (im, t, q, prevst, prevsq, cactiv, conv_act, er
else
conv_act(i)=0.0
endif
if (cactiv_m(i).gt.0) then
conv_act_m(i) = conv_act_m(i)+1.0
else
conv_act_m(i)=0.0
endif
enddo

end subroutine cu_gf_driver_post_run
Expand Down
17 changes: 17 additions & 0 deletions physics/cu_gf_driver_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
type = integer
intent = in
optional = F
[cactiv_m]
standard_name = mid_conv_activity_counter
long_name = midlevel convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = F
[conv_act]
standard_name = gf_memory_counter
long_name = Memory counter for GF
Expand All @@ -68,6 +76,15 @@
kind = kind_phys
intent = out
optional = F
[conv_act_m]
standard_name = gf_mid_memory_counter
long_name = Memory counter for GF midlevel
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
6 changes: 5 additions & 1 deletion physics/cu_gf_driver_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ end subroutine cu_gf_driver_pre_finalize
!! \htmlinclude cu_gf_driver_pre_run.html
!!
subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q, prevst, prevsq, &
forcet, forceq, cactiv, conv_act, errmsg, errflg)
forcet, forceq, cactiv, cactiv_m, conv_act, conv_act_m, &
errmsg, errflg)

use machine, only: kind_phys

Expand All @@ -39,7 +40,9 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q,
real(kind_phys), intent(out) :: forcet(:,:)
real(kind_phys), intent(out) :: forceq(:,:)
integer, intent(out) :: cactiv(:)
integer, intent(out) :: cactiv_m(:)
real(kind_phys), intent(in) :: conv_act(:)
real(kind_phys), intent(in) :: conv_act_m(:)
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand Down Expand Up @@ -68,6 +71,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q,
endif

cactiv(:)=nint(conv_act(:))
cactiv_m(:)=nint(conv_act_m(:))

end subroutine cu_gf_driver_pre_run

Expand Down
17 changes: 17 additions & 0 deletions physics/cu_gf_driver_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@
type = integer
intent = out
optional = F
[cactiv_m]
standard_name = mid_conv_activity_counter
long_name = midlevel convective activity memory
units = none
dimensions = (horizontal_loop_extent)
type = integer
intent = out
optional = F
[conv_act]
standard_name = gf_memory_counter
long_name = Memory counter for GF
Expand All @@ -120,6 +128,15 @@
kind = kind_phys
intent = in
optional = F
[conv_act_m]
standard_name = gf_mid_memory_counter
long_name = Memory counter for GF midlevel
units = none
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
19 changes: 7 additions & 12 deletions physics/module_MYNNPBL_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

!>\ingroup gsd_mynn_edmf
!> The following references best describe the code within
!! Olson et al. (2018, NOAA Technical Memorandum)
!! Olson et al. (2019, NOAA Technical Memorandum)
!! Nakanishi and Niino (2009 ) \cite NAKANISHI_2009
MODULE mynnedmf_wrapper

Expand Down Expand Up @@ -101,7 +101,7 @@ SUBROUTINE mynnedmf_wrapper_run( &
& grav_settling, bl_mynn_tkebudget, bl_mynn_tkeadvect, &
& bl_mynn_cloudpdf, bl_mynn_mixlength, &
& bl_mynn_edmf, bl_mynn_edmf_mom, bl_mynn_edmf_tke, &
& bl_mynn_edmf_part, bl_mynn_cloudmix, bl_mynn_mixqt,&
& bl_mynn_cloudmix, bl_mynn_mixqt, &
& bl_mynn_output, &
& icloud_bl, do_mynnsfclay, &
& imp_physics, imp_physics_gfdl, &
Expand Down Expand Up @@ -212,7 +212,6 @@ SUBROUTINE mynnedmf_wrapper_run( &
& bl_mynn_edmf, &
& bl_mynn_edmf_mom, &
& bl_mynn_edmf_tke, &
& bl_mynn_edmf_part, &
& bl_mynn_cloudmix, &
& bl_mynn_mixqt, &
& bl_mynn_tkebudget, &
Expand All @@ -231,8 +230,9 @@ SUBROUTINE mynnedmf_wrapper_run( &
!MISC CONFIGURATION OPTIONS
INTEGER, PARAMETER :: &
& spp_pbl=0, &
& bl_mynn_mixscalars=1, &
& levflag=2
& bl_mynn_mixscalars=1
REAL, PARAMETER :: &
& closure=2.5 !2.5, 2.6 or 3.0
LOGICAL :: &
& FLAG_QI, FLAG_QNI, FLAG_QC, FLAG_QNC, &
& FLAG_QNWFA, FLAG_QNIFA
Expand Down Expand Up @@ -565,11 +565,6 @@ SUBROUTINE mynnedmf_wrapper_run( &
else
rmol(i)=ABS(rb(i))*1./(dz(i,1)*0.5)
endif
!if (rb(i) .ge. 0.)then
! rmol(i)=rb(i)*8./(dz(i,1)*0.5)
!else
! rmol(i)=MAX(rb(i)*5.,-10.)/(dz(i,1)*0.5)
!endif
endif
ts(i)=tsurf(i)/exner(i,1) !theta
! qsfc(i)=qss(i)
Expand Down Expand Up @@ -622,7 +617,7 @@ SUBROUTINE mynnedmf_wrapper_run( &
print*,"bl_mynn_tkebudget=",bl_mynn_tkebudget," bl_mynn_tkeadvect=",bl_mynn_tkeadvect
print*,"bl_mynn_cloudpdf=",bl_mynn_cloudpdf," bl_mynn_mixlength=",bl_mynn_mixlength
print*,"bl_mynn_edmf=",bl_mynn_edmf," bl_mynn_edmf_mom=",bl_mynn_edmf_mom
print*,"bl_mynn_edmf_tke=",bl_mynn_edmf_tke," bl_mynn_edmf_part=",bl_mynn_edmf_part
print*,"bl_mynn_edmf_tke=",bl_mynn_edmf_tke
print*,"bl_mynn_cloudmix=",bl_mynn_cloudmix," bl_mynn_mixqt=",bl_mynn_mixqt
print*,"icloud_bl=",icloud_bl
print*,"T:",t3d(1,1),t3d(1,2),t3d(1,levs)
Expand Down Expand Up @@ -691,7 +686,7 @@ SUBROUTINE mynnedmf_wrapper_run( &
& ,bl_mynn_mixlength=bl_mynn_mixlength & !input parameter
& ,icloud_bl=icloud_bl & !input parameter
& ,qc_bl=qc_bl,qi_bl=qi_bl,cldfra_bl=cldfra_bl & !output
& ,levflag=levflag,bl_mynn_edmf=bl_mynn_edmf & !input parameter
& ,closure=closure,bl_mynn_edmf=bl_mynn_edmf & !input parameter
& ,bl_mynn_edmf_mom=bl_mynn_edmf_mom & !input parameter
& ,bl_mynn_edmf_tke=bl_mynn_edmf_tke & !input parameter
& ,bl_mynn_mixscalars=bl_mynn_mixscalars & !input parameter
Expand Down
8 changes: 0 additions & 8 deletions physics/module_MYNNPBL_wrapper.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1231,14 +1231,6 @@
type = integer
intent = in
optional = F
[bl_mynn_edmf_part]
standard_name = edmf_partition_flag
long_name = flag to partitioning of the MF and ED areas
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[bl_mynn_cloudmix]
standard_name = cloud_specie_mix_flag
long_name = flag to activate mixing of cloud species
Expand Down
Loading

0 comments on commit 9edfe02

Please sign in to comment.