py-ewr 2.3.0__py3-none-any.whl → 2.3.1__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/data_inputs.py +2 -2
- py_ewr/model_metadata/SiteID_MDBA.csv +2 -0
- py_ewr/observed_handling.py +12 -12
- py_ewr/parameter_metadata/ewr2obj.csv +36799 -39096
- py_ewr/parameter_metadata/obj2target.csv +7941 -7973
- py_ewr/parameter_metadata/obj2yrtarget.csv +106 -106
- py_ewr/parameter_metadata/parameter_sheet.csv +2295 -2301
- py_ewr/scenario_handling.py +12 -12
- py_ewr/summarise_results.py +7 -5
- {py_ewr-2.3.0.dist-info → py_ewr-2.3.1.dist-info}/METADATA +3 -2
- py_ewr-2.3.1.dist-info/RECORD +20 -0
- py_ewr-2.3.0.dist-info/RECORD +0 -20
- {py_ewr-2.3.0.dist-info → py_ewr-2.3.1.dist-info}/LICENSE +0 -0
- {py_ewr-2.3.0.dist-info → py_ewr-2.3.1.dist-info}/WHEEL +0 -0
- {py_ewr-2.3.0.dist-info → py_ewr-2.3.1.dist-info}/top_level.txt +0 -0
py_ewr/scenario_handling.py
CHANGED
|
@@ -653,10 +653,10 @@ class ScenarioHandler:
|
|
|
653
653
|
events_to_process = summarise_results.get_events_to_process(self.yearly_events)
|
|
654
654
|
all_events = summarise_results.process_all_events_results(events_to_process)
|
|
655
655
|
|
|
656
|
-
all_events = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
656
|
+
all_events = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
657
657
|
left_table=all_events,
|
|
658
658
|
left_on=['gauge','pu','ewr'],
|
|
659
|
-
selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
659
|
+
selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
660
660
|
'eventDuration', 'eventLength',
|
|
661
661
|
'Multigauge'],
|
|
662
662
|
parameter_sheet_path=self.parameter_sheet)
|
|
@@ -673,10 +673,10 @@ class ScenarioHandler:
|
|
|
673
673
|
events_to_process = summarise_results.get_events_to_process(self.yearly_events)
|
|
674
674
|
all_events_temp = summarise_results.process_all_events_results(events_to_process)
|
|
675
675
|
|
|
676
|
-
all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
676
|
+
all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
677
677
|
left_table=all_events_temp,
|
|
678
678
|
left_on=['gauge','pu','ewr'],
|
|
679
|
-
selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
679
|
+
selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
680
680
|
'eventDuration', 'eventLength',
|
|
681
681
|
'Multigauge'],
|
|
682
682
|
parameter_sheet_path=self.parameter_sheet)
|
|
@@ -701,10 +701,10 @@ class ScenarioHandler:
|
|
|
701
701
|
events_to_process = summarise_results.get_events_to_process(self.yearly_events)
|
|
702
702
|
all_events_temp1 = summarise_results.process_all_events_results(events_to_process)
|
|
703
703
|
|
|
704
|
-
all_events_temp1 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
704
|
+
all_events_temp1 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
705
705
|
left_table=all_events_temp1,
|
|
706
706
|
left_on=['gauge','pu','ewr'],
|
|
707
|
-
selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
707
|
+
selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
708
708
|
'eventDuration', 'eventLength',
|
|
709
709
|
'Multigauge'],
|
|
710
710
|
parameter_sheet_path=self.parameter_sheet)
|
|
@@ -723,10 +723,10 @@ class ScenarioHandler:
|
|
|
723
723
|
events_to_process = summarise_results.get_events_to_process(self.yearly_events)
|
|
724
724
|
all_events_temp2 = summarise_results.process_all_events_results(events_to_process)
|
|
725
725
|
|
|
726
|
-
all_events_temp2 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
726
|
+
all_events_temp2 = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
727
727
|
left_table=all_events_temp2,
|
|
728
728
|
left_on=['gauge','pu','ewr'],
|
|
729
|
-
selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
729
|
+
selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
730
730
|
'eventDuration', 'eventLength',
|
|
731
731
|
'Multigauge'],
|
|
732
732
|
parameter_sheet_path=self.parameter_sheet)
|
|
@@ -760,24 +760,24 @@ class ScenarioHandler:
|
|
|
760
760
|
to_process = summarise_results.pu_dfs_to_process(self.pu_ewr_statistics)
|
|
761
761
|
yearly_ewr_results = summarise_results.process_df_results(to_process)
|
|
762
762
|
|
|
763
|
-
yearly_ewr_results = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
763
|
+
yearly_ewr_results = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
764
764
|
left_table=yearly_ewr_results,
|
|
765
765
|
left_on=['gauge','pu','ewrCode'],
|
|
766
766
|
selected_columns= ['Year', 'eventYears', 'numAchieved', 'numEvents', 'numEventsAll',
|
|
767
767
|
'eventLength', 'eventLengthAchieved', 'totalEventDays', 'totalEventDaysAchieved',
|
|
768
768
|
'maxEventDays', 'maxRollingEvents', 'maxRollingAchievement',
|
|
769
769
|
'missingDays', 'totalPossibleDays', 'ewrCode',
|
|
770
|
-
'scenario', 'gauge', 'pu', 'Multigauge'],
|
|
770
|
+
'scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'Multigauge'],
|
|
771
771
|
parameter_sheet_path=self.parameter_sheet)
|
|
772
772
|
|
|
773
773
|
# Setting up the dictionary of yearly rolling maximum interevent periods:
|
|
774
774
|
events_to_process = summarise_results.get_events_to_process(self.yearly_events)
|
|
775
775
|
all_events_temp = summarise_results.process_all_events_results(events_to_process)
|
|
776
776
|
|
|
777
|
-
all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge'],
|
|
777
|
+
all_events_temp = summarise_results.join_ewr_parameters(cols_to_add=['Multigauge', 'State', 'SWSDLName'],
|
|
778
778
|
left_table=all_events_temp,
|
|
779
779
|
left_on=['gauge','pu','ewr'],
|
|
780
|
-
selected_columns= ['scenario', 'gauge', 'pu', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
780
|
+
selected_columns= ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'waterYear', 'startDate', 'endDate',
|
|
781
781
|
'eventDuration', 'eventLength',
|
|
782
782
|
'Multigauge'],
|
|
783
783
|
parameter_sheet_path=self.parameter_sheet)
|
py_ewr/summarise_results.py
CHANGED
|
@@ -414,11 +414,11 @@ def summarise(input_dict:Dict , events:Dict, parameter_sheet_path:str = None)->
|
|
|
414
414
|
right_on=['scenario', 'gauge','pu',"ewrCode"])
|
|
415
415
|
# Join Ewr parameter to summary
|
|
416
416
|
|
|
417
|
-
final_merged = join_ewr_parameters(cols_to_add=['TargetFrequency','MaxInter-event','Multigauge'],
|
|
417
|
+
final_merged = join_ewr_parameters(cols_to_add=['TargetFrequency','MaxInter-event','Multigauge', 'State', 'SWSDLName'],
|
|
418
418
|
left_table=final_summary_output,
|
|
419
419
|
left_on=['gauge','pu','ewrCode'],
|
|
420
420
|
selected_columns=["scenario",'gauge',
|
|
421
|
-
'pu',
|
|
421
|
+
'pu', 'State', 'SWSDLName',
|
|
422
422
|
'ewrCode',
|
|
423
423
|
'Multigauge',
|
|
424
424
|
'EventYears',
|
|
@@ -436,7 +436,7 @@ def summarise(input_dict:Dict , events:Dict, parameter_sheet_path:str = None)->
|
|
|
436
436
|
'MaxInter-event',
|
|
437
437
|
'NoDataDays',
|
|
438
438
|
'TotalDays'],
|
|
439
|
-
renamed_columns=['Scenario','Gauge', 'PlanningUnit', 'EwrCode', 'Multigauge','EventYears', 'Frequency', 'TargetFrequency',
|
|
439
|
+
renamed_columns=['Scenario','Gauge', 'PlanningUnit', 'State', 'SWSDLName', 'EwrCode', 'Multigauge','EventYears', 'Frequency', 'TargetFrequency',
|
|
440
440
|
'AchievementCount', 'AchievementPerYear', 'EventCount', 'EventCountAll','EventsPerYear', 'EventsPerYearAll',
|
|
441
441
|
'AverageEventLength', 'ThresholdDays', #'InterEventExceedingCount',
|
|
442
442
|
'MaxInterEventYears', 'NoDataDays', 'TotalDays'],
|
|
@@ -507,7 +507,7 @@ def events_to_interevents(start_date: date, end_date: date, df_events: pd.DataFr
|
|
|
507
507
|
# Create the unique ID field
|
|
508
508
|
df_events['ID'] = df_events['scenario']+df_events['gauge']+df_events['pu']+df_events['ewr']
|
|
509
509
|
unique_ID = df_events['ID'].unique()
|
|
510
|
-
all_interEvents = pd.DataFrame(columns = ['scenario', 'gauge', 'pu', 'ewr', 'ID',
|
|
510
|
+
all_interEvents = pd.DataFrame(columns = ['scenario', 'gauge', 'pu', 'State', 'SWSDLName', 'ewr', 'ID',
|
|
511
511
|
'startDate', 'endDate', 'interEventLength'])
|
|
512
512
|
|
|
513
513
|
for i in unique_ID:
|
|
@@ -530,10 +530,12 @@ def events_to_interevents(start_date: date, end_date: date, df_events: pd.DataFr
|
|
|
530
530
|
new_scenario = [contain_values['scenario'].iloc[0]]*length
|
|
531
531
|
new_gauge = [contain_values['gauge'].iloc[0]]*length
|
|
532
532
|
new_pu = [contain_values['pu'].iloc[0]]*length
|
|
533
|
+
new_state = [contain_values['State'].iloc[0]]*length
|
|
534
|
+
new_sdl = [contain_values['SWSDLName'].iloc[0]]*length
|
|
533
535
|
new_ewr = [contain_values['ewr'].iloc[0]]*length
|
|
534
536
|
new_ID = [contain_values['ID'].iloc[0]]*length
|
|
535
537
|
|
|
536
|
-
data = {'scenario': new_scenario, 'gauge': new_gauge, 'pu': new_pu, 'ewr': new_ewr, 'ID': new_ID, 'startDate': inter_starts, 'endDate': inter_ends}
|
|
538
|
+
data = {'scenario': new_scenario, 'gauge': new_gauge, 'pu': new_pu, 'State': new_state, 'SWSDLName': new_sdl, 'ewr': new_ewr, 'ID': new_ID, 'startDate': inter_starts, 'endDate': inter_ends}
|
|
537
539
|
|
|
538
540
|
df_subset = pd.DataFrame(data=data)
|
|
539
541
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: py_ewr
|
|
3
|
-
Version: 2.3.
|
|
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
|
[](https://pypi.org/project/py-ewr/)
|
|
35
35
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
36
36
|
|
|
37
|
-
### **EWR tool version 2.3.
|
|
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
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
py_ewr/data_inputs.py,sha256=oUiEiLY_CmbvqF5GlV-3Yfz_JZ1qZNvta-VEYCzAcso,20124
|
|
3
|
+
py_ewr/evaluate_EWRs.py,sha256=bAhFZTQZkoAE2eKgNIomm1LJdZ2HihoygUnXybtEdm4,231326
|
|
4
|
+
py_ewr/io.py,sha256=Is0xPAzLx6-ylpTFyYJxMimkNVxxoTxUcknTk6bQbgs,840
|
|
5
|
+
py_ewr/observed_handling.py,sha256=JTSK_2obhqNWJ2QknykywevNMN0fsvGXSejFwUSpMoA,18112
|
|
6
|
+
py_ewr/scenario_handling.py,sha256=veaiQ6vfQX40laUk3eEUFWqO3wceP76Wh92HhJFsl8A,35762
|
|
7
|
+
py_ewr/summarise_results.py,sha256=rFaAUVR4jIsjeRl4ocPFE2RUoJJBZgZ2wPEBh-dfEsc,31761
|
|
8
|
+
py_ewr/model_metadata/SiteID_MDBA.csv,sha256=QDIW21IFX1MYxDvs6Aja-OOUBhgnNa8l-NnCpQMmBl4,168430
|
|
9
|
+
py_ewr/model_metadata/SiteID_NSW.csv,sha256=UVBxN43Z5KWCvWhQ5Rh6TNEn35q4_sjPxKyHg8wPFws,6805
|
|
10
|
+
py_ewr/model_metadata/iqqm_stations.csv,sha256=vl4CPtPslG5VplSzf_yLZulTrmab-mEBHOfzFtS1kf4,110
|
|
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
|
|
13
|
+
py_ewr/parameter_metadata/obj2target.csv,sha256=f6kLVyBhXUpGR4b0dzLbBvZbfpn3OxOhaB4aouO6Bvw,1593877
|
|
14
|
+
py_ewr/parameter_metadata/obj2yrtarget.csv,sha256=G8XgdCrOpB0xhp6n7DIS4Vcq69Kpgb1Pum7Ay3a_YPU,54882
|
|
15
|
+
py_ewr/parameter_metadata/parameter_sheet.csv,sha256=MxKE-649bIC6HGqh87MT_fR3Lmew8n10Oi6OsAF1N0Q,768524
|
|
16
|
+
py_ewr-2.3.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
17
|
+
py_ewr-2.3.1.dist-info/METADATA,sha256=QAW_W9RLEq6SXwpl68WRObU7cEUq_MCpygk8cDkAFtQ,12585
|
|
18
|
+
py_ewr-2.3.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
19
|
+
py_ewr-2.3.1.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
|
|
20
|
+
py_ewr-2.3.1.dist-info/RECORD,,
|
py_ewr-2.3.0.dist-info/RECORD
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
py_ewr/data_inputs.py,sha256=OLIxqq15yoEqLSRmBJP37erldUGRRvSNn2XwO8LKZA8,20080
|
|
3
|
-
py_ewr/evaluate_EWRs.py,sha256=bAhFZTQZkoAE2eKgNIomm1LJdZ2HihoygUnXybtEdm4,231326
|
|
4
|
-
py_ewr/io.py,sha256=Is0xPAzLx6-ylpTFyYJxMimkNVxxoTxUcknTk6bQbgs,840
|
|
5
|
-
py_ewr/observed_handling.py,sha256=aVQYI8Qs-v5DZOA_r8bYluE3ilgM7Vjygs29jA6kpaA,17848
|
|
6
|
-
py_ewr/scenario_handling.py,sha256=95HdNNPkY-w77hxnHRJxfzmn9fBu6OqHM5iyoQPwOXE,35498
|
|
7
|
-
py_ewr/summarise_results.py,sha256=CEHsx6hC5UidgYy-dCJW_buiktGKkTH9D_Yl5QpSzh8,31499
|
|
8
|
-
py_ewr/model_metadata/SiteID_MDBA.csv,sha256=HvUgmthXh9J493xI7_bBgLDF2GvbCN19vdhSMrSA7LE,168186
|
|
9
|
-
py_ewr/model_metadata/SiteID_NSW.csv,sha256=UVBxN43Z5KWCvWhQ5Rh6TNEn35q4_sjPxKyHg8wPFws,6805
|
|
10
|
-
py_ewr/model_metadata/iqqm_stations.csv,sha256=vl4CPtPslG5VplSzf_yLZulTrmab-mEBHOfzFtS1kf4,110
|
|
11
|
-
py_ewr/parameter_metadata/ewr2obj.csv,sha256=iJFHRvTAHbq_8MvWb-MUP_IAvsI8_UngfrYfJij7-BY,3628203
|
|
12
|
-
py_ewr/parameter_metadata/ewr_calc_config.json,sha256=l1AgIRlf7UUmk3BNQ4r3kutU48pYHHVKmLELjoB-8rQ,17664
|
|
13
|
-
py_ewr/parameter_metadata/obj2target.csv,sha256=2T96bnQMwog_SSGuT82SzjICMJucVBMiwChym42_06c,1478364
|
|
14
|
-
py_ewr/parameter_metadata/obj2yrtarget.csv,sha256=x-lvGTHMsXutSKfgN6_B0ujQueiu953lEk-_k8ybTNw,56681
|
|
15
|
-
py_ewr/parameter_metadata/parameter_sheet.csv,sha256=Pm741CUDywFJ_Jd8LN41YcimKvne-ey-gJskI13wTIk,772287
|
|
16
|
-
py_ewr-2.3.0.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
17
|
-
py_ewr-2.3.0.dist-info/METADATA,sha256=-QwHeSa73Gn1YO3QAejaGLPOSoZtdOatcdUcTO6DRUs,12516
|
|
18
|
-
py_ewr-2.3.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
19
|
-
py_ewr-2.3.0.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
|
|
20
|
-
py_ewr-2.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|