Skip to content

Commit

Permalink
relevant for sediment and acude=true:
Browse files Browse the repository at this point in the history
lake_vollost contained the REMAINING storage capacity. Now corrected to the LOSS in the timestep. additional file lake_maxstorcap.out for displaying the  REMAINING storage capacity added.
  • Loading branch information
TillF committed Jul 2, 2021
1 parent cfff774 commit 3c865f2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 21 deletions.
16 changes: 9 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ lake_outflow
lake_storage
lake_retention
lake_vollost
lake_maxstorcap
lake_volume
lake_sedinflow
lake_sedoutflow
Expand Down Expand Up @@ -1848,13 +1849,14 @@ Nr. |Output file | Content
20 | ```lake_outflow.out``` | Water outflow discharges from the reservoir size classes<sup>3</sup>
21 | ```lake_storage.out``` | Water volume of the reservoir size classes<sup>3</sup>
22 | ```lake_retention.out``` | Water retention in the reservoir size classes<sup>3</sup>
23 | ```lake_vollost.out``` | Sediment retention in the reservoir size classes<sup>3</sup>
24 | ```lake_volume.out``` | Water stored in the reservoir size classes<sup>3</sup>
25 | ```lake_volume_r.out``` | Water stored in the reservoir size classes<sup>1</sup>
26 | ```lake_sedinflow.out``` | Sediment inflow discharges into the reservoir size classes<sup>3</sup>
27 | ```lake_sedoutflow.out``` | Sediment outflow discharges from the reservoir size classes<sup>3</sup>
28 | ```lake_sizedistoutflow.out``` | Effluent grain size distribution of the reservoir size classes <sup>4</sup>
29 | ```lake_storage.stat, reservoir_storage.stat``` (optional) | Initialisation state variables, see [section 3.6](#3-6-state-variables)
23 | ```lake_vollost.out``` | Sediment retention in the reservoir size classes per timestep<sup>3</sup>
24 | ```lake_maxstorcap.out``` | Current (remaining) maximum sotrage capacity for reservoir size classes<sup>3</sup>
25 | ```lake_volume.out``` | Water stored in the reservoir size classes<sup>3</sup>
26 | ```lake_volume_r.out``` | Water stored in the reservoir size classes<sup>1</sup>
27 | ```lake_sedinflow.out``` | Sediment inflow discharges into the reservoir size classes<sup>3</sup>
28 | ```lake_sedoutflow.out``` | Sediment outflow discharges from the reservoir size classes<sup>3</sup>
29 | ```lake_sizedistoutflow.out``` | Effluent grain size distribution of the reservoir size classes <sup>4</sup>
30 | ```lake_storage.stat, reservoir_storage.stat``` (optional) | Initialisation state variables, see [section 3.6](#3-6-state-variables)

<sup>1</sup> Results are displayed for the whole catchment after grouping them by reservoir size classes (one value for the whole catchment and each reservoir size class) <br>
<sup>2</sup> Results are displayed for the whole catchment without distinguishing between size classes (one value for the whole catchment) <br>
Expand Down
2 changes: 1 addition & 1 deletion src/General/allocate_h.f90
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ subroutine allocate_reservoir()
lakefrout(subasin,5), &
lakecumfrout(subasin,5), &
lakerunoff(366*nt,subasin), &
lake_vollost(366*nt,subasin,5), & !actually, only relevant when dosediment=TRUE, activated here for debugging

STAT = istate)

Expand All @@ -380,7 +381,6 @@ subroutine allocate_reservoir()
lakefracsedout_hrr(366*nt,subasin,5,n_sed_class), &
lakedep_hrr(366*nt,subasin,5), &
lakecumdep_hrr(subasin,5), &
lake_vollost(366*nt,subasin,5), &
cumseddep(subasin), &
lake_cumseddep(366*nt,subasin,5), &

Expand Down
2 changes: 1 addition & 1 deletion src/General/common_h.f90
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module common_h
LOGICAL :: f_river_susp_sediment_storage, f_river_velocity, f_river_bedload, f_river_infiltration, f_actetranspiration,f_qhorton,f_subsurface_runoff,f_total_overlandflow,f_gw_discharge,f_potetranspiration,f_gw_loss,f_gw_recharge
LOGICAL :: f_res_watbal,f_res_vollost,f_res_cav,f_res_hydraul,f_res_bedchange,f_res_sedbal,f_res_longitudunal,f_res_sedcomposition
LOGICAL :: f_lake_inflow_r,f_lake_outflow_r,f_lake_retention_r,f_lake_volume_r,f_lake_sedinflow_r,f_lake_sedoutflow_r,f_lake_sedretention_r,f_lake_sedimentation_r
LOGICAL :: f_lake_watbal,f_lake_sedbal,f_lake_inflow,f_lake_outflow,f_lake_volume,f_lake_retention,f_lake_vollost,f_lake_sedinflow,f_lake_sedoutflow,f_lake_sizedistoutflow
LOGICAL :: f_lake_watbal,f_lake_sedbal,f_lake_inflow,f_lake_outflow,f_lake_volume,f_lake_retention,f_lake_vollost,f_lake_maxstorcap,f_lake_sedinflow,f_lake_sedoutflow,f_lake_sizedistoutflow
LOGICAL :: f_snowEnergyCont, f_snowWaterEquiv, f_snowAlbedo, f_snowCover, f_snowTemp, f_surfTemp, f_liquFrac, f_fluxPrec, f_fluxSubl, f_fluxFlow, f_fluxNetS, f_fluxNetL, f_fluxSoil, f_fluxSens, f_stoiPrec, f_stoiSubl, f_stoiFlow, f_rateAlbe, f_precipMod, f_cloudFrac,f_radiMod,f_temperaMod,f_rel_elevation
LOGICAL :: do_rad_corr=.FALSE. ! modification of radiation with aspect and slope
LOGICAL :: do_alt_corr=.FALSE. ! modification of temperature with altitude of LU
Expand Down
3 changes: 3 additions & 0 deletions src/General/readgen.f90
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ SUBROUTINE readgen(path2do_dat)
f_lake_volume=.FALSE.
f_lake_retention=.FALSE.
f_lake_vollost=.FALSE.
f_lake_maxstorcap=.FALSE.
f_lake_sedinflow=.FALSE.
f_lake_sedoutflow=.FALSE.
f_lake_sizedistoutflow=.FALSE.
Expand Down Expand Up @@ -660,6 +661,8 @@ SUBROUTINE readgen(path2do_dat)
f_lake_retention=.TRUE.
CASE ('lake_vollost')
f_lake_vollost=.TRUE.
CASE ('lake_maxstorcap')
f_lake_maxstorcap=.TRUE.
CASE ('lake_sedinflow')
f_lake_sedinflow=dosediment
CASE ('lake_sedoutflow')
Expand Down
39 changes: 27 additions & 12 deletions src/Reservoir/lake.f90
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ SUBROUTINE lake(STATUS,muni)
call open_subdaily_output_lake(f_lake_outflow,'lake_outflow.out','Year, day, hour, reservoir_class, lakeoutflow(m**3/timestep)')
call open_subdaily_output_lake(f_lake_volume,'lake_volume.out','Year, day, hour, reservoir_class, lakevolume(m**3)')
call open_subdaily_output_lake(f_lake_vollost,'lake_vollost.out','Year, day, hour, reservoir_class, lakevollost(m**3)')
call open_subdaily_output_lake(f_lake_maxstorcap,'lake_maxstorcap.out','Year, day, hour, reservoir_class, maxstorcap(m**3)')
call open_subdaily_output_lake(f_lake_retention,'lake_retention.out','Year, day, hour, reservoir_class, lakeretention(m**3/timestep)')

IF (dosediment) then
Expand Down Expand Up @@ -943,7 +944,7 @@ SUBROUTINE lake(STATUS,muni)
lake_vollost(step,muni,5)=(lakesedin_hrr(step,muni,5)/acud(muni,5))/1.5
ENDIF
DO k=1,5
maxlake(muni,k)=max(0.,maxlake(muni,k)-lake_vollost(step,muni,k))
maxlake(muni,k)=max(0.,maxlake(muni,k)-lake_vollost(step,muni,k)) !
!write(*,'(3I4,5F15.3)')step,muni,k,lake_vollost(step,muni,k),maxlake(muni,k)
ENDDO
ENDIF
Expand Down Expand Up @@ -1358,19 +1359,33 @@ SUBROUTINE lake(STATUS,muni)

IF (f_lake_vollost) then
OPEN(11,FILE=pfadn(1:pfadi)//'lake_vollost.out',STATUS='old', &
POSITION='append')
DO d=1,dayyear
DO ih=1,nt
hour=ih
POSITION='append')
DO d=1,dayyear
DO ih=1,nt
hour=ih
step=(d-1)*nt+hour
DO k=1,5
WRITE(11,fmtstr)t,d,hour,k,(maxstorcap_hrr(step,imun,k),imun=1,subasin)
!WRITE(11,'(4I6,<subasin>f15.3)')t,d,hour,k,(maxstorcap_hrr(step,imun,k),imun=1,subasin)
ENDDO
ENDDO
ENDDO
DO k=1,5
WRITE(11,fmtstr)t,d,hour,k,(lake_vollost(step,imun,k),imun=1,subasin)
ENDDO
ENDDO
ENDDO
CLOSE(11)
ENDIF
ENDIF

IF (f_lake_maxstorcap) then
OPEN(11,FILE=pfadn(1:pfadi)//'lake_maxstorcap.out',STATUS='old', &
POSITION='append')
DO d=1,dayyear
DO ih=1,nt
hour=ih
step=(d-1)*nt+hour
DO k=1,5
WRITE(11,fmtstr)t,d,hour,k,(maxstorcap_hrr(step,imun,k),imun=1,subasin)
ENDDO
ENDDO
ENDDO
CLOSE(11)
ENDIF

IF (dosediment) then
IF (f_lake_sedinflow) then
Expand Down

0 comments on commit 3c865f2

Please sign in to comment.