diff --git a/src/biogeophys/SoilHydrologyMod.F90 b/src/biogeophys/SoilHydrologyMod.F90 index 7f9b4ed08a..168ce161e3 100644 --- a/src/biogeophys/SoilHydrologyMod.F90 +++ b/src/biogeophys/SoilHydrologyMod.F90 @@ -377,6 +377,7 @@ subroutine Infiltration(bounds, num_hydrologyc, filter_hydrologyc, num_urbanc, f dz => col%dz , & ! Input: [real(r8) (:,:) ] layer depth (m) t_soisno => temperature_inst%t_soisno_col , & ! Input: [real(r8) (:,:) ] soil temperature (Kelvin) + t_h2osfc => temperature_inst%t_h2osfc_col , & ! Input: [real(r8) (:) ] surface water temperature (Kelvin) KSA2018 frac_h2osfc => waterstate_inst%frac_h2osfc_col , & ! Input: [real(r8) (:) ] fraction of ground covered by surface water (0 to 1) frac_h2osfc_nosnow => waterstate_inst%frac_h2osfc_nosnow_col, & ! Output: [real(r8) (:) ] col fractional area with surface water greater than zero (if no snow present) @@ -518,6 +519,15 @@ subroutine Infiltration(bounds, num_hydrologyc, filter_hydrologyc, num_urbanc, f qflx_infl_excess(c) = 0._r8 endif + ! if surface water is frozen, send infiltration excess to runoff to + ! avoid artificial loop between snow and h2osfc. KSA2018 + if (h2osfcflag/=0 .and. t_h2osfc(c) <= tfrz) then + ! shift infiltration excess from h2osfc input to surface runoff + qflx_in_h2osfc(c) = qflx_in_h2osfc(c) - qflx_infl_excess(c) + qflx_surf(c)= qflx_surf(c) + qflx_infl_excess(c) + qflx_infl_excess(c) = 0._r8 + end if + qflx_in_h2osfc(c) = qflx_in_h2osfc(c) - qflx_h2osfc_surf(c) !6. update h2osfc prior to calculating bottom drainage from h2osfc diff --git a/src/biogeophys/SurfaceAlbedoMod.F90 b/src/biogeophys/SurfaceAlbedoMod.F90 index 7d1763041f..43dde278df 100644 --- a/src/biogeophys/SurfaceAlbedoMod.F90 +++ b/src/biogeophys/SurfaceAlbedoMod.F90 @@ -204,7 +204,7 @@ subroutine SurfaceAlbedo(bounds,nc, & ! ! !USES: use shr_orb_mod - use clm_time_manager , only : get_nstep + use clm_time_manager , only : get_nstep, get_step_size !+tht add step_size use abortutils , only : endrun use clm_varctl , only : subgridflag, use_snicar_frc, use_fates use CLMFatesInterfaceMod, only : hlm_fates_interface_type @@ -278,6 +278,9 @@ subroutine SurfaceAlbedo(bounds,nc, & real(r8) :: mss_cnc_aer_in_frc_oc (bounds%begc:bounds%endc,-nlevsno+1:0,sno_nbr_aer) ! mass concentration of aerosol species for OC forcing (col,lyr,aer) [kg kg-1] real(r8) :: mss_cnc_aer_in_frc_dst (bounds%begc:bounds%endc,-nlevsno+1:0,sno_nbr_aer) ! mass concentration of aerosol species for dust forcing (col,lyr,aer) [kg kg-1] real(r8) :: mss_cnc_aer_in_fdb (bounds%begc:bounds%endc,-nlevsno+1:0,sno_nbr_aer) ! mass concentration of all aerosol species for feedback calculation (col,lyr,aer) [kg kg-1] + + real(r8) :: dtavg !+tht land model time step (sec) + real(r8), parameter :: mpe = 1.e-06_r8 ! prevents overflow for division by zero integer , parameter :: nband =numrad ! number of solar radiation waveband classes !----------------------------------------------------------------------- @@ -355,8 +358,9 @@ subroutine SurfaceAlbedo(bounds,nc, & ! Cosine solar zenith angle for next time step + dtavg=get_step_size() !+tht do g = bounds%begg,bounds%endg - coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1) + coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1, dtavg) !+tht dtavg end do do c = bounds%begc,bounds%endc g = col%gridcell(c) @@ -685,7 +689,7 @@ subroutine SurfaceAlbedo(bounds,nc, & ! (NEEDED FOR ENERGY CONSERVATION) do i = -nlevsno+1,1,1 if (subgridflag == 0 .or. lun%itype(col%landunit(c)) == istdlak) then - if (ib == 1) then + if (ib == 1) then flx_absdv(c,i) = flx_absd_snw(c,i,ib)*frac_sno(c) + & ((1.-frac_sno(c))*(1-albsod(c,ib))*(flx_absd_snw(c,i,ib)/(1.-albsnd(c,ib)))) flx_absiv(c,i) = flx_absi_snw(c,i,ib)*frac_sno(c) + & diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index a4eb5331ed..815071004a 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -514,11 +514,11 @@ subroutine hist_htapes_build () tape(t)%dov2xy = hist_dov2xy(t) tape(t)%nhtfrq = hist_nhtfrq(t) tape(t)%mfilt = hist_mfilt(t) - if (hist_ndens(t) == 1) then +! if (hist_ndens(t) == 1) then tape(t)%ncprec = ncd_double - else - tape(t)%ncprec = ncd_float - endif +! else +! tape(t)%ncprec = ncd_float +! endif end do ! Set time of beginning of current averaging interval