Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade develop to v14.3.1 #19

Merged
merged 30 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dfbb263
Add GEOS-Chem 14.3.1, HEMCO 3.8.1, and Cloud-J 7.7.1 as submodules fo…
ltmurray May 6, 2024
df9cfe3
Updates to ModelE2.1 to allow GEOS-Chem version 14.3.1 to be an alter…
ltmurray May 6, 2024
9cd8698
Failed attempt at building GEOS-Chem libraries and linking to ModelE2.1.
ltmurray May 6, 2024
8c70e55
Introduce GC_BUILD_DIR and GC_LIB_DIR environment variables
jwallwork23 Jun 18, 2024
26a25ae
Add linker flags: -nostartfiles -nofor-main
jwallwork23 Jun 18, 2024
d78c606
Add GC to clean recipe
jwallwork23 Jun 18, 2024
65a2a4a
Fix MODEL_CLASSIC typo
jwallwork23 Jun 18, 2024
05e7df9
Hook up right branch for GEOS-Chem
jwallwork23 Jun 26, 2024
3938d0a
Drop comments in model/Makefile and reformat
jwallwork23 Jul 18, 2024
75404e9
Use -qopenmp for recent versions of the Intel compiler
jwallwork23 Jul 19, 2024
468ed51
Pass GISS OpenMP configuration through to GEOS-Chem
jwallwork23 Jul 19, 2024
a10e9eb
Equivalent linker flags for gfortran, too; pass F90 and linker flags …
jwallwork23 Jul 23, 2024
3e71ea0
Need MODEL_ compile definition
jwallwork23 Jul 23, 2024
c396587
Account for having separate C and Fortran NetCDF installs
jwallwork23 Jul 23, 2024
1b263b0
Only alter LFLAGS if GC=YES
jwallwork23 Jul 24, 2024
1088414
Add OpenMP flags for gfortran
jwallwork23 Jul 29, 2024
2283165
Base F90FLAGS off FFLAGS
jwallwork23 Jul 30, 2024
53694dc
Simplify change set
jwallwork23 Aug 15, 2024
45a72a2
Do not include executable
jwallwork23 Aug 15, 2024
beb1767
Add development environment Dockerfile
jwallwork23 Jul 26, 2024
b36b9a0
Add Makefile for working with Docker container
jwallwork23 Jul 25, 2024
b80fda3
Use HTTPS for Git modules
jwallwork23 Jul 26, 2024
07947a3
Add modelErc
jwallwork23 Jul 26, 2024
6d0ab82
Add CI workflow for building GISS-GC
jwallwork23 Jul 26, 2024
e672bb6
Separate task for creating fake inputs
jwallwork23 Jul 26, 2024
c39aec6
Define environment variables before jobs
jwallwork23 Jul 26, 2024
854a797
More environment variables; formatting
jwallwork23 Jul 26, 2024
3c04d9a
Job for setting up submodules; use RUNID
jwallwork23 Jul 26, 2024
577c64a
Formatting changes to trigger CI
jwallwork23 Aug 9, 2024
f9fec59
Merge pull request #16 from fetch4/setup-ci
ltmurray Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[submodule "model/geos-chem/src"]
path = model/geos-chem/src
[submodule "model/geos-chem/src/GEOS-Chem"]
path = model/geos-chem/src/GEOS-Chem
url = git@github.com:fetch4/geos-chem.git
branch = dev/giss-gc
branch = dev/giss-gc-14
[submodule "model/geos-chem/src/HEMCO"]
path = model/geos-chem/src/HEMCO
url = git@github.com:fetch4/HEMCO.git
branch = dev/giss-gc-14
[submodule "model/geos-chem/src/Cloud-J"]
path = model/geos-chem/src/Cloud-J
url = git@github.com:fetch4/Cloud-J.git
branch = dev/giss-gc-14
10 changes: 9 additions & 1 deletion config/compiler.gfortran.mk
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were already approved as part of #3.

Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ endif
FMAKEDEP = $(SCRIPTS_DIR)/sfmakedepend
CPPFLAGS += -DCOMPILER_G95
FFLAGS = -g -cpp -fconvert=big-endian -O2 -fno-range-check -fallow-argument-mismatch
F90FLAGS = -g -cpp -fconvert=big-endian -O2 -fno-range-check -ffree-line-length-none -fallow-argument-mismatch
F90FLAGS = $(FFLAGS) -ffree-line-length-none
LFLAGS =
ifeq ($(GC),YES)
LFLAGS += -nostartfiles -Wno-main
endif
ifeq ($(MP),YES)
FFLAGS += -fopenmp
F90FLAGS += -fopenmp
LFLAGS += -fopenmp
endif

F90_VERSION = $(shell $(F90) --version | head -1)

Expand Down
13 changes: 8 additions & 5 deletions config/compiler.intel.mk
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were already approved as part of #3.

Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ IFORT_RELEASE := $(shell ifort --version | perl -e \
'while(<>){ if(/ifort.* (\d+\.\d+)/) { print "$$1"; } }')
FMAKEDEP = $(SCRIPTS_DIR)/sfmakedepend
CMP_MOD = $(SCRIPTS_DIR)/compare_module_file.pl -compiler INTEL-ifort-9-0-on-LINUX
FFLAGS = -fpp -O2 -ftz -convert big_endian
F90FLAGS = -fpp -O2 -ftz -convert big_endian -free
FFLAGS = -fpp -O2 -ftz -convert big_endian
F90FLAGS = $(FFLAGS) -free
LFLAGS = -O2 -ftz
ifeq ($(GC),YES)
LFLAGS += -nostartfiles -nofor-main
endif
CPPFLAGS += -DCOMPILER_Intel8 -DCONVERT_BIGENDIAN
F90_VERSION = $(shell $(F90) -v 2>&1)
ifeq ($(MP),YES)
FFLAGS += -openmp
F90FLAGS += -openmp
LFLAGS += -openmp
FFLAGS += -qopenmp
F90FLAGS += -qopenmp
LFLAGS += -qopenmp
endif
R8 = -r8
EXTENDED_SOURCE = -extend_source
Expand Down
53 changes: 30 additions & 23 deletions config/rules.mk
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were already approved as part of #3.

Original file line number Diff line number Diff line change
Expand Up @@ -229,36 +229,43 @@ endif

ifneq ($(CUBED_SPHERE),YES)

ifdef NETCDFHOME
ifneq ($(wildcard $(NETCDFHOME)/include/netcdf.inc),)
NETCDFINCLUDEDIR ?= $(NETCDFHOME)/include
else
ifneq ($(wildcard $(NETCDFHOME)/include/netcdf-3/netcdf.inc),)
NETCDFINCLUDEDIR ?= $(NETCDFHOME)/include/netcdf-3
ifneq ($(and $(NETCDF_HOME),$(NETCDF_F_HOME)),)
LIBS += -L$(NETCDF_HOME)/lib -lnetcdf -L$(NETCDF_F_HOME)/lib -lnetcdff
FFLAGS += -I$(NETCDF_HOME)/include -I$(NETCDF_F_HOME)/include
F90FLAGS += -I$(NETCDF_HOME)/include -I$(NETCDF_F_HOME)/include
INCS += -I$(NETCDF_HOME)/include -I$(NETCDF_F_HOME)/include
else
ifdef NETCDFHOME
ifneq ($(wildcard $(NETCDFHOME)/include/netcdf.inc),)
NETCDFINCLUDEDIR ?= $(NETCDFHOME)/include
else
$(error NetCDF include files not found)
ifneq ($(wildcard $(NETCDFHOME)/include/netcdf-3/netcdf.inc),)
NETCDFINCLUDEDIR ?= $(NETCDFHOME)/include/netcdf-3
else
$(error NetCDF include files not found)
endif
endif
endif

ifneq ($(wildcard $(NETCDFHOME)/$(LIBABI)/libnetcdf*),)
NETCDFLIBDIR ?= $(NETCDFHOME)/$(LIBABI)
else
NETCDFLIBDIR ?= $(NETCDFHOME)/lib
ifneq ($(wildcard $(NETCDFHOME)/$(LIBABI)/libnetcdf*),)
NETCDFLIBDIR ?= $(NETCDFHOME)/$(LIBABI)
else
NETCDFLIBDIR ?= $(NETCDFHOME)/lib
endif
endif
endif

ifdef NETCDFINCLUDEDIR
FFLAGS += -I$(NETCDFINCLUDEDIR)
F90FLAGS += -I$(NETCDFINCLUDEDIR)
INCS += -I$(NETCDFINCLUDEDIR)
endif
ifdef NETCDFINCLUDEDIR
FFLAGS += -I$(NETCDFINCLUDEDIR)
F90FLAGS += -I$(NETCDFINCLUDEDIR)
INCS += -I$(NETCDFINCLUDEDIR)
endif

ifdef NETCDFLIBDIR
LIBS += -L$(NETCDFLIBDIR) -lnetcdf
ifeq ($(wildcard $(NETCDFLIBDIR)/libnetcdff.*),)
ifdef NETCDFLIBDIR
LIBS += -L$(NETCDFLIBDIR) -lnetcdf
else
LIBS += -L$(NETCDFLIBDIR) -L/opt/local/lib -lnetcdff -lnetcdf
ifeq ($(wildcard $(NETCDFLIBDIR)/libnetcdff.*),)
LIBS += -L$(NETCDFLIBDIR) -lnetcdf
else
LIBS += -L$(NETCDFLIBDIR) -L/opt/local/lib -lnetcdff -lnetcdf
endif
endif
endif

Expand Down
37 changes: 31 additions & 6 deletions decks/Makefile
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes were already approved as part of #3.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ else
MODEL_E_BUILD_DIR = $(MODEL_E_ROOT)
endif
MODEL_DIR = $(MODEL_E_BUILD_DIR)/model
GC_BUILD_DIR = $(MODEL_DIR)/geos-chem/build
GC_LIB_DIR = $(MODEL_DIR)/geos-chem/lib
AUX_DIR = $(MODEL_E_ROOT)/aux
SCRIPTS_DIR = $(MODEL_E_ROOT)/exec
DECKS_DIR = $(shell pwd)
Expand Down Expand Up @@ -127,9 +129,34 @@ ifeq ($(GC),YES)
@echo "***************************************************************"
@echo "Compiling GEOS-Chem"
@echo "***************************************************************"
cd $(MODEL_DIR)/geos-chem/src && make FC=$(FC) EXTERNAL_GRID=y EXTERNAL_FORCING=y GISS=y OMP=n NO_EXE=y all MAKEFLAGS=
#cd $(MODEL_DIR)/geos-chem/src && make FC=$(FC) EXTERNAL_GRID=y EXTERNAL_FORCING=y GISS=y OMP=n DEBUG=y TRACEBACK=y NO_EXE=y all MAKEFLAGS=
cp $(MODEL_DIR)/geos-chem/src/mod/* $(MODEL_DIR)/mod/
mkdir -p $(GC_BUILD_DIR)
mkdir -p $(GC_LIB_DIR)
cd $(GC_BUILD_DIR) && cmake ../ -DINSTALLCOPY=.. \
-DOMP=$(MP) \
-DCMAKE_Fortran_FLAGS="$(F90FLAGS)" \
-DCMAKE_EXE_LINKER_FLAGS="$(LFLAGS)"
cd $(GC_BUILD_DIR) && make -j install
cp $(GC_BUILD_DIR)/mod/*.mod $(MODEL_DIR)/mod/
cp $(GC_BUILD_DIR)/src/HEMCO/mod/*.mod $(MODEL_DIR)/mod/
cp $(GC_BUILD_DIR)/src/Cloud-J/mod/*.mod $(MODEL_DIR)/mod/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Core/libHCO.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Extensions/libHCOX.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Shared/Headers/libHeadersHco.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Shared/GeosUtil/libJulDayHco.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Shared/GeosUtil/libGeosUtilHco.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Shared/NcdfUtil/libNcdfUtilHco.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/HEMCO/src/Interfaces/Shared/libHCOI_Shared.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/ISORROPIA/libIsorropia.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/Headers/libHeaders.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/ObsPack/libObsPack.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/History/libHistory.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/KPP/fullchem/libKPP_FirstPass.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/KPP/fullchem/libKPP.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/GeosCore/libGeosCore.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/GeosUtil/libGeosUtil.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/GeosUtil/libJulDay.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/GEOS-Chem/NcdfUtil/libNcdfUtil.a $(GC_LIB_DIR)/
cp $(GC_BUILD_DIR)/src/Cloud-J/src/Core/libCloudJ_Core.a $(GC_LIB_DIR)/
endif
$(MAKE) -C $(MODEL_DIR) gcm RUN=$(RUN) DECKS_DIR=$(DECKS_DIR) $(OPTS_MAIN)
-mv $(MODEL_DIR)/$(RUN).bin $(BIN_DIR)/$(RUN).exe
Expand Down Expand Up @@ -225,9 +252,7 @@ ifneq ($(PFUNIT),)
$(MAKE) -C $(TESTS_DIR) clean
endif
$(MAKE) -C $(AUX_DIR) $@ $(OPTS_MAIN)
ifeq ($(GC),YES)
cd $(MODEL_DIR)/geos-chem/src && make realclean
endif
rm -rf $(GC_BUILD_DIR)

exe: $(RUN)/$(RUN) gcm
@if [ ! -s $(CMRUNDIR)/$(RUN)/I ] ; then \
Expand Down
22 changes: 0 additions & 22 deletions model/CHEM_COM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ module CHEM_COM
!@var ijlt_power: power of 10 used for tracer IJL 3D diags
INTEGER, DIMENSION(kgcaijl) :: ijlt_power

! Indices to radiatively active species
INTEGER :: i_H2O = 0
INTEGER :: i_CO2 = 0
INTEGER :: i_O3 = 0
INTEGER :: i_O2 = 0
INTEGER :: i_NO2 = 0
INTEGER :: i_N2O = 0
INTEGER :: i_CH4 = 0
INTEGER :: i_CFC11 = 0
INTEGER :: i_CFC12 = 0
INTEGER :: i_N2 = 0
INTEGER :: i_CFCY = 0
INTEGER :: i_CFCZ = 0
INTEGER :: i_SO2 = 0
INTEGER :: i_SO4 = 0
INTEGER :: i_NIT = 0
INTEGER :: i_OCPI = 0
INTEGER :: i_OCPO = 0
INTEGER :: i_BCPI = 0
INTEGER :: i_BCPO = 0
INTEGER :: i_SOAS = 0
Comment on lines -51 to -71
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change versus the previous implementation rather than GISS modelE itself.


! This section declares arrays used to write tracer
! diagnostics accumulations in a format suitable for offline
! postprocessing. The size of these arrays cannot be known
Expand Down
Loading