From caa8b1c0ac530ada7375e99ab6fe3518c099b13c Mon Sep 17 00:00:00 2001 From: Justin Perket Date: Wed, 6 May 2026 11:00:10 -0400 Subject: [PATCH 1/4] grid utils radius changes with GFS_CONSTANTS --- grid_utils/constant.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grid_utils/constant.h b/grid_utils/constant.h index dfadf9bd1c..d49a73f70e 100644 --- a/grid_utils/constant.h +++ b/grid_utils/constant.h @@ -15,7 +15,13 @@ * PARTICULAR PURPOSE. See the License for the specific language * governing permissions and limitations under the License. ***********************************************************************/ + +#ifdef GFS_CONSTANTS +#define RADIUS (6371200.) +#else +// GFDL or GEOS #define RADIUS (6371000.) +#endif #define STRING 255 #define EPSLN8 (1.e-8) From b85ec90975004ea78b23b004c1f3da84e34bfd30 Mon Sep 17 00:00:00 2001 From: Justin Perket Date: Wed, 6 May 2026 11:00:10 -0400 Subject: [PATCH 2/4] remove comment --- grid_utils/constant.h | 1 - 1 file changed, 1 deletion(-) diff --git a/grid_utils/constant.h b/grid_utils/constant.h index d49a73f70e..56368fefcf 100644 --- a/grid_utils/constant.h +++ b/grid_utils/constant.h @@ -19,7 +19,6 @@ #ifdef GFS_CONSTANTS #define RADIUS (6371200.) #else -// GFDL or GEOS #define RADIUS (6371000.) #endif #define STRING 255 From e85998a8324abaa69c109dfaefd0916e98940de2 Mon Sep 17 00:00:00 2001 From: Justin Perket Date: Tue, 26 May 2026 16:51:25 -0400 Subject: [PATCH 3/4] re-add comment to doc link with .fh headers --- grid_utils/constant.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/grid_utils/constant.h b/grid_utils/constant.h index 56368fefcf..8d967f5f69 100644 --- a/grid_utils/constant.h +++ b/grid_utils/constant.h @@ -16,11 +16,6 @@ * governing permissions and limitations under the License. ***********************************************************************/ -#ifdef GFS_CONSTANTS -#define RADIUS (6371200.) -#else -#define RADIUS (6371000.) -#endif #define STRING 255 #define EPSLN8 (1.e-8) @@ -30,3 +25,11 @@ #define R2D (180/M_PI) #define TPI (2.0*M_PI) #define HPI (0.5*M_PI) + +/* This matches FMSconstants behavior, and sets Earth radius with gfs_constants.fh value, + or with gfdl_constants.fh == geos_constants.fh value */ +#ifdef GFS_CONSTANTS +#define RADIUS (6371200.) +#else +#define RADIUS (6371000.) +#endif \ No newline at end of file From 89824c508c4e396206da30780f906f38849e18ae Mon Sep 17 00:00:00 2001 From: Justin Perket Date: Tue, 26 May 2026 17:13:03 -0400 Subject: [PATCH 4/4] linting fix --- grid_utils/constant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grid_utils/constant.h b/grid_utils/constant.h index 8d967f5f69..6983b4784a 100644 --- a/grid_utils/constant.h +++ b/grid_utils/constant.h @@ -26,7 +26,7 @@ #define TPI (2.0*M_PI) #define HPI (0.5*M_PI) -/* This matches FMSconstants behavior, and sets Earth radius with gfs_constants.fh value, +/* This matches FMSconstants behavior, and sets Earth radius with gfs_constants.fh value, or with gfdl_constants.fh == geos_constants.fh value */ #ifdef GFS_CONSTANTS #define RADIUS (6371200.)