Skip to content

Commit

Permalink
'pull ctsm_n03_clm4_5_16_r249 tags from svn'
Browse files Browse the repository at this point in the history
  • Loading branch information
billsacks committed Dec 28, 2017
1 parent 3307234 commit 35a76a9
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 68 deletions.
2 changes: 1 addition & 1 deletion src/biogeochem/ch4Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ subroutine ch4 (bounds, num_soilc, filter_soilc, num_lakec, filter_lakec, &
frac_h2osfc => waterstate_inst%frac_h2osfc_col , & ! Input: [real(r8) (:) ] fraction of ground covered by surface water (0 to 1)
snow_depth => waterstate_inst%snow_depth_col , & ! Input: [real(r8) (:) ] snow height (m)
tws => waterstate_inst%tws_grc , & ! Input: [real(r8) (:) ] total water storage (kg m-2)
qflx_surf => waterflux_inst%qflx_surf_col , & ! Input: [real(r8) (:) ] surface runoff (mm H2O /s)
qflx_surf => waterflux_inst%qflx_surf_for_bgc_col , & ! Input: [real(r8) (:) ] surface runoff for input into BGC code (mm H2O /s)

conc_o2_sat => ch4_inst%conc_o2_sat_col , & ! Input: [real(r8) (:,:) ] O2 conc in each soil layer (mol/m3) (nlevsoi)
zwt0 => ch4_inst%zwt0_col , & ! Input: [real(r8) (:) ] decay factor for finundated (m)
Expand Down
6 changes: 1 addition & 5 deletions src/biogeophys/BalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ subroutine BalanceCheck( bounds, &
qflx_h2osfc_to_ice => waterflux_inst%qflx_h2osfc_to_ice_col , & ! Input: [real(r8) (:) ] conversion of h2osfc to ice
qflx_drain_perched => waterflux_inst%qflx_drain_perched_col , & ! Input: [real(r8) (:) ] sub-surface runoff (mm H2O /s)
qflx_floodc => waterflux_inst%qflx_floodc_col , & ! Input: [real(r8) (:) ] total runoff due to flooding
qflx_h2osfc_surf => waterflux_inst%qflx_h2osfc_surf_col , & ! Input: [real(r8) (:) ] surface water runoff (mm/s)
qflx_snow_drain => waterflux_inst%qflx_snow_drain_col , & ! Input: [real(r8) (:) ] drainage from snow pack
qflx_surf => waterflux_inst%qflx_surf_col , & ! Input: [real(r8) (:) ] surface runoff (mm H2O /s)
qflx_qrgwl => waterflux_inst%qflx_qrgwl_col , & ! Input: [real(r8) (:) ] qflx_surf at glaciers, wetlands, lakes
Expand Down Expand Up @@ -270,7 +269,6 @@ subroutine BalanceCheck( bounds, &
+ qflx_glcice_dyn_water_flux(c) &
- qflx_evap_tot(c) &
- qflx_surf(c) &
- qflx_h2osfc_surf(c) &
- qflx_qrgwl(c) &
- qflx_drain(c) &
- qflx_drain_perched(c) &
Expand Down Expand Up @@ -318,7 +316,6 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'qflx_evap_tot = ',qflx_evap_tot(indexc)*dtime
write(iulog,*)'qflx_irrig = ',qflx_irrig(indexc)*dtime
write(iulog,*)'qflx_surf = ',qflx_surf(indexc)*dtime
write(iulog,*)'qflx_h2osfc_surf = ',qflx_h2osfc_surf(indexc)*dtime
write(iulog,*)'qflx_qrgwl = ',qflx_qrgwl(indexc)*dtime
write(iulog,*)'qflx_drain = ',qflx_drain(indexc)*dtime
write(iulog,*)'qflx_ice_runoff_snwcp = ',qflx_ice_runoff_snwcp(indexc)*dtime
Expand All @@ -330,7 +327,7 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'deltawb = ',endwb(indexc)-begwb(indexc)
write(iulog,*)'deltawb/dtime = ',(endwb(indexc)-begwb(indexc))/dtime
write(iulog,*)'deltaflux = ',forc_rain_col(indexc)+forc_snow_col(indexc) - (qflx_evap_tot(indexc) + &
qflx_surf(indexc)+qflx_h2osfc_surf(indexc)+qflx_drain(indexc))
qflx_surf(indexc)+qflx_drain(indexc))

write(iulog,*)'clm model is stopping'
call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(sourcefile, __LINE__))
Expand All @@ -349,7 +346,6 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'qflx_evap_tot = ',qflx_evap_tot(indexc)*dtime
write(iulog,*)'qflx_irrig = ',qflx_irrig(indexc)*dtime
write(iulog,*)'qflx_surf = ',qflx_surf(indexc)*dtime
write(iulog,*)'qflx_h2osfc_surf = ',qflx_h2osfc_surf(indexc)*dtime
write(iulog,*)'qflx_qrgwl = ',qflx_qrgwl(indexc)*dtime
write(iulog,*)'qflx_drain = ',qflx_drain(indexc)*dtime
write(iulog,*)'qflx_drain_perched = ',qflx_drain_perched(indexc)*dtime
Expand Down
5 changes: 1 addition & 4 deletions src/biogeophys/HydrologyDrainageMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ subroutine HydrologyDrainage(bounds, &
qflx_snwcp_discarded_liq => waterflux_inst%qflx_snwcp_discarded_liq_col, & ! excess liquid h2o due to snow capping,
! which we simply discard in order to reset
! the snow pack (mm H2O /s) [+]
qflx_h2osfc_surf => waterflux_inst%qflx_h2osfc_surf_col , & ! surface water runoff (mm/s)
qflx_drain_perched => waterflux_inst%qflx_drain_perched_col , & ! sub-surface runoff from perched zwt (mm H2O /s)
qflx_rsub_sat => waterflux_inst%qflx_rsub_sat_col , & ! soil saturation excess [mm h2o/s]
qflx_drain => waterflux_inst%qflx_drain_col , & ! sub-surface runoff (mm H2O /s)
Expand Down Expand Up @@ -176,7 +175,6 @@ subroutine HydrologyDrainage(bounds, &

qflx_drain(c) = 0._r8
qflx_drain_perched(c) = 0._r8
qflx_h2osfc_surf(c) = 0._r8
qflx_surf(c) = 0._r8
qflx_infl(c) = 0._r8
qflx_qrgwl(c) = forc_rain(c) + forc_snow(c) + qflx_floodg(g) - qflx_evap_tot(c) - qflx_snwcp_ice(c) - &
Expand All @@ -186,7 +184,6 @@ subroutine HydrologyDrainage(bounds, &
else if (lun%urbpoi(l) .and. ctype(c) /= icol_road_perv) then

qflx_drain_perched(c) = 0._r8
qflx_h2osfc_surf(c) = 0._r8
qflx_rsub_sat(c) = spval

end if
Expand All @@ -206,7 +203,7 @@ subroutine HydrologyDrainage(bounds, &
c = filter_nolakec(fc)
l = col%landunit(c)

qflx_runoff(c) = qflx_drain(c) + qflx_surf(c) + qflx_h2osfc_surf(c) + qflx_qrgwl(c) + qflx_drain_perched(c)
qflx_runoff(c) = qflx_drain(c) + qflx_surf(c) + qflx_qrgwl(c) + qflx_drain_perched(c)

if ((lun%itype(l)==istsoil .or. lun%itype(l)==istcrop) .and. col%active(c)) then
qflx_runoff(c) = qflx_runoff(c) - qflx_irrig(c)
Expand Down
6 changes: 5 additions & 1 deletion src/biogeophys/HydrologyNoDrainageMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ subroutine HydrologyNoDrainage(bounds, &
use SnowHydrologyMod , only : SnowCompaction, CombineSnowLayers, DivideSnowLayers, SnowCapping
use SnowHydrologyMod , only : SnowWater, BuildSnowFilter
use SoilHydrologyMod , only : CLMVICMap, SetFracIce, SurfaceRunoff
use SoilHydrologyMod , only : SetQflxTopSoil, Infiltration, WaterTable, PerchedWaterTable
use SoilHydrologyMod , only : SetQflxTopSoil, Infiltration, TotalSurfaceRunoff
use SoilHydrologyMod , only : WaterTable, PerchedWaterTable
use SoilHydrologyMod , only : ThetaBasedWaterTable, RenewCondensation
use SoilWaterMovementMod , only : SoilWater
use SoilWaterRetentionCurveMod, only : soil_water_retention_curve_type
Expand Down Expand Up @@ -185,6 +186,9 @@ subroutine HydrologyNoDrainage(bounds, &
energyflux_inst, soilhydrology_inst, soilstate_inst, temperature_inst, &
waterflux_inst, waterstate_inst)

call TotalSurfaceRunoff(bounds, num_hydrologyc, filter_hydrologyc, &
waterflux_inst)

call Compute_EffecRootFrac_And_VertTranSink(bounds, num_hydrologyc, &
filter_hydrologyc, soilstate_inst, canopystate_inst, waterflux_inst, energyflux_inst)

Expand Down
2 changes: 0 additions & 2 deletions src/biogeophys/LakeHydrologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ subroutine LakeHydrology(bounds, &
qflx_snwcp_discarded_ice => waterflux_inst%qflx_snwcp_discarded_ice_col, & ! Input: [real(r8) (:) ] excess solid h2o due to snow capping, which we simply discard in order to reset the snow pack (mm H2O /s) [+]
qflx_snwcp_discarded_liq => waterflux_inst%qflx_snwcp_discarded_liq_col, & ! Input: [real(r8) (:) ] excess liquid h2o due to snow capping, which we simply discard in order to reset the snow pack (mm H2O /s) [+]
qflx_drain_perched => waterflux_inst%qflx_drain_perched_col , & ! Output: [real(r8) (:) ] perched wt sub-surface runoff (mm H2O /s) !TODO - move this to somewhere else
qflx_h2osfc_surf => waterflux_inst%qflx_h2osfc_surf_col , & ! Output: [real(r8) (:) ] surface water runoff (mm H2O /s)
qflx_snow_drain => waterflux_inst%qflx_snow_drain_col , & ! Output: [real(r8) (:) ] drainage from snow pack
qflx_rsub_sat => waterflux_inst%qflx_rsub_sat_col , & ! Output: [real(r8) (:) ] soil saturation excess [mm h2o/s]
qflx_surf => waterflux_inst%qflx_surf_col , & ! Output: [real(r8) (:) ] surface runoff (mm H2O /s)
Expand Down Expand Up @@ -619,7 +618,6 @@ subroutine LakeHydrology(bounds, &
g = pgridcell(p)

qflx_drain_perched(c) = 0._r8
qflx_h2osfc_surf(c) = 0._r8
qflx_rsub_sat(c) = 0._r8
qflx_infl(c) = 0._r8
qflx_surf(c) = 0._r8
Expand Down
Loading

0 comments on commit 35a76a9

Please sign in to comment.