HARPgroup / om

Object-oriented Meta-model
0 stars 1 forks source link

Bug report: Testing and QA Smin_L30_mg Smin_L90_mg #521

Open rburghol opened 10 months ago

rburghol commented 10 months ago

I have a pump store reservoir that I am testing, but Smin is resolving as zero, even when there is a bunch of storage (or a little bit of storage) remaining. It appears that the code is skipping calculation of Smin if it IS marked as pump_store == TRUE, when it should be calculating it.

I think the problem is here:

if (pump_store || !imp_enabled) {
  flow_ts <- ddat2$Qintake
  flow_ts_name = "Source Stream"

  # No storage if there is no impoundment
  Smin_L30_mg <- 0
  Smin_L90_mg <- 0

}

The above code sets Smin to 0.0 if this is a pump_store, but if it's a pump store it DOES have storage by definition, and it's storage needs to be counted. Now, I believe that we can amend this by saying either if (!pump_store || !imp_enabled)

See amended code in PR #522