py-ewr 2.1.2__py3-none-any.whl → 2.1.5__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/model_metadata/SiteID_MDBA.csv +38 -15
- py_ewr/scenario_handling.py +60 -27
- py_ewr/summarise_results.py +5 -7
- {py_ewr-2.1.2.dist-info → py_ewr-2.1.5.dist-info}/METADATA +6 -6
- {py_ewr-2.1.2.dist-info → py_ewr-2.1.5.dist-info}/RECORD +8 -8
- {py_ewr-2.1.2.dist-info → py_ewr-2.1.5.dist-info}/LICENSE +0 -0
- {py_ewr-2.1.2.dist-info → py_ewr-2.1.5.dist-info}/WHEEL +0 -0
- {py_ewr-2.1.2.dist-info → py_ewr-2.1.5.dist-info}/top_level.txt +0 -0
|
@@ -80,10 +80,11 @@ SITEID,Name,Description,AWRC,StateID
|
|
|
80
80
|
422401,Maranoa River @ Mitchell,,422401,1
|
|
81
81
|
422404A,Maranoa River @ Cashmere,,422404,1
|
|
82
82
|
422407C,Maranoa River @ Forestvale,,422407,1
|
|
83
|
-
|
|
83
|
+
423003,Warrego River @ Barringun,,423004,2
|
|
84
|
+
423003_,Warrego River @ Barringun,,423004,2
|
|
84
85
|
423201A,Warrego River @ Charleville,,423201A,1
|
|
85
86
|
423202C,Warrego River @ Cunnamulla,,423202C,1
|
|
86
|
-
423203A,Warrego River @ Wyandra,,423203,
|
|
87
|
+
423203A,Warrego River @ Wyandra,,423203 ,
|
|
87
88
|
423204_,Warrego River @ Augathella,,423204,
|
|
88
89
|
424002_,Paroo River @ Willara Crossing,,424002,
|
|
89
90
|
4261125,Wellington @ Top Surface,,,5
|
|
@@ -237,7 +238,8 @@ BARNXNY,Vic Barmah to Nyah �exc. Nyah Pumps,Victorian Barmah to Nyah diversion
|
|
|
237
238
|
BARNYAH,Barmah to Nyah - Murray River,Barmah to Nyah - Murray River,,4
|
|
238
239
|
BAROONA,Macquarie River @ Baroona,,421127,2
|
|
239
240
|
BARPRES,Barwon River u/s Presbury Weir,Barwon River u/s Presbury Weir,416050,2
|
|
240
|
-
|
|
241
|
+
9GSPRES,Barwon River u/s Presbury Weir,Barwon River u/s Presbury Weir,416050,2
|
|
242
|
+
BARRAGE,Barrages near the Murray Mouth,,A4261002,5
|
|
241
243
|
BARRASP,Airspace in Barr Creek Disposal Basins,,,4
|
|
242
244
|
BARRATT,Edward River D/S of Barratta.,Edward River Downstream of Barratta.,,2
|
|
243
245
|
BARRCK,Barr Creek D/S of Pumps,,,4
|
|
@@ -259,6 +261,7 @@ BCKRWDO,Broken Creek at Rice's Weir deemed irrigation retu,,,4
|
|
|
259
261
|
BDGRWP,Bendigo RWP,,,4
|
|
260
262
|
BECTIVE,Peel River @ Bective,Peel River @ Bective,419074,1
|
|
261
263
|
BEEMERY,Barwon River @ Beemery (u/s Culgoa Junction),,422028,2
|
|
264
|
+
9GSBEEM,Barwon River @ Beemery (u/s Culgoa Junction),,422028,2
|
|
262
265
|
BELLFIE,Lake Bellfields - Wimmera Mallee,,,4
|
|
263
266
|
BELNEW,Bell River @ Newrea,Bell River @ Newrea,421018,2
|
|
264
267
|
BELTONS,Beltons,Hattah Lakes System - manual data collection in the lakes,,
|
|
@@ -335,11 +338,13 @@ BORDRRN,Border Rivers System - New South Wales,,,2
|
|
|
335
338
|
BORDRRQ,Border Rivers Cap Valley - Queensland,"Border Rivers Cap Valley - Queensland - includes Border River, Weir River and Macintyre Brook",,1
|
|
336
339
|
BORDRV,Border Rivers in Queensland,Border Rivers excluding Weir river in Queensland in Border River System,,1
|
|
337
340
|
BOROMA,Barwon River @ Boorooma (u/s Macquarie Junction),,422026,2
|
|
341
|
+
9GSBOOR,Barwon River @ Boorooma (u/s Macquarie Junction),,422026,2
|
|
338
342
|
BORWEIR,Border Rivers including Weir River in QLD,Border Rivers including Weir River in Border River System Queensland,,1
|
|
339
343
|
BOUBEND,River Murray at Boundary Bend,,414201B,2
|
|
340
344
|
BOUNDCK,Lake Alexandrina U/S Boundary Ck Barrage,,,5
|
|
341
345
|
BOUNDDS,Boundary Creek D/S Boundary Creek Barrage,Boundary Creek downstream Boundary Creek Barrage,A4261044,5
|
|
342
346
|
BOURKE,Darling River at Bourke,,425003,2
|
|
347
|
+
9GSBOUR,Darling River at Bourke,,425003,2
|
|
343
348
|
BOWKILN,Bowls Kiln,Millewa monitoring site,,
|
|
344
349
|
BOWLERS,Mitta Mitta River at Bowlers Lane,,401222,
|
|
345
350
|
BOXBARR,Box Creek at Barratta Dam,,409059,2
|
|
@@ -385,6 +390,7 @@ BRENDA,Culgoa River at Brenda,BSMS EOV target site,422015,2
|
|
|
385
390
|
BRESDRN,BERRI EAST DRAINAGE OUTFALL,BERRI EAST DRAINAGE OUTFALL DIRECTLY TO R.MURRAY,,5
|
|
386
391
|
BRESTP,Brewarrina STP,,,2
|
|
387
392
|
BREWARR,Barwon River at Brewarrina,,422002,2
|
|
393
|
+
9GSBREW,Barwon River at Brewarrina,,422002,2
|
|
388
394
|
BREWTOT,Barwon R Brewarrina ( total flow ),,422023,2
|
|
389
395
|
BRGSTP,Bellbridge STP,,,4
|
|
390
396
|
BRHAMET,Broken Hill Airport MET,Broken Hill Airport AWS. 2.8 Km from closed Site BROKMET,47048,2
|
|
@@ -454,6 +460,7 @@ CADESC3,Cadow No. 3 Escape,,,2
|
|
|
454
460
|
CADLDRN,Cadell LWMP Drains,Cadell Land and Water Management Plan Drains,,
|
|
455
461
|
CADPUM,Cadell - Blanchetown Pipeline,,,
|
|
456
462
|
CAIRNCU,Loddon River at Cairn Curran Reservoir,Cairn Curran Reservoir - Loddon River,407210,4
|
|
463
|
+
424201A,Paroo R at Caiwarro,Paroo R at Caiwarro - Queensland,424201A,1
|
|
457
464
|
CAIWARR,Paroo R at Caiwarro,Paroo R at Caiwarro - Queensland,424201A,1
|
|
458
465
|
CALFCK,Calf Creek River Regulator U/S Forest Side,New South Wales Regulators - Koondrook-Perricoota Forest,,2
|
|
459
466
|
CALIVIL,Calivil Creek at Wisharts Road,Calivil Creek at Wisharts Road,407284,4
|
|
@@ -591,6 +598,7 @@ COLIBAS,Campaspe River - Coliban System,,,4
|
|
|
591
598
|
COLIGNA,River Murray at Colignans,,414207A,4
|
|
592
599
|
COLIPON,Murray River at Colignan - pontoon,Murray River at Colignan - pontoon,41310022,4
|
|
593
600
|
COLLARE,Barwon River at Collarenebri Main Channel,Barwon River @ Collarenebri Main Channel,422003,2
|
|
601
|
+
9GSCOLL,Barwon River at Collarenebri Main Channel,Barwon River @ Collarenebri Main Channel,422003,2
|
|
594
602
|
COLLBRI,Mehi River Near Collarenebri,,418055,2
|
|
595
603
|
COLLEAM,Colleambally,Colleambally - Murrumbidgee River System,,2
|
|
596
604
|
COLLELD,CIA Diversion,,,2
|
|
@@ -854,6 +862,7 @@ FOAPMET,Forbes Apt,,65103,2
|
|
|
854
862
|
FORBES,Lachlan River - Forbes (Cottons Weir),,412004,2
|
|
855
863
|
FORBMET,Forbes (Camp Street),,65016,2
|
|
856
864
|
FORDSBR,WARREGO RIVER AT FORDS BRIDGE (MN CHANN),,423001,2
|
|
865
|
+
423001_,WARREGO RIVER AT FORDS BRIDGE (MN CHANN),,423001,2
|
|
857
866
|
FORDSBY,WARREGO RIVER - FORDS BRIDGE (BYWASH),,423002,2
|
|
858
867
|
FOREST,Barmah-Millewa Regulator Openings,PERCENTAGE OF REGULATORS THAT ARE OPEN,,4
|
|
859
868
|
FORHSTP,Forest Hill STP (Wagga Wagga),,,2
|
|
@@ -977,6 +986,7 @@ GUMCOW,Gum Cowal @ Bifurcation,Gum Cowal @ Bifurcation,421146,2
|
|
|
977
986
|
GUNBENV,Gunbower Creek Environmental Releases,Releases for environmental watering of riverine wetlands,,4
|
|
978
987
|
GUNCOXY,Gum Cowal @ Oxley,Gum Cowal @ Oxley,421152,2
|
|
979
988
|
GUNDABA,MOONIE RIVER - GUNDABLOUIE,,417001,
|
|
989
|
+
417001_,MOONIE RIVER - GUNDABLOUIE,,417001,
|
|
980
990
|
GUNDAGI,MURRUMBIDGEE RIVER - GUNDAGAI,,410004,2
|
|
981
991
|
GUNDSTP,Gundagai STP,,,2
|
|
982
992
|
GUNFORE,Gunbower forest system,added to capture environmental water for the Gunbower system,GUNFORE,4
|
|
@@ -1306,11 +1316,11 @@ LOCK5DS,River Murray D/S Lock 5,,426513,5
|
|
|
1306
1316
|
LOCK5US,River Murray U/S Lock 5,SAMPLE AT GAUGING STATION,426512,5
|
|
1307
1317
|
LOCK6DS,River Murray D/S Lock 6,,426511,5
|
|
1308
1318
|
LOCK6US,River Murray U/S Lock 6,,426510,5
|
|
1309
|
-
LOCK7DS,River Murray D/S Lock 7,,
|
|
1310
|
-
LOCK7US,River Murray U/S Lock 7,,
|
|
1311
|
-
LOCK8DS,River Murray D/S Lock 8,,
|
|
1312
|
-
LOCK8US,River Murray U/S Lock 8,,
|
|
1313
|
-
LOCK9DS,River Murray D/S Lock 9,,
|
|
1319
|
+
LOCK7DS,River Murray D/S Lock 7,,A4260509,5
|
|
1320
|
+
LOCK7US,River Murray U/S Lock 7,,A4260508,5
|
|
1321
|
+
LOCK8DS,River Murray D/S Lock 8,,A4260507,5
|
|
1322
|
+
LOCK8US,River Murray U/S Lock 8,,A4260506,5
|
|
1323
|
+
LOCK9DS,River Murray D/S Lock 9,,A4260505,5
|
|
1314
1324
|
LOCK9US,River Murray U/S Lock 9,SAMPLE AT GAUGING STATION,A4260501,5
|
|
1315
1325
|
LOCKING,Lockington Main Drain,Lockington Main Drain Shepparton,407712,4
|
|
1316
1326
|
LOCKRIC,Lockington Main Drain adj to Richardsons,Lockington Main Drain adjacent to Richardsons,,4
|
|
@@ -1330,6 +1340,7 @@ LODWWMC,Loddon River - WWMC,,,4
|
|
|
1330
1340
|
LONSDAL,Lake Lonsdale - Wimmera Mallee,,,4
|
|
1331
1341
|
LOUSYCR,Lousy Crossing,Millewa monitoring site,,
|
|
1332
1342
|
LOUTH,Darling River at Louth,,425004,2
|
|
1343
|
+
9GSLOUT,Darling River at Louth,,425004,2
|
|
1333
1344
|
LOVEBAS,Loveday Outfall at Loveday Evaporation Basin,Loveday Outfall at Loveday Evaporation Basin,A4260698,5
|
|
1334
1345
|
LOVECAU,Loveday Swamp at Cit Causeway Southern Basin,Loveday Swamp at Cit Causeway Southern Basin,A4261088,5
|
|
1335
1346
|
LOVECOB,Loveday Disposal Basin at Cobdogla Swamp,Loveday Disposal Basin at Cobdogla Swamp,A4261081,5
|
|
@@ -1534,6 +1545,7 @@ MNCKUMB,"Manna Creek, upstream Manna bridge",,,2
|
|
|
1534
1545
|
MNTESC,1 McNight,,,4
|
|
1535
1546
|
MNWDRM,Merbein North-West Drain,Merbein North-West Drain @ U/S of Outfall to Murray River,414706,4
|
|
1536
1547
|
MOGIL,Barwon River at Mogil Mogil,,422004,2
|
|
1548
|
+
9GSMOGI,Barwon River at Mogil Mogil,,422004,2
|
|
1537
1549
|
MOIRACK,Moira Creek River Regulator,River Regulator settings - Murray River - Barmah forest - NSW National Parks,,2
|
|
1538
1550
|
MOIRADS,Moira Creek D/S,Millewa monitoring site,,
|
|
1539
1551
|
MOIRALW,Moira Lake West,Millewa monitoring site,,
|
|
@@ -1576,7 +1588,7 @@ MORTBLK,Morton Boulka Lake,,,2
|
|
|
1576
1588
|
MORTOMB,Morgan to Murray Bridge Reach,,,
|
|
1577
1589
|
MOULAME,Edward River at Moulamein,,409014,4
|
|
1578
1590
|
MOULMET,Moulamein Post Office Met Station,,75046,4
|
|
1579
|
-
MOUTH,Murray Mouth
|
|
1591
|
+
MOUTH,Murray Mouth,,A4260527,5
|
|
1580
1592
|
MPNSTP,Mooroopna STP,,,4
|
|
1581
1593
|
MRLPUMP,Murray River Level @ Main Hattah Pump Station,,MRLPUMP,
|
|
1582
1594
|
MRUFUSR,River Murray D/S Rufus River,,426200A,5
|
|
@@ -2125,6 +2137,7 @@ TALMALM,Murray R @ Talmalmo,Thermal Analysis Site,,2
|
|
|
2125
2137
|
TALPILE,TALPILE,Lake Talpile in the Poon Boon system,,2
|
|
2126
2138
|
TALSTP,Tallangatta STP,,,4
|
|
2127
2139
|
TALYBH,TALYAWALKA CREEK AT BARRIER HIGHWAY,TALYAWALKA CREEK AT BARRIER HIGHWAY,425018,4
|
|
2140
|
+
9GSBARR,TALYAWALKA CREEK AT BARRIER HIGHWAY,TALYAWALKA CREEK AT BARRIER HIGHWAY,425018,4
|
|
2128
2141
|
TALYRLB,Talyawalka Creek at Rail Bridge,Bypass Flow around Menindee Lakes,,
|
|
2129
2142
|
TAMFIE,Thales Australia Munitions Factory,,,2
|
|
2130
2143
|
TAMSTP,Tamworth STP - Westdale & Swan St Plants,,,2
|
|
@@ -2144,6 +2157,7 @@ TANREDB,Tandou Diversions from Redbank Creek,Tancaw + Tanover,,2
|
|
|
2144
2157
|
TANTANG,Tantangara Reservoir on Murrumbidgee,Snowy Hydro Limited,,2
|
|
2145
2158
|
TAPIO,DARLING River AT TAPIO,,42510050,
|
|
2146
2159
|
TARA,Barwon River @ Tara (u/s Namoi Junction),Barwon River @ Tara (u/s Namoi Junction),422025,2
|
|
2160
|
+
9GSTARA,Barwon River @ Tara (u/s Namoi Junction),Barwon River @ Tara (u/s Namoi Junction),422025,2
|
|
2147
2161
|
TARADWN,Great Darling River at Tara Downs,,425054,2
|
|
2148
2162
|
TARASTP,Tara STP,,,1
|
|
2149
2163
|
TARCOOL,RIVER MURRAY - TARCOOLA,,,
|
|
@@ -2181,6 +2195,7 @@ THURK,Thurk island (SA),Thurk island (SA),,5
|
|
|
2181
2195
|
TIDBMET,Tidbinbilla Meteo Station,,70310,3
|
|
2182
2196
|
TILLMET,Balranald (Tillara),,49048,2
|
|
2183
2197
|
TILPA,Darling River @ Tilpa,Sample @ Gauging Station,425900,2
|
|
2198
|
+
9GSTILP,Darling River @ Tilpa,Sample @ Gauging Station,425900,2
|
|
2184
2199
|
TINHUT,Tin Hut,Millewa monitoring site,,
|
|
2185
2200
|
TMPLTON,RIVER MURRAY - TEMPLETON,,4260632,5
|
|
2186
2201
|
TOCDOF,Toolamba Community Drain,,,4
|
|
@@ -2369,6 +2384,7 @@ WALBUND,Billabong Creek at Walbundrie Station,,410091,2
|
|
|
2369
2384
|
WALEAST,Wallawalla east regulator,,,
|
|
2370
2385
|
WALGET2,Barwon River at Walgett (Hannafords),,422009,2
|
|
2371
2386
|
WALGETT,Barwon River at Walgett (Dangar Bridge),,422001,2
|
|
2387
|
+
9GSWALG,Barwon River at Walgett (Dangar Bridge),,422001,2
|
|
2372
2388
|
WALGSTP,Walgett STP,,,2
|
|
2373
2389
|
WALHLDS,Wallpolla Horseshoe Lagoon regulator D/S,,,
|
|
2374
2390
|
WALKERF,River Murray at Walker Flat,,426548,5
|
|
@@ -2387,6 +2403,7 @@ WANDELF,Wandell Creek at Fairly,WANDELL CREEK AT FAIRLY,407286,4
|
|
|
2387
2403
|
WANGARA,Ovens River (ONLY) - Wangaratta,,403200,4
|
|
2388
2404
|
WANGSTP,Wangaratta STP,,,4
|
|
2389
2405
|
WANWIM,Wannon River Catchment to Wimmera-Mallee,,,4
|
|
2406
|
+
9GSWARR,Darling River @ Warraweena (d/s Culgoa Junction),,425039,2
|
|
2390
2407
|
WARAWEN,Darling River @ Warraweena (d/s Culgoa Junction),,425039,2
|
|
2391
2408
|
WARESC9,Warroo No.9 Escape,,,2
|
|
2392
2409
|
WARGNSW,Warrego River in NSW,,,1
|
|
@@ -2454,12 +2471,14 @@ WIDGEON,River Murray @ Widgeon,,409039,4
|
|
|
2454
2471
|
WILCAN,Darling River at Wilcannia (Total Flow),,425002,2
|
|
2455
2472
|
WILCMET,Wilcannia Met Station,From 10/1/2015 we are using above site as - 46012 Wilcannia Aerodrome Automatic water station (AWS),46043,2
|
|
2456
2473
|
WILCMNC,Main Darling Channel at Wilcannia,,425008,2
|
|
2474
|
+
9GSWILC,Main Darling Channel at Wilcannia,,425008,2
|
|
2457
2475
|
WILDDOG,Wild Dog Creek,Millewa monitoring site,,
|
|
2458
2476
|
WILKDLW,Wilkinsons Dr @ Lake Wandella,Kerang Lakes - Wilkinsons Dr at Lake Wandella,407758,4
|
|
2459
2477
|
WILLHOV,Lake William Hovell - Ovens River,,403234A,4
|
|
2460
2478
|
WILLIAM,Lake William,,,
|
|
2461
2479
|
WILMSTO,Williamstown Met Stn,Williamstown Meteorological Stn,23572,4
|
|
2462
2480
|
WIMHOR,Wimmera River @ Horsham Weir (Victoria),Wimmera River at Horsham (Victoria),415200,4
|
|
2481
|
+
415200,Wimmera River @ Horsham Weir (Victoria),Wimmera River at Horsham (Victoria),415200,4
|
|
2463
2482
|
WIMMALL,Wimmera Mallee - Diversions,,,4
|
|
2464
2483
|
WIMMDIM,Wimmera River U/S of Dimboola,Wimmera River U/S of Dimboola,415256A,4
|
|
2465
2484
|
WINDAME,Windamere Reservoir - Cudgegong River,,,2
|
|
@@ -2598,15 +2617,19 @@ __WRYC1,__WRYC1,Wimmera River System Model Node WR_YC1,__WRYC1,4
|
|
|
2598
2617
|
1AS,1AS,"Yanga (South Redbank), combined 1AS and 1ES regulators",1AS,2
|
|
2599
2618
|
422207A,422207A,Hebel-Bollon Road GS (Node C),422207A,1
|
|
2600
2619
|
422209A,422209A,Hebel GS (Node D),422209A,1
|
|
2601
|
-
|
|
2602
|
-
LOCK8DS,A4260507,Murray downstream Lock 8 ,A4260507,5
|
|
2603
|
-
LOCK6US - Natural,A4260509,Murray downstream Lock 7 ,A4260509,5
|
|
2604
|
-
MOUTH,A4260527,Barrages near the Murray Mouth,A4260527,5
|
|
2605
|
-
FLOWSA ,A4261001,Flow at South Australia border,A4261001,5
|
|
2606
|
-
BARRAGE,A4261002,Barrages near the Murray Mouth,A4261002,5
|
|
2620
|
+
FLOWSA,A4261001,Flow at South Australia border,A4261001,5
|
|
2607
2621
|
Bills Pipe,Bills Pipe,North Redbank,Bills Pipe,2
|
|
2608
2622
|
"Eulimbah, Nimmie Creek","Eulimbah, Nimmie Creek","Gayini/ Nimmie-Caira, combined Eulimbah and Nimmie Creek regulators","Eulimbah, Nimmie Creek",2
|
|
2609
2623
|
Glen Dee,Glen Dee,"Western Lakes, Glenn Dee",Glen Dee,2
|
|
2610
2624
|
Pattos Pipe,Pattos Pipe,North Redbank,Pattos Pipe,2
|
|
2611
2625
|
Pump direct from river,Pump direct from river,"North Redbank, pumped direct from river",Pump direct from river,2
|
|
2612
2626
|
Pumped from Yanga Lake,Pumped from Yanga Lake,Yanga (South Redbank),Pumped from Yanga Lake,2
|
|
2627
|
+
424201A,Warrego Paroo Bulloo and Nebine Long-term watering plan,Paroo River at Caiwarro,424201A,1
|
|
2628
|
+
6GRAVEG,GWYDIR RIVER - GRAVESEND ROAD BRIDGE,Gwydir River @ Gravesend Road Bridge, 418013,2
|
|
2629
|
+
6FDSCOP,GWYDIR RIVER D/S COPETON DAM,_,418026,2
|
|
2630
|
+
6YARMAN,Gwydir River @ Yarraman Bridge,_,418004,2
|
|
2631
|
+
6MOREEG,MEHI RIVER AT MOREE,_,418002,2
|
|
2632
|
+
6COLARG,Mehi River Near Collarenebri,_,418055,2
|
|
2633
|
+
6MALLWA,Mallowa Creek @ Regulator,Mallowa Creek @ Regulator,418049,2
|
|
2634
|
+
6CAROLG,418011,Carole downstream Regulator Gwydir,418011,2
|
|
2635
|
+
6GARAHG,Carole Creek Outflow -Gwydir System,Carole Creek @ near Garah,418052,2
|
py_ewr/scenario_handling.py
CHANGED
|
@@ -16,27 +16,6 @@ log.addHandler(logging.NullHandler())
|
|
|
16
16
|
from . import data_inputs, evaluate_EWRs, summarise_results
|
|
17
17
|
#----------------------------------- Scenario testing handling functions--------------------------#
|
|
18
18
|
|
|
19
|
-
# def gauge_only_column(df: pd.DataFrame) -> pd.DataFrame:
|
|
20
|
-
# '''Ingesting scenario file locations with a standard timeseries format,
|
|
21
|
-
# returns a dictionary of flow dataframes with their associated header data
|
|
22
|
-
|
|
23
|
-
# Args:
|
|
24
|
-
# csv_file (str): location of model file
|
|
25
|
-
|
|
26
|
-
# Results:
|
|
27
|
-
# pd.DataFrame: model file converted to dataframe
|
|
28
|
-
# '''
|
|
29
|
-
|
|
30
|
-
# siteList = []
|
|
31
|
-
# for location in df.columns:
|
|
32
|
-
# gauge = extract_gauge_from_string(location)
|
|
33
|
-
# siteList.append(gauge)
|
|
34
|
-
# # Save over the top of the column headings with the new list containing only the gauges
|
|
35
|
-
# df.columns = siteList
|
|
36
|
-
|
|
37
|
-
# return df
|
|
38
|
-
|
|
39
|
-
|
|
40
19
|
def unpack_model_file(csv_file: str, main_key: str, header_key: str) -> tuple:
|
|
41
20
|
'''Ingesting scenario file locations of model files with all formats (excluding standard timeseries format), seperates the flow data and header data
|
|
42
21
|
returns a dictionary of flow dataframes with their associated header data
|
|
@@ -236,7 +215,8 @@ def cleaner_NSW(input_df: pd.DataFrame) -> pd.DataFrame:
|
|
|
236
215
|
cleaned_df['Date'] = pd.to_datetime(cleaned_df['Date'], format = '%d/%m/%Y')
|
|
237
216
|
cleaned_df['Date'] = cleaned_df['Date'].apply(lambda x: x.to_period(freq='D'))
|
|
238
217
|
except ValueError:
|
|
239
|
-
log.info('Attempted and failed to read in dates in format: dd/mm/yyyy,
|
|
218
|
+
log.info('''Attempted and failed to read in dates in format: dd/mm/yyyy,
|
|
219
|
+
attempting to look for dates in format: yyyy-mm-dd''')
|
|
240
220
|
try:
|
|
241
221
|
cleaned_df['Date'] = pd.to_datetime(cleaned_df['Date'], format = '%Y-%m-%d')
|
|
242
222
|
cleaned_df['Date'] = cleaned_df['Date'].apply(lambda x: x.to_period(freq='D'))
|
|
@@ -250,6 +230,51 @@ def cleaner_NSW(input_df: pd.DataFrame) -> pd.DataFrame:
|
|
|
250
230
|
def cleaner_standard_timeseries(input_df: pd.DataFrame, ewr_table_path: str = None) -> pd.DataFrame:
|
|
251
231
|
'''Ingests dataframe, removes junk columns, fixes date, allocates gauges to either flow/level
|
|
252
232
|
|
|
233
|
+
Args:
|
|
234
|
+
input_df (pd.DataFrame): flow/water level dataframe
|
|
235
|
+
|
|
236
|
+
Results:
|
|
237
|
+
tuple[pd.DataFrame, pd.DataFrame]: Cleaned flow dataframe; cleaned water level dataframe
|
|
238
|
+
|
|
239
|
+
'''
|
|
240
|
+
|
|
241
|
+
cleaned_df = input_df.copy(deep=True)
|
|
242
|
+
try:
|
|
243
|
+
cleaned_df.index = pd.to_datetime(cleaned_df.index, format = '%d/%m/%Y')
|
|
244
|
+
except ValueError:
|
|
245
|
+
log.info('''Attempted and failed to read in dates in format: dd/mm/yyyy, attempting
|
|
246
|
+
to look for dates in format: yyyy-mm-dd''')
|
|
247
|
+
try:
|
|
248
|
+
cleaned_df.index = pd.to_datetime(cleaned_df.index, format = '%Y-%m-%d')
|
|
249
|
+
except ValueError:
|
|
250
|
+
raise ValueError('''New date format detected. Cannot read in data''')
|
|
251
|
+
log.info('''Successfully read in data with yyyy-mm-dd formatting''')
|
|
252
|
+
|
|
253
|
+
# If there are missing dates, add in the dates and fill with NaN values
|
|
254
|
+
dates = pd.date_range(start = cleaned_df.index[0], end=cleaned_df.index[-1])
|
|
255
|
+
cleaned_df = cleaned_df.reindex(dates)
|
|
256
|
+
|
|
257
|
+
# TODO: Optional: add in gap filling code if user selects preference for gap filling
|
|
258
|
+
|
|
259
|
+
df_flow = pd.DataFrame(index = cleaned_df.index)
|
|
260
|
+
df_level = pd.DataFrame(index = cleaned_df.index)
|
|
261
|
+
df_flow.index.name = 'Date'
|
|
262
|
+
df_level.index.name = 'Date'
|
|
263
|
+
|
|
264
|
+
for gauge in cleaned_df.columns:
|
|
265
|
+
gauge_only = extract_gauge_from_string(gauge)
|
|
266
|
+
if 'flow' in gauge:
|
|
267
|
+
df_flow[gauge_only] = cleaned_df[gauge].copy(deep=True)
|
|
268
|
+
if 'level' in gauge:
|
|
269
|
+
df_level[gauge_only] = cleaned_df[gauge].copy(deep=True)
|
|
270
|
+
if not gauge_only:
|
|
271
|
+
log.info('Could not identify gauge in column name:', gauge, ', skipping analysis of data in this column.')
|
|
272
|
+
return df_flow, df_level
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def cleaner_ten_thousand_year(input_df: pd.DataFrame, ewr_table_path: str = None) -> pd.DataFrame:
|
|
276
|
+
'''Ingests dataframe, removes junk columns, fixes date, allocates gauges to either flow/level
|
|
277
|
+
|
|
253
278
|
Args:
|
|
254
279
|
input_df (pd.DataFrame): flow/water level dataframe
|
|
255
280
|
|
|
@@ -271,7 +296,6 @@ def cleaner_standard_timeseries(input_df: pd.DataFrame, ewr_table_path: str = No
|
|
|
271
296
|
except ValueError:
|
|
272
297
|
raise ValueError('New date format detected. Cannot read in data')
|
|
273
298
|
log.info('successfully read in data with yyyy-mm-dd formatting')
|
|
274
|
-
|
|
275
299
|
date_range = pd.period_range(date_start, date_end, freq = 'D')
|
|
276
300
|
cleaned_df['Date'] = date_range
|
|
277
301
|
cleaned_df = cleaned_df.set_index('Date')
|
|
@@ -330,7 +354,8 @@ def match_MDBA_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame, ewr_t
|
|
|
330
354
|
df_flow[gauge] = input_df[col]
|
|
331
355
|
if gauge in level_gauges and measure == '35':
|
|
332
356
|
df_level[gauge] = input_df[col]
|
|
333
|
-
|
|
357
|
+
if df_flow.empty:
|
|
358
|
+
raise ValueError('No relevant gauges and or measurands found in dataset, the EWR tool cannot evaluate this model output file')
|
|
334
359
|
return df_flow, df_level
|
|
335
360
|
|
|
336
361
|
def match_NSW_nodes(input_df: pd.DataFrame, model_metadata: pd.DataFrame) -> tuple:
|
|
@@ -405,11 +430,12 @@ class ScenarioHandler:
|
|
|
405
430
|
bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}',
|
|
406
431
|
desc= 'Evaluating scenarios'):
|
|
407
432
|
if self.model_format == 'Bigmod - MDBA':
|
|
433
|
+
|
|
408
434
|
data, header = unpack_model_file(scenarios[scenario], 'Dy', 'Field')
|
|
409
435
|
data = build_MDBA_columns(data, header)
|
|
410
436
|
df_clean = cleaner_MDBA(data)
|
|
411
437
|
df_F, df_L = match_MDBA_nodes(df_clean, data_inputs.get_MDBA_codes(), self.parameter_sheet)
|
|
412
|
-
|
|
438
|
+
|
|
413
439
|
elif self.model_format == 'Standard time-series':
|
|
414
440
|
df = pd.read_csv(scenarios[scenario], index_col = 'Date')
|
|
415
441
|
df_F, df_L = cleaner_standard_timeseries(df, self.parameter_sheet)
|
|
@@ -419,9 +445,18 @@ class ScenarioHandler:
|
|
|
419
445
|
data = build_NSW_columns(data, header)
|
|
420
446
|
df_clean = cleaner_NSW(data)
|
|
421
447
|
df_F, df_L = match_NSW_nodes(df_clean, data_inputs.get_NSW_codes())
|
|
448
|
+
|
|
449
|
+
elif self.model_format == 'ten thousand year':
|
|
450
|
+
df = pd.read_csv(scenarios[scenario], index_col = 'Date')
|
|
451
|
+
df_F, df_L = cleaner_ten_thousand_year(df, self.parameter_sheet)
|
|
452
|
+
|
|
453
|
+
elif self.model_format == 'Source - Qld':
|
|
454
|
+
df = pd.read_csv(scenarios[scenario], index_col = 'Date')
|
|
455
|
+
df_F, df_L = cleaner_Qld_source(data)
|
|
422
456
|
|
|
423
457
|
gauge_results = {}
|
|
424
458
|
gauge_events = {}
|
|
459
|
+
|
|
425
460
|
all_locations = set(df_F.columns.to_list() + df_L.columns.to_list())
|
|
426
461
|
EWR_table, bad_EWRs = data_inputs.get_EWR_table(self.parameter_sheet)
|
|
427
462
|
calc_config = data_inputs.get_ewr_calc_config(self.calc_config_path)
|
|
@@ -429,9 +464,7 @@ class ScenarioHandler:
|
|
|
429
464
|
gauge_results[gauge], gauge_events[gauge] = evaluate_EWRs.calc_sorter(df_F, df_L, gauge,
|
|
430
465
|
EWR_table, calc_config)
|
|
431
466
|
detailed_results[scenario] = gauge_results
|
|
432
|
-
#print(detailed_results)
|
|
433
467
|
detailed_events[scenario] = gauge_events
|
|
434
|
-
#print(detailed_events)
|
|
435
468
|
self.pu_ewr_statistics = detailed_results
|
|
436
469
|
self.yearly_events = detailed_events
|
|
437
470
|
|
py_ewr/summarise_results.py
CHANGED
|
@@ -569,20 +569,18 @@ def filter_successful_events(all_events: pd.DataFrame, ewr_table_path: str = Non
|
|
|
569
569
|
# Iterate over the all_events dataframe
|
|
570
570
|
for i in unique_ID:
|
|
571
571
|
# Subset df with only
|
|
572
|
-
df_subset = all_events[all_events['ID']
|
|
572
|
+
df_subset = all_events[all_events['ID'] == i]
|
|
573
573
|
gauge = i.split('TEMPORARY_ID_SPLIT')[1]
|
|
574
574
|
pu = i.split('TEMPORARY_ID_SPLIT')[2]
|
|
575
|
-
ewr = i.split('TEMPORARY_ID_SPLIT')[3]
|
|
575
|
+
ewr = i.split('TEMPORARY_ID_SPLIT')[3]
|
|
576
576
|
|
|
577
577
|
# Pull EWR minSpell value from EWR dataset
|
|
578
578
|
minSpell = int(data_inputs.ewr_parameter_grabber(EWR_table, gauge, pu, ewr, 'MinSpell'))
|
|
579
579
|
# Filter out the events that fall under the minimum spell length
|
|
580
|
-
df_subset = df_subset.drop(df_subset[df_subset.eventDuration
|
|
581
|
-
|
|
580
|
+
df_subset = df_subset.drop(df_subset[df_subset.eventDuration < minSpell].index)
|
|
582
581
|
# Append to master dataframe
|
|
583
582
|
all_successfulEvents = pd.concat([all_successfulEvents, df_subset], ignore_index=True)
|
|
584
583
|
all_successfulEvents.drop(['ID', 'multigaugeID'], axis=1, inplace=True)
|
|
585
|
-
|
|
586
584
|
return all_successfulEvents
|
|
587
585
|
|
|
588
586
|
def get_rolling_max_interEvents(df:pd.DataFrame, start_date: date, end_date: date, yearly_df: pd.DataFrame, ewr_table_path: str = None) -> pd.DataFrame:
|
|
@@ -605,8 +603,8 @@ def get_rolling_max_interEvents(df:pd.DataFrame, start_date: date, end_date: dat
|
|
|
605
603
|
# Load in EWR table to variable to access start and end dates of the EWR
|
|
606
604
|
EWR_table, bad_EWRs = data_inputs.get_EWR_table(ewr_table_path)
|
|
607
605
|
for unique_EWR in unique_ID:
|
|
608
|
-
df_subset = df[df['ID']
|
|
609
|
-
yearly_df_subset = yearly_df[yearly_df['ID']
|
|
606
|
+
df_subset = df[df['ID'] == unique_EWR]
|
|
607
|
+
yearly_df_subset = yearly_df[yearly_df['ID'] == unique_EWR]
|
|
610
608
|
# Get EWR characteristics for current EWR
|
|
611
609
|
scenario = unique_EWR.split('TEMPORARY_ID_SPLIT')[0]
|
|
612
610
|
gauge = unique_EWR.split('TEMPORARY_ID_SPLIT')[1]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: py_ewr
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5
|
|
4
4
|
Summary: Environmental Water Requirement calculator
|
|
5
5
|
Home-page: https://github.com/MDBAuth/EWR_tool
|
|
6
6
|
Author: Martin Job
|
|
@@ -32,12 +32,12 @@ Requires-Dist: cachetools ==5.2.0
|
|
|
32
32
|
[](https://pypi.org/project/py-ewr/)
|
|
33
33
|
[](https://zenodo.org/badge/latestdoi/342122359)
|
|
34
34
|
|
|
35
|
-
### **EWR tool version 2.1.
|
|
35
|
+
### **EWR tool version 2.1.5 README**
|
|
36
36
|
|
|
37
|
-
### **Notes on recent
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
37
|
+
### **Notes on recent version update**
|
|
38
|
+
- 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.
|
|
39
|
+
- ten thousand year handling - the same formatting as above is required (gauge_flow OR gauge_level)
|
|
40
|
+
- 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.
|
|
41
41
|
|
|
42
42
|
### **Installation**
|
|
43
43
|
|
|
@@ -2,14 +2,14 @@ py_ewr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
py_ewr/data_inputs.py,sha256=BLJrrasZYpSUkC0yVBzVqnz6WGT2Y3SJYJJhguDi-Vo,18046
|
|
3
3
|
py_ewr/evaluate_EWRs.py,sha256=1JYWNtw5MYgf92jXhDNlgGkDx2mcfBP34OO-0jgal1w,229279
|
|
4
4
|
py_ewr/observed_handling.py,sha256=NaySsqe8nWgZdDRSr22EYmCwf0uNzVj9DFF6hzNr6ws,18173
|
|
5
|
-
py_ewr/scenario_handling.py,sha256=
|
|
6
|
-
py_ewr/summarise_results.py,sha256=
|
|
7
|
-
py_ewr/model_metadata/SiteID_MDBA.csv,sha256=
|
|
5
|
+
py_ewr/scenario_handling.py,sha256=BNMKQmDIcT7mYd0jnSGUBfcZ2AzCvxgHGwJA9KxyQ_A,28184
|
|
6
|
+
py_ewr/summarise_results.py,sha256=7w2Tbriwob21UXG0N2rSKffneg3M49hWouJPTHVjDAU,29747
|
|
7
|
+
py_ewr/model_metadata/SiteID_MDBA.csv,sha256=ZVY_P-lq_tHNELfUrTTveNPWcumKHot7yWvdjje0I2k,164412
|
|
8
8
|
py_ewr/model_metadata/SiteID_NSW.csv,sha256=UVBxN43Z5KWCvWhQ5Rh6TNEn35q4_sjPxKyHg8wPFws,6805
|
|
9
9
|
py_ewr/parameter_metadata/ewr_calc_config.json,sha256=BkuSJI6NqZzJxZMd8eh3GBs5uoHfI2joOkPrKLu9-60,17556
|
|
10
10
|
py_ewr/parameter_metadata/parameter_sheet.csv,sha256=ufOYn59cS4kl9XF1WaNqBhodcsBxUWH8Y0g1qHVUAcg,594257
|
|
11
|
-
py_ewr-2.1.
|
|
12
|
-
py_ewr-2.1.
|
|
13
|
-
py_ewr-2.1.
|
|
14
|
-
py_ewr-2.1.
|
|
15
|
-
py_ewr-2.1.
|
|
11
|
+
py_ewr-2.1.5.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
12
|
+
py_ewr-2.1.5.dist-info/METADATA,sha256=Sw5eAbah1SeV6Bd4BUCOXOqgEl6QgHSdaAg79Qixp5k,9570
|
|
13
|
+
py_ewr-2.1.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
14
|
+
py_ewr-2.1.5.dist-info/top_level.txt,sha256=n3725d-64Cjyb-YMUMV64UAuIflzUh2_UZSxiIbrur4,7
|
|
15
|
+
py_ewr-2.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|