From e3f7f64df3b232d080df1e186798abf2b24e1067 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 20 Oct 2020 14:02:59 -0600 Subject: [PATCH 1/5] Fix uninitialized variable mvd_r in physics/module_mp_thompson.F90 From 8b3545ae6ca54e51f31e6701e13f2c5bdd5e063a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 5 Nov 2020 15:48:35 -0700 Subject: [PATCH 2/5] Add reminders for sncovr_ice initialization to GFS_phys_time_vary.{fv3,scm}.F90 --- physics/GFS_phys_time_vary.fv3.F90 | 1 + physics/GFS_phys_time_vary.scm.F90 | 1 + 2 files changed, 2 insertions(+) diff --git a/physics/GFS_phys_time_vary.fv3.F90 b/physics/GFS_phys_time_vary.fv3.F90 index 3c894b777..d547eb308 100644 --- a/physics/GFS_phys_time_vary.fv3.F90 +++ b/physics/GFS_phys_time_vary.fv3.F90 @@ -519,6 +519,7 @@ subroutine GFS_phys_time_vary_run (Data, Model, nthrds, first_time_step, errmsg, endif enddo enddo + ! DH* 20201104: don't forget snocvr_ice for RUC LSM (see FV3GFS_io.F90) endif endif #endif diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 5fcc9ed84..ece9d5ee9 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -389,6 +389,7 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, endif endif enddo + ! DH* 20201104: don't forget snocvr_ice for RUC LSM (see FV3GFS_io.F90) endif endif #endif From f2291a581d5516221ac85c3d292978b7a2f87e27 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 9 Nov 2020 08:54:00 -0700 Subject: [PATCH 3/5] physics/sfc_drv_ruc.{F90,meta}: use local variables where possible, remove unneeded acsnow --- physics/sfc_drv_ruc.F90 | 30 +++++++++++++----------------- physics/sfc_drv_ruc.meta | 33 +++------------------------------ 2 files changed, 16 insertions(+), 47 deletions(-) diff --git a/physics/sfc_drv_ruc.F90 b/physics/sfc_drv_ruc.F90 index f84583a35..0d41c3e4a 100644 --- a/physics/sfc_drv_ruc.F90 +++ b/physics/sfc_drv_ruc.F90 @@ -268,18 +268,18 @@ subroutine lsm_ruc_run & ! inputs ! for land & smois, tsice, tslb, sh2o, keepfr, smfrkeep, & ! on RUC levels & canopy, trans, tsurf_lnd, tsnow_lnd, z0rl_lnd, & - & sfcqc_lnd, sfcdew_lnd, sfcqv_lnd, & + & sfcqc_lnd, sfcqv_lnd, & & qsurf_lnd, gflux_lnd, evap_lnd, hflx_lnd, & & runof, runoff, srunoff, drain, & & cm_lnd, ch_lnd, evbs, evcw, stm, wetness, & & snowfallac_lnd, & ! for ice - & sfcqc_ice, sfcdew_ice, sfcqv_ice, & + & sfcqc_ice, sfcqv_ice, & & tice, tsurf_ice, tsnow_ice, z0rl_ice, & & qsurf_ice, gflux_ice, evap_ice, ep1d_ice, hflx_ice, & & cm_ice, ch_ice, snowfallac_ice, & ! --- out - & acsnow, rhosnf, sbsno, & + & rhosnf, sbsno, & & cmm_lnd, chh_lnd, cmm_ice, chh_ice, & ! & flag_iter, flag_guess, flag_init, flag_restart, & @@ -333,14 +333,14 @@ subroutine lsm_ruc_run & ! inputs ! for land & weasd_lnd, snwdph_lnd, tskin_lnd, & & tsurf_lnd, z0rl_lnd, tsnow_lnd, & - & sfcqc_lnd, sfcqv_lnd, sfcdew_lnd, & + & sfcqc_lnd, sfcqv_lnd, & ! for ice & weasd_ice, snwdph_ice, tskin_ice, & & tsurf_ice, z0rl_ice, tsnow_ice, & - & sfcqc_ice, sfcqv_ice, sfcdew_ice, fice, tice + & sfcqc_ice, sfcqv_ice, fice, tice ! --- in - real (kind=kind_phys), dimension(im), intent(in) :: & + real (kind=kind_phys), dimension(im), intent(in) :: & & rainnc, rainc, ice, snow, graupel ! --- in/out: ! --- on RUC levels @@ -348,7 +348,7 @@ subroutine lsm_ruc_run & ! inputs & smois, tsice, tslb, sh2o, keepfr, smfrkeep ! --- output: - real (kind=kind_phys), dimension(im), intent(inout) :: acsnow, & + real (kind=kind_phys), dimension(im), intent(inout) :: & & rhosnf, runof, drain, runoff, srunoff, evbs, evcw, & & stm, wetness, semis_lnd, semis_ice, & ! for land @@ -366,8 +366,7 @@ subroutine lsm_ruc_run & ! inputs ! --- locals: real (kind=kind_phys), dimension(im) :: rho, & & q0, qs1, & - & tprcp_old, srflag_old, sr_old, canopy_old, & - & acsnow_old, wetness_old, & + & tprcp_old, srflag_old, sr_old, canopy_old, wetness_old, & ! for land & weasd_lnd_old, snwdph_lnd_old, tskin_lnd_old, & & tsnow_lnd_old, snowfallac_lnd_old, & @@ -553,7 +552,7 @@ subroutine lsm_ruc_run & ! inputs wetness_old(i) = wetness(i) canopy_old(i) = canopy(i) !srflag_old(i) = srflag(i) - acsnow_old(i) = acsnow(i) + !acsnow_old(i) = acsnow(i) ! for land weasd_lnd_old(i) = weasd_lnd(i) snwdph_lnd_old(i) = snwdph_lnd(i) @@ -600,8 +599,6 @@ subroutine lsm_ruc_run & ! inputs gflux_ice(i) = 0.0 drain(i) = 0.0 canopy(i) = max(canopy(i), 0.0) - sfcdew_lnd(i) = 0.0 - sfcdew_ice(i) = 0.0 evbs (i) = 0.0 evcw (i) = 0.0 @@ -735,7 +732,8 @@ subroutine lsm_ruc_run & ! inputs ! ice not used ! precipfr(i,j) = rainncv(i,j) * ffrozp(i,j) - acsn(i,j) = acsnow(i) + !acsn(i,j) = acsnow(i) + acsn(i,j) = 0.0 ! --- units % shdfac(i,j) = sigmaf(i)*100. @@ -1049,7 +1047,6 @@ subroutine lsm_ruc_run & ! inputs evap_lnd(i) = qfx_lnd(i,j) / rho(i) ! kinematic hflx_lnd(i) = hfx_lnd(i,j) / (con_cp*rho(i)) ! kinematic gflux_lnd(i) = ssoil_lnd(i,j) - sfcdew_lnd(i) = dew_lnd(i,j) qsurf_lnd(i) = qsfc_lnd(i,j) tsurf_lnd(i) = soilt_lnd(i,j) stm(i) = soilm(i,j) * 1.e-3 ! convert to [m] @@ -1064,7 +1061,7 @@ subroutine lsm_ruc_run & ! inputs sfcqc_lnd(i) = qcg_lnd(i,j) ! --- ... units [m/s] = [g m-2 s-1] rhosnf(i) = rhosnfr(i,j) - acsnow(i) = acsn(i,j) ! kg m-2 + !acsnow(i) = acsn(i,j) ! kg m-2 ! --- ... accumulated total runoff and surface runoff runoff(i) = runoff(i) + (drain(i)+runof(i)) * delt * 0.001 ! kg m-2 @@ -1207,7 +1204,6 @@ subroutine lsm_ruc_run & ! inputs hflx_ice(i) = hfx_ice(i,j) / (con_cp*rho(i)) ! kinematic gflux_ice(i) = ssoil_ice(i,j) - sfcdew_ice(i) = dew_ice(i,j) qsurf_ice(i) = qsfc_ice(i,j) tsurf_ice(i) = soilt_ice(i,j) @@ -1295,7 +1291,7 @@ subroutine lsm_ruc_run & ! inputs !srflag(i) = srflag_old(i) tsnow_lnd(i) = tsnow_lnd_old(i) snowfallac_lnd(i) = snowfallac_lnd_old(i) - acsnow(i) = acsnow_old(i) + !acsnow(i) = acsnow_old(i) sfcqv_lnd(i) = sfcqv_lnd_old(i) sfcqc_lnd(i) = sfcqc_lnd_old(i) wetness(i) = wetness_old(i) diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 31baf5628..49ee875d6 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -1006,25 +1006,16 @@ intent = inout optional = F [sfcqc_lnd] - standard_name = cloud_condensed_water_mixing_ratio_at_surface - long_name = moist cloud water mixing ratio at surface + standard_name = cloud_condensed_water_mixing_ratio_at_surface_over_land + long_name = moist cloud water mixing ratio at surface over land units = kg kg-1 dimensions = (horizontal_dimension) type = real kind = kind_phys intent = inout optional = F -[sfcdew_lnd] - standard_name = surface_condensation_mass_over_land - long_name = surface condensation mass over land - units = kg m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [sfcqv_lnd] - standard_name = water_vapor_mixing_ratio_at_surface + standard_name = water_vapor_mixing_ratio_at_surface_over_land long_name = water vapor mixing ratio at surface over land units = kg kg-1 dimensions = (horizontal_dimension) @@ -1176,15 +1167,6 @@ kind = kind_phys intent = inout optional = F -[sfcdew_ice] - standard_name = surface_condensation_mass_over_ice - long_name = surface condensation mass over ice - units = kg m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [sfcqv_ice] standard_name = water_vapor_mixing_ratio_at_surface_over_ice long_name = water vapor mixing ratio at surface over ice @@ -1302,15 +1284,6 @@ kind = kind_phys intent = inout optional = F -[acsnow] - standard_name = accumulated_water_equivalent_of_frozen_precip - long_name = snow water equivalent of run-total frozen precip - units = kg m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [rhosnf] standard_name = density_of_frozen_precipitation long_name = density of frozen precipitation From ea8b130d0b8f4d4c61624060eb8229d155747417 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 9 Nov 2020 09:16:49 -0700 Subject: [PATCH 4/5] Update physics/GFS_debug.F90 with changes to RUC LSM arrays --- physics/GFS_debug.F90 | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 4680f8de7..cbb1765f0 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -491,18 +491,19 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, end if ! CCPP/RUC only if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zs', Sfcprop%zs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf', Sfcprop%clw_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf', Sfcprop%qwv_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%cndm_surf', Sfcprop%cndm_surf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow', Sfcprop%tsnow) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac ', Sfcprop%snowfallac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%acsnow ', Sfcprop%acsnow) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_land', Sfcprop%clw_surf_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_ice', Sfcprop%clw_surf_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_land', Sfcprop%qwv_surf_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_ice', Sfcprop%qwv_surf_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_land', Sfcprop%tsnow_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_ice', Sfcprop%tsnow_ice) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_land', Sfcprop%snowfallac_land) + call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_ice', Sfcprop%snowfallac_ice) end if ! Radtend call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfxc', Radtend%sfcfsw(:)%upfxc) From e6cac7bd89c154c8961d114eb6c2d60b3215e510 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 10 Nov 2020 14:22:58 -0700 Subject: [PATCH 5/5] Remove physics/lsm_ruc_sfc_sice_interstitial.F90 --- physics/lsm_ruc_sfc_sice_interstitial.F90 | 123 ---------------------- 1 file changed, 123 deletions(-) delete mode 100644 physics/lsm_ruc_sfc_sice_interstitial.F90 diff --git a/physics/lsm_ruc_sfc_sice_interstitial.F90 b/physics/lsm_ruc_sfc_sice_interstitial.F90 deleted file mode 100644 index 27033fcc8..000000000 --- a/physics/lsm_ruc_sfc_sice_interstitial.F90 +++ /dev/null @@ -1,123 +0,0 @@ -module lsm_ruc_sfc_sice_pre - - use machine, only: kind_phys - - implicit none - - private - - public :: lsm_ruc_sfc_sice_pre_init, lsm_ruc_sfc_sice_pre_run, lsm_ruc_sfc_sice_pre_finalize - -contains - - subroutine lsm_ruc_sfc_sice_pre_init () - end subroutine lsm_ruc_sfc_sice_pre_init - - subroutine lsm_ruc_sfc_sice_pre_finalize () - end subroutine lsm_ruc_sfc_sice_pre_finalize - -#if 0 -!> \section arg_table_lsm_ruc_sfc_sice_pre_run Argument Table -!! \htmlinclude lsm_ruc_sfc_sice_pre_run.html -!! -#endif - subroutine lsm_ruc_sfc_sice_pre_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) - - implicit none - - ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil, kice - logical, dimension(im), intent(in) :: land, icy -! --- on Noah levels - real (kind=kind_phys), dimension(im,lsoil), intent(inout) :: stc -! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(in) :: tslb - real (kind=kind_phys), dimension(im,kice), intent(inout) :: tiice - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - do i=1,im - if (icy(i)) then - do k=1,kice - tiice(i,k) = tslb(i,k) - end do - else if (.not.land(i)) then - do k=1,min(lsoil,lsoil_ruc) - stc(i,k) = tslb(i,k) - end do - end if - end do - - end subroutine lsm_ruc_sfc_sice_pre_run - -end module lsm_ruc_sfc_sice_pre - -module lsm_ruc_sfc_sice_post - - use machine, only: kind_phys - - implicit none - - private - - public :: lsm_ruc_sfc_sice_post_init, lsm_ruc_sfc_sice_post_run, lsm_ruc_sfc_sice_post_finalize - -contains - - subroutine lsm_ruc_sfc_sice_post_init () - end subroutine lsm_ruc_sfc_sice_post_init - - subroutine lsm_ruc_sfc_sice_post_finalize () - end subroutine lsm_ruc_sfc_sice_post_finalize - -#if 0 -!> \section arg_table_lsm_ruc_sfc_sice_post_run Argument Table -!! \htmlinclude lsm_ruc_sfc_sice_post_run.html -!! -#endif - subroutine lsm_ruc_sfc_sice_post_run(im, lsoil_ruc, lsoil, kice, land, icy, stc, tslb, tiice, errmsg, errflg) - - implicit none - - ! Interface variables - integer, intent(in) :: im, lsoil_ruc, lsoil, kice - logical, dimension(im), intent(in) :: land, icy -! --- on Noah levels - real (kind=kind_phys), dimension(im,lsoil), intent(in) :: stc - real (kind=kind_phys), dimension(im,kice), intent(in) :: tiice -! --- on RUC levels - real (kind=kind_phys), dimension(im,lsoil_ruc), intent(inout) :: tslb - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Local variables - integer :: i, k - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - do i=1,im - if (icy(i)) then - do k=1,kice - tslb(i,k) = tiice(i,k) - end do - else if (.not.land(i)) then - do k=1,min(lsoil,lsoil_ruc) - tslb(i,k) = stc(i,k) - end do - end if - end do - - end subroutine lsm_ruc_sfc_sice_post_run - -end module lsm_ruc_sfc_sice_post