forked from NCAR/wrf-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnippet.py
More file actions
29 lines (21 loc) · 682 Bytes
/
snippet.py
File metadata and controls
29 lines (21 loc) · 682 Bytes
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
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
def main():
bm = Basemap(projection="rotpole",
o_lat_p=36.0,
o_lon_p=180.0,
llcrnrlat=-10.590603,
urcrnrlat=46.591976,
llcrnrlon=-139.08585,
urcrnrlon=22.661009,
lon_0=-106.0,
rsphere=6370000,
resolution='l')
fig = plt.figure(figsize=(8, 8))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
bm.drawcoastlines(linewidth=.5)
print(bm.proj4string)
plt.savefig("basemap_map.png")
plt.close(fig)
if __name__ == "__main__":
main()