From 519515024d756524c17da35972999029b2f0bf4d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 1 Apr 2020 14:33:22 -0600 Subject: [PATCH 01/10] Merge branch 'man_hafs_sas_without_updates_of_dtc_develop_49b73a8f4149ca88f071dbaae81f1769b120f1e0' into HEAD --- ccpp/physics | 2 +- gfsphysics/GFS_layer/GFS_typedefs.F90 | 18 ++++++++++++++++++ gfsphysics/GFS_layer/GFS_typedefs.meta | 12 ++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index efb68b5b9..bccf301e1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit efb68b5b948937f256a1a90c2de446b0d9b09e0f +Subproject commit bccf301e158c346b051b3d6a9bd392a71d07df25 diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 00bae3897..312e58e27 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -813,6 +813,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 @@ -826,6 +827,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) @@ -2926,6 +2928,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 @@ -3143,6 +3147,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, & @@ -3491,6 +3496,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 .ne. 2) then + write(*,*) 'Logic error: hwrf_samfdeep has to be used along with imfdeepcnv=2' + stop + end if + if (hwrf_samfshal .and. imfshalcnv .ne. 2) then + write(*,*) 'Logic error: hwrf_samfshal has to be used along with 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.' diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta index bc2344250..1849e1ae6 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -2968,6 +2968,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 From a727ae0c40cf580dd42b90d8609c832b32e918a0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 1 Apr 2020 14:36:23 -0600 Subject: [PATCH 02/10] Update .gitmodules for code review and testing --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index d253f6966..d956ead58 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,7 @@ 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 \ No newline at end of file diff --git a/ccpp/physics b/ccpp/physics index bccf301e1..71eace19a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit bccf301e158c346b051b3d6a9bd392a71d07df25 +Subproject commit 71eace19a5f42b60f64816575c425d34624c6018 From 82a00343b048cbe72446603c94d04abacafb95d4 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 6 Apr 2020 17:07:47 -0600 Subject: [PATCH 03/10] gfsphysics/physics/GFS_debug.F90: add capability to debug 1-d logical arrays --- ccpp/physics | 2 +- gfsphysics/physics/GFS_debug.F90 | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 71eace19a..b61ea19fb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 71eace19a5f42b60f64816575c425d34624c6018 +Subproject commit b61ea19fb484acc6bba891b8a12ef430cba8cdb2 diff --git a/gfsphysics/physics/GFS_debug.F90 b/gfsphysics/physics/GFS_debug.F90 index c0b24ca97..bb50e321c 100644 --- a/gfsphysics/physics/GFS_debug.F90 +++ b/gfsphysics/physics/GFS_debug.F90 @@ -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 @@ -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) @@ -549,6 +551,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) +#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 From 4fff6678ce80ee8d51f545a32ee20b47c85a161d Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Mon, 13 Apr 2020 13:32:44 +0000 Subject: [PATCH 04/10] Update .gitmodules (atmos_cubed_sphere) --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d253f6966..d895540a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [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/DusanJovic-NOAA/GFDL_atmos_cubed_sphere + branch = butterfly_effect [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework From 6606e415076117447a4b5f6275a727c16264ec55 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Mon, 13 Apr 2020 18:35:17 +0000 Subject: [PATCH 05/10] Update atmos_cubed_sphere submodule --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 80ce8ce20..0a7cdd7c9 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 80ce8ce200f90985097860c4eb47da1574b87c58 +Subproject commit 0a7cdd7c91842a6d4851c57f9b94659763dbc37c From b930d2dd7ea899a00dde31f6d85a251ae2409bf8 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Wed, 15 Apr 2020 14:28:06 +0000 Subject: [PATCH 06/10] Update atmos_cubed_sphere submodule --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 0a7cdd7c9..a59520b14 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 0a7cdd7c91842a6d4851c57f9b94659763dbc37c +Subproject commit a59520b147203446df4e111c926e0f1e439d4c31 From 788110c3ccce3f4a6ecddb3263e6fed560bbf497 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 09:52:30 -0600 Subject: [PATCH 07/10] Clean up error messages in gfsphysics/GFS_layer/GFS_typedefs.F90 --- ccpp/physics | 2 +- gfsphysics/GFS_layer/GFS_typedefs.F90 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index ba106f702..42aa6e41c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ba106f70277426dac36094da8566435098b54422 +Subproject commit 42aa6e41c56637dbf8b2156ca8cbc8cf335117e2 diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index bc5ab1009..df37e2562 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -3677,12 +3677,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shoc_cld = shoc_cld #ifdef CCPP !HWRF physics suite - if (hwrf_samfdeep .and. imfdeepcnv .ne. 2) then - write(*,*) 'Logic error: hwrf_samfdeep has to be used along with imfdeepcnv=2' + if (hwrf_samfdeep .and. imfdeepcnv/=2) then + write(*,*) 'Logic error: hwrf_samfdeep requires imfdeepcnv=2' stop end if - if (hwrf_samfshal .and. imfshalcnv .ne. 2) then - write(*,*) 'Logic error: hwrf_samfshal has to be used along with imfshalcnv=2' + if (hwrf_samfshal .and. imfshalcnv/=2) then + write(*,*) 'Logic error: hwrf_samfshal requires imfshalcnv=2' stop end if Model%hwrf_samfdeep = hwrf_samfdeep From 2b4bab6f5824a6145884a6bfd7c729792215982f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 14:07:58 -0600 Subject: [PATCH 08/10] Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere after merging the butterfly effect changes --- .gitmodules | 6 ++++-- atmos_cubed_sphere | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index d956ead58..c3411ec24 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,9 @@ [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 diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 15c615f80..f26bd6423 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 15c615f80e745848d0af50a47174e7c6dc851236 +Subproject commit f26bd6423e6918a789602b584bb11e353250868d From 07e1941692e7c47fa63c2b412d9568648e367545 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 3 Jun 2020 16:39:33 -0600 Subject: [PATCH 09/10] Update submodule pointer for ccpp-physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 42aa6e41c..4fcdf2fd0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 42aa6e41c56637dbf8b2156ca8cbc8cf335117e2 +Subproject commit 4fcdf2fd07e36f5a80620502fa9200cb7f1ca02e From 2b7c767aa7a00fffe19d23b21fd25f6eba346e90 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 5 Jun 2020 11:25:16 -0600 Subject: [PATCH 10/10] Revert change to .gitmodules and update submodule pointers for ccpp-physics and GFDL_atmos_cubed_sphere --- .gitmodules | 12 ++++-------- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index c3411ec24..d253f6966 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,16 +1,12 @@ [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/climbfuji/GFDL_atmos_cubed_sphere - branch = butterfly_effect_from_dusan + url = https://github.com/NOAA-EMC/GFDL_atmos_cubed_sphere + branch = dev/emc [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/climbfuji/ccpp-physics - branch = man_hafs_sas_for_master \ No newline at end of file + url = https://github.com/NCAR/ccpp-physics + branch = master diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index f26bd6423..66c8df235 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit f26bd6423e6918a789602b584bb11e353250868d +Subproject commit 66c8df23500bde286907a26cb3feab987dd2dba5 diff --git a/ccpp/physics b/ccpp/physics index 4fcdf2fd0..6a6dd2c7b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4fcdf2fd07e36f5a80620502fa9200cb7f1ca02e +Subproject commit 6a6dd2c7beaeb8d5dd848341d4becf52f05fe0e2