From 90fcb0d1a1fd24c89fb59f92f85ba083af7eab8c Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Tue, 17 Sep 2024 00:05:08 +0000 Subject: [PATCH 1/6] add namelist parameter sigmab_coldstart --- .gitmodules | 6 ++++-- ccpp/data/GFS_typedefs.F90 | 5 +++++ ccpp/data/GFS_typedefs.meta | 6 ++++++ ccpp/physics | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 75876f6fa..533a68353 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,8 +8,10 @@ branch = production/RRFS.v1 [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics - branch = production/RRFS.v1 +# url = https://github.com/ufs-community/ccpp-physics +# branch = production/RRFS.v1 + url = https://github.com/JiliDong-NOAA/ccpp-physics + branch = sigmab_fix [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index a20fb88a3..3124ce257 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1231,6 +1231,7 @@ module GFS_typedefs real(kind=kind_phys) :: betascu !< Tuning parameter for prog. closure shallow clouds real(kind=kind_phys) :: betamcu !< Tuning parameter for prog. closure midlevel clouds real(kind=kind_phys) :: betadcu !< Tuning parameter for prog. closure deep clouds + logical :: sigmab_coldstart !< flag to cold start sigmab !--- MYNN parameters/switches logical :: do_mynnedmf @@ -4036,6 +4037,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: betascu = 8.0 !< Tuning parameter for prog. closure shallow clouds real(kind=kind_phys) :: betamcu = 1.0 !< Tuning parameter for prog. closure midlevel clouds real(kind=kind_phys) :: betadcu = 2.0 !< Tuning parameter for prog. closure deep clouds + logical :: sigmab_coldstart = .false. !< flag to cold start sigmab ! *DH logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme @@ -4367,6 +4369,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & do_myjsfc, do_myjpbl, & hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, & betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,& + sigmab_coldstart, & shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, & random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, & conv_cf_opt, do_deep, jcap, & @@ -5176,6 +5179,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%betascu = betascu Model%betamcu = betamcu Model%betadcu = betadcu + Model%sigmab_coldstart = sigmab_coldstart 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.' @@ -7202,6 +7206,7 @@ subroutine control_print(Model) print *, 'betascu : ', Model%betascu print *, 'betamcu : ', Model%betamcu print *, 'betadcu : ', Model%betadcu + print *, 'sigmab_coldstart : ', Model%sigmab_coldstart print *, ' ' print *, 'cellular automata' print *, ' nca : ', Model%nca diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index ab5a79291..270d8e660 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -5566,6 +5566,12 @@ dimensions = () type = real kind = kind_phys +[sigmab_coldstart] + standard_name = flag_to_cold_start_for_sigmab_init + long_name = flag to cold start for sigmab initialization + 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 diff --git a/ccpp/physics b/ccpp/physics index cfe8a0ce6..8302de4af 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit cfe8a0ce6b6b44396d5f578f8c10e8428c9ce3a5 +Subproject commit 8302de4afc9b693974d26d98f6d15cbcda65e93a From 225dad6e152fdc95d3515f9b80ac306ba8c92ec3 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Fri, 11 Oct 2024 00:15:45 +0000 Subject: [PATCH 2/6] fix for inline post when using RUC LSM --- io/post_fv3.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 97962bdd9..1e803c762 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -1589,6 +1589,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) sllevel(7) = 1.0 sllevel(8) = 1.6 sllevel(9) = 3.0 + iSF_SURFACE_PHYSICS = 3 endif ! liquid volumetric soil mpisture in fraction From 5a4180e484972518fc4ca2386f0de9b388d1d3c7 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Fri, 18 Oct 2024 20:57:59 +0000 Subject: [PATCH 3/6] pass landsfcmdl to iSF_SURFACE_PHYSICS in post_fv3 --- io/module_write_internal_state.F90 | 1 + io/post_fv3.F90 | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/io/module_write_internal_state.F90 b/io/module_write_internal_state.F90 index 51c422227..6d0602a5f 100644 --- a/io/module_write_internal_state.F90 +++ b/io/module_write_internal_state.F90 @@ -98,6 +98,7 @@ module write_internal_state integer :: ncld !< Number of hydrometeors. integer :: nsoil !< Number of soil layers. integer :: imp_physics !< Choice of microphysics scheme. + integer :: landsfcmdl !< Choice of land surface model integer :: dtp !< Physics timestep. real,dimension(:),allocatable :: ak !< a parameter for sigma pressure level calculations. real,dimension(:),allocatable :: bk !< b parameter for sigma pressure level calculations. diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 1e803c762..62aa29b01 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -430,6 +430,7 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id) if (trim(attName) == 'nsoil') wrt_int_state%nsoil=varival if (trim(attName) == 'fhzero') wrt_int_state%fhzero=varival if (trim(attName) == 'imp_physics') wrt_int_state%imp_physics=varival + if (trim(attName) == 'landsfcmdl') wrt_int_state%landsfcmdl=varival endif else if (typekind==ESMF_TYPEKIND_R4) then if(n==1) then @@ -592,6 +593,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! integer i, ip1, j, l, k, n, iret, ibdl, rc, kstart, kend integer i1,i2,j1,j2,k1,k2 + integer landsfcmdl integer fieldDimCount,gridDimCount,ncount_field,bundle_grid_id integer jdate(8) logical foundland, foundice, found, mvispresent @@ -624,7 +626,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! imp_physics = wrt_int_state%imp_physics !set GFS mp physics to 99 for Zhao scheme dtp = wrt_int_state%dtp - iSF_SURFACE_PHYSICS = 2 + iSF_SURFACE_PHYSICS = wrt_int_state%landsfcmdl spval = 9.99e20 ! ! nems gfs has zhour defined @@ -1589,7 +1591,6 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) sllevel(7) = 1.0 sllevel(8) = 1.6 sllevel(9) = 3.0 - iSF_SURFACE_PHYSICS = 3 endif ! liquid volumetric soil mpisture in fraction From 310cf37ca54315f0a1c7575ddeec9c996883c763 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Thu, 24 Oct 2024 14:09:31 +0000 Subject: [PATCH 4/6] update ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 8302de4af..b2d503256 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 8302de4afc9b693974d26d98f6d15cbcda65e93a +Subproject commit b2d503256ababff56b0ba1b03bb7ee4e8c5ccf83 From 77603a6fa28e548e778258b3e8a1040e3643c0f7 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Sat, 2 Nov 2024 01:02:07 +0000 Subject: [PATCH 5/6] remove redundant declaration --- io/post_fv3.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 62aa29b01..8296b7517 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -593,7 +593,6 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! integer i, ip1, j, l, k, n, iret, ibdl, rc, kstart, kend integer i1,i2,j1,j2,k1,k2 - integer landsfcmdl integer fieldDimCount,gridDimCount,ncount_field,bundle_grid_id integer jdate(8) logical foundland, foundice, found, mvispresent From 89b620e0b4c3d30175afb1a099b6a28370568cc2 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Wed, 13 Nov 2024 19:50:02 +0000 Subject: [PATCH 6/6] another bug fix for LSM soil output with inline post --- io/fv3atm_history_io.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/fv3atm_history_io.F90 b/io/fv3atm_history_io.F90 index 7c73fe296..faeac2a8f 100644 --- a/io/fv3atm_history_io.F90 +++ b/io/fv3atm_history_io.F90 @@ -186,7 +186,7 @@ subroutine history_type_register(hist, Diag, Time, Atm_block, Model, xlon, xlat, hist%fhzero = nint(Model%fhzero) ! hist%ncld = Model%ncld hist%ncld = Model%imp_physics - hist%nsoil = Model%lsoil + hist%nsoil = Model%lsoil_lsm hist%dtp = Model%dtp hist%imp_physics = Model%imp_physics hist%landsfcmdl = Model%lsm