The support for embedding Python within MET has opened the door for users to incorporate novel file formats, input datasets, derived fields, and data manipulation with the entire Python ecosystem at their fingertips. The primary purpose of Python embedding has been to replace input data files with Python scripts that serve data instead. Gridded data, point observations, and pre-computed matched forecast and observation pairs can be supplied to the MET tools in this manner. Users can substitute a data file for a special keyword and the full path to their Python script along with any command line input arguments for their script. At runtime, the MET C++ code is initialized and then executes the user’s Python script instead of performing a data file read. Depending on whether the user is using the Python installation used to compile the MET C++ code or their own Python installation to run their script, data are either passed in memory directly to the C++ code or written to a temporary file and read in by the C++ code. Specific requirements exist for supplying gridded data, point observations, and matched pairs via Python. Many of these requirements concern metadata typically obtained from the input data file that in some cases the user must curate on their own. A gallery of user contributed use cases has been amassed featuring these capabilities to highlight the broad range of applications and assist other users with implementing them in their workflow. A detailed discussion of the implementation as well as a brief demonstration will be presented.

