Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 933 cartopy hpc #964

Merged
merged 4 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ to run.
- cartopy (0.17.0)
- matplotlib (3.3.4)

Cartopy, one of the dependencies of CyclonePlotter, attempts to download shapefiles from the internet to complete successfully. So if CyclonePlotter is run on a closed system (i.e. no internet), additional steps need to be taken. First, go to the Cartopy repository and download the tarball for Natural Earth shapefiles. The categories should include

j-opatz marked this conversation as resolved.
Show resolved Hide resolved
- coastline
- land
- ocean

at 110m and 50m for each, and each should have the proper files (.dbf, .shp, .shx). Untar this file in a noted location. Finally, create an environment variable in the user-specific system configuration file for CARTOPY_DIR, setting it to the location where the shapefiles are located.
j-opatz marked this conversation as resolved.
Show resolved Hide resolved

.. _getcode:

Getting the METplus Wrappers source code
Expand Down
3 changes: 2 additions & 1 deletion docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ Description

This wrapper does not have a corresponding MET tool but instead wraps
the logic necessary to create plots of cyclone tracks. Currently only
the output from the MET tc-pairs tool can be plotted.
the output from the MET tc-pairs tool can be plotted. If used on an internet-limited system,
additional dependencies may apply. See :ref:`install` for details.

METplus Configuration
---------------------
Expand Down
7 changes: 7 additions & 0 deletions metplus/wrappers/cyclone_plotter_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
import matplotlib.ticker as mticker
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import cartopy
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
##If the script is run on a limited-internet access machine, the CARTOPY_DIR environment setting
##will need to be set in the user-specific system configuration file. Review the Installation section
##of the User's Guide for more details.
if os.getenv('CARTOPY_DIR'):
cartopy.config['data_dir'] = os.getenv('CARTOPY_DIR', cartopy.config.get('data_dir'))

except Exception as err_msg:
WRAPPER_CANNOT_RUN = True
EXCEPTION_ERR = err_msg
Expand Down