py-ewr 2.3.3__tar.gz → 2.3.4__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.3 → py_ewr-2.3.4}/PKG-INFO +12 -3
- {py_ewr-2.3.3 → py_ewr-2.3.4}/README.md +1 -1
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/model_metadata/SiteID_MDBA.csv +3 -2
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/parameter_metadata/ewr_calc_config.json +14 -2
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/scenario_handling.py +9 -9
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr.egg-info/PKG-INFO +12 -3
- {py_ewr-2.3.3 → py_ewr-2.3.4}/setup.py +1 -1
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_scenario_handling.py +2 -3
- {py_ewr-2.3.3 → py_ewr-2.3.4}/LICENSE +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/__init__.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/data_inputs.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/evaluate_EWRs.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/io.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/model_metadata/SiteID_NSW.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/model_metadata/iqqm_stations.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/observed_handling.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/parameter_metadata/ewr2obj.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/parameter_metadata/obj2target.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/parameter_metadata/obj2yrtarget.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/parameter_metadata/parameter_sheet.csv +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr/summarise_results.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr.egg-info/SOURCES.txt +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr.egg-info/dependency_links.txt +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr.egg-info/requires.txt +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/py_ewr.egg-info/top_level.txt +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/pyproject.toml +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/setup.cfg +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_data_inputs.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_evaluate_ewr_rest.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_evaluate_ewrs.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_observed_handling.py +0 -0
- {py_ewr-2.3.3 → py_ewr-2.3.4}/tests/test_summarise_results.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: py_ewr
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Environmental Water Requirement calculator
|
|
5
5
|
Home-page: https://github.com/MDBAuth/EWR_tool
|
|
6
6
|
Author: Martin Job
|
|
@@ -28,13 +28,22 @@ Requires-Dist: xarray
|
|
|
28
28
|
Requires-Dist: h5py
|
|
29
29
|
Requires-Dist: netCDF4
|
|
30
30
|
Requires-Dist: numpy<2
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: project-url
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: summary
|
|
31
40
|
|
|
32
41
|
[]()
|
|
33
42
|
[](https://pypi.org/project/py-ewr/)
|
|
34
43
|
[](https://pypi.org/project/py-ewr/)
|
|
35
44
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
36
45
|
|
|
37
|
-
### **EWR tool version 2.3.
|
|
46
|
+
### **EWR tool version 2.3.4 README**
|
|
38
47
|
|
|
39
48
|
### **Notes on recent version updates**
|
|
40
49
|
- CLLMM_c and CLLMM_d ewrs are now able to be calculated without all barrage level gauges being present in the model file.
|
|
@@ -3,7 +3,7 @@
|
|
|
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.4 README**
|
|
7
7
|
|
|
8
8
|
### **Notes on recent version updates**
|
|
9
9
|
- CLLMM_c and CLLMM_d ewrs are now able to be calculated without all barrage level gauges being present in the model file.
|
|
@@ -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
|
|
@@ -517,7 +517,19 @@
|
|
|
517
517
|
"BF4-single-F",
|
|
518
518
|
"BF5-single-F",
|
|
519
519
|
"BF_FD1-single-F",
|
|
520
|
-
"BF_FD2-single-F"
|
|
520
|
+
"BF_FD2-single-F",
|
|
521
|
+
"BF1_1-single-F",
|
|
522
|
+
"BF1_2-single-F",
|
|
523
|
+
"BF1_3-single-F",
|
|
524
|
+
"BF1_4-single-F",
|
|
525
|
+
"BF1_5-single-F",
|
|
526
|
+
"BF1_6-single-F",
|
|
527
|
+
"BF1_7-single-F",
|
|
528
|
+
"BF1_8-single-F",
|
|
529
|
+
"BF1_9-single-F",
|
|
530
|
+
"BF1_10-single-F",
|
|
531
|
+
"BF1_11-single-F",
|
|
532
|
+
"BF1_12-single-F"
|
|
521
533
|
],
|
|
522
534
|
"ctf_handle_multi": [
|
|
523
535
|
"CF-multigauge-F"
|
|
@@ -663,4 +675,4 @@
|
|
|
663
675
|
"level_change_handle": [
|
|
664
676
|
"FLR-single-L"
|
|
665
677
|
]
|
|
666
|
-
}
|
|
678
|
+
}
|
|
@@ -336,7 +336,7 @@ def cleaner_standard_timeseries(input_df: pd.DataFrame, ewr_table_path: str = No
|
|
|
336
336
|
log.info('Could not identify gauge in column name:', gauge, ', skipping analysis of data in this column.')
|
|
337
337
|
return df_flow, df_level
|
|
338
338
|
|
|
339
|
-
def cleaner_netcdf_werp(input_df: pd.DataFrame, stations: dict) -> pd.DataFrame:
|
|
339
|
+
def cleaner_netcdf_werp(input_df: pd.DataFrame, stations: dict, ewr_table_path: str) -> pd.DataFrame:
|
|
340
340
|
|
|
341
341
|
'''Ingests dataframe, cleans up into a format matching IQQM csv
|
|
342
342
|
|
|
@@ -370,8 +370,8 @@ def cleaner_netcdf_werp(input_df: pd.DataFrame, stations: dict) -> pd.DataFrame:
|
|
|
370
370
|
cleaned_df.index.names = ['Date']
|
|
371
371
|
|
|
372
372
|
# Split gauges into flow and level, allocate to respective dataframe
|
|
373
|
-
flow_gauges = data_inputs.get_gauges('flow gauges')
|
|
374
|
-
level_gauges = data_inputs.get_gauges('level gauges')
|
|
373
|
+
flow_gauges = data_inputs.get_gauges('flow gauges', ewr_table_path=ewr_table_path)
|
|
374
|
+
level_gauges = data_inputs.get_gauges('level gauges', ewr_table_path=ewr_table_path)
|
|
375
375
|
df_flow = pd.DataFrame(index = cleaned_df.index)
|
|
376
376
|
df_level = pd.DataFrame(index = cleaned_df.index)
|
|
377
377
|
for gauge in cleaned_df.columns:
|
|
@@ -455,7 +455,7 @@ def match_MDBA_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame, ewr_t
|
|
|
455
455
|
df_flow = pd.DataFrame(index = input_df.index)
|
|
456
456
|
df_level = pd.DataFrame(index = input_df.index)
|
|
457
457
|
|
|
458
|
-
unique_gauges = data_inputs.get_gauges('all gauges')
|
|
458
|
+
unique_gauges = data_inputs.get_gauges('all gauges', ewr_table_path=ewr_table_path)
|
|
459
459
|
flow_gauges = data_inputs.get_gauges('flow gauges', ewr_table_path=ewr_table_path)
|
|
460
460
|
level_gauges = data_inputs.get_gauges('level gauges', ewr_table_path=ewr_table_path)
|
|
461
461
|
|
|
@@ -534,7 +534,7 @@ def match_MDBA_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame, ewr_t
|
|
|
534
534
|
|
|
535
535
|
# return df_flow, df_level
|
|
536
536
|
|
|
537
|
-
def match_NSW_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame) -> tuple:
|
|
537
|
+
def match_NSW_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame, ewr_table_path: str) -> tuple:
|
|
538
538
|
'''Checks if the source file columns have EWRs available, returns a flow and level dataframe with only
|
|
539
539
|
the columns with EWRs available. Renames columns to gauges
|
|
540
540
|
|
|
@@ -546,8 +546,8 @@ def match_NSW_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame) -> tup
|
|
|
546
546
|
tuple[pd.DataFrame, pd.DataFrame]: flow dataframe, water level dataframe
|
|
547
547
|
|
|
548
548
|
'''
|
|
549
|
-
flow_gauges = data_inputs.get_gauges('flow gauges')
|
|
550
|
-
level_gauges = data_inputs.get_gauges('level gauges')
|
|
549
|
+
flow_gauges = data_inputs.get_gauges('flow gauges', ewr_table_path=ewr_table_path)
|
|
550
|
+
level_gauges = data_inputs.get_gauges('level gauges', ewr_table_path=ewr_table_path)
|
|
551
551
|
df_flow = pd.DataFrame(index = input_df.index)
|
|
552
552
|
df_level = pd.DataFrame(index = input_df.index)
|
|
553
553
|
for col in input_df.columns:
|
|
@@ -622,7 +622,7 @@ class ScenarioHandler:
|
|
|
622
622
|
|
|
623
623
|
elif self.model_format == 'IQQM - netcdf':
|
|
624
624
|
df_unpacked = unpack_netcdf_as_dataframe(scenarios[scenario])
|
|
625
|
-
df_F, df_L = cleaner_netcdf_werp(df_unpacked, data_inputs.get_iqqm_codes())
|
|
625
|
+
df_F, df_L = cleaner_netcdf_werp(df_unpacked, data_inputs.get_iqqm_codes(),self.parameter_sheet)
|
|
626
626
|
|
|
627
627
|
elif self.model_format == 'ten thousand year':
|
|
628
628
|
df = pd.read_csv(scenarios[scenario], index_col = 'Date')
|
|
@@ -808,4 +808,4 @@ class ScenarioHandler:
|
|
|
808
808
|
if not self.pu_ewr_statistics:
|
|
809
809
|
self.process_scenarios()
|
|
810
810
|
|
|
811
|
-
return summarise_results.summarise(self.pu_ewr_statistics , self.yearly_events, parameter_sheet_path=self.parameter_sheet)
|
|
811
|
+
return summarise_results.summarise(self.pu_ewr_statistics , self.yearly_events, parameter_sheet_path=self.parameter_sheet)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: py_ewr
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.4
|
|
4
4
|
Summary: Environmental Water Requirement calculator
|
|
5
5
|
Home-page: https://github.com/MDBAuth/EWR_tool
|
|
6
6
|
Author: Martin Job
|
|
@@ -28,13 +28,22 @@ Requires-Dist: xarray
|
|
|
28
28
|
Requires-Dist: h5py
|
|
29
29
|
Requires-Dist: netCDF4
|
|
30
30
|
Requires-Dist: numpy<2
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: author-email
|
|
33
|
+
Dynamic: classifier
|
|
34
|
+
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: project-url
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: summary
|
|
31
40
|
|
|
32
41
|
[]()
|
|
33
42
|
[](https://pypi.org/project/py-ewr/)
|
|
34
43
|
[](https://pypi.org/project/py-ewr/)
|
|
35
44
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
36
45
|
|
|
37
|
-
### **EWR tool version 2.3.
|
|
46
|
+
### **EWR tool version 2.3.4 README**
|
|
38
47
|
|
|
39
48
|
### **Notes on recent version updates**
|
|
40
49
|
- CLLMM_c and CLLMM_d ewrs are now able to be calculated without all barrage level gauges being present in the model file.
|
|
@@ -257,7 +257,7 @@ def test_match_NSW_nodes():
|
|
|
257
257
|
df = pd.DataFrame(data = data_df)
|
|
258
258
|
df = df.set_index('Date')
|
|
259
259
|
|
|
260
|
-
df_F, df_L = scenario_handling.match_NSW_nodes(df, model_metadata)
|
|
260
|
+
df_F, df_L = scenario_handling.match_NSW_nodes(df, model_metadata,None)
|
|
261
261
|
|
|
262
262
|
# Set up expected outputs and test:
|
|
263
263
|
data_expected_df_L = {'Date': pd.date_range(start= datetime.strptime('2012-07-01', '%Y-%m-%d'), end = datetime.strptime('2016-06-30', '%Y-%m-%d'))}
|
|
@@ -407,14 +407,13 @@ def test_cleaner_netcdf_werp():
|
|
|
407
407
|
1. check ncdf is unpacked correctly
|
|
408
408
|
'''
|
|
409
409
|
df = scenario_handling.unpack_netcdf_as_dataframe('unit_testing_files/werp_ncdf.nc')
|
|
410
|
-
df_F, df_L = scenario_handling.cleaner_netcdf_werp(df, data_inputs.get_iqqm_codes())
|
|
410
|
+
df_F, df_L = scenario_handling.cleaner_netcdf_werp(df, data_inputs.get_iqqm_codes(), None)
|
|
411
411
|
|
|
412
412
|
# the test ncdf is too big to mock, so check properties
|
|
413
413
|
assert df_F.dtypes.iloc[0] == 'float32'
|
|
414
414
|
assert isinstance(df_F.index, pd.DatetimeIndex)
|
|
415
415
|
assert all(df_F.columns == ['421001', '421004', '421012', '421019', '421022', '421023', '421090', '421146'])
|
|
416
416
|
|
|
417
|
-
|
|
418
417
|
def test_csv_input():
|
|
419
418
|
'''
|
|
420
419
|
1. check we can feed scenario_handling a csv that looks like gauge data
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|