Skip to content

Commit

Permalink
Merge pull request #583 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync develop into main
  • Loading branch information
sdrabenh authored May 3, 2022
2 parents 6face23 + a423bd5 commit 256b537
Show file tree
Hide file tree
Showing 27 changed files with 148 additions and 183 deletions.
33 changes: 9 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
version: 2.1

orbs:
circleci-tools: geos-esm/circleci-tools@0.11.0
ci: geos-esm/circleci-tools@1

workflows:
build-test:
jobs:
- build-GEOSgcm:
# Build GEOSgcm
- ci/build:
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
context:
- docker-hub-creds

jobs:
build-GEOSgcm:
parameters:
compiler:
type: string
executor: circleci-tools/<< parameters.compiler >>
working_directory: /root/project
steps:
- circleci-tools/checkout_fixture
- circleci-tools/mepoclone
- circleci-tools/mepodevelop
- circleci-tools/checkout_if_exists
- circleci-tools/cmake:
compiler: << parameters.compiler >>
- circleci-tools/buildinstall
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles

repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
persist_workspace: false # Needs to be true to run fv3/gcm experiment, costs extra
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env-mkl:v6.2.8-openmpi_4.0.6-gcc_11.2.0
image: gmao/ubuntu20-geos-env-mkl:v6.2.13-openmpi_4.1.2-gcc_11.2.0
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_GcmGridComp.F90)
esma_add_library(${this}
SRCS GEOS_GcmGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL esmf)

ecbuild_install_project( NAME GEOSgcm_GridComp)

Expand All @@ -25,6 +24,6 @@ else ()

endif()




13 changes: 10 additions & 3 deletions GEOS_GcmGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1062,17 +1062,23 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
call ESMF_TimeIntervalGet( PREDICTOR_DURATION, S=i_PREDICTOR_DURATION, rc=status )
call MAPL_ConfigSetAttribute( CF, i_PREDICTOR_DURATION, Label="PREDICTOR_DURATION:", RC=STATUS)
VERIFY_(STATUS)
IF(MAPL_AM_I_ROOT()) PRINT *,'Setting PREDICTOR_DURATION, to ',i_PREDICTOR_DURATION
IF(MAPL_AM_I_ROOT()) PRINT *,'Setting PREDICTOR_DURATION based on IAU Frequency: ',i_PREDICTOR_DURATION
else
call ESMF_TimeIntervalGet( PREDICTOR_DURATION, S=rep_S, rc=status )
if( rep_S .ne. i_PREDICTOR_DURATION ) then
if( rep_S .gt. i_PREDICTOR_DURATION ) then
IF(MAPL_AM_I_ROOT()) then
PRINT *
PRINT *,'ERROR! User-Defined PREDICTOR_DURATION: ',i_PREDICTOR_DURATION
PRINT *,'is INCONSISTENT with Calculated PREDICTOR_DURATION: ',rep_S
PRINT *,'is SMALLER THAN required Calculated PREDICTOR_DURATION: ',rep_S
PRINT *
endif
VERIFY_(ESMF_FAILURE)
else
if( rep_S .ne. i_PREDICTOR_DURATION ) then
call ESMF_TimeIntervalSet( PREDICTOR_DURATION, S=i_PREDICTOR_DURATION, rc=status )
VERIFY_(STATUS)
IF(MAPL_AM_I_ROOT()) PRINT *,' (Note: PREDICTOR_DURATION based on USER Input) '
endif
endif
endif
gcm_internal_state%predur = i_PREDICTOR_DURATION
Expand Down Expand Up @@ -1797,6 +1803,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
VERIFY_(STATUS)

if( gcm_internal_state%predur .ne. 0 ) then
if( MAPL_AM_I_Root() ) print *
do
call ESMF_ClockAdvance ( clock, rc=status )
VERIFY_(STATUS)
Expand Down
3 changes: 1 addition & 2 deletions GEOSagcm_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_AgcmGridComp.F90)
esma_add_library (${this}
SRCS GEOS_AgcmGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GEOS_Shared Chem_Shared
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL GEOS_Shared Chem_Shared esmf)

else ()

Expand Down
3 changes: 1 addition & 2 deletions GEOSagcm_GridComp/GEOSphysics_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_PhysicsGridComp.F90)
esma_add_library (${this}
SRCS GEOS_PhysicsGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GMAO_mpeu GMAO_stoch
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL GMAO_mpeu GMAO_stoch esmf)

else ()

Expand Down
23 changes: 10 additions & 13 deletions GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1200,19 +1200,16 @@ subroutine SetServices ( GC, RC )
! -----------------

call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/ 'Q ', 'RH2 ', &
'SNO ', 'DQDT ', &
'FCLD ', 'LS_PRCP ', 'CNV_MFC ', &
'CNV_MFD ', 'QL ', 'PFL_CN ', &
'PFL_LSAN', 'PFI_CN ', 'PFI_LSAN', &
'QCTOT ', 'CNV_QC ', &
'QLTOT ', 'QLCN ', 'QICN ', &
'DQLDT ', 'QITOT ', 'REV_CN ', &
'REV_LS ', 'REV_AN ', 'LFR_GCC ', &
'DQIDT ', 'QI ', &
'DQRC ', 'CNV_CVW ', 'QLLS ', &
'QILS ', 'DQRL ', 'CNV_FRC ', &
'RI ', 'RL ' /), &
SHORT_NAME = (/ 'Q ', 'RH2 ', 'DQDT ', &
'FCLD ', 'CNV_MFC ', 'CNV_MFD ', &
'QL ', 'PFL_CN ', 'PFL_LSAN', &
'PFI_CN ', 'PFI_LSAN', 'QCTOT ', &
'CNV_QC ', 'QLTOT ', 'QLCN ', &
'QICN ', 'DQLDT ', 'QITOT ', &
'REV_CN ', 'REV_LS ', 'REV_AN ', &
'LFR_GCC ', 'DQIDT ', 'QI ', &
'DQRC ', 'CNV_CVW ', 'DQRL ', &
'CNV_FRC ', 'RI ', 'RL ' /), &
DST_ID = CHEM, &
SRC_ID = MOIST, &
RC=STATUS )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ endif ()

esma_add_library (${this}
SRCS ${srcs}
DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base
INCLUDES ${INC_ESMF})
DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base esmf)

get_target_property (extra_incs fms_r4 INCLUDE_DIRECTORIES)
target_include_directories(${this} PRIVATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ set (alldirs
esma_add_library (${this}
SRCS GEOS_RadiationGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GEOS_Shared
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL GEOS_Shared esmf)

Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ set (alldirs
GEOSland_GridComp
GEOSsaltwater_GridComp
)

if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_SurfaceGridComp.F90)

esma_add_library (${this}
SRCS GEOS_SurfaceGridComp.F90
SUBCOMPONENTS ${alldirs}
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared MAPL GMAO_mpeu
INCLUDES ${INC_ESMF})
DEPENDENCIES GEOS_SurfaceShared MAPL GMAO_mpeu esmf)

else ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ esma_set_this()

esma_add_library (${this}
SRCS GEOS_LakeGridComp.F90
DEPENDENCIES GEOS_Shared MAPL
INCLUDES ${INC_ESMF})
DEPENDENCIES GEOS_Shared MAPL esmf)

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ set (alldirs
esma_add_library (${this}
SRCS GEOS_LandGridComp.F90
SUBCOMPONENTS ${alldirs}
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared GEOS_LandShared MAPL
INCLUDES ${INC_ESMF})
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared GEOS_LandShared MAPL esmf)

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ add_subdirectory (GEOScatchCNCLM40_GridComp)
add_subdirectory (GEOScatchCNCLM45_GridComp)

esma_add_library (${this}
SRCS GEOS_CatchCNGridComp.F90
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared GEOS_LandShared GEOS_CatchCNShared MAPL
INCLUDES ${INC_ESMF})
SRCS GEOS_CatchCNGridComp.F90
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared GEOS_LandShared GEOS_CatchCNShared MAPL esmf)

# Special case for GEOScatch and GEOScatchCN components - build with / without openmp
if (USE_OPENMP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ esma_add_library (${this}
TYPE SHARED)

if (is_openmp)
target_compile_options(${this} PRIVATE ${OpenMP_Fortran_FLAGS})
target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran)
endif ()

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ esma_add_library (${this}
TYPE SHARED)

if (is_openmp)
target_compile_options(${this} PRIVATE ${OpenMP_Fortran_FLAGS})
target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran)
endif ()

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ esma_add_library (${this}
TYPE SHARED)

if (is_openmp)
target_compile_options(${this} PRIVATE ${OpenMP_Fortran_FLAGS})
target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran)
endif ()

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ esma_add_library (${this}
TYPE SHARED)

if (is_openmp)
target_compile_options(${this} PRIVATE ${OpenMP_Fortran_FLAGS})
target_link_libraries(${this} PRIVATE OpenMP::OpenMP_Fortran)
endif ()

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ set_source_files_properties (catch_constants.f90 PROPERTIES COMPILE_FLAGS ${PP})

esma_add_library (${this}
SRCS ${srcs}
DEPENDENCIES GEOS_SurfaceShared GEOS_Shared MAPL
DEPENDENCIES GEOS_SurfaceShared GEOS_Shared MAPL esmf
TYPE SHARED)
target_include_directories (${this} PUBLIC ${INC_ESMF})
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,10 @@ esma_add_library (${this}

foreach (src ${exe_srcs})
string (REGEX REPLACE ".F90" "" exe ${src})
if (ESMA_USE_GFE_NAMESPACE)
ecbuild_add_executable (
TARGET ${exe}
SOURCES ${src}
LIBS MAPL GFTL_SHARED::gftl-shared GEOS_SurfaceShared GEOSroute_GridComp GEOS_LandShared ${this})
else ()
ecbuild_add_executable (
TARGET ${exe}
SOURCES ${src}
LIBS MAPL gftl-shared GEOS_SurfaceShared GEOSroute_GridComp GEOS_LandShared ${this})
endif ()
ecbuild_add_executable (
TARGET ${exe}
SOURCES ${src}
LIBS MAPL GFTL_SHARED::gftl-shared GEOS_SurfaceShared GEOSroute_GridComp GEOS_LandShared ${this})
endforeach ()

install(PROGRAMS mk_Restarts DESTINATION bin)
5 changes: 2 additions & 3 deletions GEOSagcm_GridComp/GEOSsuperdyn_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_SuperdynGridComp.F90)
esma_add_library (${this}
SRCS GEOS_SuperdynGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GEOS_Shared
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL GEOS_Shared esmf)

else ()

esma_add_subdirectories (${alldirs})

endif ()




3 changes: 1 addition & 2 deletions GEOSdataatm_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ set (srcs

esma_add_library (${this}
SRCS ${srcs}
DEPENDENCIES MAPL CICE4 GEOS_Shared
INCLUDES ${INC_ESMF})
DEPENDENCIES MAPL CICE4 GEOS_Shared esmf)

target_compile_definitions (${this} PRIVATE USE_CICE USE_R8)

Loading

0 comments on commit 256b537

Please sign in to comment.