From dcc23e85789a28aadb108ec738ab61afc75a7827 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 10 Jul 2020 20:19:54 +0000 Subject: [PATCH 1/8] This is EMC flake model --- ccpp/config/ccpp_prebuild_config.py | 2 + ccpp/suites/suite_FV3_GFS_v16beta_flake.xml | 94 +++++++++++++++++++++ gfsphysics/GFS_layer/GFS_typedefs.F90 | 23 +++++ gfsphysics/GFS_layer/GFS_typedefs.meta | 13 +++ io/FV3GFS_io.F90 | 8 ++ 5 files changed, 140 insertions(+) create mode 100644 ccpp/suites/suite_FV3_GFS_v16beta_flake.xml diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index cb9a0ade4..a1aa5cd16 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -162,6 +162,7 @@ 'FV3/ccpp/physics/physics/sfcsub.F', 'FV3/ccpp/physics/physics/sflx.f', 'FV3/ccpp/physics/physics/set_soilveg.f', + 'FV3/ccpp/physics/physics/flake.F90', 'FV3/ccpp/physics/physics/surface_perturbation.F90', 'FV3/ccpp/physics/physics/cu_gf_deep.F90', 'FV3/ccpp/physics/physics/cu_gf_sh.F90', @@ -289,6 +290,7 @@ 'FV3/ccpp/physics/physics/sfc_diff.f', 'FV3/ccpp/physics/physics/sfc_drv.f', 'FV3/ccpp/physics/physics/sfc_noahmp_drv.f', + 'FV3/ccpp/physics/physics/flake_driver.F90', 'FV3/ccpp/physics/physics/sfc_nst.f', 'FV3/ccpp/physics/physics/sfc_ocean.F', 'FV3/ccpp/physics/physics/sfc_sice.f', diff --git a/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml b/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml new file mode 100644 index 000000000..7929fcd61 --- /dev/null +++ b/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml @@ -0,0 +1,94 @@ + + + + + + + fv_sat_adj + + + + + GFS_time_vary_pre + GFS_rrtmg_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmg_pre + rrtmg_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + flake_driver + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + + + GFS_stochastics + + + + diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 967a4cc64..fa51a7e25 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -235,6 +235,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: oceanfrac(:) => null() !< ocean fraction [0:1] real (kind=kind_phys), pointer :: landfrac(:) => null() !< land fraction [0:1] real (kind=kind_phys), pointer :: lakefrac(:) => null() !< lake fraction [0:1] + real (kind=kind_phys), pointer :: lakedepth(:) => null() !< lake depth [ m ] real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface air temperature in K !< [tsea in gbphys.f] real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K @@ -803,6 +804,9 @@ module GFS_typedefs logical :: use_ufo !< flag for gcycle surface option +!--- flake model parameters + integer :: lkm !< flag for flake model + !--- tuning parameters for physical parameterizations logical :: ras !< flag for ras convection scheme logical :: flipv !< flag for vertical direction flip (ras) @@ -2208,6 +2212,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%oceanfrac(IM)) allocate (Sfcprop%landfrac (IM)) allocate (Sfcprop%lakefrac (IM)) + allocate (Sfcprop%lakedepth(IM)) allocate (Sfcprop%tsfc (IM)) allocate (Sfcprop%tsfco (IM)) allocate (Sfcprop%tsfcl (IM)) @@ -2225,6 +2230,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%oceanfrac = clear_val Sfcprop%landfrac = clear_val Sfcprop%lakefrac = clear_val + Sfcprop%lakedepth = clear_val Sfcprop%tsfc = clear_val Sfcprop%tsfco = clear_val Sfcprop%tsfcl = clear_val @@ -3059,6 +3065,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: use_ufo = .false. !< flag for gcycle surface option +!--- flake model parameters + integer :: lkm = 1 !< flag for flake model + !--- tuning parameters for physical parameterizations logical :: ras = .false. !< flag for ras convection scheme logical :: flipv = .true. !< flag for vertical direction flip (ras) @@ -3352,6 +3361,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & + + !--- lake model control + lkm, & + !--- physical parameterizations ras, trans_trac, old_monin, cnvgwd, mstrat, moist_adj, & cscnv, cal_pre, do_aw, do_shoc, shocaftcnv, shoc_cld, & @@ -3796,6 +3809,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%isot = isot Model%use_ufo = use_ufo +!--- flake model parameters + Model%lkm = lkm + ! Noah MP options from namelist ! Model%iopt_dveg = iopt_dveg @@ -4336,6 +4352,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' ignore_lake=',ignore_lake print *,' min_lakeice=',Model%min_lakeice,' min_seaice=',Model%min_seaice, & 'min_lake_height=',Model%min_lake_height + + print *, 'flake model parameters' + print *, 'lkm : ', Model%lkm + if (Model%nstf_name(1) > 0 ) then print *,' NSSTM is active ' print *,' nstf_name(1)=',Model%nstf_name(1) @@ -4920,6 +4940,9 @@ subroutine control_print(Model) print *, ' use_ufo : ', Model%use_ufo print *, ' ' + print *, 'flake model parameters' + print *, 'lkm : ', Model%lkm + print *, ' ' print *, 'tuning parameters for physical parameterizations' print *, ' ras : ', Model%ras if (Model%ras) then diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta index 337b3fce8..55d074279 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -470,6 +470,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[lakedepth] + standard_name = lake_depth + long_name = lake depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tsfc] standard_name = surface_skin_temperature long_name = surface skin temperature @@ -2975,6 +2982,12 @@ units = index dimensions = () type = integer +[lkm] + standard_name = flag_for_lake_surface_scheme + long_name = flag for lake surface model + units = flag + dimensions = () + type = integer [ras] standard_name = flag_for_ras_deep_convection long_name = flag for ras convection scheme diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 4b2738b23..9eda6c089 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -640,6 +640,14 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) Sfcprop(nb)%oro_uf(ix) = oro_var2(i,j,16) Sfcprop(nb)%landfrac(ix) = oro_var2(i,j,17) !land frac [0:1] Sfcprop(nb)%lakefrac(ix) = oro_var2(i,j,18) !lake frac [0:1] + + Sfcprop(nb)%lakedepth(ix) = oro_var2(i,j,19) !lake depth [m] !YWu + + if(Model%lkm.ne.1) then !to avoid program crash when flake not called + Sfcprop(nb)%lakefrac(ix) = 0.0 + Sfcprop(nb)%lakedepth(ix) = 0.0 + endif + enddo enddo From 0486ff91e4d85f79fbce9a86b81319fe835342b7 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Fri, 10 Jul 2020 21:02:48 +0000 Subject: [PATCH 2/8] Updated .gitmodules file under FV3 --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d253f6966..ab6e71ccf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = master + url = https://github.com/YihuaWu-NOAA/ccpp-physics + branch = flake From 3b50368919f6896c982eb8afd074477b8c5818d0 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Mon, 13 Jul 2020 18:14:32 +0000 Subject: [PATCH 3/8] Removed the reset of lake fraction and lake depth statements --- io/FV3GFS_io.F90 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 9eda6c089..b86cd0295 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -643,11 +643,6 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain) Sfcprop(nb)%lakedepth(ix) = oro_var2(i,j,19) !lake depth [m] !YWu - if(Model%lkm.ne.1) then !to avoid program crash when flake not called - Sfcprop(nb)%lakefrac(ix) = 0.0 - Sfcprop(nb)%lakedepth(ix) = 0.0 - endif - enddo enddo From 8470224c42b4e16a02ff831db98e94d08f7fa215 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Mon, 13 Jul 2020 21:50:45 +0000 Subject: [PATCH 4/8] point to ccpp physics branch flake --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 01c2257ab..1c64f9f7a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 01c2257ab1538b3e9a51fed5a5b10f4dda5bfddf +Subproject commit 1c64f9f7a9e8536bfc235b75c36449edaa396261 From ea18189547671060dc6e4fce3f4c87ad03f2e24e Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 16 Jul 2020 14:15:18 +0000 Subject: [PATCH 5/8] Reset lkm to 0 --- gfsphysics/GFS_layer/GFS_typedefs.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 77a5ec889..0af959b02 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -3063,7 +3063,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: use_ufo = .false. !< flag for gcycle surface option !--- flake model parameters - integer :: lkm = 1 !< flag for flake model + integer :: lkm = 0 !< flag for flake model !--- tuning parameters for physical parameterizations logical :: ras = .false. !< flag for ras convection scheme From eb2b6c54ffb5abc9eb385aabedfbad59f99bc0f6 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Thu, 16 Jul 2020 15:20:29 +0000 Subject: [PATCH 6/8] Swapped the order of calls in the suite file --- ccpp/physics | 2 +- ccpp/suites/suite_FV3_GFS_v16beta_flake.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index ccec758c0..e22848195 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ccec758c013a1a3b8afced2ba6c8bdf96b75c17d +Subproject commit e22848195f094f0741c0beb4883e688cc32990f0 diff --git a/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml b/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml index 7929fcd61..dec1a76a2 100644 --- a/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml +++ b/ccpp/suites/suite_FV3_GFS_v16beta_flake.xml @@ -69,9 +69,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre From 8a396fe5e9c1f4260008375d8d7eca53c9414264 Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Sat, 18 Jul 2020 20:49:13 +0000 Subject: [PATCH 7/8] update to the latest ccpp/physics branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index e22848195..33739998a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit e22848195f094f0741c0beb4883e688cc32990f0 +Subproject commit 33739998ab375e1c1d87dc37d9e7dc7aed126e68 From cdbe98a863a06546a9c56a59de96103c1ea6f6ca Mon Sep 17 00:00:00 2001 From: "Yihua.Wu" Date: Mon, 20 Jul 2020 14:11:23 +0000 Subject: [PATCH 8/8] Revert change to .gitmodules and update submodule pointer for ccpp-physics --- .gitmodules | 4 ++-- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index ab6e71ccf..d253f6966 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = master [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/YihuaWu-NOAA/ccpp-physics - branch = flake + url = https://github.com/NCAR/ccpp-physics + branch = master diff --git a/ccpp/physics b/ccpp/physics index 33739998a..82a73dddd 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 33739998ab375e1c1d87dc37d9e7dc7aed126e68 +Subproject commit 82a73dddd8789f268fd6f8020b5b303540d68d0d