Skip to content

Commit

Permalink
added comments based on Erik review on pull-request #336
Browse files Browse the repository at this point in the history
  • Loading branch information
nmizukami committed Mar 9, 2023
1 parent 4c82136 commit ad95b15
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
27 changes: 15 additions & 12 deletions route/build/src/dataTypes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,17 @@ MODULE dataTypes
integer(i4b) , allocatable :: qhru_ix(:) ! Index of hrus associated with runoff simulation (="qhru")
end type remap

! mapping time step between two time series e.g., simulation time step vs runoff time step for one simulation time step
! mapping time step between two time series e.g., simulation time step and runoff time step for one simulation time step
! runoff value used at each simulaition time step is weighted average of runoff(s) across input time step(s)
! (can be one, but several if simulation step is larger than runoff time step)
! This store indices of netCDF files in input file streams and time step weight of input variables from each input timestep
type, public :: map_time
integer(i4b), allocatable :: iFile(:)
integer(i4b), allocatable :: iTime(:)
real(dp), allocatable :: frac(:)
integer(i4b), allocatable :: iFile(:) ! index of input netCDF file
integer(i4b), allocatable :: iTime(:) ! index of time steps within the corresponding netCDF
real(dp), allocatable :: frac(:) ! weight
end type map_time

! ---------- forcing and water management data ----------------------------------------------------------------------
! ---------- input forcing data ----------------------------------------------------------------------

type, public :: inputData
integer(i4b) :: nSpace(1:2) ! number of spatial dimension
Expand All @@ -164,19 +167,19 @@ MODULE dataTypes
real(dp) :: fillvalue ! fillvalue
end type inputData

type, public, extends(inputData) :: runoff
type, public, extends(inputData) :: runoff ! runoff data
integer(i4b) , allocatable :: hru_id(:) ! id of HM_HRUs or RN_HRUs at which runoff is stored (size: nSpace(1))
integer(i4b) , allocatable :: hru_ix(:) ! Index of RN_HRUs associated with river network (used only if HM_HRUs = RN_HRUs)
real(dp) , allocatable :: basinRunoff(:) ! remapped river network catchment runoff (size: number of nHRU)
real(dp) , allocatable :: basinEvapo(:) ! remapped river network catchment runoff (size: number of nHRU)
real(dp) , allocatable :: basinPrecip(:) ! remapped river network catchment runoff (size: number of nHRU)
real(dp) , allocatable :: basinRunoff(:) ! remapped river network catchment runoff [depth/time] (size: number of nHRU)
real(dp) , allocatable :: basinEvapo(:) ! remapped river network catchment evaporation [depth/time] (size: number of nHRU)
real(dp) , allocatable :: basinPrecip(:) ! remapped river network catchment precipitation [depth/time] (size: number of nHRU)
end type runoff

type, public, extends(inputData) :: wm
type, public, extends(inputData) :: wm ! water-management
integer(i4b) , allocatable :: seg_id(:) ! id of reach in data (size: nSpace)
integer(i4b) , allocatable :: seg_ix(:) ! Index of river network reach IDs corresponding reach ID in data
real(dp) , allocatable :: flux_wm(:) ! allocated flux to existing river network using sort_flux (size: number of nRCH)
real(dp) , allocatable :: vol_wm(:) ! allocated target vol to existing river network using sort_flux (size: number of nRCH)
real(dp) , allocatable :: flux_wm(:) ! allocated flux to existing river network using sort_flux [m3/s] (size: number of nRCH)
real(dp) , allocatable :: vol_wm(:) ! allocated target vol to existing river network using sort_flux [m3/s] (size: number of nRCH)
end type wm

! ---------- reach parameters ----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions route/settings/SAMPLE.control
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<fname_state_in> INPUT_RESTART_NC ! input restart netCDF name. remove or 'coldstart' for run without any particular restart file
<newFileFrequency> month ! output netcdf frequency: single, daily, monthly, yearly
<dt_qsim> 86400 ! time interval of the forcing [sec] e.g., 86400 sec for daily step
! lake mode
! lake and water management (wm) mode
<is_lake_sim> T ! switch on (T) or off (F) lake simulation
<is_flux_wm> T ! switch on (T) or off (F) abstraction from or injection to seg/lakes
<is_vol_wm> T ! switch on (T) or off (F) target volume
<is_vol_wm> T ! switch on (T) or off (F) target volume (threshold lake volume where water release is trigerred)
<is_vol_wm_jumpstart> T ! switch on (T) or off (F) for start for lakes with target volume
! ****************************************************************************************************************************
! DEFINE DIRECTORIES
Expand Down

0 comments on commit ad95b15

Please sign in to comment.