-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocessing.py
More file actions
53 lines (40 loc) · 1.42 KB
/
processing.py
File metadata and controls
53 lines (40 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Process and plot superwell outputs
import geopandas as gpd
import matplotlib.pyplot as plt
# %% Plot distributions of results
# Read inputs
results = pd.read_csv(output_path + "\\" + output_name, low_memory=False)
input = gpd.read_file('../inputs/geoprocessed/All_merged.shp')
### plot inputs
# Create the map
fig, ax = plt.subplots(figsize=(16, 9))
# Plot the porosity map without borders
input.plot(column='MEAN_Poros', ax=ax, edgecolor='None')
# Remove axis ticks and labels
ax.set_xticks([])
ax.set_yticks([])
ax.axis('off')
# Show and save the plot as an image
plt.show()
plt.savefig('../processing/gridded_map_py.png', bbox_inches='tight', pad_inches=0)
### plot outputs
first_year_unit_cost = results.where(results.year_number == 1)
first_year_unit_cost = first_year_unit_cost.dropna(thresh=5)
plt.scatter(first_year_unit_cost.hydraulic_conductivity * 86400, first_year_unit_cost.unit_cost_per_acreft)
plt.xscale('log')
plt.yscale('log')
plt.xlabel('Aquifer K (m/d)')
plt.ylabel('$ per acre-foot')
plt.show()
plt.scatter(first_year_unit_cost.well_yield * 60 * 264.17, first_year_unit_cost.unit_cost_per_acreft)
plt.xscale('log')
plt.yscale('log')
plt.xlabel('Well pumping rate (gpm)')
plt.ylabel('$ per acre-foot')
plt.show()
plt.scatter(first_year_unit_cost.areal_extent * 0.000247105, first_year_unit_cost.unit_cost_per_acreft)
plt.xscale('log')
plt.yscale('log')
plt.xlabel('Acres per well')
plt.ylabel('$ per acre-foot')
plt.show()