Skip to content

Commit

Permalink
Merge remote-tracking branch 'ESCOMP/main' into bugfix/aoflux4ufs
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Jun 7, 2024
2 parents 09132fd + 6384ff4 commit 709de40
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 110 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/extbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
CPPFLAGS: "-I/usr/include -I/usr/local/include"

# Versions of all dependencies can be updated here
ESMF_VERSION: v8.6.0
ESMF_VERSION: v8.6.1
PNETCDF_VERSION: checkpoint.1.12.3
NETCDF_FORTRAN_VERSION: v4.6.1
PIO_VERSION: pio2_6_2
CDEPS_VERSION: cdeps1.0.26
CDEPS_VERSION: cdeps1.0.36
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Build the ESMF library, if the cache contains a previous build
# it will be used instead
- id: load-env
Expand All @@ -40,13 +40,13 @@ jobs:
sudo apt-get install pnetcdf-bin libpnetcdf-dev
sudo apt-get install autotools-dev autoconf
- id: cache-esmf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/ESMF
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF
- name: Cache ParallelIO
id: cache-ParallelIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pio
key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio
Expand All @@ -71,31 +71,35 @@ jobs:
parallelio_path: $HOME/pio
- name: Cache CDEPS
id: cache-cdeps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: $HOME/cdeps
key: ${{ runner.os }}-${{ env.CDEPS_VERSION }}.cdeps
path: /homme/runner/work/CMEPS/CMEPS/build-cdeps
key: ${{ runner.os }}-${{ env.CDEPS_VERSION }}.cdeps1

- name: checkout CDEPS
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ESCOMP/CDEPS
path: cdeps-src
ref: ${{ env.CDEPS_VERSION }}
- name: get genf90
run: |
cd cdeps-src
git submodule update --init
- name: Build CDEPS
if: steps.cache-cdeps.outputs.cache-hit != 'true'
uses: ESCOMP/CDEPS/.github/actions/[email protected]
with:
esmfmkfile: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
pio_path: $HOME/pio
src_root: ${GITHUB_WORKSPACE}/cdeps-src
cmake_flags: " -Wno-dev -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
cmake_flags: " -Wno-dev -DDISABLE_FoX=ON -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
-ffree-form -ffree-line-length-none -fallow-argument-mismatch \""

- name: Build CMEPS
run: |
export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
export PIO=$HOME/pio
export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
mkdir build-cmeps
pushd build-cmeps
cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -Werror -ffree-form -ffree-line-length-none -Wno-unused-dummy-argument -I /home/runner/work/CMEPS/CMEPS/build-cdeps/share" ../
Expand Down
84 changes: 32 additions & 52 deletions .github/workflows/srt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
CPPFLAGS: "-I/usr/include -I/usr/local/include "
LDFLAGS: "-L/usr/lib/x86_64-linux-gnu -lnetcdf -lnetcdff -lpnetcdf"
# Versions of all dependencies can be updated here
ESMF_VERSION: v8.6.0
ESMF_VERSION: v8.6.1
PARALLELIO_VERSION: pio2_6_2
CIME_MODEL: cesm
CIME_DRIVER: nuopc
Expand Down Expand Up @@ -64,13 +64,13 @@ jobs:
run: pip install -r requirements.txt
# use the latest cesm main
- name: cesm checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ESCOMP/CESM
path: cesm
# this cmeps commit
- name: cmeps checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: cesm/components/cmeps

Expand All @@ -94,72 +94,53 @@ jobs:
git submodule update --init
cd ../components/cdeps
git checkout main
git submodule update --init
- name: Cache ESMF
id: cache-esmf
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/ESMF
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF1
# - name: cache pnetcdf
# id: cache-pnetcdf
# uses: actions/cache@v3
# with:
# path: ~/pnetcdf
# key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf

# - name: Cache netcdf-fortran
# id: cache-netcdf-fortran
# uses: actions/cache@v3
# with:
# path: ~/netcdf-fortran
# key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}

- name: Cache ParallelIO
id: cache-ParallelIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/pio
path: ${GITHUB_WORKSPACE}/pio
key: ${{ runner.os }}-${{ env.PARALLELIO_VERSION }}.parallelio

- name: Cache inputdata
id: cache-inputdata
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: $HOME/cesm/inputdata
key: inputdata
# - name: Build PNetCDF
# if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
# uses: ESCOMP/CDEPS/.github/actions/buildpnetcdf@e06246b560d3132170bb1a5443fa3d65dfbd2040
# with:
# pnetcdf_version: ${{ env.PNETCDF_VERSION }}
# install_prefix: $HOME/pnetcdf
# - name: Build NetCDF Fortran
# if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
# uses: ESCOMP/CDEPS/.github/actions/buildnetcdff@e06246b560d3132170bb1a5443fa3d65dfbd2040
# with:
# netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }}
# install_prefix: $HOME/netcdf-fortran
# netcdf_c_path: /usr

- name: Build ParallelIO
if: steps.cache-PARALLELIO.outputs.cache-hit != 'true'
uses: NCAR/ParallelIO/.github/actions/parallelio_cmake@05173a6556ea8d80eb34e3881a5014ea8f4b7543
with:
parallelio_version: ${{ env.ParallelIO_VERSION }}
enable_fortran: True
install_prefix: /home/runner/pio
install_prefix: ${GITHUB_WORKSPACE}/pio

- name: Build ESMF
if: steps.cache-esmf.outputs.cache-hit != 'true'
uses: ESCOMP/CDEPS/.github/actions/buildesmf@e06246b560d3132170bb1a5443fa3d65dfbd2040
- name: Install ESMF
uses: esmf-org/install-esmf-action@v1
env:
ESMF_COMPILER: gfortran
ESMF_BOPT: g
ESMF_COMM: openmpi
ESMF_NETCDF: nc-config
ESMF_PNETCDF: pnetcdf-config
ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/ESMF
ESMF_PIO: external
ESMF_PIO_INCLUDE: ${GITHUB_WORKSPACE}/pio/include
ESMF_PIO_LIBPATH: ${GITHUB_WORKSPACE}/pio/lib
with:
esmf_version: ${{ env.ESMF_VERSION }}
esmf_bopt: g
esmf_comm: openmpi
install_prefix: ~/ESMF
netcdf_c_path: /usr
netcdf_fortran_path: /usr
pnetcdf_path: /usr
parallelio_path: ~/pio
version: ${{ env.ESMF_VERSION }}
esmpy: false
cache: true


- name: PREP for scripts regression test
Expand All @@ -169,14 +150,13 @@ jobs:
pushd $GITHUB_WORKSPACE/cesm/cime/CIME/tests
export SRCROOT=$GITHUB_WORKSPACE/cesm/
export CIME_TEST_PLATFORM=ubuntu-latest
export PIO_INCDIR=$HOME/pio/include
export PIO_LIBDIR=$HOME/pio/lib
export PIO_INCDIR=$GITHUB_WORKSPACE/pio/include
export PIO_LIBDIR=$GITHUB_WORKSPACE/pio/lib
export PIO_VERSION_MAJOR=2
export PIO_TYPENAME_VALID_VALUES="netcdf,pnetcdf"
export NETCDF_PATH=/usr
export PNETCDF_PATH=/usr
export LD_LIBRARY_PATH=/usr/lib/libx86_64-linux-gnu/:$LD_LIBRARY_PATH
export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
cat <<EOF >> $GITHUB_WORKSPACE/cesm/ccs_config/machines/cmake_macros/ubuntu-latest.cmake
set(NetCDF_Fortran_INCLUDE_DIR /usr/include)
set(NetCDF_Fortran_LIBRARY /usr/lib/x86_64-gnu-Linux/libnetcdff.so)
Expand All @@ -190,6 +170,6 @@ jobs:
popd
# the following can be used by developers to login to the github server in case of errors
# see https://github.com/marketplace/actions/debugging-with-tmate for further details
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
2 changes: 1 addition & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
elif case.get_value("RUN_TYPE") == "branch":
config["run_type"] = "branch"

config['wav_ice_coupling'] = config['COMP_WAV'] == 'ww3dev' and config['COMP_ICE'] == 'cice'
config['wav_ice_coupling'] = 'ww3' in config['COMP_WAV'] and config['COMP_ICE'] == 'cice'

# ----------------------------------------------------
# Initialize namelist defaults
Expand Down
13 changes: 0 additions & 13 deletions cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -620,19 +620,6 @@
</values>
</entry>

<entry id="ocn2glc_levels">
<type>char</type>
<category>flds</category>
<group>ALLCOMP_attributes</group>
<desc>
if the ocean component sends fields at multiple ocean levels to the
land-ice component, these are the colon deliminted level indices
</desc>
<values>
<value>1:10:19:26:30:33:35</value>
</values>
</entry>

<entry id="tfreeze_option" modify_via_xml="TFREEZE_SALTWATER_OPTION">
<type>char</type>
<category>control</category>
Expand Down
2 changes: 1 addition & 1 deletion mediator/esmFldsExchange_cesm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
!-----------------------------
! to glc: from ocn
!-----------------------------
if (is_local%wrap%ocn2glc_coupling) then
if (ocn2glc_coupling) then
if (phase == 'advertise') then
call addfld_from(compocn, 'So_t_depth')
call addfld_from(compocn, 'So_s_depth')
Expand Down
6 changes: 4 additions & 2 deletions mediator/med.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ subroutine DataInitialize(gcomp, rc)
do n1 = 1,ncomps
if (maintask) then
write(logunit,*)
write(logunit,'(a)') trim(subname)//" "//trim(compname(n1))
write(logunit,'(a,2L2)') trim(subname)//" "//trim(compname(n1)), is_local%wrap%comp_present(n1), ESMF_StateIsCreated(is_local%wrap%NStateImp(n1),rc=rc)
end if
if (is_local%wrap%comp_present(n1) .and. ESMF_StateIsCreated(is_local%wrap%NStateImp(n1),rc=rc)) then
call State_GetScalar(scalar_value=real_nx, &
Expand Down Expand Up @@ -2150,12 +2150,14 @@ subroutine DataInitialize(gcomp, rc)
end if
is_local%wrap%nx(n1) = nint(real_nx)
is_local%wrap%ny(n1) = nint(real_ny)
endif
if (is_local%wrap%comp_present(n1)) then
write(msgString,'(3i8)') is_local%wrap%nx(n1), is_local%wrap%ny(n1), is_local%wrap%ntile(n1)
if (maintask) then
write(logunit,'(a)') 'global nx,ny,ntile sizes for '//trim(compname(n1))//":"//trim(msgString)
end if
call ESMF_LogWrite(trim(subname)//":"//trim(compname(n1))//":"//trim(msgString), ESMF_LOGMSG_INFO)
end if
endif
end do
if (maintask) write(logunit,*)

Expand Down
2 changes: 1 addition & 1 deletion mediator/med_internalstate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ subroutine med_internalstate_coupling(gcomp, rc)
isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent .and. isSet) then
! are multiple ocean depths for temperature and salinity sent from the ocn to glc?
! multiple ocean depths for temperature and salinity sent from the ocn to glc
read(cvalue,*) is_local%wrap%ocn2glc_coupling
else
is_local%wrap%ocn2glc_coupling = .false.
Expand Down
1 change: 1 addition & 0 deletions mediator/med_phases_post_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ subroutine med_phases_post_ocn(gcomp, rc)

! Accumulate ocn input for glc if there is ocn->glc coupling
if (is_local%wrap%ocn2glc_coupling) then
call ESMF_LogWrite(subname//' DEBUG: calling med_phases_prep_glc_accum_ocn', ESMF_LOGMSG_INFO)
call med_phases_prep_glc_accum_ocn(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
Expand Down
Loading

0 comments on commit 709de40

Please sign in to comment.