Skip to content

Commit

Permalink
Merge pull request #41 from fetch4/csd3-fixes
Browse files Browse the repository at this point in the history
Various fixes required on CSD3
  • Loading branch information
ltmurray authored Sep 16, 2024
2 parents b12e037 + 4d3605d commit 863cfdc
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ jobs:
export GC_F_INCLUDE=${NETCDF_F_HOME}/include
export GC_F_LIB=${NETCDF_F_HOME}/lib
# Environment variable for OpenMPI build
export MPI_ROOT=/opt/software/linux-ubuntu22.04-skylake/gcc-11.4.0/openmpi-4.1.6-s3fu5gvaasgjy4jecnb6rvemx7oofexx
MPIF90=$(find /opt/software -name mpif90 | head -n 1)
export MPI_ROOT=${MPIF90%/bin/mpif90}
# Copy over rundeck and modelErc
cp .github/rundecks/${RUNID}.R decks
cp .github/modelErc ~/.modelErc
Expand Down
2 changes: 1 addition & 1 deletion config/compiler.intel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ifeq ($(GC),YES)
LFLAGS += -nostartfiles -nofor-main
endif
CPPFLAGS += -DCOMPILER_Intel8 -DCONVERT_BIGENDIAN
F90_VERSION = $(shell $(F90) -v 2>&1)
F90_VERSION = $(shell $(F90) --version 2>&1)
ifeq ($(MP),YES)
FFLAGS += -qopenmp
F90FLAGS += -qopenmp
Expand Down
8 changes: 7 additions & 1 deletion config/mpi.openmpi.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ CPPFLAGS += -DMPITYPE_LOOKUP_HACK
VER := $(subst ., ,$(word 4,$(shell $(MPIRUN) --version 2>&1)))
VER_MAJOR := $(word 1,$(VER))
VER_MINOR := $(word 2,$(VER))
ifneq (,$(filter 7 8 9 10,$(VER_MINOR))$(filter 2 3 4,$(VER_MAJOR)))

# Check for later versions of the Intel compiler which have a different pattern
# for --version
ifeq ($(VER_MAJOR),for)
LIBS += -lmpifort -lmpi
# Check for some other versions
else ifneq (,$(filter 7 8 9 10,$(VER_MINOR))$(filter 2 3 4,$(VER_MAJOR)))
LIBS += -lmpi_mpifh -lmpi
else
LIBS += -lmpi_f77 -lmpi
Expand Down
3 changes: 2 additions & 1 deletion model/ATMDYN.f
Original file line number Diff line number Diff line change
Expand Up @@ -3180,7 +3180,8 @@ module UNRDRAG_COM
!@var N_C: number of C samples in source spectrum
integer, parameter :: N_C = 100
!@var dc: spectral resolution (m/s)
real(r8), parameter :: dc(N_Kh) = (C_sup - C_inf)/(N_C - 1)
real(r8), parameter :: Cdiff = C_sup(1) - C_inf(1)
real(r8), parameter :: dc(N_Kh) = (/Cdiff/(N_C - 1)/)
!@var C: horizontal phase speed grid
real(r8) :: C(N_C, N_Kh)
!@var IZ0: vertical grid index of GW source (function of latitude)
Expand Down
8 changes: 6 additions & 2 deletions model/CHEM_DRV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ SUBROUTINE DO_CHEM
! Surface roughness height [m]
State_Met%Z0 (II,JJ) = z0m_save(i,j)

#ifdef MODEL_GEOS
! Convective fraction [1] (only used by GEOS)
State_Met%CNV_FRC (II,JJ) = 0.0
State_Met%CNV_FRC (II,JJ) = 0.0
#endif

ENDDO
ENDDO
Expand Down Expand Up @@ -498,8 +500,10 @@ SUBROUTINE DO_CHEM
! E/W component of wind [m s-1]
State_Met%U (II,JJ,K) = ualij(k,i,j)

#ifdef MODEL_GEOS
! Updraft vertical velocity [hPa/s] (only used by GEOS)
State_Met%UPDVVEL (II,JJ,K) = 0d0
State_Met%UPDVVEL (II,JJ,K) = 0d0
#endif

! N/S component of wind [m s-1]
State_Met%V (II,JJ,K) = valij(k,i,j)
Expand Down
11 changes: 4 additions & 7 deletions model/RAD2_COM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -866,20 +866,17 @@ MODULE DIAG_COM_RAD
INTEGER :: j_vtau = 1, j_ghg = 1
#endif

#ifdef ACCMIP_LIKE_DIAGS
!@var IJ_fcghg GHG forcing diagnostics (2=LW,SW, 4=CH4,N2O,CFC11,CFC12)
INTEGER, DIMENSION(2,4) :: ij_fcghg
#endif

#ifdef TRACERS_GC
#if ( defined TRACERS_GC )
!@var GEOS-Chem radiative forcing diagnostics
! First index is:
! 1=SW, 2=LW
! Second index is:
! 1 = CH4; 2 = N2O; 3 = CFC11; 4 = CFC12
! 5 = O3; 6 = SO4; 7 = NIT; 8 = BCO; 9 = BCI
! 10 = OCO; 11 = OCI; 12 = SOA
INTEGER, DIMENSION(2,5) :: ij_fcghg
#elif ( defined ACCMIP_LIKE_DIAGS )
!@var IJ_fcghg GHG forcing diagnostics (2=LW,SW, 4=CH4,N2O,CFC11,CFC12)
INTEGER, DIMENSION(2,4) :: ij_fcghg
#endif

END MODULE DIAG_COM_RAD
5 changes: 4 additions & 1 deletion model/RAD_COM.f
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,10 @@ MODULE DIAG_COM_RAD
& ,ij_sw_as_noa=1
& ,ij_lw_as_noa=1

#if ( defined ACCMIP_LIKE_DIAGS ) || ( defined TRACERS_GC )
#if ( defined TRACERS_GC )
!@var IJ_fcghg GHG forcing diagnostics (2=LW,SW, 4=CH4,N2O,CFC11,CFC12, 5=O3)
integer, dimension(2,5) :: ij_fcghg
#elif ( defined ACCMIP_LIKE_DIAGS )
!@var IJ_fcghg GHG forcing diagnostics (2=LW,SW, 4=CH4,N2O,CFC11,CFC12)
integer, dimension(2,4) :: ij_fcghg
#endif
Expand Down
2 changes: 1 addition & 1 deletion model/geos-chem/src/GEOS-Chem

0 comments on commit 863cfdc

Please sign in to comment.