EOMF-12. Object-Oriented Python Framework for Operational Graphics

Abstract
The Global Systems Laboratory (GSL) at NOAA in Boulder, Colorado, develops and tests many meteorological models and analyses, including the High-Resolution Rapid Refresh (HRRR) model. GSL provides graphical forecasts to the public using a public web interface: https://rapidrefresh.noaa.gov/hrrr/HRRR/Welcome.cgi. Web graphics have been generated using the NCAR Command Language (NCL) for about 15 years. In 2019, NCAR made the decision to transition to Python for graphic display and discontinued support for NCL. GSL has used this opportunity to also move to Python scripting language to generate its graphics forecasts. The NCL framework for GSL’s meteorological graphics has a number of drawbacks. It makes heavy use of legacy scripts where code and information tend to be heavily duplicated. The code is not easily portable. Configuration options are mostly hard-coded in the software. Parallelization of the large volumes of graphics being generated needs an external utility. In contrast to our legacy NCL-based graphics system, Python scripting under an object-oriented framework has several advantages. The design allows for minimal duplication of code by moving all configuration to YAML files. Parallelization, scripting, and graphics generation can all be done with the same language. Python also supports a suite of graphics packages, and the resulting scripts are extremely portable. Script development has followed the best practices for Python programming, including being fully linted and PEP-8 compliant, performing test-driven development, using Git and GitHub for version control and collaboration, developing automated testing of code changes, and packaging the software with Conda for reliable deployment over various platforms. GSL will enjoy numerous benefits from the OO Python graphics package. We will provide machine-level support, supplying tools that will be easy to use and suitable for both research and real-time activities for all RAP/HRRR/RRFS applications. The code will be robust enough to allow for easy generation of identical graphics for any UPP output. Real-time runs will generate graphics more efficiently, since drivers can be designed to support parallelization at the workflow level, or job level to minimize resource usage. Finally, using industry standard approaches maximizes supportability across more current and future team members, reducing risk associated with a single point of failure. We will provide detailed summaries of the Python graphics package at the Rendezvous, as well as examples of the improvements in efficiencies using the new system.