Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ Makefile-*
*.backup
# site directory from mkdocs
site/
# vscode setting files
.vscode
1 change: 1 addition & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ SUMMA_SOLVER= \
opSplittin.f90 \
coupled_em.f90 \
run_oneHRU.f90 \
HDS.f90 \
run_oneGRU.f90
SOLVER = $(patsubst %, $(ENGINE_DIR)/%, $(SUMMA_SOLVER))

Expand Down
1 change: 0 additions & 1 deletion build/source/driver/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions build/source/driver/summa_modelRun.f90
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ subroutine summa_runPhysics(modelTimeStep, summa1_struc, err, message)
typeStruct%gru(iGRU), & ! intent(in): local classification of soil veg etc. for each HRU
idStruct%gru(iGRU), & ! intent(in): local classification of soil veg etc. for each HRU
attrStruct%gru(iGRU), & ! intent(in): local attributes for each HRU
bparStruct%gru(iGRU), & ! intent(in): basin-average parameters for HDS
! data structures (input-output)
mparStruct%gru(iGRU), & ! intent(inout): local model parameters
indxStruct%gru(iGRU), & ! intent(inout): model indices
Expand Down
19 changes: 18 additions & 1 deletion build/source/driver/summa_restart.f90
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module summa_restart
USE var_lookup,only:iLookDIAG ! look-up values for local column model diagnostic variables
USE var_lookup,only:iLookFLUX ! look-up values for local column model fluxes
USE var_lookup,only:iLookBVAR ! look-up values for basin-average model variables
USE var_lookup,only:iLookBPAR ! look-up values for basin-average model parameters used by HDS
USE var_lookup,only:iLookDECISIONS ! look-up values for model decisions

! safety: set private unless specified otherwise
Expand Down Expand Up @@ -67,7 +68,9 @@ subroutine summa_readRestart(summa1_struc, err, message)
! model decisions
USE mDecisions_module,only:& ! look-up values for the choice of method for the spatial representation of groundwater
localColumn, & ! separate groundwater representation in each local soil column
singleBasin ! single groundwater store over the entire basin
singleBasin, & ! single groundwater store over the entire basin
HDSmodel ! Hysteretic Depressional Storage model implementation for prairie potholes
USE HDS,only:init_summa_HDS ! initialize HDS variables at the GRU level
! ---------------------------------------------------------------------------------------
! * variables
! ---------------------------------------------------------------------------------------
Expand Down Expand Up @@ -227,6 +230,20 @@ subroutine summa_readRestart(summa1_struc, err, message)
dt_init%gru(iGRU)%hru(iHRU) = progStruct%gru(iGRU)%hru(iHRU)%var(iLookPROG%dt_init)%dat(1) ! seconds
end do

! *****************************************************************************
! *** initialize HDS variables at the GRU level
! *****************************************************************************
if(model_decisions(iLookDECISIONS%prPotholes)%iDecision == HDSmodel)then
call init_summa_HDS(bvarStruct%gru(iGRU)%var(iLookBVAR%pondVolFrac)%dat(1) , &
bparStruct%gru(iGRU)%var(iLookBPAR%depressionDepth) , &
bparStruct%gru(iGRU)%var(iLookBPAR%depressionAreaFrac) , &
bvarStruct%gru(iGRU)%var(iLookBVAR%basin__totalArea)%dat(1) , &
bparStruct%gru(iGRU)%var(iLookBPAR%depression_p) , &
bvarStruct%gru(iGRU)%var(iLookBVAR%pondVol)%dat(1) , &
bvarStruct%gru(iGRU)%var(iLookBVAR%pondArea)%dat(1) , &
bvarStruct%gru(iGRU)%var(iLookBVAR%conAreaFrac)%dat(1) , &
bvarStruct%gru(iGRU)%var(iLookBVAR%vMin)%dat(1))
endif
end do ! end looping through GRUs

! *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion build/source/driver/summa_setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module summa_setup
USE var_lookup,only:iLookATTR ! look-up values for local attributes
USE var_lookup,only:iLookTYPE ! look-up values for classification of veg, soils etc.
USE var_lookup,only:iLookPARAM ! look-up values for local column model parameters
USE var_lookup,only:iLookID ! look-up values for local column model parameters
USE var_lookup,only:iLookID ! look-up values for local column model parameters
USE var_lookup,only:iLookBVAR ! look-up values for basin-average model variables
USE var_lookup,only:iLookDECISIONS ! look-up values for model decisions
USE globalData,only:urbanVegCategory ! vegetation category for urban areas
Expand Down
14 changes: 14 additions & 0 deletions build/source/dshare/get_ixname.f90
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function get_ixdecisions(varName)
case('subRouting' ); get_ixdecisions=iLookDECISIONS%subRouting ! choice of method for sub-grid routing
case('snowDenNew' ); get_ixdecisions=iLookDECISIONS%snowDenNew ! choice of method for new snow density
case('snowUnload' ); get_ixdecisions=iLookDECISIONS%snowUnload ! choice of parameterization for snow unloading from canopy
case('prPotholes' ); get_ixdecisions=iLookDECISIONS%prPotholes ! choice of parameterization for prairie potholes
! get to here if cannot find the variable
case default
get_ixdecisions = integerMissing
Expand Down Expand Up @@ -861,6 +862,12 @@ function get_ixbpar(varName)
! sub-grid routing
case('routingGammaShape' ); get_ixbpar = iLookBPAR%routingGammaShape ! shape parameter in Gamma distribution used for sub-grid routing (-)
case('routingGammaScale' ); get_ixbpar = iLookBPAR%routingGammaScale ! scale parameter in Gamma distribution used for sub-grid routing (s)
! parameters for HDS pothole storage
case('depressionDepth' ); get_ixbpar = iLookBPAR%depressionDepth ! average depth of depressional storage (depressionVol/depressionArea) (m)
case('depressionAreaFrac' ); get_ixbpar = iLookBPAR%depressionAreaFrac ! fractional depressional area (depressionArea/basinArea) (-)
case('depressionCatchAreaFrac'); get_ixbpar = iLookBPAR%depressionCatchAreaFrac ! fractional area (of the landArea= basinArea - depressionArea) that drains to the depressions (-)
case('depression_p' ); get_ixbpar = iLookBPAR%depression_p ! shape of the slope profile (-)
case('depression_b' ); get_ixbpar = iLookBPAR%depression_b ! shape of contributing fraction curve (-)
! get to here if cannot find the variable
case default
get_ixbpar = integerMissing
Expand Down Expand Up @@ -895,6 +902,13 @@ function get_ixbvar(varName)
case('routingFractionFuture' ); get_ixbvar = iLookBVAR%routingFractionFuture ! fraction of runoff in future time steps (-)
case('averageInstantRunoff' ); get_ixbvar = iLookBVAR%averageInstantRunoff ! instantaneous runoff (m s-1)
case('averageRoutedRunoff' ); get_ixbvar = iLookBVAR%averageRoutedRunoff ! routed runoff (m s-1)
! variables for pothole storage (HDS)
case('vMin' ); get_ixbvar = iLookBVAR%vMin ! volume of water in the meta depression at the start of a fill period (m3)
case('conAreaFrac' ); get_ixbvar = iLookBVAR%conAreaFrac ! fractional contributing area (-)
case('pondVolFrac' ); get_ixbvar = iLookBVAR%pondVolFrac ! fractional pond volume = pondVol/depressionVol (-)
case('pondVol' ); get_ixbvar = iLookBVAR%pondVol ! pond volume at the end of time step (m3)
case('pondArea' ); get_ixbvar = iLookBVAR%pondArea ! pond area at the end of the time step (m2)
case('pondOutflow' ); get_ixbvar = iLookBVAR%pondOutflow ! pond outflow (m3)
! get to here if cannot find the variable
case default
get_ixbvar = integerMissing
Expand Down
19 changes: 19 additions & 0 deletions build/source/dshare/popMetadat.f90
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,15 @@ subroutine popMetadat(err,message)
bpar_meta(iLookBPAR%basin__aquiferBaseflowExp) = var_info('basin__aquiferBaseflowExp', 'baseflow exponent for the big bucket' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%routingGammaShape) = var_info('routingGammaShape' , 'shape parameter in Gamma distribution used for sub-grid routing', '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%routingGammaScale) = var_info('routingGammaScale' , 'scale parameter in Gamma distribution used for sub-grid routing', 's' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)

! -----
! * HDS pothole storage parameters...
! -----------------------------------
bpar_meta(iLookBPAR%depressionDepth) = var_info('depressionDepth' , 'average depth of depressional storage (depressionVol/depressionArea)' , 'm' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%depressionAreaFrac) = var_info('depressionAreaFrac' , 'fractional depressional area (depressionArea/basinArea)' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%depressionCatchAreaFrac) = var_info('depressionCatchAreaFrac' , 'fractional area of the landArea (basinArea - depressionArea) that drains to the depressions', '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%depression_p) = var_info('depression_p' , 'shape of the slope profile' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bpar_meta(iLookBPAR%depression_b) = var_info('depression_b' , 'shape of contributing fraction curve' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)

! -----
! * local model prognostic (state) variables...
Expand Down Expand Up @@ -596,6 +605,16 @@ subroutine popMetadat(err,message)
bvar_meta(iLookBVAR%routingFractionFuture) = var_info('routingFractionFuture' , 'fraction of runoff in future time steps' , '-' , get_ixVarType('routing'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%averageInstantRunoff) = var_info('averageInstantRunoff' , 'instantaneous runoff' , 'm s-1' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%averageRoutedRunoff) = var_info('averageRoutedRunoff' , 'routed runoff' , 'm s-1' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)

! -----
! * basin-wide HDS pothole storage fluxes/variables...
! -----------------------------------------
bvar_meta(iLookBVAR%vMin) = var_info('vMin' , 'volume of water in the meta depression at the start of a fill period' , 'm3' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%conAreaFrac) = var_info('conAreaFrac' , 'fractional contributing area' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%pondVolFrac) = var_info('pondVolFrac' , 'fractional pond volume at the end of time step' , '-' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%pondVol) = var_info('pondVol' , 'pond volume at the end of time step' , 'm3' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%pondArea) = var_info('pondArea' , 'pond area at the end of the time step' , 'm2' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)
bvar_meta(iLookBVAR%pondOutflow) = var_info('pondOutflow' , 'pond outflow' , 'm3' , get_ixVarType('scalarv'), iMissVec, iMissVec, .false.)

! -----
! * model indices...
Expand Down
24 changes: 19 additions & 5 deletions build/source/dshare/var_lookup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ MODULE var_lookup
integer(i4b) :: spatial_gw = integerMissing ! choice of method for spatial representation of groundwater
integer(i4b) :: subRouting = integerMissing ! choice of method for sub-grid routing
integer(i4b) :: snowDenNew = integerMissing ! choice of method for new snow density
integer(i4b) :: prPotholes = integerMissing ! choice of method for prairie potholes representation
endtype iLook_decision

! ***********************************************************************************************************
Expand Down Expand Up @@ -690,6 +691,12 @@ MODULE var_lookup
! within-grid routing
integer(i4b) :: routingGammaShape = integerMissing ! shape parameter in Gamma distribution used for sub-grid routing (-)
integer(i4b) :: routingGammaScale = integerMissing ! scale parameter in Gamma distribution used for sub-grid routing (s)
! define paramters for HDS pothole storage
integer(i4b) :: depressionDepth = integerMissing ! average depth of depressional storage (depressionVol/depressionArea) (m)
integer(i4b) :: depressionAreaFrac = integerMissing ! fractional depressional area (depressionArea/basinArea) (-)
integer(i4b) :: depressionCatchAreaFrac = integerMissing ! fractional area (of the landArea = basinArea - depressionArea) that drains to the depressions (-)
integer(i4b) :: depression_p = integerMissing ! shape of the slope profile (-)
integer(i4b) :: depression_b = integerMissing ! shape of contributing fraction curve (-)
endtype iLook_bpar

! ***********************************************************************************************************
Expand All @@ -712,6 +719,13 @@ MODULE var_lookup
integer(i4b) :: routingFractionFuture = integerMissing ! fraction of runoff in future time steps (-)
integer(i4b) :: averageInstantRunoff = integerMissing ! instantaneous runoff (m s-1)
integer(i4b) :: averageRoutedRunoff = integerMissing ! routed runoff (m s-1)
! define variables for pothole storage (HDS)
integer(i4b) :: vMin = integerMissing ! volume of water in the meta depression at the start of a fill period (m3)
integer(i4b) :: conAreaFrac = integerMissing ! fractional contributing area (-)
integer(i4b) :: pondVolFrac = integerMissing ! fractional pond volume at the end of time step (-)
integer(i4b) :: pondVol = integerMissing ! pond volume at the end of time step (m3)
integer(i4b) :: pondArea = integerMissing ! pond area at the end of the time step (m2)
integer(i4b) :: pondOutflow = integerMissing ! pond outflow (m3)
endtype iLook_bvar

! ***********************************************************************************************************
Expand Down Expand Up @@ -764,7 +778,7 @@ MODULE var_lookup
type(iLook_decision),public,parameter :: iLookDECISIONS=iLook_decision( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,&
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,&
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,&
31, 32, 33, 34, 35, 36, 37, 38)
31, 32, 33, 34, 35, 36, 37, 38, 39)
! named variables: model time
type(iLook_time), public,parameter :: iLookTIME =iLook_time ( 1, 2, 3, 4, 5, 6, 7)

Expand Down Expand Up @@ -838,12 +852,12 @@ MODULE var_lookup
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,&
51, 52, 53, 54, 55, 56, 57, 58, 59, 60)

! named variables: basin-average parameters
type(iLook_bpar), public,parameter :: iLookBPAR =ilook_bpar ( 1, 2, 3, 4, 5)
! named variables: basin-average parameters (including HDS parameters)
type(iLook_bpar), public,parameter :: iLookBPAR =ilook_bpar ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

! named variables: basin-average variables
! named variables: basin-average variables (including HDS variables)
type(iLook_bvar), public,parameter :: iLookBVAR =ilook_bvar ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,&
11, 12, 13)
11, 12, 13, 14, 15, 16, 17, 18, 19)

! named variables in varibale type structure
type(iLook_varType), public,parameter :: iLookVarType =ilook_varType ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,&
Expand Down
Loading