py-ewr 2.3.9__tar.gz → 2.4.0__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 (32) hide show
  1. {py_ewr-2.3.9 → py_ewr-2.4.0}/PKG-INFO +20 -20
  2. {py_ewr-2.3.9 → py_ewr-2.4.0}/README.md +19 -19
  3. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/data_inputs.py +6 -6
  4. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/evaluate_EWRs.py +168 -221
  5. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/model_metadata/EWR_Sitelist_FIRM_20250718.csv +11 -2
  6. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/observed_handling.py +22 -5
  7. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/parameter_metadata/ewr_calc_config.json +8 -0
  8. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/parameter_metadata/objective_reference.csv +911 -776
  9. py_ewr-2.4.0/py_ewr/parameter_metadata/parameter_sheet.csv +3249 -0
  10. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/scenario_handling.py +7 -6
  11. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/summarise_results.py +1 -1
  12. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr.egg-info/PKG-INFO +20 -20
  13. {py_ewr-2.3.9 → py_ewr-2.4.0}/setup.py +1 -1
  14. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_evaluate_ewr_rest.py +57 -67
  15. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_evaluate_ewrs.py +93 -130
  16. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_scenario_handling.py +2 -2
  17. py_ewr-2.3.9/py_ewr/parameter_metadata/parameter_sheet.csv +0 -3325
  18. {py_ewr-2.3.9 → py_ewr-2.4.0}/LICENSE +0 -0
  19. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/__init__.py +0 -0
  20. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/io.py +0 -0
  21. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/model_metadata/SiteID_MDBA.csv +0 -0
  22. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/model_metadata/SiteID_NSW.csv +0 -0
  23. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr/model_metadata/iqqm_stations.csv +0 -0
  24. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr.egg-info/SOURCES.txt +0 -0
  25. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr.egg-info/dependency_links.txt +0 -0
  26. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr.egg-info/requires.txt +0 -0
  27. {py_ewr-2.3.9 → py_ewr-2.4.0}/py_ewr.egg-info/top_level.txt +0 -0
  28. {py_ewr-2.3.9 → py_ewr-2.4.0}/pyproject.toml +0 -0
  29. {py_ewr-2.3.9 → py_ewr-2.4.0}/setup.cfg +0 -0
  30. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_data_inputs.py +0 -0
  31. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_observed_handling.py +0 -0
  32. {py_ewr-2.3.9 → py_ewr-2.4.0}/tests/test_summarise_results.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py_ewr
3
- Version: 2.3.9
3
+ Version: 2.4.0
4
4
  Summary: Environmental Water Requirement calculator
5
5
  Home-page: https://github.com/MDBAuth/EWR_tool
6
6
  Author: Martin Job
@@ -44,16 +44,19 @@ Dynamic: summary
44
44
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
45
45
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
46
46
 
47
- ### **ewr tool version 2.3.9 README**
47
+ ### **ewr tool version 2.4.0 README**
48
48
 
49
49
  ### **Notes on recent version updates**
50
50
 
51
+ #### Documentation
52
+ - Working version of the EWR User Guide has been added
53
+
51
54
  #### EWR handling and outputs
52
55
  - Adding handling for cases where there are single MDBA bigmod site IDs mapping to multiple different gauges
53
56
  - New EWRs: New Qld EWRs - SF_FD and BF_FD used to look into the FD EWRs in closer detail.
54
57
  - Adding state and Surface Water SDL (SWSDL) to py-ewr output tables
55
- - Including metadata report (this is still being ironed out and tested)
56
- - New handling capabilities for FIRM model formated files
58
+ - Including metadata report (this is still being ironed out and tested)
59
+ - New handling capabilities for FIRM model formated files
57
60
 
58
61
  #### Model metadata
59
62
  - Added new FIRM ID file mapping FIRM ID to gauge number.
@@ -67,6 +70,8 @@ Dynamic: summary
67
70
  - Renamed MaxLevelRise to MaxLevelChange
68
71
  - Removed AnnualFlowSum and MinLevelRise column from parameter sheet
69
72
  - New format of objective mapping includes the adding of objective mapping back into the parameter sheet and one secondary dataframe (objective_reference.csv) in parameter metadata.
73
+ - Removed ACT EWRs. These will be re-added once the ACT LTWP has been finalised
74
+ - "EnvObj" has been changed to "EcoObj" for consistency purposes
70
75
 
71
76
  ### **Installation**
72
77
 
@@ -266,27 +271,22 @@ This tool has two purposes:
266
271
  2. Planning: Comparing ewr success between scenarios (i.e. model runs) - option 2 above.
267
272
 
268
273
  **Support**
269
- For issues relating to the script, a tutorial, or feedback please contact Martin Job at martin.job@mdba.gov.au, Sirous Safari Pour at sirous.safaripour@mdba.gov.au, Elisha Freedman at elisha.freedman@mdba.gov.au, Joel Bailey at joel.bailey@mdba.gov.au, or Lara Palmer at lara.palmer@mdba.gov.au.
270
-
274
+ For issues relating to the script, a tutorial, or feedback please contact Martin Job at Martin.Job@mdba.gov.au, Sirous Safari Pour at Sirous.SafariPour@mdba.gov.au, Elisha Freedman at Elisha.Freedman@mdba.gov.au, Rory Hackett at Rory.Hackett@mdba.gov.au or Joel Bailey at Joel.Bailey@mdba.gov.au
271
275
 
272
276
  **Disclaimer**
273
- Every effort has been taken to ensure the ewr database represents the original EWRs from state Long Term Water Plans (LTWPs) and Environmental Water Management Plans (EWMPs) as best as possible, and that the code within this tool has been developed to interpret and analyse these EWRs in an accurate way. However, there may still be unresolved bugs in the ewr parameter sheet and/or ewr tool. Please report any bugs to the issues tab under the GitHub project so we can investigate further.
274
-
277
+ Every effort has been taken to ensure the ewr database represents the original EWRs from state Long Term Water Plans (LTWPs), Environmental Water Management Plans (EWMPs), Flows studies, and those derived through expert elicitation processes as best as possible. The code within this tool has been developed to interpret and analyse these EWRs in an accurate way. However, there may still be unresolved bugs in the ewr parameter sheet and/or ewr tool. Please report any bugs to the issues tab under the GitHub project so we can investigate further.
275
278
 
276
279
  **Notes on development of the dataset of EWRs**
277
- The MDBA has worked with Basin state representatives to ensure scientific integrity of EWRs has been maintained when translating from raw EWRs in the Basin state LTWPs and EWMPs to the machine readable format found in the parameter sheet within this tool.
280
+ The MDBA has worked with Basin state representatives to ensure scientific integrity of EWRs has been maintained when translating from raw EWRs in the Basin state LTWPs, EWMPs, Flows studies, and those derived through expert elicitation processes to the machine readable format found in the parameter sheet within this tool.
278
281
 
279
- Environmental Water Requirements (EWRs) in the tool are subject to change when the relevant documents including Long Term Water Plans (LTWPs) and Environmental Water Management Plans (EWMPs) are updated or move from draft to final versions. LTWPs that are currently in draft form include the ACT and the upper Murrumbidgee section of the NSW Murrumbidgee LTWP.
282
+ Environmental Water Requirements (EWRs) in the tool are subject to change when the relevant documents including Long Term Water Plans (LTWPs), Environmental Water Management Plans (EWMPs), Flows studies, and those derived through expert elicitation processes are updated or move from draft to final versions. LTWPs that are currently in draft form include the upper Murrumbidgee section of the NSW Murrumbidgee LTWP, and the SA LTWP.
280
283
 
281
284
  **Compatibility**
282
285
 
283
286
  - All Queensland catchments
284
287
  - All New South Wales catchments
285
288
  - All South Australian catchments
286
- - All EWRs from river based Environmental Water Management Plans (EWMPs) in Victoria*
287
- - All EWRs for ACT (draft version)
288
-
289
- *The wetland EWMPS and mixed wetland-river EWMPs in Victoria are in progress. The MDBA will work with our Victorian colleagues to ensure any updated EWRs in these plans are integrated into the tool where possible.
289
+ - Where possible all EWRs from Environmental Water Management Plans (EWMPs) and Flows studies in Victoria
290
290
 
291
291
  **Input data**
292
292
 
@@ -294,14 +294,14 @@ Environmental Water Requirements (EWRs) in the tool are subject to change when t
294
294
  - Scenario data input by the user
295
295
  - Model metadata for location association between gauge ID's and model nodes
296
296
  #### optional
297
- - ewr parameter sheet
298
- - calc_config.json
297
+ - parameter sheet
298
+ - ewr_calc_config.json
299
299
 
300
300
  **Objective mapping**
301
301
  The objective mapping is located in the EWR tool package. This is intended to be used to link EWRs to the detailed objectives, theme level targets and specific goals. The objective reference file is located in the py_ewr/parameter_metadata folder:
302
302
 
303
- parameter_sheet.csv (EnvObj column)
304
- obj_reference.csv
303
+ parameter_sheet.csv (EcoObj column)
304
+ objective_reference.csv
305
305
 
306
- Contains the individual environmnetal objectives listed in the 'EnvObj' column of the parameter sheet and their ecological targets (Target) and plain english description of objectives (Objectives) for each planning unit, long term water plan (LTWPShortName), and surface water sustainable diversion limit (SWSDLName).
307
- the function ```get_obj_mapping()``` is available to automatically merge the information from obj_reference.csv with the parameter sheet to link these objectives with their specific ewr_codes.
306
+ Contains the individual ecological objectives listed in the 'EcoObj' column of the parameter sheet and their ecological targets (Target) and plain english description of objectives (Objective) for each planning unit, long term water plan (LTWPShortName), surface water sustainable diversion limit region (SWSDLName), and Basin State (State)
307
+ the function ```get_obj_mapping()``` is available to automatically merge the information from objective_reference.csv with the parameter sheet to link these objectives with their specific ewr_codes.
@@ -3,16 +3,19 @@
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.9 README**
6
+ ### **ewr tool version 2.4.0 README**
7
7
 
8
8
  ### **Notes on recent version updates**
9
9
 
10
+ #### Documentation
11
+ - Working version of the EWR User Guide has been added
12
+
10
13
  #### EWR handling and outputs
11
14
  - Adding handling for cases where there are single MDBA bigmod site IDs mapping to multiple different gauges
12
15
  - New EWRs: New Qld EWRs - SF_FD and BF_FD used to look into the FD EWRs in closer detail.
13
16
  - Adding state and Surface Water SDL (SWSDL) to py-ewr output tables
14
- - Including metadata report (this is still being ironed out and tested)
15
- - New handling capabilities for FIRM model formated files
17
+ - Including metadata report (this is still being ironed out and tested)
18
+ - New handling capabilities for FIRM model formated files
16
19
 
17
20
  #### Model metadata
18
21
  - Added new FIRM ID file mapping FIRM ID to gauge number.
@@ -26,6 +29,8 @@
26
29
  - Renamed MaxLevelRise to MaxLevelChange
27
30
  - Removed AnnualFlowSum and MinLevelRise column from parameter sheet
28
31
  - New format of objective mapping includes the adding of objective mapping back into the parameter sheet and one secondary dataframe (objective_reference.csv) in parameter metadata.
32
+ - Removed ACT EWRs. These will be re-added once the ACT LTWP has been finalised
33
+ - "EnvObj" has been changed to "EcoObj" for consistency purposes
29
34
 
30
35
  ### **Installation**
31
36
 
@@ -225,27 +230,22 @@ This tool has two purposes:
225
230
  2. Planning: Comparing ewr success between scenarios (i.e. model runs) - option 2 above.
226
231
 
227
232
  **Support**
228
- For issues relating to the script, a tutorial, or feedback please contact Martin Job at martin.job@mdba.gov.au, Sirous Safari Pour at sirous.safaripour@mdba.gov.au, Elisha Freedman at elisha.freedman@mdba.gov.au, Joel Bailey at joel.bailey@mdba.gov.au, or Lara Palmer at lara.palmer@mdba.gov.au.
229
-
233
+ For issues relating to the script, a tutorial, or feedback please contact Martin Job at Martin.Job@mdba.gov.au, Sirous Safari Pour at Sirous.SafariPour@mdba.gov.au, Elisha Freedman at Elisha.Freedman@mdba.gov.au, Rory Hackett at Rory.Hackett@mdba.gov.au or Joel Bailey at Joel.Bailey@mdba.gov.au
230
234
 
231
235
  **Disclaimer**
232
- Every effort has been taken to ensure the ewr database represents the original EWRs from state Long Term Water Plans (LTWPs) and Environmental Water Management Plans (EWMPs) as best as possible, and that the code within this tool has been developed to interpret and analyse these EWRs in an accurate way. However, there may still be unresolved bugs in the ewr parameter sheet and/or ewr tool. Please report any bugs to the issues tab under the GitHub project so we can investigate further.
233
-
236
+ Every effort has been taken to ensure the ewr database represents the original EWRs from state Long Term Water Plans (LTWPs), Environmental Water Management Plans (EWMPs), Flows studies, and those derived through expert elicitation processes as best as possible. The code within this tool has been developed to interpret and analyse these EWRs in an accurate way. However, there may still be unresolved bugs in the ewr parameter sheet and/or ewr tool. Please report any bugs to the issues tab under the GitHub project so we can investigate further.
234
237
 
235
238
  **Notes on development of the dataset of EWRs**
236
- The MDBA has worked with Basin state representatives to ensure scientific integrity of EWRs has been maintained when translating from raw EWRs in the Basin state LTWPs and EWMPs to the machine readable format found in the parameter sheet within this tool.
239
+ The MDBA has worked with Basin state representatives to ensure scientific integrity of EWRs has been maintained when translating from raw EWRs in the Basin state LTWPs, EWMPs, Flows studies, and those derived through expert elicitation processes to the machine readable format found in the parameter sheet within this tool.
237
240
 
238
- Environmental Water Requirements (EWRs) in the tool are subject to change when the relevant documents including Long Term Water Plans (LTWPs) and Environmental Water Management Plans (EWMPs) are updated or move from draft to final versions. LTWPs that are currently in draft form include the ACT and the upper Murrumbidgee section of the NSW Murrumbidgee LTWP.
241
+ Environmental Water Requirements (EWRs) in the tool are subject to change when the relevant documents including Long Term Water Plans (LTWPs), Environmental Water Management Plans (EWMPs), Flows studies, and those derived through expert elicitation processes are updated or move from draft to final versions. LTWPs that are currently in draft form include the upper Murrumbidgee section of the NSW Murrumbidgee LTWP, and the SA LTWP.
239
242
 
240
243
  **Compatibility**
241
244
 
242
245
  - All Queensland catchments
243
246
  - All New South Wales catchments
244
247
  - All South Australian catchments
245
- - All EWRs from river based Environmental Water Management Plans (EWMPs) in Victoria*
246
- - All EWRs for ACT (draft version)
247
-
248
- *The wetland EWMPS and mixed wetland-river EWMPs in Victoria are in progress. The MDBA will work with our Victorian colleagues to ensure any updated EWRs in these plans are integrated into the tool where possible.
248
+ - Where possible all EWRs from Environmental Water Management Plans (EWMPs) and Flows studies in Victoria
249
249
 
250
250
  **Input data**
251
251
 
@@ -253,14 +253,14 @@ Environmental Water Requirements (EWRs) in the tool are subject to change when t
253
253
  - Scenario data input by the user
254
254
  - Model metadata for location association between gauge ID's and model nodes
255
255
  #### optional
256
- - ewr parameter sheet
257
- - calc_config.json
256
+ - parameter sheet
257
+ - ewr_calc_config.json
258
258
 
259
259
  **Objective mapping**
260
260
  The objective mapping is located in the EWR tool package. This is intended to be used to link EWRs to the detailed objectives, theme level targets and specific goals. The objective reference file is located in the py_ewr/parameter_metadata folder:
261
261
 
262
- parameter_sheet.csv (EnvObj column)
263
- obj_reference.csv
262
+ parameter_sheet.csv (EcoObj column)
263
+ objective_reference.csv
264
264
 
265
- Contains the individual environmnetal objectives listed in the 'EnvObj' column of the parameter sheet and their ecological targets (Target) and plain english description of objectives (Objectives) for each planning unit, long term water plan (LTWPShortName), and surface water sustainable diversion limit (SWSDLName).
266
- the function ```get_obj_mapping()``` is available to automatically merge the information from obj_reference.csv with the parameter sheet to link these objectives with their specific ewr_codes.
265
+ Contains the individual ecological objectives listed in the 'EcoObj' column of the parameter sheet and their ecological targets (Target) and plain english description of objectives (Objective) for each planning unit, long term water plan (LTWPShortName), surface water sustainable diversion limit region (SWSDLName), and Basin State (State)
266
+ the function ```get_obj_mapping()``` is available to automatically merge the information from objective_reference.csv with the parameter sheet to link these objectives with their specific ewr_codes.
@@ -433,7 +433,7 @@ def get_barrage_level_gauges()-> dict:
433
433
  dict: dictionary of level gauges associated with each barrage.
434
434
  """
435
435
 
436
- level_barrage_gauges = {'A4260527': ['A4260527','A4261133', 'A4260524', 'A4260574', 'A4260575' ],
436
+ level_barrage_gauges = {'A4260524': ['A4260527','A4261133', 'A4260524', 'A4260574', 'A4260575' ],
437
437
  'A4260633' : ['A4260633','A4261209', 'A4261165']}
438
438
 
439
439
  return level_barrage_gauges
@@ -466,7 +466,7 @@ def get_vic_level_gauges()-> list:
466
466
 
467
467
 
468
468
  def get_cllmm_gauges()->list:
469
- return ["A4261002", "A4260527", "A4260633"]
469
+ return ["A4261002", "A4260524", "A4260633"]
470
470
 
471
471
 
472
472
  def get_gauges(category: str, ewr_table_path: str = None) -> set:
@@ -556,7 +556,7 @@ def get_obj_mapping(
556
556
  obj_ref_path (str) = file path to objective mapping csv. If Not, default objective_reference.csv inside EWR tool is selected
557
557
  '''
558
558
  param_sheet_cols = [
559
- 'PlanningUnitName', 'LTWPShortName', 'SWSDLName', 'State', 'Gauge', 'Code', 'EnvObj'
559
+ 'PlanningUnitName', 'LTWPShortName', 'SWSDLName', 'State', 'Gauge', 'Code', 'EcoObj'
560
560
  ]
561
561
 
562
562
  if not objective_reference_path:
@@ -571,13 +571,13 @@ def get_obj_mapping(
571
571
 
572
572
  # Split 'EnvObj' by '+' and explode to long format
573
573
  longform_ewr = okay_EWRs_sub.assign(
574
- EnvObj=okay_EWRs_sub['EnvObj'].str.split('+')
574
+ EnvObj=okay_EWRs_sub['EcoObj'].str.split('+')
575
575
  ).explode('EnvObj').drop_duplicates()
576
576
 
577
577
  merged_df = longform_ewr.merge(
578
578
  obj_ref,
579
- left_on= ['LTWPShortName', 'PlanningUnitName', 'Gauge', 'Code', 'EnvObj', 'SWSDLName', 'State'],
580
- right_on=['LTWPShortName', 'PlanningUnitName', 'Gauge', 'Code', 'EnvObj', 'SWSDLName', 'State'],
579
+ left_on= ['LTWPShortName', 'PlanningUnitName', 'Gauge', 'Code', 'EcoObj', 'SWSDLName', 'State'],
580
+ right_on=['LTWPShortName', 'PlanningUnitName', 'Gauge', 'Code', 'EcoObj', 'SWSDLName', 'State'],
581
581
  how='left'
582
582
  )
583
583