Skip to content

Commit

Permalink
Merge pull request #2 from NCAR/modularize_infiltration
Browse files Browse the repository at this point in the history
Modularization of Infiltration - first stage

Separate out the first 3 steps of subroutine Infiltration into more modular
homes. The biggest piece of this is to introduce a new
InfiltrationExcessRunoffMod.F90; this will be where alternative
parameterizations of infiltration excess runoff can be put.
  • Loading branch information
billsacks committed Dec 28, 2017
2 parents 7b26ad5 + 192c84e commit 7e1bcd5
Show file tree
Hide file tree
Showing 8 changed files with 568 additions and 147 deletions.
98 changes: 98 additions & 0 deletions ChangeLog_branch
Original file line number Diff line number Diff line change
@@ -1,4 +1,102 @@
===============================================================
Tag name: ctsm_n06_clm4_5_16_r249
Originator(s): sacks
Date: Aug 21, 2017
One-line Summary: Modularization of Infiltration - first stage

Purpose of changes
------------------

Separate out the first 3 steps of subroutine Infiltration into more modular
homes. The biggest piece of this is to introduce a new
InfiltrationExcessRunoffMod.F90; this will be where alternative
parameterizations of infiltration excess runoff can be put.


Notes of particular relevance for developers: (including Code reviews and testing)
---------------------------------------------

CLM testing:

build-namelist tests:

yellowstone - not run

unit-tests (components/clm/src):

yellowstone - not run

tools-tests (components/clm/test/tools):

yellowstone - not run

PTCLM testing (components/clm/tools/shared/PTCLM/test):

yellowstone - not run

regular tests (aux_clm):

yellowstone_intel - pass
yellowstone_pgi - pass
yellowstone_gnu - pass
cheyenne_intel - pass
hobart_nag - pass
hobart_pgi - pass
hobart_intel - pass

NOTE: Most tests were run on 24913d0. On the final commit (afdbcf7), I ran
only the following tests:

These test failed without the fix in afdbcf7, so I reran them with that fix:

ERP_D_Ld5.f10_f10_musgs.I2000Clm50BgcCrop.yellowstone_intel.clm-allActive
ERP_D_P15x2_Ld3.f10_f10_musgs.I2000Clm50BgcCrop.yellowstone_intel.clm-cropColdStart
ERP_P180x2_D_Ld5.f19_g17.I2000Clm50BgcDvCrop.yellowstone_pgi.clm-crop
ERP_D_Ld5.f10_f10_musgs.I2000Clm50BgcCrop.cheyenne_intel.clm-allActive
ERP_D_P15x2_Ld3.f10_f10_musgs.I2000Clm50BgcCrop.cheyenne_intel.clm-cropColdStart

This is the only oldhyd test, and so is the only test that should be
affected by this change:

SMS_D_Ld1_P24x1.f10_f10_musgs.I2000Clm45BgcCrop.hobart_nag.clm-oldhyd

CLM tag used for the baseline comparisons: ctsm_n05_clm4_5_16_r249


Answer changes
--------------

Changes answers relative to baseline: NO


Detailed list of changes
------------------------

List any svn externals directories updated (cime, rtm, mosart, cism, etc.): none

List all files eliminated: none

List all files added and what they do:

========= Holds the portion of subroutine Infiltration that actually computes
the infiltration excess runoff flux. New parameterizations of
infiltration excess runoff should be put here.
A components/clm/src/biogeophys/InfiltrationExcessRunoffMod.F90

List all existing files that have been modified, and describe the changes:

========= Main changes, as described above
M components/clm/src/biogeophys/SoilHydrologyMod.F90
M components/clm/src/biogeophys/HydrologyNoDrainageMod.F90
M components/clm/src/biogeophys/WaterfluxType.F90
M components/clm/src/main/clm_driver.F90
M components/clm/src/main/clm_instMod.F90

========= Just add a comment
M components/clm/src/biogeophys/SurfRunoffSatMod.F90

===============================================================
===============================================================
Tag name: ctsm_n05_clm4_5_16_r249
Originator(s): sacks
Date: Aug 17, 2017
Expand Down
25 changes: 17 additions & 8 deletions src/biogeophys/HydrologyNoDrainageMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Module HydrologyNoDrainageMod
use SoilHydrologyType , only : soilhydrology_type
use SoilStateType , only : soilstate_type
use SurfRunoffSatMod , only : surf_runoff_sat_type
use InfiltrationExcessRunoffMod, only : infiltration_excess_runoff_type
use WaterfluxType , only : waterflux_type
use WaterstateType , only : waterstate_type
use CanopyStateType , only : canopystate_type
Expand All @@ -43,8 +44,8 @@ subroutine HydrologyNoDrainage(bounds, &
clm_fates, &
atm2lnd_inst, soilstate_inst, energyflux_inst, temperature_inst, &
waterflux_inst, waterstate_inst, &
soilhydrology_inst, surf_runoff_sat_inst, aerosol_inst, &
canopystate_inst, soil_water_retention_curve)
soilhydrology_inst, surf_runoff_sat_inst, infiltration_excess_runoff_inst, &
aerosol_inst, canopystate_inst, soil_water_retention_curve)
!
! !DESCRIPTION:
! This is the main subroutine to execute the calculation of soil/snow
Expand All @@ -60,8 +61,8 @@ subroutine HydrologyNoDrainage(bounds, &
use clm_time_manager , only : get_step_size, get_nstep
use SnowHydrologyMod , only : SnowCompaction, CombineSnowLayers, DivideSnowLayers, SnowCapping
use SnowHydrologyMod , only : SnowWater, BuildSnowFilter
use SoilHydrologyMod , only : CLMVICMap, SetFracIce
use SoilHydrologyMod , only : SetQflxTopSoil, Infiltration, TotalSurfaceRunoff
use SoilHydrologyMod , only : CLMVICMap, SetSoilWaterFractions
use SoilHydrologyMod , only : SetQflxInputs, Infiltration, TotalSurfaceRunoff
use SoilHydrologyMod , only : UpdateUrbanPonding
use SoilHydrologyMod , only : WaterTable, PerchedWaterTable
use SoilHydrologyMod , only : ThetaBasedWaterTable, RenewCondensation
Expand Down Expand Up @@ -93,6 +94,7 @@ subroutine HydrologyNoDrainage(bounds, &
type(aerosol_type) , intent(inout) :: aerosol_inst
type(soilhydrology_type) , intent(inout) :: soilhydrology_inst
type(surf_runoff_sat_type), intent(inout) :: surf_runoff_sat_inst
type(infiltration_excess_runoff_type), intent(inout) :: infiltration_excess_runoff_inst
type(canopystate_type) , intent(inout) :: canopystate_inst
class(soil_water_retention_curve_type), intent(in) :: soil_water_retention_curve
!
Expand Down Expand Up @@ -177,18 +179,25 @@ subroutine HydrologyNoDrainage(bounds, &
soilhydrology_inst, waterstate_inst)
end if

call SetFracIce(bounds, num_hydrologyc, filter_hydrologyc, &
call SetSoilWaterFractions(bounds, num_hydrologyc, filter_hydrologyc, &
soilhydrology_inst, soilstate_inst, waterstate_inst)

call surf_runoff_sat_inst%SaturatedSurfaceRunoff(&
bounds, num_hydrologyc, filter_hydrologyc, col, &
soilhydrology_inst, soilstate_inst, waterflux_inst)

call SetQflxTopSoil(bounds, num_hydrologyc, filter_hydrologyc, waterflux_inst)
call SetQflxInputs(bounds, num_hydrologyc, filter_hydrologyc, &
waterflux_inst, surf_runoff_sat_inst, waterstate_inst)

call infiltration_excess_runoff_inst%InfiltrationExcessRunoff( &
bounds, num_hydrologyc, filter_hydrologyc, &
soilhydrology_inst, soilstate_inst, surf_runoff_sat_inst, waterflux_inst, &
waterstate_inst)

call Infiltration(bounds, num_hydrologyc, filter_hydrologyc, num_urbanc, filter_urbanc,&
energyflux_inst, soilhydrology_inst, soilstate_inst, surf_runoff_sat_inst, &
temperature_inst, waterflux_inst, waterstate_inst)
infiltration_excess_runoff_inst, &
energyflux_inst, soilhydrology_inst, surf_runoff_sat_inst, &
waterflux_inst, waterstate_inst)

call TotalSurfaceRunoff(bounds, num_hydrologyc, filter_hydrologyc, &
num_urbanc, filter_urbanc, &
Expand Down
Loading

0 comments on commit 7e1bcd5

Please sign in to comment.