Dear all; I have a question about the water level of a reservoir, when the volume changed or doubled. There is a DEM file with the highest elevation 1267 m. The lowest elevation is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. Now I want to know what would be the water level if the volume rises to 1250 m? or what would be the water level if the volume doubled (14,000,000 m3)? Is there any way to write codes to do this in R? I would be more than happy if anyone could help me. Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat194 at yahoo.com [[alternative HTML version deleted]]
Homework? -- Sent from my Android device with K-9 Mail. Please excuse my brevity. On April 7, 2024 8:27:18 AM EDT, javad bayat <j.bayat194 at gmail.com> wrote:>Dear all; >I have a question about the water level of a reservoir, when the volume >changed or doubled. >There is a DEM file with the highest elevation 1267 m. The lowest elevation >is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. >Now I want to know what would be the water level if the volume rises to >1250 m? or what would be the water level if the volume doubled (14,000,000 >m3)? > >Is there any way to write codes to do this in R? >I would be more than happy if anyone could help me. >Sincerely > > > > > > > >
Rui Barradas
2024-Apr-07 14:53 UTC
[R] Question regarding reservoir volume and water level
?s 13:27 de 07/04/2024, javad bayat escreveu:> Dear all; > I have a question about the water level of a reservoir, when the volume > changed or doubled. > There is a DEM file with the highest elevation 1267 m. The lowest elevation > is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. > Now I want to know what would be the water level if the volume rises to > 1250 m? or what would be the water level if the volume doubled (14,000,000 > m3)? > > Is there any way to write codes to do this in R? > I would be more than happy if anyone could help me. > Sincerely > > > > > > > >Hello, This is a simple rule of three. If you know the level l the argument doesn't need to be named but if you know the volume v then it must be named. water_level <- function(l, v, level = 1240, volume = 7e6) { if(missing(v)) { volume * l / level } else level * v / volume } lev <- 1250 vol <- 14e6 water_level(l = lev) #> [1] 7056452 water_level(v = vol) #> [1] 2480 Hope this helps, Rui Barradas -- Este e-mail foi analisado pelo software antiv?rus AVG para verificar a presen?a de v?rus. www.avg.com
Maybe Matching Threads
- Question regarding reservoir volume and water level
- Question regarding reservoir volume and water level
- Question regarding reservoir volume and water level
- Question regarding reservoir volume and water level
- Question regarding reservoir volume and water level