Note
Go to the end to download the full example code
CyclonePlotter: Basic Use Case
met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf
Scientific Objective
Provide visualization of cyclone tracks on a global map (PlateCaree projection)
Datasets
No datasets are required for running this use case. Only output from running the MET Tool tc-pairs or the METplus tc pairs wrapper is required.
External Dependencies
You will need to use a version of Python 3.6+ that has the following packages installed:
cartopy
matplotlib
METplus Components
This use case does not utilize any MET tools
METplus Workflow
CyclonePlotter is the only tool called in this example. It processes the following run times:
METplus Configuration
METplus first loads all of the configuration files found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line with the -c option, i.e. -c parm/use_cases/met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf
[config]
# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/CyclonePlotter/CyclonePlotter.html
# For additional information, please see the METplus Users Guide.
# https://metplus.readthedocs.io/en/latest/Users_Guide
###
# Processes to run
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list
###
PROCESS_LIST = CyclonePlotter
###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###
CYCLONE_PLOTTER_INPUT_DIR = {INPUT_BASE}/met_test/tc_pairs
CYCLONE_PLOTTER_OUTPUT_DIR = {OUTPUT_BASE}/cyclone
###
# CyclonePlotter Settings
# https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#cycloneplotter
###
CYCLONE_PLOTTER_INIT_DATE = 20150301
CYCLONE_PLOTTER_INIT_HR = 12
CYCLONE_PLOTTER_MODEL = GFSO
CYCLONE_PLOTTER_PLOT_TITLE = Model Forecast Storm Tracks
CYCLONE_PLOTTER_GLOBAL_PLOT = no
CYCLONE_PLOTTER_WEST_LON = -180
CYCLONE_PLOTTER_EAST_LON = 179
CYCLONE_PLOTTER_SOUTH_LAT = 0
CYCLONE_PLOTTER_NORTH_LAT = 90
CYCLONE_PLOTTER_CIRCLE_MARKER_SIZE = 2
CYCLONE_PLOTTER_CROSS_MARKER_SIZE = 11
CYCLONE_PLOTTER_ANNOTATION_FONT_SIZE = 3
CYCLONE_PLOTTER_RESOLUTION_DPI = 400
CYCLONE_PLOTTER_GENERATE_TRACK_ASCII = yes
CYCLONE_PLOTTER_ADD_WATERMARK = False
MET Configuration
No MET configuration is needed to run the cyclone plotter wrapper.
Running METplus
This use case can be run as follows:
Passing in CyclonePlotter.conf then a user-specific system configuration file:
run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf \ -c /path/to/user_system.conf
Modifying the configurations in parm/metplus_config, then passing in CyclonePlotter.conf:
run_metplus.py -c /path/to/METplus/parm/use_cases/met_tool_wrapper/CyclonePlotter/CyclonePlotter.conf
The former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly:
INPUT_BASE - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases
OUTPUT_BASE - Path where METplus output will be written. This must be in a location where you have write permissions
MET_INSTALL_DIR - Path to location where MET is installed locally
Example User Configuration File:
[dir]
INPUT_BASE = /path/to/sample/input/data
OUTPUT_BASE = /path/to/output/dir
MET_INSTALL_DIR = /path/to/met-X.Y
NOTE: All of these items must be found under the [dir] section.
Expected Output
A successful run will generate output to both the screen and to the logfile:
INFO: METplus has successfully finished running.
Additionally, two output files are created. Refer to the value set for OUTPUT_BASE to find where the output data was generated. TCPairs output for this use case will be found in cyclone/201503 (relative to OUTPUT_BASE) and will contain files with the following format:
20150301.txt
20150301.png
Keywords
Note
CyclonePlotterUseCase
Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.
Total running time of the script: (0 minutes 0.000 seconds)