From fc9a4c215b12061f22866c83bf251e1385644f1e Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Wed, 11 Mar 2020 15:15:18 -0400 Subject: [PATCH 1/5] fix omp error in dycore and atmos_model.F90 (#77) * fix omp error in dycore and atmos_model.F90 * Update atmos_cubed_sphere submodule --- atmos_cubed_sphere | 2 +- atmos_model.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index db3acfbec..371a29afb 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit db3acfbec2ca00d1795b72b7ebf0b1e308506ced +Subproject commit 371a29afbf813357dd93647cac0cbcd44db2ab20 diff --git a/atmos_model.F90 b/atmos_model.F90 index a0204da0a..987608232 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -1672,7 +1672,7 @@ subroutine assign_importdata(rc) if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex) .and. IPD_control%cplwav2atm) then -!$omp parallel do default(shared) private(i,j,nb,ix) +!$omp parallel do default(shared) private(i,j,nb,ix,tem) do j=jsc,jec do i=isc,iec nb = Atm_block%blkno(i,j) From 67c8b06418730d2672b68562dc111c0b48271822 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 12 Mar 2020 13:13:57 -0600 Subject: [PATCH 2/5] Add nsradar_reset to control resetting radar calculations for Thompson MP --- ccpp/physics | 2 +- gfsphysics/GFS_layer/GFS_typedefs.F90 | 28 ++++++++++++++++++++------ gfsphysics/GFS_layer/GFS_typedefs.meta | 6 ++++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index db57e1858..059548223 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit db57e185891cf0c8fe3793909ad9687359b30e97 +Subproject commit 059548223262c948f8a1c44ab658d3a283a53b27 diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index ea56d63a4..603089660 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -709,7 +709,8 @@ module GFS_typedefs !--- Thompson's microphysical parameters logical :: ltaerosol !< flag for aerosol version - logical :: lradar !< flag for radar reflectivity + logical :: lradar !< flag for radar reflectivity + real(kind=kind_phys) :: nsradar_reset !< seconds between resetting radar reflectivity calculation real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s !--- GFDL microphysical paramters @@ -1785,6 +1786,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_ocean(:) => null() !< + logical :: radar_reset => null() !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< real (kind=kind_phys), pointer :: raincd(:) => null() !< @@ -2781,11 +2783,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: evpco = 2.0d-5 !< [in] coeff for evaporation of largescale rain real(kind=kind_phys) :: wminco(2) = (/1.0d-5,1.0d-5/) !< [in] water and ice minimum threshold for Zhao !---Max hourly - real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly. + real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly !--- Ferrier-Aligo microphysical parameters #ifdef CCPP - real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only - logical :: spec_adv = .true. !< Individual cloud species advected + real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only + logical :: spec_adv = .true. !< Individual cloud species advected #endif !--- M-G microphysical parameters integer :: fprcp = 0 !< no prognostic rain and snow (MG) @@ -2823,6 +2825,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- Thompson microphysical parameters logical :: ltaerosol = .false. !< flag for aerosol version logical :: lradar = .false. !< flag for radar reflectivity + real(kind=kind_phys) :: nsradar_reset = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate !--- GFDL microphysical parameters @@ -3119,7 +3122,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & mg_do_graupel, mg_do_hail, mg_nccons, mg_nicons, mg_ngcons, & mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, & mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, & - ltaerosol, lradar, lrefres, ttendlim, lgfdlmprad, & + ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, & + lgfdlmprad, & !--- max hourly avg_max_length, & !--- land/surface model control @@ -3408,6 +3412,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- Thompson MP parameters Model%ltaerosol = ltaerosol Model%lradar = lradar + Model%nsradar_reset = nsradar_reset Model%ttendlim = ttendlim !--- F-A MP parameters #ifdef CCPP @@ -4201,7 +4206,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%me == Model%master) print *,' Using Thompson double moment', & ' microphysics',' ltaerosol = ',Model%ltaerosol, & ' ttendlim =',Model%ttendlim, & - ' lradar =',Model%lradar,Model%num_p3d,Model%num_p2d + ' lradar =',Model%lradar, & + ' nsradar_reset =',Model%nsradar_reset, & + ' num_p3d =',Model%num_p3d, & + ' num_p2d =',Model%num_p2d else if (Model%imp_physics == Model%imp_physics_mg) then ! Morrison-Gettelman Microphysics Model%npdf3d = 0 @@ -4473,6 +4481,7 @@ subroutine control_print(Model) print *, ' Thompson microphysical parameters' print *, ' ltaerosol : ', Model%ltaerosol print *, ' lradar : ', Model%lradar + print *, ' nsradar_reset : ', Model%nsradar_reset print *, ' lrefres : ', Model%lrefres print *, ' ttendlim : ', Model%ttendlim print *, ' ' @@ -6518,6 +6527,12 @@ subroutine interstitial_phys_reset (Interstitial, Model) ! ! Set flag for resetting maximum hourly output fields Interstitial%reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 + ! Set flag for resetting radar reflectivity calculation + if (Interstitial%radar_reset<0) then + Interstitial%radar_reset = .true. + else + Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 + end if ! end subroutine interstitial_phys_reset @@ -6705,6 +6720,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%qss_ice ) = ', sum(Interstitial%qss_ice ) write (0,*) 'sum(Interstitial%qss_land ) = ', sum(Interstitial%qss_land ) write (0,*) 'sum(Interstitial%qss_ocean ) = ', sum(Interstitial%qss_ocean ) + write (0,*) 'Interstitial%radar_reset = ', Interstitial%radar_reset write (0,*) 'Interstitial%raddt = ', Interstitial%raddt write (0,*) 'sum(Interstitial%raincd ) = ', sum(Interstitial%raincd ) write (0,*) 'sum(Interstitial%raincs ) = ', sum(Interstitial%raincs ) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.meta b/gfsphysics/GFS_layer/GFS_typedefs.meta index 48d26266b..adb24a3fc 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.meta +++ b/gfsphysics/GFS_layer/GFS_typedefs.meta @@ -7565,6 +7565,12 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[radar_reset] + standard_name = flag_for_resetting_radar_reflectivity_calculation + long_name = flag for resetting radar reflectivity calculation + units = flag + dimensions = () + type = logical [raddt] standard_name = time_step_for_radiation long_name = radiation time step From 1b5bd6e55c038f01a8e8e39ce0fae330ab4be850 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 12 Mar 2020 13:38:50 -0600 Subject: [PATCH 3/5] Update .gitmodules for code review and testing --- .gitmodules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index c9b87c2b4..a458674a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,5 +10,7 @@ branch = dtc/develop [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = dtc/develop + #url = https://github.com/NCAR/ccpp-physics + #branch = dtc/develop + url = https://github.com/climbfuji/ccpp-physics + branch = update_from_dev_emc_20200312_and_other_changes From 872b8fc90354ab4c84be14ae310865aa323bca5a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 12 Mar 2020 20:57:19 -0600 Subject: [PATCH 4/5] gfsphysics/GFS_layer/GFS_typedefs.F90: bugfix for declaration of variable radar_reset --- 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 603089660..ba3cc58f7 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -1786,7 +1786,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_ocean(:) => null() !< - logical :: radar_reset => null() !< + logical :: radar_reset !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< real (kind=kind_phys), pointer :: raincd(:) => null() !< From fcb131337e5d0091440db93ce004b2339b3ccc3d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 13 Mar 2020 13:04:05 -0600 Subject: [PATCH 5/5] Revert change to .gitmodules, update submodule pointers for GFDL_atmos_cubed_sphere and ccpp-physics --- .gitmodules | 12 ++++-------- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index a458674a7..2fdeca40a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,16 +1,12 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - #url = https://github.com/NCAR/GFDL_atmos_cubed_sphere - #branch = dtc/develop - url = https://github.com/climbfuji/GFDL_atmos_cubed_sphere - branch = update_from_dev_emc_20200312_and_other_changes + url = https://github.com/NCAR/GFDL_atmos_cubed_sphere + branch = dtc/develop [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework branch = dtc/develop [submodule "ccpp/physics"] path = ccpp/physics - #url = https://github.com/NCAR/ccpp-physics - #branch = dtc/develop - url = https://github.com/climbfuji/ccpp-physics - branch = update_from_dev_emc_20200312_and_other_changes + url = https://github.com/NCAR/ccpp-physics + branch = dtc/develop diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 9bacf554e..ce66d6a56 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 9bacf554ed078dfa8c09ee662e7608442288e2d5 +Subproject commit ce66d6a56e89b6330a2bef763755c7154047d829 diff --git a/ccpp/physics b/ccpp/physics index 059548223..d9796048b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 059548223262c948f8a1c44ab658d3a283a53b27 +Subproject commit d9796048bd24109dd6f964513361602d20cfa397