py-ewr 2.3.4__tar.gz → 2.3.6__tar.gz
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-2.3.4 → py_ewr-2.3.6}/PKG-INFO +3 -2
- {py_ewr-2.3.4 → py_ewr-2.3.6}/README.md +2 -1
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/evaluate_EWRs.py +10 -7
- py_ewr-2.3.6/py_ewr/parameter_metadata/ewr2obj.csv +43331 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/parameter_metadata/ewr_calc_config.json +63 -49
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/parameter_metadata/parameter_sheet.csv +151 -159
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/scenario_handling.py +267 -7
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr.egg-info/PKG-INFO +3 -2
- {py_ewr-2.3.4 → py_ewr-2.3.6}/setup.py +1 -1
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_evaluate_ewr_rest.py +3 -3
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_evaluate_ewrs.py +29 -32
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_scenario_handling.py +10 -10
- py_ewr-2.3.4/py_ewr/parameter_metadata/ewr2obj.csv +0 -36799
- {py_ewr-2.3.4 → py_ewr-2.3.6}/LICENSE +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/__init__.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/data_inputs.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/io.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/model_metadata/SiteID_MDBA.csv +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/model_metadata/SiteID_NSW.csv +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/model_metadata/iqqm_stations.csv +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/observed_handling.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/parameter_metadata/obj2target.csv +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/parameter_metadata/obj2yrtarget.csv +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr/summarise_results.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr.egg-info/SOURCES.txt +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr.egg-info/dependency_links.txt +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr.egg-info/requires.txt +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/py_ewr.egg-info/top_level.txt +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/pyproject.toml +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/setup.cfg +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_data_inputs.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_observed_handling.py +0 -0
- {py_ewr-2.3.4 → py_ewr-2.3.6}/tests/test_summarise_results.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: py_ewr
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.6
|
|
4
4
|
Summary: Environmental Water Requirement calculator
|
|
5
5
|
Home-page: https://github.com/MDBAuth/EWR_tool
|
|
6
6
|
Author: Martin Job
|
|
@@ -43,9 +43,10 @@ Dynamic: summary
|
|
|
43
43
|
[](https://pypi.org/project/py-ewr/)
|
|
44
44
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
45
45
|
|
|
46
|
-
### **EWR tool version 2.3.
|
|
46
|
+
### **EWR tool version 2.3.6 README**
|
|
47
47
|
|
|
48
48
|
### **Notes on recent version updates**
|
|
49
|
+
- Including metadata report (this is still being ironed out and tested)
|
|
49
50
|
- CLLMM_c and CLLMM_d ewrs are now able to be calculated without all barrage level gauges being present in the model file.
|
|
50
51
|
- Including draft objective mapping files in the package (see below sub heading **Objective mapping** for more information). Objective mapping has been therefore pulled out of the parameter sheet
|
|
51
52
|
- Including an example parallel processing script for running the EWR tool
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
[](https://pypi.org/project/py-ewr/)
|
|
4
4
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
5
5
|
|
|
6
|
-
### **EWR tool version 2.3.
|
|
6
|
+
### **EWR tool version 2.3.6 README**
|
|
7
7
|
|
|
8
8
|
### **Notes on recent version updates**
|
|
9
|
+
- Including metadata report (this is still being ironed out and tested)
|
|
9
10
|
- CLLMM_c and CLLMM_d ewrs are now able to be calculated without all barrage level gauges being present in the model file.
|
|
10
11
|
- Including draft objective mapping files in the package (see below sub heading **Objective mapping** for more information). Objective mapping has been therefore pulled out of the parameter sheet
|
|
11
12
|
- Including an example parallel processing script for running the EWR tool
|
|
@@ -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
|
|