From 6c321f1cec77d4b8238b2d425ddb748a577c9186 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 07:19:54 -0700 Subject: [PATCH 1/9] update github tests --- .github/workflows/extbuild.yml | 16 ++++++++-------- .github/workflows/srt.yml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml index 6e26b40a..0614d5ac 100644 --- a/.github/workflows/extbuild.yml +++ b/.github/workflows/extbuild.yml @@ -20,11 +20,11 @@ jobs: CPPFLAGS: "-I/usr/include -I/usr/local/include" # Versions of all dependencies can be updated here - ESMF_VERSION: v8.4.2 + ESMF_VERSION: v8.6.0 PNETCDF_VERSION: checkpoint.1.12.3 - NETCDF_FORTRAN_VERSION: v4.6.0 - PIO_VERSION: pio2_6_0 - CDEPS_VERSION: cdeps1.0.15 + NETCDF_FORTRAN_VERSION: v4.6.1 + PIO_VERSION: pio2_6_2 + CDEPS_VERSION: cdeps1.0.26 steps: - uses: actions/checkout@v3 # Build the ESMF library, if the cache contains a previous build @@ -84,7 +84,7 @@ jobs: ref: ${{ env.CDEPS_VERSION }} - name: Build CDEPS if: steps.cache-cdeps.outputs.cache-hit != 'true' - uses: ESCOMP/CDEPS/.github/actions/buildcdeps@cdeps1.0.15 + uses: ESCOMP/CDEPS/.github/actions/buildcdeps@cdeps1.0.26 with: esmfmkfile: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk pio_path: $HOME/pio @@ -102,6 +102,6 @@ jobs: make VERBOSE=1 popd - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3 diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 34252cb6..65f3a24e 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -26,8 +26,8 @@ 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.5.0 - PARALLELIO_VERSION: pio2_6_0 + ESMF_VERSION: v8.6.0 + PARALLELIO_VERSION: pio2_6_2 CIME_MODEL: cesm CIME_DRIVER: nuopc GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -176,6 +176,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 From 09568f1f7065619242a6f9afa8e6def33b7dbc69 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 08:04:43 -0700 Subject: [PATCH 2/9] fix testing issues --- .github/workflows/srt.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 65f3a24e..e4bd7162 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -80,6 +80,8 @@ jobs: run: | pushd cesm ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 parallelio + cd ccs_config + git checkout main - name: Cache ESMF id: cache-esmf From e96e1995b812dc0cc2333b59a82abff0ce9c22d3 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 08:30:51 -0700 Subject: [PATCH 3/9] fixing tests --- .github/workflows/srt.yml | 3 ++- mediator/med_phases_aofluxes_mod.F90 | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index e4bd7162..62b2c3d8 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -82,7 +82,8 @@ jobs: ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 parallelio cd ccs_config git checkout main - + cd ../cime + git checkout master - name: Cache ESMF id: cache-esmf uses: actions/cache@v3 diff --git a/mediator/med_phases_aofluxes_mod.F90 b/mediator/med_phases_aofluxes_mod.F90 index 0713019f..24eafd11 100644 --- a/mediator/med_phases_aofluxes_mod.F90 +++ b/mediator/med_phases_aofluxes_mod.F90 @@ -1095,7 +1095,6 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc) call flux_atmocn (logunit=logunit, & nMax=aoflux_in%lsize, mask=aoflux_in%mask, & zbot=aoflux_in%zbot, ubot=aoflux_in%ubot, vbot=aoflux_in%vbot, thbot=aoflux_in%thbot, qbot=aoflux_in%shum, & - rainc=aoflux_in%rainc, & rbot=aoflux_in%dens, tbot=aoflux_in%tbot, us=aoflux_in%uocn, vs=aoflux_in%vocn, ts=aoflux_in%tocn, & ocn_surface_flux_scheme=ocn_surface_flux_scheme, & sen=aoflux_out%sen, lat=aoflux_out%lat, lwup=aoflux_out%lwup, evap=aoflux_out%evap, & From 18c510ba648aa5e9f98074d44c9e3b91e36bfe2f Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 08:43:26 -0700 Subject: [PATCH 4/9] add check for cam_dev if add_gusts is true --- cime_config/buildnml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cime_config/buildnml b/cime_config/buildnml index 32be8ead..504ab5a4 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -144,6 +144,10 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): if config["COMP_OCN"] == "docn" and "aqua" in case.get_value("DOCN_MODE"): nmlgen.set_value("aqua_planet", value=".true.") + # make sure that variable add_gusts is only set to true if compset includes cam_dev + if nmlgen.get_value("add_gusts"): + expect("CAM%DEV" in case.get_value("COMPSET"),"ERROR: add_gusts can only be set if CAM%DEV in compset {}".format(case.get_value("COMPSET"))) + # -------------------------------- # Overwrite: set component coupling frequencies # -------------------------------- @@ -658,6 +662,7 @@ def buildnml(case, caseroot, component): create_namelist_infile(case, user_nl_file, namelist_infile, infile_text) infile = [namelist_infile] + # create the files nuopc.runconfig, nuopc.runseq, drv_in and drv_flds_in _create_drv_namelists(case, infile, confdir, nmlgen, files) From f04687b0c7e23c8fa57192a3cf1082ab1ffcfdc1 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 09:24:58 -0700 Subject: [PATCH 5/9] add check for cam_dev --- cime_config/buildnml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index 504ab5a4..3e071853 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -15,6 +15,7 @@ from CIME.case import Case from CIME.nmlgen import NamelistGenerator from CIME.utils import expect from CIME.utils import get_model, get_time_in_seconds, get_timestamp +from CIME.namelist import literal_to_python_value from CIME.buildnml import create_namelist_infile, parse_input from CIME.XML.files import Files @@ -145,7 +146,8 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): nmlgen.set_value("aqua_planet", value=".true.") # make sure that variable add_gusts is only set to true if compset includes cam_dev - if nmlgen.get_value("add_gusts"): + add_gusts = literal_to_python_value(nmlgen.get_value("add_gusts"), type_="logical") + if add_gusts: expect("CAM%DEV" in case.get_value("COMPSET"),"ERROR: add_gusts can only be set if CAM%DEV in compset {}".format(case.get_value("COMPSET"))) # -------------------------------- From 962484bca4cc9c8d041f6dbadbc4dbb215a2619f Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 11:21:32 -0700 Subject: [PATCH 6/9] another reference to gust outside of cesm code --- mediator/med_phases_aofluxes_mod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/mediator/med_phases_aofluxes_mod.F90 b/mediator/med_phases_aofluxes_mod.F90 index 24eafd11..97ad8fe1 100644 --- a/mediator/med_phases_aofluxes_mod.F90 +++ b/mediator/med_phases_aofluxes_mod.F90 @@ -1100,7 +1100,6 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc) sen=aoflux_out%sen, lat=aoflux_out%lat, lwup=aoflux_out%lwup, evap=aoflux_out%evap, & taux=aoflux_out%taux, tauy=aoflux_out%tauy, tref=aoflux_out%tref, qref=aoflux_out%qref, & duu10n=aoflux_out%duu10n, & - ugust_out = aoflux_out%ugust_out, & missval=0.0_r8) #ifdef UFS_AOFLUX end if From 6d0e37e0092ef250c6b112872f208ea738140d9d Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 11:22:12 -0700 Subject: [PATCH 7/9] debug tests --- .github/workflows/srt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 62b2c3d8..197f6e23 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -179,6 +179,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 From 3051280234fb80a0a81b4414f3ef07a7f7694e16 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 12:12:51 -0700 Subject: [PATCH 8/9] add submodule command --- .github/workflows/srt.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 197f6e23..2d73d266 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -84,6 +84,7 @@ jobs: git checkout main cd ../cime git checkout master + git submodule update --init - name: Cache ESMF id: cache-esmf uses: actions/cache@v3 From aaa78b8a813f045dfc2045ebec46a56bf8fa12ab Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 21 Dec 2023 12:38:48 -0700 Subject: [PATCH 9/9] add submodule command complication --- .github/workflows/srt.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 2d73d266..df5eb3c0 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -84,6 +84,12 @@ jobs: git checkout main cd ../cime git checkout master + if [[ ! -e "${PWD}/.gitmodules.bak" ]] + then + echo "Convering git@github.com to https://github.com urls in ${PWD}/.gitmodules" + + sed -i".bak" "s/git@github.com:/https:\/\/github.com\//g" "${PWD}/.gitmodules" + fi git submodule update --init - name: Cache ESMF id: cache-esmf