ISMN (International Soil Moisture Network)¶
By Kerry Mundy¶
In situ soil moisture database which has the means for validating and improving global satellite products, land surface, climate models, etc. https://ismn.bafg.de/en/dataviewer/¶
Reader tool that is used to access in-situ soil moisture data¶
Provides functions to access single networks and stations around the globe¶
Install Package¶
In [100]:
Copied!
pip install ismn
pip install ismn
Requirement already satisfied: ismn in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (1.3.4) Requirement already satisfied: pygeogrids>=0.3.2 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (0.4.2) Requirement already satisfied: numpy in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (1.26.0) Requirement already satisfied: pandas in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (2.1.2) Requirement already satisfied: configparser in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (6.0.0) Requirement already satisfied: more-itertools in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (10.1.0) Requirement already satisfied: tqdm in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from ismn) (4.66.1) Requirement already satisfied: netCDF4 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pygeogrids>=0.3.2->ismn) (1.6.5) Requirement already satisfied: pyproj in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pygeogrids>=0.3.2->ismn) (3.6.1) Requirement already satisfied: pykdtree in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pygeogrids>=0.3.2->ismn) (1.3.9) Requirement already satisfied: python-dateutil>=2.8.2 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pandas->ismn) (2.8.2) Requirement already satisfied: pytz>=2020.1 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pandas->ismn) (2023.3.post1) Requirement already satisfied: tzdata>=2022.1 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from pandas->ismn) (2023.3) Requirement already satisfied: six>=1.5 in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from python-dateutil>=2.8.2->pandas->ismn) (1.16.0) Requirement already satisfied: cftime in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from netCDF4->pygeogrids>=0.3.2->ismn) (1.6.3) Requirement already satisfied: certifi in ./miniforge3/envs/rcaes_env_new/lib/python3.9/site-packages (from netCDF4->pygeogrids>=0.3.2->ismn) (2023.11.17) Note: you may need to restart the kernel to use updated packages.
Why soil moisture?¶
Impacts ecosystem functions and processes: agriculture, flooding, water resources, runoff, weather and climate, carbon cycling, etc.
ISMN Interface¶
Collects metadata for all sensors - iterate through the files to collect information
Understanding the Data¶
U.S. Climate Reference Network (USCRN)
In [179]:
Copied!
from ismn.interface import ISMN_Interface
import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
from ismn.interface import ISMN_Interface
import numpy as np
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
In [104]:
Copied!
path = 'Data_separate_files_header_20131122_20231122_10739_4gp7_20231123.zip'
ismn_data = ISMN_Interface(path)
path = 'Data_separate_files_header_20131122_20231122_10739_4gp7_20231123.zip'
ismn_data = ISMN_Interface(path)
Found existing ismn metadata in python_metadata/Data_separate_files_header_20131122_20231122_10739_4gp7_20231123.csv.
Networks and Stations¶
In [116]:
Copied!
ismn_data[10]
ismn_data[10]
Out[116]:
Network 'USCRN' with Stations: ['Aberdeen-35-WNW', 'Arco-17-SW', 'Asheville-13-S', 'Asheville-8-SSW', 'Austin-33-NW', 'Avondale-2-N', 'Baker-5-W', 'Batesville-8-WNW', 'Bedford-5-WNW', 'Blackville-3-W', 'Bodega-6-WSW', 'Boulder-14-W', 'Bowling-Green-21-NNE', 'Brigham-City-28-WNW', 'Bronte-11-NNE', 'Brunswick-23-S', 'Buffalo-13-ESE', 'Cape-Charles-5-ENE', 'Champaign-9-SW', 'Charlottesville-2-SSE', 'Chatham-1-SE', 'Chillicothe-22-ENE', 'Coos-Bay-8-SW', 'Cortez-8-SE', 'Corvallis-10-SSW', 'Coshocton-8-NNE', 'Crossville-7-NW', 'Darrington-21-NNE', 'Denio-52-WSW', 'Des-Moines-17-E', 'Dillon-18-WSW', 'Dinosaur-2-E', 'Durham-11-W', 'Durham-2-N', 'Durham-2-SSW', 'Edinburg-17-NNE', 'Elgin-5-S', 'Elkins-21-ENE', 'Everglades-City-5-NE', 'Fairhope-3-NE', 'Fallbrook-5-NE', 'Gadsden-19-N', 'Gaylord-9-SSW', 'Goodridge-12-NNW', 'Goodwell-2-E', 'Goodwell-2-SE', 'Harrison-20-SSE', 'Holly-Springs-4-N', 'Ithaca-13-E', 'Jamestown-38-WSW', 'John-Day-35-WNW', 'Joplin-24-N', 'Kenai-29-ENE', 'Kingston-1-NW', 'Kingston-1-W', 'La-Junta-17-WSW', 'Lafayette-13-SE', 'Lander-11-SSE', 'Las-Cruces-20-N', 'Lewistown-42-WSW', 'Limestone-4-NNW', 'Lincoln-11-SW', 'Lincoln-8-ENE', 'Los-Alamos-13-W', 'Manhattan-6-SSW', 'McClellanville-7-NE', 'Medora-7-E', 'Merced-23-WSW', 'Mercury-3-SSW', 'Millbrook-3-W', 'Monahans-6-ENE', 'Monroe-26-N', 'Montrose-11-ENE', 'Moose-1-NNE', 'Muleshoe-19-S', 'Murphy-10-W', 'Necedah-5-WNW', 'Newton-11-SW', 'Newton-5-ENE', 'Newton-8-W', 'Northgate-5-ESE', 'Nunn-7-NNE', 'Oakley-19-SSW', 'Old-Town-2-W', 'Palestine-6-WNW', 'Panther-Junction-2-N', 'Pierre-24-S', 'Port-Aransas-32-NNE', 'Quinault-4-NE', 'Redding-12-WNW', 'Riley-10-WSW', 'Salem-10-W', 'Sandstone-6-W', 'Santa-Barbara-11-W', 'Sebring-23-SSE', 'Selma-13-WNW', 'Shabbona-5-NNE', 'Sioux-Falls-14-NNE', 'Socorro-20-N', 'Spokane-17-SSW', 'St.-Mary-1-SSW', 'Stillwater-2-W', 'Stillwater-5-WNW', 'Stovepipe-Wells-1-SW', 'Sundance-8-NNW', 'Titusville-7-E', 'Tucson-11-W', 'Versailles-3-NNW', 'Watkinsville-5-SSE', 'Whitman-5-ENE', 'Williams-35-NNW', 'Wolf-Point-29-ENE', 'Wolf-Point-34-NE', 'Yosemite-Village-12-W', 'Yuma-27-ENE']
In [27]:
Copied!
ismn_data['USCRN']['Millbrook-3-W']
ismn_data['USCRN']['Millbrook-3-W']
Out[27]:
Station 'Millbrook-3-W' with Sensors: ['Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000', 'Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.100000_0.100000', 'Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.200000_0.200000', 'Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.500000_0.500000', 'Stevens-Hydraprobe-II-Sdi-12_soil_moisture_1.000000_1.000000']
In [28]:
Copied!
ismn_data['USCRN']['Millbrook-3-W'].metadata
ismn_data['USCRN']['Millbrook-3-W'].metadata
Out[28]:
MetaData([ MetaVar([clay_fraction, 20.0, Depth([0.0, 0.3])]), MetaVar([climate_KG, Dfb, None]), MetaVar([climate_insitu, unknown, None]), MetaVar([elevation, 126.0, None]), MetaVar([instrument, Stevens-Hydraprobe-II-Sdi-12, Depth([0.05, 0.05])]), MetaVar([latitude, 41.7857, None]), MetaVar([lc_2000, 61, None]), MetaVar([lc_2005, 61, None]), MetaVar([lc_2010, 61, None]), MetaVar([lc_insitu, unknown, None]), MetaVar([longitude, -73.7422, None]), MetaVar([network, USCRN, None]), MetaVar([organic_carbon, 1.45, Depth([0.0, 0.3])]), MetaVar([sand_fraction, 41.0, Depth([0.0, 0.3])]), MetaVar([saturation, 0.46, Depth([0.0, 0.3])]), MetaVar([silt_fraction, 39.0, Depth([0.0, 0.3])]), MetaVar([station, Millbrook-3-W, None]), MetaVar([timerange_from, 2013-11-22 00:00:00, None]), MetaVar([timerange_to, 2023-11-21 22:00:00, None]), MetaVar([variable, soil_moisture, Depth([0.05, 0.05])]), MetaVar([instrument, Stevens-Hydraprobe-II-Sdi-12, Depth([0.1, 0.1])]), MetaVar([variable, soil_moisture, Depth([0.1, 0.1])]), MetaVar([instrument, Stevens-Hydraprobe-II-Sdi-12, Depth([0.2, 0.2])]), MetaVar([variable, soil_moisture, Depth([0.2, 0.2])]), MetaVar([clay_fraction, 20.0, Depth([0.3, 1.0])]), MetaVar([instrument, Stevens-Hydraprobe-II-Sdi-12, Depth([0.5, 0.5])]), MetaVar([organic_carbon, 0.5, Depth([0.3, 1.0])]), MetaVar([sand_fraction, 45.0, Depth([0.3, 1.0])]), MetaVar([saturation, 0.41, Depth([0.3, 1.0])]), MetaVar([silt_fraction, 35.0, Depth([0.3, 1.0])]), MetaVar([variable, soil_moisture, Depth([0.5, 0.5])]), MetaVar([instrument, Stevens-Hydraprobe-II-Sdi-12, Depth([1.0, 1.0])]), MetaVar([variable, soil_moisture, Depth([1.0, 1.0])]) ])
Soil Moisture Probes¶
In [118]:
Copied!
ismn_data['USCRN']['Millbrook-3-W']['Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000']
ismn_data['USCRN']['Millbrook-3-W']['Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000']
Out[118]:
Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000
Sensors contain a time series (sensor.data) and metadata (sensor.metadata) - we can convert metadata to a dataframe¶
In [120]:
Copied!
sensor = ismn_data['USCRN']['Millbrook-3-W']['Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000']
print(sensor.metadata.to_pd())
ax = sensor.data.plot(figsize=(14,6))
ax.set_xlabel('Time [year]')
ax.set_ylabel("Soil Moisture")
sensor = ismn_data['USCRN']['Millbrook-3-W']['Stevens-Hydraprobe-II-Sdi-12_soil_moisture_0.050000_0.050000']
print(sensor.metadata.to_pd())
ax = sensor.data.plot(figsize=(14,6))
ax.set_xlabel('Time [year]')
ax.set_ylabel("Soil Moisture")
variable key clay_fraction val 20.0 depth_from 0.0 depth_to 0.3 climate_KG val Dfb climate_insitu val unknown elevation val 126.0 instrument val Stevens-Hydraprobe-II-Sdi-12 depth_from 0.05 depth_to 0.05 latitude val 41.7857 lc_2000 val 61 lc_2005 val 61 lc_2010 val 61 lc_insitu val unknown longitude val -73.7422 network val USCRN organic_carbon val 1.45 depth_from 0.0 depth_to 0.3 sand_fraction val 41.0 depth_from 0.0 depth_to 0.3 saturation val 0.46 depth_from 0.0 depth_to 0.3 silt_fraction val 39.0 depth_from 0.0 depth_to 0.3 station val Millbrook-3-W timerange_from val 2013-11-22 00:00:00 timerange_to val 2023-11-21 22:00:00 variable val soil_moisture depth_from 0.05 depth_to 0.05 Name: data, dtype: object
Out[120]:
Text(0, 0.5, 'Soil Moisture')
What station is closest to us?¶
In [128]:
Copied!
station, dist = ismn_data.collection.get_nearest_station(-74.4376005175904, 40.47736974602313)
print(f'Station {station.name} is {int(dist)} metres away from the ENR building:')
station, dist = ismn_data.collection.get_nearest_station(-74.4376005175904, 40.47736974602313)
print(f'Station {station.name} is {int(dist)} metres away from the ENR building:')
Station NJMeadowlands is 44023 metres away from the ENR building:
Reading Specific Sensors¶
In [135]:
Copied!
NJ_sensor = ismn_data['COSMOS']['NJMeadowlands']['Cosmic-ray-Probe_soil_moisture_0.000000_0.170000']
print(NJ_sensor.metadata.to_pd())
ax = NJ_sensor.data.plot(figsize=(14,6))
ax.set_xlabel('Time [year]')
ax.set_ylabel("Soil Moisture")
NJ_sensor = ismn_data['COSMOS']['NJMeadowlands']['Cosmic-ray-Probe_soil_moisture_0.000000_0.170000']
print(NJ_sensor.metadata.to_pd())
ax = NJ_sensor.data.plot(figsize=(14,6))
ax.set_xlabel('Time [year]')
ax.set_ylabel("Soil Moisture")
variable key clay_fraction val 20.0 depth_from 0.0 depth_to 0.3 climate_KG val Dfa climate_insitu val unknown elevation val 3.0 instrument val Cosmic-ray-Probe depth_from 0.0 depth_to 0.17 latitude val 40.7691 lc_2000 val 180 lc_2005 val 180 lc_2010 val 180 lc_insitu val unknown longitude val -74.0853 network val COSMOS organic_carbon val 1.45 depth_from 0.0 depth_to 0.3 sand_fraction val 41.0 depth_from 0.0 depth_to 0.3 saturation val 0.46 depth_from 0.0 depth_to 0.3 silt_fraction val 39.0 depth_from 0.0 depth_to 0.3 station val NJMeadowlands timerange_from val 2014-10-16 22:00:00 timerange_to val 2015-08-04 13:00:00 variable val soil_moisture depth_from 0.0 depth_to 0.17 Name: data, dtype: object
Out[135]:
Text(0, 0.5, 'Soil Moisture')
In [149]:
Copied!
ismn_data.metadata
ismn_data.metadata
Out[149]:
variable | clay_fraction | climate_KG | climate_insitu | elevation | ... | timerange_from | timerange_to | variable | file_path | file_type | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key | depth_from | depth_to | val | depth_from | depth_to | val | depth_from | depth_to | val | depth_from | ... | depth_to | val | depth_from | depth_to | val | depth_from | depth_to | val | val | val |
0 | 0.00 | 0.30 | 23.0 | NaN | NaN | Cfa | NaN | NaN | unknown | NaN | ... | NaN | 2013-11-22 00:00:00 | NaN | NaN | 2021-09-14 16:00:00 | 0.025 | 0.025 | soil_moisture | ARM/Anthony/ARM_ARM_Anthony_sm_0.025000_0.0250... | header_values |
1 | 0.00 | 0.30 | 23.0 | NaN | NaN | Cfa | NaN | NaN | unknown | NaN | ... | NaN | 2013-11-22 00:00:00 | NaN | NaN | 2021-09-14 16:00:00 | 0.025 | 0.025 | soil_moisture | ARM/Anthony/ARM_ARM_Anthony_sm_0.025000_0.0250... | header_values |
2 | 0.00 | 0.30 | 23.0 | NaN | NaN | Cfa | NaN | NaN | unknown | NaN | ... | NaN | 2013-11-22 00:00:00 | NaN | NaN | 2021-09-14 16:00:00 | 0.025 | 0.025 | soil_moisture | ARM/Anthony/ARM_ARM_Anthony_sm_0.025000_0.0250... | header_values |
3 | 0.00 | 0.30 | 23.0 | NaN | NaN | Cfa | NaN | NaN | unknown | NaN | ... | NaN | 2016-03-07 18:00:00 | NaN | NaN | 2021-09-21 12:00:00 | 0.050 | 0.050 | soil_moisture | ARM/Anthony/ARM_ARM_Anthony_sm_0.050000_0.0500... | header_values |
4 | 0.00 | 0.30 | 23.0 | NaN | NaN | Cfa | NaN | NaN | unknown | NaN | ... | NaN | 2016-03-07 18:00:00 | NaN | NaN | 2021-09-21 12:00:00 | 0.100 | 0.100 | soil_moisture | ARM/Anthony/ARM_ARM_Anthony_sm_0.100000_0.1000... | header_values |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
4748 | 0.05 | 0.05 | 30.0 | NaN | NaN | Dfb | NaN | NaN | unknown | NaN | ... | NaN | 2016-08-31 15:00:00 | NaN | NaN | 2021-01-01 07:00:00 | 0.050 | 0.050 | soil_moisture | iRON/SpringValley/iRON_iRON_SpringValley_sm_0.... | header_values |
4749 | 0.20 | 0.20 | 44.0 | NaN | NaN | Dfb | NaN | NaN | unknown | NaN | ... | NaN | 2016-06-08 19:00:00 | NaN | NaN | 2020-11-01 21:00:00 | 0.200 | 0.200 | soil_moisture | iRON/SpringValley/iRON_iRON_SpringValley_sm_0.... | header_values |
4750 | 0.20 | 0.20 | 44.0 | NaN | NaN | Dfb | NaN | NaN | unknown | NaN | ... | NaN | 2016-08-31 15:00:00 | NaN | NaN | 2021-01-01 07:00:00 | 0.200 | 0.200 | soil_moisture | iRON/SpringValley/iRON_iRON_SpringValley_sm_0.... | header_values |
4751 | 0.51 | 0.51 | 48.0 | NaN | NaN | Dfb | NaN | NaN | unknown | NaN | ... | NaN | 2016-06-08 19:00:00 | NaN | NaN | 2021-01-01 07:00:00 | 0.510 | 0.510 | soil_moisture | iRON/SpringValley/iRON_iRON_SpringValley_sm_0.... | header_values |
4752 | 0.51 | 0.51 | 48.0 | NaN | NaN | Dfb | NaN | NaN | unknown | NaN | ... | NaN | 2016-08-31 15:00:00 | NaN | NaN | 2021-01-01 07:00:00 | 0.510 | 0.510 | soil_moisture | iRON/SpringValley/iRON_iRON_SpringValley_sm_0.... | header_values |
4753 rows × 62 columns
In [180]:
Copied!
ismn_data.print_climate_dict()
ismn_data.print_climate_dict()
KOEPPEN GEIGER Climate Classification ------------------------------------- Af : Tropical Rainforest Am : Tropical Monsoon As : Tropical Savanna Dry Aw : Tropical Savanna Wet BWk : Arid Desert Cold BWh : Arid Desert Hot BWn : Arid Desert With Frequent Fog BSk : Arid Steppe Cold BSh : Arid Steppe Hot BSn : Arid Steppe With Frequent Fog Csa : Temperate Dry Hot Summer Csb : Temperate Dry Warm Summer Csc : Temperate Dry Cold Summer Cwa : Temperate Dry Winter, Hot Summer Cwb : Temperate Dry Winter, Warm Summer Cwc : Temperate Dry Winter, Cold Summer Cfa : Temperate Without Dry Season, Hot Summer Cfb : Temperate Without Dry Season, Warm Summer Cfc : Temperate Without Dry Season, Cold Summer Dsa : Cold Dry Summer, Hot Summer Dsb : Cold Dry Summer, Warm Summer Dsc : Cold Dry Summer, Cold Summer Dsd : Cold Dry Summer, Very Cold Winter Dwa : Cold Dry Winter, Hot Summer Dwb : Cold Dry Winter, Warm Summer Dwc : Cold Dry Winter, Cold Summer Dwd : Cold Dry Winter, Very Cold Winter Dfa : Cold Dry Without Dry Season, Hot Summer Dfb : Cold Dry Without Dry Season, Warm Summer Dfc : Cold Dry Without Dry Season, Cold Summer Dfd : Cold Dry Without Dry Season, Very Cold Winter ET : Polar Tundra EF : Polar Eternal Winter W : Water
In [181]:
Copied!
ids = ismn_data.get_dataset_ids(variable='soil_moisture',
max_depth=1,
filter_meta_dict={'lc_2010': 130, 'climate_KG': 'Csb'}) ## Köppen-Geiger (KG) climate classification ## land cover (lc)
ids
ids = ismn_data.get_dataset_ids(variable='soil_moisture',
max_depth=1,
filter_meta_dict={'lc_2010': 130, 'climate_KG': 'Csb'}) ## Köppen-Geiger (KG) climate classification ## land cover (lc)
ids
Out[181]:
[402, 434, 440, 459, 482, 488, 496, 503, 520, 528, 2952, 2953, 2954, 3047, 3048, 3049, 3050, 4294, 4295, 4296, 4297, 4298]
In [182]:
Copied!
ts, meta = ismn_data.read(ids, return_meta=True)
ax = ts.plot(figsize=(12,4), title=f'Time series for IDs', xlabel="Time [year]", ylabel="Soil Moisture")
ts, meta = ismn_data.read(ids, return_meta=True)
ax = ts.plot(figsize=(12,4), title=f'Time series for IDs', xlabel="Time [year]", ylabel="Soil Moisture")
Plot Station Locations With Subset of Data¶
In [245]:
Copied!
metadata = ismn_data.metadata[ismn_data.metadata[('variable', 'val')] == 'soil_moisture']
np.random.seed(123)
ids = np.random.choice(metadata.index, 15)
subset = ismn_data.subset_from_ids(ids)
subset
metadata = ismn_data.metadata[ismn_data.metadata[('variable', 'val')] == 'soil_moisture']
np.random.seed(123)
ids = np.random.choice(metadata.index, 15)
subset = ismn_data.subset_from_ids(ids)
subset
Found existing ismn metadata in python_metadata/Data_separate_files_header_20131122_20231122_10739_4gp7_20231123.csv.
Out[245]:
ismn.base.IsmnRoot Zip at Data_separate_files_header_20131122_20231122_10739_4gp7_20231123.zip with Networks[Stations]: ------------------------ SNOTEL: ['VERNONCREEK', 'SilverCreekNv', 'TAYLORBUTTE', 'LEAVITTMEADOWS', 'SENTINELBUTTE'], SCAN: ['IsbellFarms', 'MarbleCreek', 'BodieHills', 'JordanValleyCwma', 'Corozal'], SOILSCAPE: ['node816', 'node914'], ARM: ['Lamont-CF1', 'MapleCity'], TxSON: ['CR200-21']
In [251]:
Copied!
fig, ax = plt.subplots(1, 1, figsize=(10,14), subplot_kw={'projection': ccrs.Robinson()})
subset.plot_station_locations(ax=ax, markersize=10,text_scalefactor=3)
ax.gridlines (linewidth = 1, color = 'red', alpha = 0.5, linestyle='-')
ax.set_extent([-127, -70, 24, 50.5])
ax.stock_img()
plt.show()
fig, ax = plt.subplots(1, 1, figsize=(10,14), subplot_kw={'projection': ccrs.Robinson()})
subset.plot_station_locations(ax=ax, markersize=10,text_scalefactor=3)
ax.gridlines (linewidth = 1, color = 'red', alpha = 0.5, linestyle='-')
ax.set_extent([-127, -70, 24, 50.5])
ax.stock_img()
plt.show()