Open dprincz opened 3 weeks ago
You can initialize them based on lake level input. If lake area lake_area
and elevation lake_elv
are provided, it's initialized to
store1 = lake_elv*lake_area
and store2 = store1
, and skips trying to back calculate it using the equations.
It happens in flowinit
:
! For control with rating curve, use rating curve.
! For controlled reservoirs, just use channel stoage rule
! (above) so we at least have some value.
if(b1(k).gt.0.0.and.b2(k).gt.0.0)then
if(lake_area(k).gt.0.0.and.lake_elv(k,kt).gt.0.0)then
store1(n)=lake_elv(k,kt)*lake_area(k)
elseif(b6(k).gt.0.0.and.lake_elv(k,kt).gt.0.0)then
store1(n)=max(0.0_4,lake_elv(k,kt)-b7(k))*b6(k)
elseif(b3(k).eq.0.0)then
store1(n)=(qo2(n)/b1(k))**(1.0_4/b2(k))
elseif(b3(k).gt.0.0)then
store1(n)=10.0
trialq=0.0
do while(trialq.lt.qo2(n))
store1(n)=2.0_4*store1(n)
trialq=store1(n)*(b1(k)+store1(n)*(b2(k)+store1(n)*
* (b3(k)+store1(n)*(b4(k)+b5(k)*store1(n)))))
enddo
endif
store2(n)=store1(n)
endif
You have to populate those values in reservoir.tb0. You'll see them copied in rte_module
:
lake_area = real(fms%rsvr%rls%area, kind(lake_area))
lake_elv(:, 1) = real(fms%rsvr%rls%zlvl0, kind(lake_elv))
The keywords are :ReachArea
and :InitLvl
in units of m**2 and m, respectively. They're specified and provided in the header of the tb0 file, along with the other reservoir attributes.
These fields cannot be specified using the txt format file.
If you are using MESH_input_reservoir.tb0
, there is an option to define the water level and area of a reservoir using the keywords:ReachArea
and :InitLvl
. Define them along with the coefficients, and it will initialize the reservoir from the specified level and back calculates the storage values from the level.
Make sure you are using RUNMODE runrte
in your run option file.
Please note that this option will not work with MESH_input_reservoir.txt.
copying @MIsmlAhmed
Thanks all for your responses. That's helpful.
Note that the above does not apply in the case of using DZTR and initial values are read from the DZTR parameter file
Very good point. Fuad mentioned this but it wasn't captured when the conversation was transferred.
Mohamed Ahmed: