From ba741f1c2e0e6a9c90c1eedf0caca6bd68b41c57 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 23 Sep 2023 23:49:47 +0200 Subject: add custom gpm and gpdm units metpy's gpm is defined as m, we need the correct 9.81 * J/kg --- run.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'run.py') diff --git a/run.py b/run.py index 7439bfb..9ba7024 100755 --- a/run.py +++ b/run.py @@ -4,6 +4,13 @@ import sys import yaml import matplotlib.pyplot as plt +from metpy.units import units + +# Define custom gpm and gpdm units. The default gpm in metpy is aliased to meter. +# We need the correct definition +units.define('_gpm = 9.80665 * J/kg') +units.define('_gpdm = 10 * _gpm') + FILE = 'config.yaml' if len(sys.argv) > 1: FILE = sys.argv[1] -- cgit v1.2.3