Skip to content

Commit 629fcb1

Browse files
authored
grid utils radius changes with GFS_CONSTANTS (#1867)
1 parent 3cc440d commit 629fcb1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

grid_utils/constant.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* PARTICULAR PURPOSE. See the License for the specific language
1616
* governing permissions and limitations under the License.
1717
***********************************************************************/
18-
#define RADIUS (6371000.)
18+
1919
#define STRING 255
2020

2121
#define EPSLN8 (1.e-8)
@@ -25,3 +25,11 @@
2525
#define R2D (180/M_PI)
2626
#define TPI (2.0*M_PI)
2727
#define HPI (0.5*M_PI)
28+
29+
/* This matches FMSconstants behavior, and sets Earth radius with gfs_constants.fh value,
30+
or with gfdl_constants.fh == geos_constants.fh value */
31+
#ifdef GFS_CONSTANTS
32+
#define RADIUS (6371200.)
33+
#else
34+
#define RADIUS (6371000.)
35+
#endif

0 commit comments

Comments
 (0)