-
I'm trying to read pump discharge but the quantity is not given in the res1d object. The quantities list in res1d object are given below. The pump discharge is not listed. Same res1d file given more quantities in MIKE+ (see attached screenshot). I have uploaded the res1d file to the ftp (ftp://tea42@ftp.dhigroup.com/pub/zhyu/richmond_2041OCP_24hr_2.4m_Upgrade2041OCP-24hr-2.4m-UpgradeRichmondHD.res1d) . Thanks for your help. ['WaterLevel', |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
In this case the provided res1d file does contain only 'Discharge' quantity for structures. Here Mike1D defines the pump on a Q-point of so called structure reach (the same is for weir and orifice). Mike+ plus is interpreting the 'Discharge' quantity of this Q-point as Pump Discharge. Note that there is also other kind of output called 'DischargeInStructure', which is possible to enable in Mike+ (I won't go into detail what is the difference between 'Discharge' and 'DischargeInStructure'): Here is an example script to retrieve a discharge of pump 'Woodward_P4': from mikeio1d.res1d import Res1D
from mikeio1d.res1d import QueryDataReach
pump_id = "Pump:Woodward_P4"
res1d = Res1D("richmond_2041OCP_24hr_2.4m_Upgrade2041OCP-24hr-2.4m-UpgradeRichmondHD.res1d", reaches=[pump_id])
query_pump = QueryDataReach("Discharge", pump_id, 5.0)
df = res1d.read(query_pump)
print(df) which yields the following output I think the mikeio1d API should be improved in this case to retrieve quantities on structures reaches. I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Thanks @gedaskir. So the trick is to add structure type before the name? I got following error. Am I using a different version? |
Beta Was this translation helpful? Give feedback.
-
Yes, it looks so. For the above script to work install the latest version from main: The statement reaches=[pump_id] allows to load only that time series related to pump. This is more performant. res1d = Res1D("richmond_2041OCP_24hr_2.4m_Upgrade2041OCP-24hr-2.4m-UpgradeRichmondHD.res1d") |
Beta Was this translation helpful? Give feedback.
-
Great. It works now. |
Beta Was this translation helpful? Give feedback.
In this case the provided res1d file does contain only 'Discharge' quantity for structures. Here Mike1D defines the pump on a Q-point of so called structure reach (the same is for weir and orifice). Mike+ plus is interpreting the 'Discharge' quantity of this Q-point as Pump Discharge. Note that there is also other kind of output called 'DischargeInStructure', which is possible to enable in Mike+ (I won't go into detail what is the difference between 'Discharge' and 'DischargeInStructure'):
Here is an example script to retrieve a discharge of pump 'Woodward_P4':