py-ewr 2.3.3__py3-none-any.whl → 2.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py_ewr/evaluate_EWRs.py +10 -7
- py_ewr/model_metadata/SiteID_MDBA.csv +3 -2
- py_ewr/parameter_metadata/ewr2obj.csv +43095 -36563
- py_ewr/parameter_metadata/ewr_calc_config.json +76 -50
- py_ewr/parameter_metadata/parameter_sheet.csv +151 -159
- py_ewr/scenario_handling.py +272 -15
- {py_ewr-2.3.3.dist-info → py_ewr-2.3.5.dist-info}/METADATA +13 -3
- py_ewr-2.3.5.dist-info/RECORD +20 -0
- {py_ewr-2.3.3.dist-info → py_ewr-2.3.5.dist-info}/WHEEL +1 -1
- py_ewr-2.3.3.dist-info/RECORD +0 -20
- {py_ewr-2.3.3.dist-info → py_ewr-2.3.5.dist-info}/LICENSE +0 -0
- {py_ewr-2.3.3.dist-info → py_ewr-2.3.5.dist-info}/top_level.txt +0 -0
py_ewr/evaluate_EWRs.py
CHANGED
|
@@ -837,6 +837,7 @@ def weirpool_handle(PU: str, gauge: str, EWR: str, EWR_table: pd.DataFrame, df_F
|
|
|
837
837
|
tuple[pd.DataFrame, tuple[dict]]: EWR results for the current planning unit iteration (updated); dictionary of EWR event information
|
|
838
838
|
|
|
839
839
|
'''
|
|
840
|
+
|
|
840
841
|
# Get information about EWR (changes depending on the weirpool type):
|
|
841
842
|
weirpool_type = data_inputs.weirpool_type(EWR)
|
|
842
843
|
if weirpool_type == 'raising':
|
|
@@ -851,6 +852,7 @@ def weirpool_handle(PU: str, gauge: str, EWR: str, EWR_table: pd.DataFrame, df_F
|
|
|
851
852
|
# If there is no level data loaded in, let user know and skip the analysis
|
|
852
853
|
try:
|
|
853
854
|
levels = df_L[EWR_info['weirpool_gauge']].values
|
|
855
|
+
|
|
854
856
|
except KeyError:
|
|
855
857
|
print(f'''Cannot evaluate this ewr for {gauge} {EWR}, due to missing data. Specifically this EWR
|
|
856
858
|
also needs data for level gauge {EWR_info.get('weirpool_gauge', 'no wp gauge')}''')
|
|
@@ -4965,8 +4967,8 @@ def merge_weirpool_with_freshes(wp_freshes:List, PU_df:pd.DataFrame)-> pd.DataFr
|
|
|
4965
4967
|
pd.DataFrame: Return Dataframe with the statistics of the merged EWR
|
|
4966
4968
|
"""
|
|
4967
4969
|
|
|
4968
|
-
weirpool_pair = {'
|
|
4969
|
-
'
|
|
4970
|
+
weirpool_pair = {'SF-WP':'WP3',
|
|
4971
|
+
'LF2-WP': 'WP4' }
|
|
4970
4972
|
|
|
4971
4973
|
for fresh in wp_freshes:
|
|
4972
4974
|
try:
|
|
@@ -5006,7 +5008,7 @@ def merge_weirpool_with_freshes(wp_freshes:List, PU_df:pd.DataFrame)-> pd.DataFr
|
|
|
5006
5008
|
column_attributes = list(set([col.split("_")[-1] for col in PU_df.columns if "eventYears" not in col]))
|
|
5007
5009
|
for col in column_attributes:
|
|
5008
5010
|
PU_df[f"{fresh}/{weirpool_pair[fresh]}_{col}"] = np.nan
|
|
5009
|
-
|
|
5011
|
+
|
|
5010
5012
|
return PU_df
|
|
5011
5013
|
|
|
5012
5014
|
# make handling function available to process
|
|
@@ -5133,6 +5135,7 @@ def calc_sorter(df_F:pd.DataFrame, df_L:pd.DataFrame, gauge:str, EWR_table:pd.Da
|
|
|
5133
5135
|
EWR_codes = PU_table['Code']
|
|
5134
5136
|
PU_df = pd.DataFrame()
|
|
5135
5137
|
PU_events = {}
|
|
5138
|
+
|
|
5136
5139
|
for i, EWR in enumerate(EWR_codes):
|
|
5137
5140
|
events = {}
|
|
5138
5141
|
|
|
@@ -5165,10 +5168,10 @@ def calc_sorter(df_F:pd.DataFrame, df_L:pd.DataFrame, gauge:str, EWR_table:pd.Da
|
|
|
5165
5168
|
PU_df, events = handle_function(**kwargs)
|
|
5166
5169
|
if events != {}:
|
|
5167
5170
|
PU_events[str(EWR)]=events
|
|
5168
|
-
|
|
5169
|
-
wp_freshes = [ewr for ewr in EWR_codes if ewr in ["
|
|
5170
|
-
if wp_freshes:
|
|
5171
|
-
|
|
5171
|
+
|
|
5172
|
+
# wp_freshes = [ewr for ewr in EWR_codes.to_list() if ewr in ["SF-WP","LF2-WP"]]
|
|
5173
|
+
# if wp_freshes:
|
|
5174
|
+
# PU_df = merge_weirpool_with_freshes(wp_freshes, PU_df)
|
|
5172
5175
|
|
|
5173
5176
|
PU_name = PU_items['PlanningUnitName'].loc[PU_items[PU_items['PlanningUnitID'] == PU].index[0]]
|
|
5174
5177
|
|
|
@@ -847,7 +847,7 @@ EUROBIN,Ovens River at Eurobin,,403250A,4
|
|
|
847
847
|
EURSTP,Euroa STP,,,4
|
|
848
848
|
EUS2MIL,Euston to Mildura Reach,,,
|
|
849
849
|
EUSTDS,River Murray D/S Euston Weir,,414203,4
|
|
850
|
-
EUSTON
|
|
850
|
+
EUSTON,River Murray U/S Euston Weir,,414209,4
|
|
851
851
|
EUSTUS,River Murray U/S Euston Weir,,414209,4
|
|
852
852
|
EWDFFCL,Env water Flora Fauna -Cardross Lakes,Environmental Water Deliveries from Flora & Fauna Ent,,4
|
|
853
853
|
EWEI,Lake Alexandrina U/S Ewe Island and Barrages,Ewe Island Dual Vertical Slot fishway,,5
|
|
@@ -1348,8 +1348,9 @@ LOCK7US,River Murray U/S Lock 7,,A4260508,5
|
|
|
1348
1348
|
LOCK8DS,River Murray D/S Lock 8,,4260507,5
|
|
1349
1349
|
LOCK8US,River Murray U/S Lock 8,,426506,5
|
|
1350
1350
|
LOCK8US,River Murray U/S Lock 8,,A426506,5
|
|
1351
|
+
LOCK8US,River Murray U/S Lock 8,,A4260506,5
|
|
1351
1352
|
LOCK9DS,River Murray D/S Lock 9,,4260505,5
|
|
1352
|
-
LOCK 9
|
|
1353
|
+
LOCK 9,River Murray U/S Lock 9,SAMPLE AT GAUGING STATION,A4260501,5
|
|
1353
1354
|
LOCK9US,River Murray U/S Lock 9,SAMPLE AT GAUGING STATION,A4260501,5
|
|
1354
1355
|
LOCKING,Lockington Main Drain,Lockington Main Drain Shepparton,407712,4
|
|
1355
1356
|
LOCKRIC,Lockington Main Drain adj to Richardsons,Lockington Main Drain adjacent to Richardsons,,4
|