Skip to content
Snippets Groups Projects
Commit 1db3e705 authored by Clara Betancourt's avatar Clara Betancourt
Browse files

adapted venv to cartopy

parent b2567e3c
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,8 @@ ml Stages/2020 ...@@ -6,6 +6,8 @@ ml Stages/2020
# compilers etc. # compilers etc.
# ml GCCcore/.9.3.0 # ml GCCcore/.9.3.0
ml GCCcore/.10.3.0 ml GCCcore/.10.3.0
ml GCC/10.3.0
ml ParaStationMPI/5.4.10-1
# ml GCC/9.3.0 # ml GCC/9.3.0
# ml ParaStationMPI/5.4.7-1 # ml ParaStationMPI/5.4.7-1
...@@ -19,4 +21,4 @@ ml PyTorch/1.8.1-Python-3.8.5 ...@@ -19,4 +21,4 @@ ml PyTorch/1.8.1-Python-3.8.5
ml PyTorch-Geometric/2.0.2-Python-3.8.5-PyTorch-1.8.1 ml PyTorch-Geometric/2.0.2-Python-3.8.5-PyTorch-1.8.1
# ml GDAL/3.1.2-Python-3.8.5 # ml GDAL/3.1.2-Python-3.8.5
# ml Shapely/1.7.1-Python-3.8.5 # ml Shapely/1.7.1-Python-3.8.5
# ml Cartopy/0.18.0-Python-3.8.5 ml Cartopy/0.18.0-Python-3.8.5
geopandas==0.11.0
# general
import pdb
# plotting
import matplotlib.pyplot as plt
# own package
import settings
def station_ids_on_map():
"""
To analyze what the station ids mean
"""
from cartopy.io import shapereader
import numpy as np
import geopandas
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
# get natural earth data (http://www.naturalearthdata.com/)
# get country borders
resolution = '10m'
category = 'cultural'
name = 'admin_0_countries'
shpfilename = shapereader.natural_earth(resolution, category, name)
# read the shapefile using geopandas
df = geopandas.read_file(shpfilename)
# read the german borders
poly = df.loc[df['ADMIN'] == 'Germany']['geometry'].values[0]
ax = plt.axes(projection=ccrs.PlateCarree())
ax.add_geometries(poly, crs=ccrs.PlateCarree(), facecolor='none',
edgecolor='0.5')
ax.set_extent([5, 16, 46.5, 56], crs=ccrs.PlateCarree())
plt.savefig(settings.output_dir + 'station_ids_on_map.png')
if __name__ == '__main__':
station_ids_on_map_ = True
if station_ids_on_map_:
station_ids_on_map()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment