py-ewr 2.1.5__py3-none-any.whl → 2.1.7__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.
@@ -386,6 +386,7 @@ BREMWAR,Bremer River U/S Wandstead Road,Bremer River us Wandstead Road,A4261173,
386
386
  BREMWKR,Bremer River at Woodstock Road,Bremer River at Woodstock Road,A4261071,5
387
387
  BRENDA,Culgoa River at Brenda,BSMS EOV target site,422015,2
388
388
  422015_,Culgoa River at Brenda,BSMS EOV target site,422015,2
389
+ 422015A,Culgoa River at Brenda,BSMS EOV target site,422015,2
389
390
  422013A,BIRRIE RIVER AT NEAR GOODOOGA,BSMS EOV target site,422013,2
390
391
  BRESDRN,BERRI EAST DRAINAGE OUTFALL,BERRI EAST DRAINAGE OUTFALL DIRECTLY TO R.MURRAY,,5
391
392
  BRESTP,Brewarrina STP,,,2
@@ -493,8 +494,10 @@ CAPELXG,Barr Ck at Capels Crossing,Barr Ck at Capels Crossing (not the flume),40
493
494
  CAPFSTP,Captain's Flat STP,,,2
494
495
  CARCOAR,Carcoar Reservoir on Lachlan System,,,2
495
496
  CARIMAR,Marthaguy Creek at Carinda,,421011,2
497
+ 8CARMAR,Marthaguy Creek at Carinda,,421011,2
496
498
  CARIMET,Carinda (Post Office),,51007,2
497
499
  CARINDA,Macquarie River at Carinda (Bells Bridge),,421012,2
500
+ 8FGCARR,Macquarie River at Carinda (Bells Bridge),,421012,2
498
501
  CAROLE,Carole Creek Outflow -Gwydir System,Carole Creek @ near Garah,418052,2
499
502
  CAROMET,Walgett (Old Boorooma),,48231,2
500
503
  CARYELT,Carwarp/Yelta WWD,Carwarp/Yelta WWD - Sunraysia,,
@@ -911,6 +914,7 @@ GOLHGT,Golden Heights - Major Pumping Stattion,Major Irrigation Pumping Station
911
914
  GOLWAB2,Goolwa Vertical Slot No 2,,,
912
915
  GOMUBRC,Goulburn �to River Murray via Broken Ck,Goulburn Valley Account Transfer to River Murray,,4
913
916
  GONGOLG,Bogan River at Gongolgon,,421023,2
917
+ 8GONGOG,Bogan River at Gongolgon,,421023,2
914
918
  GOOBMET,Goolwa Barrages - BOM station,,23825,5
915
919
  GOOCHBD,Goolwa Channel at Goolwa Barrage (D/S),Goolwa Channel at Goolwa Barrage (D/S),A4261035,5
916
920
  GOOCOT,Water transferred from Googong Dam to Cotter Sys,Water transferred from Googong Dam to Cotter System,,3
@@ -1627,6 +1631,7 @@ MUNDDS,LAKE ALEXANDRINA D/S MUNDOO BARRAGES,,A4260526,5
1627
1631
  MUNDIWA,CULGOA RIVER U/S COLLERINA (MUNDIWA),,422011,2
1628
1632
  MUNDOO,LAKE ALEXANDRINA U/S MUNDOO BARRAGES,,A4261042,5
1629
1633
  MUNGIND,Barwon River - Mungindi,,416001,1
1634
+ 9INMUNG,Barwon River - Mungindi,,416001,1
1630
1635
  MUNGMET,Mungindi (Post Office),,52020,2
1631
1636
  MUNGSTP,Mungallala STP,,,1
1632
1637
  MUPCRDS,Upper Potterwalkage Creek Regulator D/S,,,
@@ -2268,6 +2273,7 @@ TUMSTP,Tumut STP,,,2
2268
2273
  TUMURDS,Tumudgery Regulator D/S,Millewa monitoring site,40922002,
2269
2274
  TUMUREG,Tumudgery River Regulator,River Regulator settings - Edward River - NSW National Parks,40922002,2
2270
2275
  TUMUT,Tumut River @ Tumut,,410006,2
2276
+ 11GFTUM,Tumut River @ Tumut,,410006,2
2271
2277
  TUMUT1,Release From TumutT 1 Power Station,RECEIVED FROM SMHEA COOMA,,2
2272
2278
  TUMUTPD,Tumut Pondage,Snowy Hydro Limited,,2
2273
2279
  TUNGAMA,Boosey Creek at Tungamah (ML),,,4
@@ -12,6 +12,7 @@ from mdba_gauge_getter import gauge_getter as gg
12
12
  log = logging.getLogger(__name__)
13
13
  log.addHandler(logging.NullHandler())
14
14
 
15
+
15
16
  def categorise_gauges(gauges: list, ewr_table_path:str = None) -> tuple:
16
17
  '''Separate gauges into level, flow, or both
17
18
 
@@ -28,28 +29,29 @@ def categorise_gauges(gauges: list, ewr_table_path:str = None) -> tuple:
28
29
 
29
30
  EWR_TABLE, _ = data_inputs.get_EWR_table(ewr_table_path)
30
31
 
31
- if ewr_table_path:
32
- level_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='L']['Gauge'].to_list()
33
- # only add gauges if in the incoming list
34
- for gauge in level_gauges_to_add:
32
+ # if ewr_table_path:
33
+ level_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='L']['Gauge'].to_list()
34
+ # only add gauges if in the incoming list
35
+ for gauge in level_gauges_to_add:
36
+ if gauge in gauges:
37
+ level_gauges.append(gauge)
38
+ lake_level_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='LL']['Gauge'].to_list()
39
+ # print(lake_level_gauges_to_add)
40
+ for gauge in lake_level_gauges_to_add:
41
+ if gauge in gauges:
42
+ lake_level_gauges.append(gauge)
43
+ flow_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='F']['Gauge'].to_list()
44
+ for gauge in flow_gauges_to_add:
45
+ if gauge in gauges:
46
+ flow_gauges.append(gauge)
47
+
48
+ weirpool_gauges_to_add = [ i for i in EWR_TABLE['WeirpoolGauge'].to_list() if type(i) == str]
49
+ weirpool_gauges_to_add = [i for i in weirpool_gauges_to_add if i ]
50
+ if weirpool_gauges_to_add:
51
+ for gauge in weirpool_gauges_to_add:
35
52
  if gauge in gauges:
36
53
  level_gauges.append(gauge)
37
- lake_level_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='LL']['Gauge'].to_list()
38
- for gauge in lake_level_gauges_to_add:
39
- if gauge in gauges:
40
- lake_level_gauges.append(gauge)
41
- flow_gauges_to_add = EWR_TABLE[EWR_TABLE['GaugeType']=='F']['Gauge'].to_list()
42
- for gauge in flow_gauges_to_add:
43
- if gauge in gauges:
44
- flow_gauges.append(gauge)
45
-
46
- weirpool_gauges_to_add = [ i for i in EWR_TABLE['WeirpoolGauge'].to_list() if type(i) == str]
47
- weirpool_gauges_to_add = [i for i in weirpool_gauges_to_add if i ]
48
- if weirpool_gauges_to_add:
49
- for gauge in weirpool_gauges_to_add:
50
- if gauge in gauges:
51
- level_gauges.append(gauge)
52
- lake_level_gauges.append(gauge)
54
+ # lake_level_gauges.append(gauge)
53
55
 
54
56
  # hard code gauges in data_input module
55
57
  sa_barrage_gauges = data_inputs.get_barrage_level_gauges()
@@ -62,23 +64,14 @@ def categorise_gauges(gauges: list, ewr_table_path:str = None) -> tuple:
62
64
  if gauge in multi_gauges.keys():
63
65
  flow_gauges.append(gauge)
64
66
  flow_gauges.append(multi_gauges[gauge])
65
- if gauge in _level_gauges:
66
- level_gauges.append(gauge)
67
67
  if gauge in weirpool_gauges.keys(): # need level and flow gauges
68
- flow_gauges.append(gauge)
69
- level_gauges.append(weirpool_gauges[gauge])
70
- lake_level_gauges.append(weirpool_gauges[gauge])
68
+ flow_gauges.append(gauge)
69
+ level_gauges.append(weirpool_gauges[gauge])
71
70
 
72
71
  # add hard coded gauges only if it int he incoming list
73
72
  if any(gauge in gauges for gauge in sa_barrage_gauges):
74
73
  lake_level_gauges += sa_barrage_gauges
75
74
  level_gauges += sa_barrage_gauges
76
-
77
- # Then loop through again and allocate remaining gauges to the flow category
78
- for gauge in gauges:
79
- if ((gauge not in level_gauges) and (gauge not in lake_level_gauges) and (gauge not in flow_gauges)):
80
- # Otherwise, assume its a flow gauge and add
81
- flow_gauges.append(gauge)
82
75
 
83
76
  unique_flow_gauges = list(set(flow_gauges))
84
77
  unique_level_gauges = list(set(level_gauges))
@@ -186,11 +179,19 @@ class ObservedHandler:
186
179
 
187
180
  # Classify gauges:
188
181
  flow_gauges, level_gauges, lake_level_gauges = categorise_gauges(self.gauges, self.parameter_sheet)
182
+ print('flow gauges')
183
+ print(flow_gauges)
184
+ print('level gauges')
185
+ print(level_gauges)
186
+ print('lake level gauges')
187
+ print(lake_level_gauges)
189
188
  # Call state API for flow and level gauge data, then combine to single dataframe
190
189
  log.info(f'Including gauges: flow gauges: { ", ".join(flow_gauges)} level gauges: { ", ".join(level_gauges)} lake level gauges: { ", ".join(lake_level_gauges)}')
190
+
191
191
  flows = gg.gauge_pull(flow_gauges, start_time_user = self.dates['start_date'], end_time_user = self.dates['end_date'], var = 'F')
192
192
  levels = gg.gauge_pull(level_gauges, start_time_user = self.dates['start_date'], end_time_user = self.dates['end_date'], var = 'L')
193
193
  lake_levels = gg.gauge_pull(lake_level_gauges, start_time_user=self.dates['start_date'], end_time_user=self.dates['end_date'], var='LL')
194
+
194
195
  # Clean observed data:
195
196
  df_F = observed_cleaner(flows, self.dates)
196
197
  df_L = observed_cleaner(levels, self.dates)
@@ -515,7 +515,9 @@
515
515
  "BF2_c_P-single-F",
516
516
  "BF2_c_S-single-F",
517
517
  "BF4-single-F",
518
- "BF5-single-F"
518
+ "BF5-single-F",
519
+ "BF_FD1-single-F",
520
+ "BF_FD2-single-F"
519
521
  ],
520
522
  "ctf_handle_multi": [
521
523
  "CF-multigauge-F"
@@ -620,7 +622,9 @@
620
622
  "DR2-single-F",
621
623
  "FR1-single-F",
622
624
  "LDF-single-F",
623
- "WFT-single-F"
625
+ "WFT-single-F",
626
+ "SF_FD1-single-F",
627
+ "SF_FD2-single-F"
624
628
  ],
625
629
  "flow_handle_check_ctf": [
626
630
  "FD1-single-F",
@@ -641,8 +645,8 @@
641
645
  "FrW4-single-F"
642
646
  ],
643
647
  "water_stability_level_handle": [
644
- "FrL1-single-L",
645
- "FrL2-single-L"
648
+ "FrL1-single-F",
649
+ "FrL2-single-F"
646
650
  ],
647
651
  "rise_and_fall_handle": [
648
652
  "RRF-single-F",