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

develop: merge HWRF version of saSAS with GFS version #93

Merged
merged 14 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from 13 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
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[submodule "atmos_cubed_sphere"]
path = atmos_cubed_sphere
url = https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere
branch = dev/emc
#url = https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere
#branch = dev/emc
url = https://github.com/climbfuji/GFDL_atmos_cubed_sphere
branch = butterfly_effect_from_dusan
[submodule "ccpp/framework"]
path = ccpp/framework
url = https://github.com/NCAR/ccpp-framework
branch = master
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = master
#url = https://github.com/NCAR/ccpp-physics
#branch = master
url = https://github.com/climbfuji/ccpp-physics
branch = man_hafs_sas_for_master
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
2 changes: 1 addition & 1 deletion ccpp/physics
18 changes: 18 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ module GFS_typedefs
integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme
integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD)
integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS)
logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF)
#endif
integer :: imfdeepcnv !< flag for mass-flux deep convection scheme
!< 1: July 2010 version of SAS conv scheme
Expand All @@ -854,6 +855,7 @@ module GFS_typedefs
integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme
integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD)
integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS)
logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF)
#endif
integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme
!< 0: initial version of satmedmf (Nov. 2018)
Expand Down Expand Up @@ -3060,6 +3062,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!< 1: updated version of satmedmf (as of May 2019)
logical :: do_deep = .true. !< whether to do deep convection
#ifdef CCPP
logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme
logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme
logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF
logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme
! DH* TODO - move to MYNN namelist section
Expand Down Expand Up @@ -3295,6 +3299,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
bl_mynn_mixqt, icloud_bl, bl_mynn_tkeadvect, gwd_opt, &
! *DH
do_myjsfc, do_myjpbl, &
hwrf_samfdeep, hwrf_samfshal, &
#endif
h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, &
shinhong, do_ysu, dspheat, lheatstrg, cnvcld, &
Expand Down Expand Up @@ -3670,6 +3675,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%shoc_parm = shoc_parm
Model%shocaftcnv = shocaftcnv
Model%shoc_cld = shoc_cld
#ifdef CCPP
!HWRF physics suite
if (hwrf_samfdeep .and. imfdeepcnv/=2) then
write(*,*) 'Logic error: hwrf_samfdeep requires imfdeepcnv=2'
stop
end if
if (hwrf_samfshal .and. imfshalcnv/=2) then
write(*,*) 'Logic error: hwrf_samfshal requires imfshalcnv=2'
stop
end if
Model%hwrf_samfdeep = hwrf_samfdeep
Model%hwrf_samfshal = hwrf_samfshal
#endif
#ifdef CCPP
if (oz_phys .and. oz_phys_2015) then
write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.'
Expand Down
12 changes: 12 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3097,6 +3097,18 @@
units = flag
dimensions = ()
type = integer
[hwrf_samfdeep]
standard_name = flag_for_hwrf_samfdeepcnv_scheme
long_name = flag for hwrf samfdeepcnv scheme
units = flag
dimensions = ()
type = logical
[hwrf_samfshal]
standard_name = flag_for_hwrf_samfshalcnv_scheme
long_name = flag for hwrf samfshalcnv scheme
units = flag
dimensions = ()
type = logical
[isatmedmf]
standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL
long_name = choice of scale-aware TKE moist EDMF PBL scheme
Expand Down
26 changes: 26 additions & 0 deletions gfsphysics/physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module GFS_diagtoscreen

interface print_var
module procedure print_logic_0d
module procedure print_logic_1d
module procedure print_int_0d
module procedure print_int_1d
module procedure print_real_0d
Expand Down Expand Up @@ -106,6 +107,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
do impi=0,mpisize-1
do iomp=0,ompsize-1
if (mpirank==impi .and. omprank==iomp) then
call print_var(mpirank,omprank, blkno, 'Model%kdt' , Model%kdt)
! Sfcprop
call print_var(mpirank,omprank, blkno, 'Sfcprop%slmsk' , Sfcprop%slmsk)
call print_var(mpirank,omprank, blkno, 'Sfcprop%oceanfrac', Sfcprop%oceanfrac)
Expand Down Expand Up @@ -544,6 +546,30 @@ subroutine print_int_0d(mpirank,omprank,blkno,name,var)

end subroutine print_int_0d

subroutine print_logic_1d(mpirank,omprank,blkno,name,var)

use machine, only: kind_phys

implicit none

integer, intent(in) :: mpirank, omprank, blkno
character(len=*), intent(in) :: name
logical, intent(in) :: var(:)

integer :: i

#ifdef PRINT_SUM
write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var)
#elif defined(PRINT_CHKSUM)
write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var)
DusanJovic-NOAA marked this conversation as resolved.
Show resolved Hide resolved
#else
do i=ISTART,min(IEND,size(var(:)))
write(0,'(2a,3i6,i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, var(i)
end do
#endif

end subroutine print_logic_1d

subroutine print_int_1d(mpirank,omprank,blkno,name,var)

use machine, only: kind_phys
Expand Down