Skip to content

Commit

Permalink
Solved a bug so that the output can be written to the folder now. Add…
Browse files Browse the repository at this point in the history
…ed a line which enabled Cartopy to download the Natural Earth images from inside the Docker container. Create a file with environment variables for the easier use of them inside the Docker container.
  • Loading branch information
tkach940 committed Sep 27, 2021
1 parent f839fc2 commit 6a6e349
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions oco_vistool.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@

from matplotlib import patheffects
from owslib.wmts import WebMapTileService
import cartopy
cartopy.config["downloaders"][("shapefiles", "natural_earth")].url_template = (
"https://naturalearth.s3.amazonaws.com/{resolution}_{category}/ne_{resolution}_{name}.zip")
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import shapefile
Expand Down Expand Up @@ -1473,6 +1476,8 @@ def do_overlay_plot(

# construct filenames for the plot and optional h5 output file.
out_plot_fullpath = os.path.join(cfg_d['out_plot_dir'], out_plot_name)
if not os.path.isdir(os.path.dirname(out_plot_fullpath)):
os.makedirs(os.path.dirname(out_plot_fullpath))
out_data_fullpath = os.path.join(cfg_d['out_data_dir'], out_data_name)
out_background_fullpath = os.path.join(cfg_d['out_plot_dir'], out_background_name)

Expand Down
7 changes: 3 additions & 4 deletions oco_vistool_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"date": "2016-07-27",
"geo_upper_left": [41.5, -78.5],
Expand All @@ -20,8 +19,8 @@
},
"ground_site": [40.7934, -77.86],
"city_labels": "",
"out_plot_dir": "",
"out_plot_dir": "./out",
"out_plot_name": "",
"out_data_dir": "",
"out_data_dir": "./out",
"out_data_name": ""
}
}
4 changes: 4 additions & 0 deletions vars.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HDF5_USE_FILE_LOCKING=FALSE
OMP_NUM_THREADS=1
DASK_NUM_WORKERS=1
PYTROLL_CHUNK_SIZE=512

0 comments on commit 6a6e349

Please sign in to comment.