From 873e267a2eefc61ad212d9226080c34cd911997f Mon Sep 17 00:00:00 2001
From: Yi-Cheng Teng - NOAA GFDL
<143743249+yichengt900@users.noreply.github.com>
Date: Thu, 2 May 2024 11:01:12 -0400
Subject: [PATCH] fix gnu compiler fms1 build (#34)
---
builds/ci_build_driver.sh | 2 +-
builds/linux-build.bash | 2 +-
exps/README.md | 1 +
xmls/NWA12/CEFI_NWA12_cobalt.xml | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/builds/ci_build_driver.sh b/builds/ci_build_driver.sh
index c6a89e0f6..cb82cc7dd 100755
--- a/builds/ci_build_driver.sh
+++ b/builds/ci_build_driver.sh
@@ -52,7 +52,7 @@ if [[ $flavor == "fms1_mom6sis2" ]] ; then
rm -f path_names
$srcdir/mkmf/bin/list_paths $srcdir/MOM6/{config_src/infra/FMS1,config_src/memory/dynamic_symmetric,config_src/drivers/FMS_cap,config_src/external/ODA_hooks,config_src/external/database_comms,config_src/external/drifters,config_src/external/stochastic_physics,pkg/GSW-Fortran/{modules,toolbox}/,src/{*,*/*}/} $srcdir/SIS2/{config_src/dynamic_symmetric,config_src/external/Icepack_interfaces,src} $srcdir/icebergs/src $srcdir/FMS/{coupler,include}/ $srcdir/{ocean_BGC/generic_tracers,ocean_BGC/mocsy/src}/ $srcdir/{atmos_null,ice_param,land_null,coupler/shared/,coupler/full/}/
- compiler_options='-DINTERNAL_FILE_NML -DMAX_FIELDS_=600 -DNOT_SET_AFFINITY -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2 -D_USE_LEGACY_LAND_ -Duse_AM3_physics'
+ compiler_options='-DINTERNAL_FILE_NML -DMAX_FIELDS_=600 -DNOT_SET_AFFINITY -Duse_deprecated_io -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2 -D_USE_LEGACY_LAND_ -Duse_AM3_physics'
$srcdir/mkmf/bin/mkmf -t $abs_rootdir/$machine_name/$platform.mk -o "-I${FMSlib_PATH}/shared/$target" -p MOM6SIS2 -l "-L${FMSlib_PATH}/shared/$target -lfms" -c "$compiler_options" path_names
diff --git a/builds/linux-build.bash b/builds/linux-build.bash
index 3f82ba946..6e34708c6 100755
--- a/builds/linux-build.bash
+++ b/builds/linux-build.bash
@@ -127,7 +127,7 @@ popd
$srcdir/mkmf/bin/list_paths $srcdir/MOM6/{config_src/infra/FMS1,config_src/memory/dynamic_symmetric,config_src/drivers/FMS_cap,config_src/external/ODA_hooks,config_src/external/database_comms,config_src/external/drifters,config_src/external/stochastic_physics,pkg/GSW-Fortran/{modules,toolbox}/,src/{*,*/*}/} $srcdir/SIS2/{config_src/dynamic_symmetric,config_src/external/Icepack_interfaces,src} $srcdir/icebergs/src $srcdir/FMS/{coupler,include}/ $srcdir/{ocean_BGC/generic_tracers,ocean_BGC/mocsy/src}/ $srcdir/{atmos_null,ice_param,land_null,coupler/shared/,coupler/full/}/
-compiler_options='-DINTERNAL_FILE_NML -DMAX_FIELDS_=600 -DNOT_SET_AFFINITY -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2 -D_USE_LEGACY_LAND_ -Duse_AM3_physics'
+compiler_options='-DINTERNAL_FILE_NML -DMAX_FIELDS_=600 -DNOT_SET_AFFINITY -Duse_deprecated_io -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2 -D_USE_LEGACY_LAND_ -Duse_AM3_physics'
linker_options=''
if [[ "$target" =~ "stdpar" ]] ; then
compiler_options="$compiler_options -stdpar -Minfo=accel"
diff --git a/exps/README.md b/exps/README.md
index 250a3148f..c6416853c 100644
--- a/exps/README.md
+++ b/exps/README.md
@@ -5,6 +5,7 @@ This folder contains example configurations to run MOM6-SIS2-cobalt
| -------------- | ------- |
| ```OM4.single_column.COBALT/``` | 1D MOM6-cobalt exmaple |
| ```NWA12.COBALT/``` | NWA12 MOM6-SIS2-cobalt example |
+| ```NEP10.COBALT/``` | NEP10 MOM6-SIS2-cobalt example |
# OM4.single_column.COBALT
Users are advised to refer to the Dockerfile located at [ci/docker/Dockerfile.ci](../ci/docker/Dockerfile.ci). This Dockerfile includes the necessary steps to compile the code, download required input files, and execute the example 1D test case.
diff --git a/xmls/NWA12/CEFI_NWA12_cobalt.xml b/xmls/NWA12/CEFI_NWA12_cobalt.xml
index e59c45513..c5b7e8d38 100644
--- a/xmls/NWA12/CEFI_NWA12_cobalt.xml
+++ b/xmls/NWA12/CEFI_NWA12_cobalt.xml
@@ -176,7 +176,7 @@ frecheck -r layout -p ncrc5.intel22 -x CEFI_NWA12_cobalt.xml CEFI_NWA12_COBALT_V
coupler.git
-
+