py-ewr 2.3.0__tar.gz → 2.3.1__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.
Files changed (33) hide show
  1. {py_ewr-2.3.0 → py_ewr-2.3.1}/PKG-INFO +3 -2
  2. {py_ewr-2.3.0 → py_ewr-2.3.1}/README.md +2 -1
  3. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/data_inputs.py +2 -2
  4. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/model_metadata/SiteID_MDBA.csv +2 -0
  5. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/observed_handling.py +12 -12
  6. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/parameter_metadata/ewr2obj.csv +36799 -39096
  7. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/parameter_metadata/obj2target.csv +7941 -7973
  8. py_ewr-2.3.1/py_ewr/parameter_metadata/obj2yrtarget.csv +106 -0
  9. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/parameter_metadata/parameter_sheet.csv +2295 -2301
  10. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/scenario_handling.py +12 -12
  11. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/summarise_results.py +7 -5
  12. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr.egg-info/PKG-INFO +3 -2
  13. {py_ewr-2.3.0 → py_ewr-2.3.1}/setup.py +1 -1
  14. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_observed_handling.py +6 -6
  15. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_scenario_handling.py +13 -13
  16. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_summarise_results.py +2 -0
  17. py_ewr-2.3.0/py_ewr/parameter_metadata/obj2yrtarget.csv +0 -106
  18. {py_ewr-2.3.0 → py_ewr-2.3.1}/LICENSE +0 -0
  19. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/__init__.py +0 -0
  20. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/evaluate_EWRs.py +0 -0
  21. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/io.py +0 -0
  22. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/model_metadata/SiteID_NSW.csv +0 -0
  23. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/model_metadata/iqqm_stations.csv +0 -0
  24. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr/parameter_metadata/ewr_calc_config.json +0 -0
  25. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr.egg-info/SOURCES.txt +0 -0
  26. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr.egg-info/dependency_links.txt +0 -0
  27. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr.egg-info/requires.txt +0 -0
  28. {py_ewr-2.3.0 → py_ewr-2.3.1}/py_ewr.egg-info/top_level.txt +0 -0
  29. {py_ewr-2.3.0 → py_ewr-2.3.1}/pyproject.toml +0 -0
  30. {py_ewr-2.3.0 → py_ewr-2.3.1}/setup.cfg +0 -0
  31. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_data_inputs.py +0 -0
  32. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_evaluate_ewr_rest.py +0 -0
  33. {py_ewr-2.3.0 → py_ewr-2.3.1}/tests/test_evaluate_ewrs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py_ewr
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Environmental Water Requirement calculator
5
5
  Home-page: https://github.com/MDBAuth/EWR_tool
6
6
  Author: Martin Job
@@ -34,7 +34,7 @@ Requires-Dist: numpy<2
34
34
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
35
35
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
36
36
 
37
- ### **EWR tool version 2.3.0 README**
37
+ ### **EWR tool version 2.3.1 README**
38
38
 
39
39
  ### **Notes on recent version updates**
40
40
  - 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
@@ -48,6 +48,7 @@ Requires-Dist: numpy<2
48
48
  - Standard time-series handling added - each column needs a gauge, followed by and underscore, followed by either flow or level (e.g. 409025_flow). This handling also has missing date filling - so any missing dates will be filled with NaN values in all columns.
49
49
  - bug fixes: spells of length equal to the minimum required spell length were getting filtered out of the successful events table and successful interevents table, fixed misclassification of some gauges to flow, level, and lake level categories
50
50
  - New EWRs: New Qld EWRs - SF_FD and BF_FD used to look into the FD EWRs in closer detail.
51
+ - Adding state and Surface Water SDL (SWSDL) to py-ewr output tables
51
52
 
52
53
  ### **Installation**
53
54
 
@@ -3,7 +3,7 @@
3
3
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
4
4
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
5
5
 
6
- ### **EWR tool version 2.3.0 README**
6
+ ### **EWR tool version 2.3.1 README**
7
7
 
8
8
  ### **Notes on recent version updates**
9
9
  - 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
@@ -17,6 +17,7 @@
17
17
  - Standard time-series handling added - each column needs a gauge, followed by and underscore, followed by either flow or level (e.g. 409025_flow). This handling also has missing date filling - so any missing dates will be filled with NaN values in all columns.
18
18
  - bug fixes: spells of length equal to the minimum required spell length were getting filtered out of the successful events table and successful interevents table, fixed misclassification of some gauges to flow, level, and lake level categories
19
19
  - New EWRs: New Qld EWRs - SF_FD and BF_FD used to look into the FD EWRs in closer detail.
20
+ - Adding state and Surface Water SDL (SWSDL) to py-ewr output tables
20
21
 
21
22
  ### **Installation**
22
23
 
@@ -50,7 +50,7 @@ def get_EWR_table(file_path:str = None) -> dict:
50
50
 
51
51
  if file_path:
52
52
  df = pd.read_csv(file_path,
53
- usecols=['PlanningUnitID', 'PlanningUnitName', 'LTWPShortName', 'CompliancePoint/Node', 'Gauge', 'Code', 'StartMonth',
53
+ usecols=['PlanningUnitID', 'PlanningUnitName', 'LTWPShortName', 'SWSDLName', 'State', 'CompliancePoint/Node', 'Gauge', 'Code', 'StartMonth',
54
54
  'EndMonth', 'TargetFrequency', 'TargetFrequencyMin', 'TargetFrequencyMax', 'EventsPerYear', 'Duration', 'MinSpell',
55
55
  'FlowThresholdMin', 'FlowThresholdMax', 'MaxInter-event', 'WithinEventGapTolerance', 'WeirpoolGauge', 'FlowLevelVolume',
56
56
  'LevelThresholdMin', 'LevelThresholdMax', 'VolumeThreshold', 'DrawdownRate', 'MaxLevelRise','AccumulationPeriod',
@@ -66,7 +66,7 @@ def get_EWR_table(file_path:str = None) -> dict:
66
66
  my_url = os.path.join(BASE_PATH, "parameter_metadata/parameter_sheet.csv")
67
67
  proxies={} # Populate with your proxy settings
68
68
  df = pd.read_csv(my_url,
69
- usecols=['PlanningUnitID', 'PlanningUnitName', 'LTWPShortName', 'CompliancePoint/Node', 'Gauge', 'Code', 'StartMonth',
69
+ usecols=['PlanningUnitID', 'PlanningUnitName', 'LTWPShortName', 'SWSDLName', 'State', 'CompliancePoint/Node', 'Gauge', 'Code', 'StartMonth',
70
70
  'EndMonth', 'TargetFrequency', 'TargetFrequencyMin', 'TargetFrequencyMax', 'EventsPerYear', 'Duration', 'MinSpell',
71
71
  'FlowThresholdMin', 'FlowThresholdMax', 'MaxInter-event', 'WithinEventGapTolerance', 'WeirpoolGauge', 'FlowLevelVolume',
72
72
  'LevelThresholdMin', 'LevelThresholdMax', 'VolumeThreshold', 'DrawdownRate', 'MaxLevelRise', 'AccumulationPeriod',
@@ -2689,6 +2689,7 @@ FLOWSA ,A4261001,Flow at South Australia border,A4261001,5
2689
2689
  BARRAGE,A4261002,Barrages near the Murray Mouth,A4261002,5
2690
2690
  Bills Pipe,Bills Pipe,North Redbank,Bills Pipe,2
2691
2691
  "Eulimbah, Nimmie Creek","Eulimbah, Nimmie Creek","Gayini/ Nimmie-Caira, combined Eulimbah and Nimmie Creek regulators","Eulimbah, Nimmie Creek",2
2692
+ Eulimbah_Nimmie Creek,"Eulimbah, Nimmie Creek","Gayini/ Nimmie-Caira, combined Eulimbah and Nimmie Creek regulators","Eulimbah, Nimmie Creek",2
2692
2693
  Glen Dee,Glen Dee,"Western Lakes, Glenn Dee",Glen Dee,2
2693
2694
  Pattos Pipe,Pattos Pipe,North Redbank,Pattos Pipe,2
2694
2695
  Pump direct from river,Pump direct from river,"North Redbank, pumped direct from river",Pump direct from river,2
@@ -2698,3 +2699,4 @@ Pumped from Yanga Lake,Pumped from Yanga Lake,Yanga (South Redbank),Pumped from
2698
2699
  410700,Cotter River at Kiosk,ACT - Icon Water Limited,410700,3
2699
2700
  410747,Cotter River below Bendora Dam,ACT - Icon Water Limited,410747,3
2700
2701
  410752,Cotter River below Corin Dam,ACT - Icon Water Limited,410752,3
2702
+ 8MAREBON,Marebone Break @ d/s Marebone Regulator,Marebone Break @ d/s Marebone Regulator,421088,2
@@ -226,10 +226,10 @@ class ObservedHandler:
226
226
  events_to_process = summarise_results.get_events_to_process(self.yearly_events)
227
227
  all_events = summarise_results.process_all_events_results(events_to_process)
228
228
 
229
- all_events = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
229
+ all_events = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
230
230
  left_table=all_events,
231
231
  left_on=['gauge','pu','ewr'],
232
- selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
232
+ selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
233
233
  'eventDuration', 'eventLength',
234
234
  'Multigauge'],
235
235
  parameter_sheet_path=self.parameter_sheet)
@@ -246,10 +246,10 @@ class ObservedHandler:
246
246
  events_to_process = summarise_results.get_events_to_process(self.yearly_events)
247
247
  all_events_temp = summarise_results.process_all_events_results(events_to_process)
248
248
 
249
- all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
249
+ all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
250
250
  left_table=all_events_temp,
251
251
  left_on=['gauge','pu','ewr'],
252
- selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
252
+ selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
253
253
  'eventDuration', 'eventLength',
254
254
  'Multigauge'],
255
255
  parameter_sheet_path=self.parameter_sheet)
@@ -274,10 +274,10 @@ class ObservedHandler:
274
274
  events_to_process = summarise_results.get_events_to_process(self.yearly_events)
275
275
  all_events_temp1 = summarise_results.process_all_events_results(events_to_process)
276
276
 
277
- all_events_temp1 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
277
+ all_events_temp1 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
278
278
  left_table=all_events_temp1,
279
279
  left_on=['gauge','pu','ewr'],
280
- selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
280
+ selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
281
281
  'eventDuration', 'eventLength',
282
282
  'Multigauge'],
283
283
  parameter_sheet_path=self.parameter_sheet)
@@ -296,10 +296,10 @@ class ObservedHandler:
296
296
  events_to_process = summarise_results.get_events_to_process(self.yearly_events)
297
297
  all_events_temp2 = summarise_results.process_all_events_results(events_to_process)
298
298
 
299
- all_events_temp2 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
299
+ all_events_temp2 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
300
300
  left_table=all_events_temp2,
301
301
  left_on=['gauge','pu','ewr'],
302
- selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
302
+ selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
303
303
  'eventDuration', 'eventLength',
304
304
  'Multigauge'],
305
305
  parameter_sheet_path=self.parameter_sheet)
@@ -329,24 +329,24 @@ class ObservedHandler:
329
329
  to_process = summarise_results.pu_dfs_to_process(self.pu_ewr_statistics)
330
330
  yearly_ewr_results = summarise_results.process_df_results(to_process)
331
331
 
332
- yearly_ewr_results = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
332
+ yearly_ewr_results = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
333
333
  left_table=yearly_ewr_results,
334
334
  left_on=['gauge','pu','ewrCode'],
335
335
  selected_columns= ['Year', 'eventYears', 'numAchieved', 'numEvents', 'numEventsAll',
336
336
  'eventLength', 'eventLengthAchieved', 'totalEventDays', 'totalEventDaysAchieved',
337
337
  'maxEventDays', 'maxRollingEvents', 'maxRollingAchievement',
338
338
  'missingDays', 'totalPossibleDays', 'ewrCode',
339
- 'scenario', 'gauge', 'pu', 'Multigauge'],
339
+ 'scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'Multigauge'],
340
340
  parameter_sheet_path=self.parameter_sheet)
341
341
 
342
342
  # Setting up the dictionary of yearly rolling maximum interevent periods:
343
343
  events_to_process = summarise_results.get_events_to_process(self.yearly_events)
344
344
  all_events_temp = summarise_results.process_all_events_results(events_to_process)
345
345
 
346
- all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
346
+ all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
347
347
  left_table=all_events_temp,
348
348
  left_on=['gauge', 'pu', 'ewr'],
349
- selected_columns=['scenario', 'gauge', 'pu', 'ewr',
349
+ selected_columns=['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr',
350
350
  'waterYear', 'startDate', 'endDate',
351
351
  'eventDuration', 'eventLength',
352
352
  'Multigauge'],