From 38a3396d8362f385975b2a5b9bc355d987ea9e72 Mon Sep 17 00:00:00 2001 From: Oliver Elbert Date: Fri, 23 Feb 2024 11:48:17 -0500 Subject: [PATCH] adding shield to basic constants --- ndsl/constants.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ndsl/constants.py b/ndsl/constants.py index c0f9a843..6b2cb70f 100644 --- a/ndsl/constants.py +++ b/ndsl/constants.py @@ -12,7 +12,7 @@ class ConstantVersions(Enum): GFDL = "GFDL" # NOAA's FV3 dynamical core constants (original port) GFS = "GFS" # Constant as defined in NOAA GFS GEOS = "GEOS" # Constant as defined in GEOS v13 - SHiELD = "SHiELD" + SHiELD = "SHiELD" # Constant as defined in NOAA SHiELD CONST_VERSION_AS_STR = os.environ.get("PACE_CONSTANTS", "GFS") @@ -68,7 +68,11 @@ class ConstantVersions(Enum): if CONST_VERSION == ConstantVersions.GEOS: # 'qlcd' is exchanged in GEOS NQ = 9 -elif CONST_VERSION == ConstantVersions.GFS or CONST_VERSION == ConstantVersions.GFDL: +elif ( + CONST_VERSION == ConstantVersions.GFS + or ConstantVersions.SHiELD + or CONST_VERSION == ConstantVersions.GFDL +): NQ = 8 else: raise RuntimeError("Constant selector failed, bad code.") @@ -90,7 +94,7 @@ class ConstantVersions(Enum): CP_AIR = RDGAS / KAPPA TFREEZE = 273.15 SAT_ADJUST_THRESHOLD = 1.0e-6 -elif CONST_VERSION == ConstantVersions.GFS: +elif CONST_VERSION == ConstantVersions.GFS or ConstantVersions.SHiELD: RADIUS = 6.3712e6 # Radius of the Earth [m] PI = 3.1415926535897931 OMEGA = 7.2921e-5 # Rotation of the earth