Check and fix all constants and units compare to MetPy results

This commit is contained in:
arofarn
2021-06-28 17:55:09 +02:00
parent adaf8b11b9
commit c1f55485ad
2 changed files with 55 additions and 40 deletions

14
tests/metpy_simpletest.py Normal file
View File

@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2021 Arofarn
#
# SPDX-License-Identifier: BSD-3-Clause
"""Same as umetpy_simpletest but for original MetPy module, to compare and validate results"""
import metpy.constants as mpconsts
# pylint: disable=eval-used
print("List of all constants:\n")
for cst in dir(mpconsts):
if cst[0] != "_" and cst not in ["exporter", "units"]:
print("{:30s} = {:.12f}".format(cst, eval("{}.{}".format("mpconsts", cst))))