Skip to content

Commit

Permalink
Merge pull request #27 from thomas-robinson/2021.01_branch
Browse files Browse the repository at this point in the history
2021.01 update
  • Loading branch information
thomas-robinson authored Mar 18, 2021
2 parents 6b110bd + 51373c4 commit 18a43b0
Show file tree
Hide file tree
Showing 22 changed files with 2,166 additions and 4,162 deletions.
13 changes: 13 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@
[submodule "src/ocean_shared"]
path = src/ocean_shared
url = https://github.com/NOAA-GFDL/ocean_BGC.git
[submodule "src/atmos_drivers"]
path = src/atmos_drivers
url = https://github.com/NOAA-GFDL/atmos_drivers.git
branch = master
[submodule "src/GFDL_atmos_cubed_sphere"]
path = src/GFDL_atmos_cubed_sphere
url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere.git
[submodule "src/FMS"]
path = src/FMS
url = https://github.com/NOAA-GFDL/FMS.git
[submodule "src/FMScoupler"]
path = src/FMScoupler
url = https://github.com/NOAA-GFDL/FMScoupler.git
23 changes: 18 additions & 5 deletions exec/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Makefile for Experiment 'cm4p12_warsaw'
# Makefile for Experiment 'cm4p12_xanadu_2021.01'

BUILDROOT = $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
SRCROOT = $(abspath $(BUILDROOT)../src)/ # Final '/' added to denote directory

MK_TEMPLATE = $(BUILDROOT)templates/intel.mk
# Select the make template (default is intel)
ifeq ($(gcc),on)
MK_TEMPLATE = $(BUILDROOT)templates/gnu.mk
else
MK_TEMPLATE = $(BUILDROOT)templates/intel.mk
endif
# Set shell to sh
ifeq ($(SH),sh)
SHELL=/bin/sh
endif

# Override default compile options. See templates/intel.mk for more compile options.
# BLD_TYPE configures the type of build, PROD (production), REPRO (regression) or
Expand All @@ -15,7 +24,7 @@ include $(MK_TEMPLATE)

SUBMAKEFLAGS = BUILDROOT=$(BUILDROOT) SRCROOT=$(SRCROOT) MK_TEMPLATE=$(MK_TEMPLATE) BLD_TYPE=$(BLD_TYPE)

fms_cm4p12_warsaw.x: coupler/libcoupler.a ice_sis/libice_sis.a atmos_dyn/libatmos_dyn.a land_lad2/libland_lad2.a atmos_phys/libatmos_phys.a mom6/libmom6.a fms/libfms.a
am4_xanadu_2021.01.x: coupler/libcoupler.a atmos_dyn/libatmos_dyn.a ice_sis/libice_sis.a atmos_cubed_sphere/libatmos_cubed_sphere.a atmos_phys/libatmos_phys.a mom6/libmom6.a land_lad2/libland_lad2.a fms/libfms.a
$(LD) $^ $(LDFLAGS) -o $@ $(STATIC_LIBS)

fms/libfms.a: FORCE
Expand All @@ -24,7 +33,10 @@ fms/libfms.a: FORCE
atmos_phys/libatmos_phys.a: fms/libfms.a FORCE
$(MAKE) $(SUBMAKEFLAGS) OPENMP=$(OPENMP) --directory=$(BUILDROOT)atmos_phys $(@F)

atmos_dyn/libatmos_dyn.a: atmos_phys/libatmos_phys.a fms/libfms.a FORCE
atmos_cubed_sphere/libatmos_cubed_sphere.a: atmos_phys/libatmos_phys.a fms/libfms.a FORCE
$(MAKE) $(SUBMAKEFLAGS) OPENMP=$(OPENMP) --directory=$(BUILDROOT)atmos_cubed_sphere $(@F)

atmos_dyn/libatmos_dyn.a: atmos_cubed_sphere/libatmos_cubed_sphere.a atmos_phys/libatmos_phys.a fms/libfms.a FORCE
$(MAKE) $(SUBMAKEFLAGS) OPENMP=$(OPENMP) --directory=$(BUILDROOT)atmos_dyn $(@F)

ice_sis/libice_sis.a: mom6/libmom6.a fms/libfms.a FORCE
Expand All @@ -37,7 +49,7 @@ land_lad2/libland_lad2.a: fms/libfms.a FORCE
mom6/libmom6.a: fms/libfms.a FORCE
$(MAKE) $(SUBMAKEFLAGS) --directory=$(BUILDROOT)mom6 $(@F)

coupler/libcoupler.a: atmos_dyn/libatmos_dyn.a ice_sis/libice_sis.a atmos_phys/libatmos_phys.a mom6/libmom6.a land_lad2/libland_lad2.a fms/libfms.a FORCE
coupler/libcoupler.a: atmos_dyn/libatmos_dyn.a ice_sis/libice_sis.a mom6/libmom6.a land_lad2/libland_lad2.a atmos_phys/libatmos_phys.a fms/libfms.a FORCE
$(MAKE) $(SUBMAKEFLAGS) OPENMP=$(OPENMP) --directory=$(BUILDROOT)coupler $(@F)

FORCE:
Expand All @@ -46,6 +58,7 @@ clean:
$(MAKE) --directory=$(BUILDROOT)fms clean
$(MAKE) --directory=$(BUILDROOT)atmos_phys clean
$(MAKE) --directory=$(BUILDROOT)atmos_dyn clean
$(MAKE) --directory=$(BUILDROOT)atmos_cubed_sphere clean
$(MAKE) --directory=$(BUILDROOT)ice_sis clean
$(MAKE) --directory=$(BUILDROOT)land_lad2 clean
$(MAKE) --directory=$(BUILDROOT)mom6 clean
Expand Down
202 changes: 202 additions & 0 deletions exec/atmos_cubed_sphere/Makefile

Large diffs are not rendered by default.

176 changes: 9 additions & 167 deletions exec/atmos_dyn/Makefile

Large diffs are not rendered by default.

1,128 changes: 566 additions & 562 deletions exec/atmos_phys/Makefile

Large diffs are not rendered by default.

63 changes: 40 additions & 23 deletions exec/coupler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,49 @@ include $(MK_TEMPLATE)
.DEFAULT:
-echo $@ does not exist.
all: libcoupler.a
atmos_ocean_dep_fluxes_calc.o: $(SRCROOT)coupler/atmos_ocean_dep_fluxes_calc.f90 surface_flux.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/atmos_ocean_dep_fluxes_calc.f90
atmos_ocean_fluxes_calc.o: $(SRCROOT)coupler/atmos_ocean_fluxes_calc.f90 surface_flux.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/atmos_ocean_fluxes_calc.f90
atm_land_ice_flux_exchange.o: $(SRCROOT)coupler/atm_land_ice_flux_exchange.F90 surface_flux.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/atm_land_ice_flux_exchange.F90
coupler_main.o: $(SRCROOT)coupler/coupler_main.F90 flux_exchange.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/coupler_main.F90
flux_exchange.o: $(SRCROOT)coupler/flux_exchange.F90 atm_land_ice_flux_exchange.o land_ice_flux_exchange.o ice_ocean_flux_exchange.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/flux_exchange.F90
ice_ocean_flux_exchange.o: $(SRCROOT)coupler/ice_ocean_flux_exchange.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/ice_ocean_flux_exchange.F90
land_ice_flux_exchange.o: $(SRCROOT)coupler/land_ice_flux_exchange.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/land_ice_flux_exchange.F90
surface_flux.o: $(SRCROOT)coupler/surface_flux.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)coupler/surface_flux.F90

SRC = $(SRCROOT)coupler/land_ice_flux_exchange.F90 $(SRCROOT)coupler/surface_flux.F90 $(SRCROOT)coupler/ice_ocean_flux_exchange.F90 $(SRCROOT)coupler/coupler_main.F90 $(SRCROOT)coupler/atm_land_ice_flux_exchange.F90 $(SRCROOT)coupler/flux_exchange.F90 $(SRCROOT)coupler/atmos_ocean_fluxes_calc.f90 $(SRCROOT)coupler/atmos_ocean_dep_fluxes_calc.f90
OBJ = land_ice_flux_exchange.o surface_flux.o ice_ocean_flux_exchange.o coupler_main.o atm_land_ice_flux_exchange.o flux_exchange.o atmos_ocean_fluxes_calc.o atmos_ocean_dep_fluxes_calc.o

atm_land_ice_flux_exchange.o: $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90 surface_flux.o atmos_ocean_fluxes_calc.o atmos_ocean_dep_fluxes_calc.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90
atmos_ocean_dep_fluxes_calc.o: $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90
$(FC) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90
atmos_ocean_fluxes_calc.o: $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90
$(FC) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90
coupler_main.o: $(SRCROOT)FMScoupler/full/coupler_main.F90 flux_exchange.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/coupler_main.F90
flux_exchange.o: $(SRCROOT)FMScoupler/full/flux_exchange.F90 atmos_ocean_fluxes_calc.o atm_land_ice_flux_exchange.o land_ice_flux_exchange.o ice_ocean_flux_exchange.o
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/flux_exchange.F90
ice_ocean_flux_exchange.o: $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90
land_ice_flux_exchange.o: $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90
surface_flux.o: $(SRCROOT)FMScoupler/shared/surface_flux.F90
$(FC) $(CPPDEFS) $(FPPFLAGS) $(FFLAGS) $(OTHERFLAGS) $(OTHER_FFLAGS) -c $(SRCROOT)FMScoupler/shared/surface_flux.F90
./flux_exchange.F90: $(SRCROOT)FMScoupler/full/flux_exchange.F90
cp $(SRCROOT)FMScoupler/full/flux_exchange.F90 .
./coupler_main.F90: $(SRCROOT)FMScoupler/full/coupler_main.F90
cp $(SRCROOT)FMScoupler/full/coupler_main.F90 .
./atmos_ocean_fluxes_calc.f90: $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90
cp $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90 .
./atm_land_ice_flux_exchange.F90: $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90
cp $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90 .
./land_ice_flux_exchange.F90: $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90
cp $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90 .
./atmos_ocean_dep_fluxes_calc.f90: $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90
cp $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90 .
./surface_flux.F90: $(SRCROOT)FMScoupler/shared/surface_flux.F90
cp $(SRCROOT)FMScoupler/shared/surface_flux.F90 .
./ice_ocean_flux_exchange.F90: $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90
cp $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90 .
SRC = $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90 $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90 $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90 $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90 $(SRCROOT)FMScoupler/full/coupler_main.F90 $(SRCROOT)FMScoupler/shared/surface_flux.F90 $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90 $(SRCROOT)FMScoupler/full/flux_exchange.F90
OBJ = ice_ocean_flux_exchange.o land_ice_flux_exchange.o atmos_ocean_fluxes_calc.o atmos_ocean_dep_fluxes_calc.o coupler_main.o surface_flux.o atm_land_ice_flux_exchange.o flux_exchange.o
OFF = $(SRCROOT)FMScoupler/full/flux_exchange.F90 $(SRCROOT)FMScoupler/full/coupler_main.F90 $(SRCROOT)FMScoupler/full/atmos_ocean_fluxes_calc.f90 $(SRCROOT)FMScoupler/full/atm_land_ice_flux_exchange.F90 $(SRCROOT)FMScoupler/full/land_ice_flux_exchange.F90 $(SRCROOT)FMScoupler/full/atmos_ocean_dep_fluxes_calc.f90 $(SRCROOT)FMScoupler/shared/surface_flux.F90 $(SRCROOT)FMScoupler/full/ice_ocean_flux_exchange.F90
clean: neat
$(RM) $(OBJ) libcoupler.a
$(RM) *.mod
-rm -f .libcoupler.a.cppdefs $(OBJ) libcoupler.a

neat:
$(RM) $(TMPFILES)
-rm -f $(TMPFILES)

localize: $(OFF)
cp $(OFF) .

TAGS: $(SRC)
etags $(SRC)
Expand Down
Loading

0 comments on commit 18a43b0

Please sign in to comment.