py-ewr 2.3.2__py3-none-any.whl → 2.3.4__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 CHANGED
@@ -1148,7 +1148,6 @@ def barrage_level_handle(PU: str, gauge: str, EWR: str, EWR_table: pd.DataFrame,
1148
1148
  Returns:
1149
1149
  tuple[pd.DataFrame, tuple[dict]]: EWR results for the current planning unit iteration (updated); dictionary of EWR event information
1150
1150
  """
1151
- print(df_L.head())
1152
1151
  barrage_level_gauges = data_inputs.get_barrage_level_gauges()
1153
1152
  all_required_gauges = barrage_level_gauges.get(gauge)
1154
1153
  # if all_required_gauges:
@@ -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 ,River Murray U/S Euston Weir,,414209,4
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 ,River Murray U/S Lock 9,SAMPLE AT GAUGING STATION,A4260501,5
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
@@ -2696,7 +2697,9 @@ Pattos Pipe,Pattos Pipe,North Redbank,Pattos Pipe,2
2696
2697
  Pump direct from river,Pump direct from river,"North Redbank, pumped direct from river",Pump direct from river,2
2697
2698
  Pumped from Yanga Lake,Pumped from Yanga Lake,Yanga (South Redbank),Pumped from Yanga Lake,2
2698
2699
  410738,Murrumbidgee River at Mt. MacDonald,"ACT - Environment, Planning and Sustainable Development Directorate",410738,3
2700
+ 11UBMAC,Murrumbidgee River at Mt. MacDonald,"ACT - Environment, Planning and Sustainable Development Directorate",410738,3
2699
2701
  410761,Murrumbidgee River below Lobbs Hole Creek,"ACT - Environment, Planning and Sustainable Development Directorate",410761,3
2702
+ 11UBLOB,Murrumbidgee River below Lobbs Hole Creek,"ACT - Environment, Planning and Sustainable Development Directorate",410761,3
2700
2703
  410700,Cotter River at Kiosk,ACT - Icon Water Limited,410700,3
2701
2704
  410747,Cotter River below Bendora Dam,ACT - Icon Water Limited,410747,3
2702
2705
  410752,Cotter River below Corin Dam,ACT - Icon Water Limited,410752,3
@@ -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
1
+ Metadata-Version: 2.2
2
2
  Name: py_ewr
3
- Version: 2.3.2
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
  [![CI](https://github.com/MDBAuth/EWR_tool/actions/workflows/test-release.yml/badge.svg)]()
33
42
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-ewr)](https://pypi.org/project/py-ewr/)
34
43
  [![PyPI](https://img.shields.io/pypi/v/py-ewr)](https://pypi.org/project/py-ewr/)
35
44
  [![DOI](https://zenodo.org/badge/342122359.svg)](https://zenodo.org/badge/latestdoi/342122359)
36
45
 
37
- ### **EWR tool version 2.3.2 README**
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.
@@ -1,20 +1,20 @@
1
1
  py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  py_ewr/data_inputs.py,sha256=oUiEiLY_CmbvqF5GlV-3Yfz_JZ1qZNvta-VEYCzAcso,20124
3
- py_ewr/evaluate_EWRs.py,sha256=KESFs1boNuq2FPPgoZY_fqWpENFI39taPyv-0ePAD3s,231607
3
+ py_ewr/evaluate_EWRs.py,sha256=pCIqWysUuM-HbYn6U9bQnrHMhTl2CVhjWanpGJ6l0pc,231584
4
4
  py_ewr/io.py,sha256=Is0xPAzLx6-ylpTFyYJxMimkNVxxoTxUcknTk6bQbgs,840
5
5
  py_ewr/observed_handling.py,sha256=JTSK_2obhqNWJ2QknykywevNMN0fsvGXSejFwUSpMoA,18112
6
- py_ewr/scenario_handling.py,sha256=veaiQ6vfQX40laUk3eEUFWqO3wceP76Wh92HhJFsl8A,35762
6
+ py_ewr/scenario_handling.py,sha256=D4P1rqrD6_3pwhifHCVVdLSEKsNI4VVzPu60g7ZyRXk,35982
7
7
  py_ewr/summarise_results.py,sha256=rFaAUVR4jIsjeRl4ocPFE2RUoJJBZgZ2wPEBh-dfEsc,31761
8
- py_ewr/model_metadata/SiteID_MDBA.csv,sha256=X5bFFYRkmQWqV05tWtij9OphwlonzxcpzYebTz4waqI,168474
8
+ py_ewr/model_metadata/SiteID_MDBA.csv,sha256=orbh3QIRbOkUjCB2hcdpeUvhepnY_3ywldu22s45d5Y,168771
9
9
  py_ewr/model_metadata/SiteID_NSW.csv,sha256=UVBxN43Z5KWCvWhQ5Rh6TNEn35q4_sjPxKyHg8wPFws,6805
10
10
  py_ewr/model_metadata/iqqm_stations.csv,sha256=vl4CPtPslG5VplSzf_yLZulTrmab-mEBHOfzFtS1kf4,110
11
11
  py_ewr/parameter_metadata/ewr2obj.csv,sha256=r2uXzhZ-Rd1u3RLhNXmJnPYcHwouHBehEPnvednfz-I,3948677
12
- py_ewr/parameter_metadata/ewr_calc_config.json,sha256=l1AgIRlf7UUmk3BNQ4r3kutU48pYHHVKmLELjoB-8rQ,17664
12
+ py_ewr/parameter_metadata/ewr_calc_config.json,sha256=NbhbB_fO0j191XDiz-2TxNasQGGe69FdhLyD0ZMj2eg,17980
13
13
  py_ewr/parameter_metadata/obj2target.csv,sha256=f6kLVyBhXUpGR4b0dzLbBvZbfpn3OxOhaB4aouO6Bvw,1593877
14
14
  py_ewr/parameter_metadata/obj2yrtarget.csv,sha256=G8XgdCrOpB0xhp6n7DIS4Vcq69Kpgb1Pum7Ay3a_YPU,54882
15
15
  py_ewr/parameter_metadata/parameter_sheet.csv,sha256=MxKE-649bIC6HGqh87MT_fR3Lmew8n10Oi6OsAF1N0Q,768524
16
- py_ewr-2.3.2.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
17
- py_ewr-2.3.2.dist-info/METADATA,sha256=7SxKbPMv5Ue-p95_mUws2xSs11TrHAOzfDAIeXi3CIE,12709
18
- py_ewr-2.3.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
19
- py_ewr-2.3.2.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
20
- py_ewr-2.3.2.dist-info/RECORD,,
16
+ py_ewr-2.3.4.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
17
+ py_ewr-2.3.4.dist-info/METADATA,sha256=dcU2egWhsIje0d-nFTKImRkNusWuguvndhV40ixSqVg,12902
18
+ py_ewr-2.3.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
19
+ py_ewr-2.3.4.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
20
+ py_ewr-2.3.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5