Skip to content

Commit

Permalink
Update Makefiles to default to FMS2; MOM6 update
Browse files Browse the repository at this point in the history
The Makefiles for each model have been updated to include a variable to
the FMS source directory (FMS_CODEBASE) which is now passed to the FMS
Makefile.

FMS_CODEBASE defaults to the FMS2 source, in order to align with
autoconf changes in MOM6 which now default to FMS2 API.  The AM2-based
models default to FMS1, with separate FMS1-based build directories for
FMS, icebergs, and ice_param.

The FMS1 source and FMS symbolic link have been preserved, so no
exisiting mkmf-based builds should be affected by this change.

The MOM6 submodule has also been updated, which includes the commit
which updates the default autoconf FMS API (f9da67331).

Updated commits:

- NOAA-GFDL/MOM6@714d2da17 Minor refactoring in set_viscous_BBL
- NOAA-GFDL/MOM6@e1ea75847 Add the debugging routine test_L_open_concave
- NOAA-GFDL/MOM6@da02ffc60 +Add find_L_open_concave_iterative
- NOAA-GFDL/MOM6@2ae638504 Refactor set_viscous_BBL channel drag calculations
- NOAA-GFDL/MOM6@f9da67331 Create BUILD and WORK directory macros
- NOAA-GFDL/MOM6@fd5696ba0 Pinning package requirements for readthedocs
- NOAA-GFDL/MOM6@d0e9c25a0 *Corrected CFC diagnostics and non-Bous CFC fluxes
- NOAA-GFDL/MOM6@8f7df084d (*)non-Boussinesq Z unit update_OBC_segment_data
- NOAA-GFDL/MOM6@86c5ed989 (*)Fix bug in h_neglect used to remap diags to rho
- NOAA-GFDL/MOM6@f2e7abff8 MLE: Use default answer date outside of block (#570)
- NOAA-GFDL/MOM6@e69d77107 Merge branch 'main' into dev/gfdl
- NOAA-GFDL/MOM6@2ab885edd Merge pull request #1616 from NOAA-GFDL/dev-gfdl-main-candidate-2023-11-13
- NOAA-GFDL/MOM6@6d7c00a83 Restore bit repro using FMA in selected runs
- NOAA-GFDL/MOM6@f92e4ac31 Update MOM_mixed_layer_restrat.F90 (#568)
- NOAA-GFDL/MOM6@3f7465a57 +tracer_Z_init can rescale tracers
- NOAA-GFDL/MOM6@f14a68107 (*)Use thickness_to_dz with BRYAN_LEWIS_DIFFUSIVITY
- NOAA-GFDL/MOM6@0fb905fdc +(*)non-Boussinesq ALE_sponges work in Z units
- NOAA-GFDL/MOM6@c37a2f0d0 Document core and linear EOS variable units
- NOAA-GFDL/MOM6@de7e5b79f Document MOM_regridding and coord variable units
- NOAA-GFDL/MOM6@4757bcb52 Remove some unused calculations if non-Boussinesq
- NOAA-GFDL/MOM6@9282cd100 +(*)Bodner param with cuberoot and non-Boussinesq
- NOAA-GFDL/MOM6@ea12532d8 Fix issue with restart filenames when using ensembles.
- NOAA-GFDL/MOM6@9a6ddee47 *+non-Boussinesq revisions to MOM_generic_tracer
- NOAA-GFDL/MOM6@e7a7a82ab (*)MOM_temp_salt_init_from_Z Z-unit tracer remap
- NOAA-GFDL/MOM6@915cfe225 +ALE_remap_scalar with arbitrary thickness units
- NOAA-GFDL/MOM6@07bace68c *Fix two bugs in convert_temp_salt_for_TEOS10
- NOAA-GFDL/MOM6@671c85d32 (*)Use cuberoot in ePBL_column
- NOAA-GFDL/MOM6@736ef16a4 Cuberoot: Break **3 into explicit integer cubes
- NOAA-GFDL/MOM6@5edba9b4d Cuberoot: Refactor (re|de)scale functions
- NOAA-GFDL/MOM6@60cb551a3 Intrinsics: Faster cuberoot scaling functions
- NOAA-GFDL/MOM6@76f066814 (*)Avoid using RHO_0 in non-Boussinesq averaging
- NOAA-GFDL/MOM6@541c2f479 (*)Oil_tracer_column_physics unit conversion fix
- NOAA-GFDL/MOM6@0de5c1493 Merge pull request #1618 from jiandewang/DEV-EMC-candidate-20230122
- NOAA-GFDL/MOM6@5ca70bac6 Open parameter block before querying BODNER23
- NOAA-GFDL/MOM6@f1e0f01a8 Params: Add do_not_log to param block open/close
- NOAA-GFDL/MOM6@435ccaae4 Data table documentation (#551)
- NOAA-GFDL/MOM6@17f1c40df Cuberoot: Apply first iteration explicitly (#11)
- NOAA-GFDL/MOM6@4813b17c2 *Use Halley method iterations in cuberoot function
- NOAA-GFDL/MOM6@c8a7325c0 Merge pull request #126 from DeniseWorthen/feature/restartfh
- NOAA-GFDL/MOM6@d7d126a7f Update Gaea F5 datasets path
- NOAA-GFDL/MOM6@d9c7bd950 Merge branch 'NOAA-EMC:dev/emc' into feature/restartfh
- NOAA-GFDL/MOM6@a728ceaa5 allow restarts to be set on non-interval hours
- NOAA-GFDL/MOM6@60c397b91 Merge pull request #124 from jiandewang/feature/update-to-main-20231218
- NOAA-GFDL/MOM6@a03bb957c +Add cuberoot function
- NOAA-GFDL/MOM6@db62734a9 Merge remote-tracking branch 'MAIN/main' into feature/update-to-main-20231218
- NOAA-GFDL/MOM6@40134ed86 change target to pointer and check for association
- NOAA-GFDL/MOM6@7ef6a5725  Fix the saltFluxAdded diagnoistic, broken in #401
- NOAA-GFDL/MOM6@f4c95ec4b Revert post_data fix to CFC concentration
- NOAA-GFDL/MOM6@a36cb73d6 Merge pull request #122 from jiandewang/feature/update-NCAR-GMAO-20231031
- NOAA-GFDL/MOM6@80a93f633 Merge remote-tracking branch 'MAIN/main' into feature/update-NCAR-GMAO-20231031
- NOAA-GFDL/MOM6@e2c322eed Merge remote-tracking branch 'MAIN/main' into feature/update-NCAR-GMAO-20231031
- NOAA-GFDL/MOM6@02d4dc455 Merge pull request #120 from DeniseWorthen/feature/fldnames
- NOAA-GFDL/MOM6@abb0ad24f switch to cesm-style field names
  • Loading branch information
marshallward committed Mar 8, 2024
1 parent f7485d4 commit d995731
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
26 changes: 17 additions & 9 deletions coupled_AM2_LM3_SIS2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ MOM_MEMORY ?=
SIS_MEMORY ?=

# Dependencies
FMS_BUILD ?= ../shared/fms/build
FMS_CODEBASE ?= ../src/FMS1
FMS_BUILD ?= ../shared/fms/build_fms1
AM2_BUILD ?= ../shared/AM2/build
ICEBERGS_BUILD ?= ../shared/icebergs/build
ICE_PARAM_BUILD ?= ../shared/ice_param/build
ICEBERGS_BUILD ?= ../shared/icebergs/build_fms1
ICE_PARAM_BUILD ?= ../shared/ice_param/build_fms1
LM3_BUILD ?= ../shared/LM3/build

# Autoconf configuration
Expand All @@ -32,6 +33,7 @@ EXTRA_SRC_DIRS = \
CONFIG_FLAGS := --config-cache
CONFIG_FLAGS += --srcdir=$(abspath $(MOM_CODEBASE))
CONFIG_FLAGS += --with-driver=FMS_cap
CONFIG_FLAGS += --with-framework=fms1
ifdef MOM_MEMORY
CONFIG_FLAGS += MOM_MEMORY=$(abspath $(MOM_MEMORY))
endif
Expand All @@ -46,7 +48,7 @@ FCFLAGS ?= -g -O2
# Path to fms_platform.h
# NOTE: Most libraries need an explicit path to this file. Someday, this could
# be handled by library-specific autoconf tests.
FCFLAGS += -I$(abspath ../src/FMS/include)
FCFLAGS += -I$(abspath $(FMS_CODEBASE)/include)

MOM_FCFLAGS = $(FCFLAGS) \
-I$(abspath $(FMS_BUILD)) \
Expand Down Expand Up @@ -170,7 +172,8 @@ $(ICEBERGS_BUILD)/libicebergs.a: FORCE $(FMS_BUILD)/libFMS.a

$(FMS_BUILD)/libFMS.a: FORCE
$(MAKE) -C ../shared/fms \
BUILD=$(abspath $(FMS_BUILD))
BUILD=$(abspath $(FMS_BUILD)) \
CODEBASE=$(abspath $(FMS_CODEBASE))

FORCE:

Expand Down Expand Up @@ -230,11 +233,16 @@ $(foreach expt,$(EXPTS),$(eval $(call EXPT_RULE,$(expt))))
.PHONY: clean
clean:
rm -rf $(BUILD)
$(MAKE) -C ../shared/AM2 clean
$(MAKE) -C ../shared/AM2 clean \
BUILD=$(abspath $(AM2_BUILD))
$(MAKE) -C ../shared/LM3 clean
$(MAKE) -C ../shared/ice_param clean
$(MAKE) -C ../shared/icebergs clean
$(MAKE) -C ../shared/fms clean
BUILD=$(abspath $(LM3_BUILD))
$(MAKE) -C ../shared/ice_param clean \
BUILD=$(abspath $(ICE_PARAM_BUILD))
$(MAKE) -C ../shared/icebergs clean \
BUILD=$(abspath $(ICEBERGS_BUILD))
$(MAKE) -C ../shared/fms clean \
BUILD=$(abspath $(FMS_BUILD))

.PHONY: clean.runs
clean.runs: $(foreach e,$(EXPTS),clean.$(e))
4 changes: 3 additions & 1 deletion ice_ocean_SIS2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MOM_MEMORY ?=
SIS_MEMORY ?=

# Dependencies
FMS_CODEBASE ?= ../src/FMS2
FMS_BUILD ?= ../shared/fms/build
ICEBERGS_BUILD ?= ../shared/icebergs/build
ICE_PARAM_BUILD ?= ../shared/ice_param/build
Expand Down Expand Up @@ -172,7 +173,8 @@ $(ICEBERGS_BUILD)/libicebergs.a: FORCE $(FMS_BUILD)/libFMS.a

$(FMS_BUILD)/libFMS.a: FORCE
$(MAKE) -C ../shared/fms \
BUILD=$(abspath $(FMS_BUILD))
BUILD=$(abspath $(FMS_BUILD)) \
CODEBASE=$(abspath $(FMS_CODEBASE))

FORCE:

Expand Down
5 changes: 4 additions & 1 deletion ocean_only/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BUILD ?= build
MOM_MEMORY ?=

# Dependencies
FMS_CODEBASE ?= ../src/FMS2
FMS_BUILD ?= ../shared/fms/build

# Autoconf configuration
Expand Down Expand Up @@ -104,7 +105,9 @@ $(BUILD):
# Dependencies

$(FMS_BUILD)/libFMS.a: FORCE
$(MAKE) -C ../shared/fms BUILD=$(abspath $(FMS_BUILD))
$(MAKE) -C ../shared/fms \
BUILD=$(abspath $(FMS_BUILD)) \
CODEBASE=$(abspath $(FMS_CODEBASE))

FORCE:

Expand Down
3 changes: 2 additions & 1 deletion shared/AM2/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration
BUILD ?= build
FMS_BUILD ?= ../fms/build
FMS_CODEBASE ?= ../../src/FMS1

TARGET = libAM2.a
CODEBASE = ../../src/AM2
Expand All @@ -13,7 +14,7 @@ SRCDIRS = $(addprefix $(abspath $(CODEBASE))/, \
atmos_param_am3)

FCFLAGS += -I$(abspath $(FMS_BUILD))
FCFLAGS += -I$(abspath ../../src/FMS/include)
FCFLAGS += -I$(abspath $(FMS_CODEBASE)/include)

LDFLAGS += -L$(abspath $(FMS_BUILD))

Expand Down
4 changes: 4 additions & 0 deletions shared/config/Libs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ MAKEPATH = $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
M4DIR ?= $(MAKEPATH)/../../src/MOM6/ac/m4
MAKEDEP = $(MAKEPATH)/../../src/MOM6/ac/makedep

# `export` disables autoconf defaults; this restores them
CFLAGS ?= -g -O2
FCFLAGS ?= -g -O2

# Autoconf configuration
export CPPFLAGS
export CC
Expand Down
2 changes: 1 addition & 1 deletion shared/fms/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuration
BUILD ?= build
CODEBASE ?= ../../src/FMS2

CODEBASE = ../../src/FMS
TARGET = libFMS.a
MAKEFILE_IN = ../../src/MOM6/ac/deps/Makefile.fms.in
CONFIGURE_AC = ../../src/MOM6/ac/deps/configure.fms.ac
Expand Down
2 changes: 1 addition & 1 deletion src/MOM6
Submodule MOM6 updated 38 files
+1 −1 .github/actions/testing-setup/action.yml
+241 −215 .testing/Makefile
+2 −2 ac/configure.ac
+152 −83 config_src/drivers/nuopc_cap/mom_cap.F90
+90 −89 config_src/drivers/nuopc_cap/mom_cap_methods.F90
+6 −0 docs/requirements.txt
+24 −12 src/ALE/MOM_ALE.F90
+150 −70 src/ALE/MOM_regridding.F90
+21 −11 src/ALE/coord_adapt.F90
+11 −12 src/ALE/coord_rho.F90
+2 −2 src/ALE/coord_sigma.F90
+4 −4 src/core/MOM.F90
+1 −1 src/core/MOM_check_scaling.F90
+19 −12 src/core/MOM_forcing_type.F90
+4 −1 src/core/MOM_isopycnal_slopes.F90
+129 −121 src/core/MOM_open_boundary.F90
+11 −5 src/core/MOM_verticalGrid.F90
+4 −5 src/diagnostics/MOM_wave_speed.F90
+1 −1 src/equation_of_state/MOM_EOS.F90
+3 −3 src/equation_of_state/MOM_EOS_linear.F90
+1 −1 src/framework/MOM_diag_remap.F90
+11 −11 src/framework/MOM_restart.F90
+35 −15 src/initialization/MOM_state_initialization.F90
+38 −18 src/initialization/MOM_tracer_initialization_from_Z.F90
+117 −28 src/parameterizations/lateral/MOM_mixed_layer_restrat.F90
+1 −2 src/parameterizations/lateral/MOM_thickness_diffuse.F90
+156 −105 src/parameterizations/vertical/MOM_ALE_sponge.F90
+5 −1 src/parameterizations/vertical/MOM_bkgnd_mixing.F90
+2 −2 src/parameterizations/vertical/MOM_diabatic_driver.F90
+1 −1 src/parameterizations/vertical/MOM_kappa_shear.F90
+2 −2 src/parameterizations/vertical/MOM_set_diffusivity.F90
+779 −196 src/parameterizations/vertical/MOM_set_viscosity.F90
+2 −2 src/parameterizations/vertical/MOM_tidal_mixing.F90
+1 −1 src/parameterizations/vertical/MOM_vert_friction.F90
+2 −6 src/tracer/MOM_CFC_cap.F90
+83 −61 src/tracer/MOM_generic_tracer.F90
+54 −35 src/tracer/MOM_tracer_Z_init.F90
+1 −1 src/tracer/MOM_tracer_flow_control.F90

0 comments on commit d995731

Please sign in to comment.