From 88129fc4ef51e773826248f13e28c9001bddbd66 Mon Sep 17 00:00:00 2001 From: Florian Deconinck Date: Mon, 2 Dec 2024 11:19:19 -0500 Subject: [PATCH 1/2] Add SECONDS_PER_DAY as a constants following mixed precision standards --- ndsl/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ndsl/constants.py b/ndsl/constants.py index 0f7d55d..ae1ae5a 100644 --- a/ndsl/constants.py +++ b/ndsl/constants.py @@ -2,6 +2,7 @@ from enum import Enum from ndsl.logging import ndsl_log +from ndsl.dsl.typing import Float # The FV3GFS model ships with two sets of constants, one used in the GFS physics @@ -119,6 +120,7 @@ class ConstantVersions(Enum): else: raise RuntimeError("Constant selector failed, bad code.") +SECONDS_PER_DAY = Float(86400.0) DZ_MIN = 2.0 CV_AIR = CP_AIR - RDGAS # Heat capacity of dry air at constant volume RDG = -RDGAS / GRAV From c436b0b9ba088b40a2d4667078db727937ec3d87 Mon Sep 17 00:00:00 2001 From: Florian Deconinck Date: Mon, 2 Dec 2024 11:23:20 -0500 Subject: [PATCH 2/2] Lint --- ndsl/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndsl/constants.py b/ndsl/constants.py index ae1ae5a..c8be060 100644 --- a/ndsl/constants.py +++ b/ndsl/constants.py @@ -1,8 +1,8 @@ import os from enum import Enum -from ndsl.logging import ndsl_log from ndsl.dsl.typing import Float +from ndsl.logging import ndsl_log # The FV3GFS model ships with two sets of constants, one used in the GFS physics