diff --git a/.circleci/config.yml b/.circleci/config.yml index 6de527ca..31a4f50c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,11 @@ version: 2.1 # Anchors in case we need to override the defaults from the orb -#baselibs_version: &baselibs_version v7.27.0 -#bcs_version: &bcs_version v11.6.0 +#baselibs_version: &baselibs_version v8.24.0 +#bcs_version: &bcs_version v12.0.0 orbs: - ci: geos-esm/circleci-tools@4 + ci: geos-esm/circleci-tools@5 workflows: build-test: @@ -21,7 +21,10 @@ workflows: #baselibs_version: *baselibs_version repo: GEOSgcm checkout_fixture: true - mepodevelop: true + # V12 code uses a special branch for now. + fixture_branch: feature/sdrabenh/gcm_v12 + # We comment out this as it will "undo" the fixture_branch + #mepodevelop: true persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra # Run AMIP GCM (1 hour, no ExtData) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 41fd37c7..49f9448e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -21,11 +21,13 @@ jobs: matrix: compiler: [ifort, gfortran-14, gfortran-15] build-type: [Debug] + fail-fast: false uses: GEOS-ESM/CI-workflows/.github/workflows/geosgcm_build_tests.yml@project/geosgcm with: compiler: ${{ matrix.compiler }} cmake-build-type: ${{ matrix.build-type }} fixture-repo: GEOS-ESM/GEOSgcm + fixture-ref: feature/sdrabenh/gcm_v12 spack_build: uses: GEOS-ESM/CI-workflows/.github/workflows/spack_gcc_build.yml@project/geosgcm @@ -34,4 +36,6 @@ jobs: BUILDCACHE_TOKEN: ${{ secrets.BUILDCACHE_TOKEN }} with: fixture-repo: GEOS-ESM/GEOSgcm + fixture-ref: feature/sdrabenh/gcm_v12 + load-fms: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 39c783da..07b9ef15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Removed ### Changed +### Removed ### Fixed ### Deprecated +## [2.0.0] - 2026-05-28 + +### Changed + +- HEMCO Run1 now checks the `RUN_DT` alarm and skips work when the alarm is not ringing +- Moved `DELP` resource read to before the interpolation loop in PChemGridComp relaxation +- `OX` (ozone) relaxation in PCHEM now uses a strongly-constrained (instantaneous) relaxation + below the tropopause (~150 hPa) and a weak TAU-based relaxation above it, via a new + `OX_PCRIT` resource (default 15000 Pa / 150 hPa) + ## [1.16.2] - 2026-01-22 ### Added diff --git a/GEOSpchem_GridComp/GEOS_PChemGridComp.F90 b/GEOSpchem_GridComp/GEOS_PChemGridComp.F90 index 80247da2..bc7bf450 100644 --- a/GEOSpchem_GridComp/GEOS_PChemGridComp.F90 +++ b/GEOSpchem_GridComp/GEOS_PChemGridComp.F90 @@ -1749,6 +1749,10 @@ subroutine UPDATE(NN,NAME,XX) PROD1 = PCHEM_STATE%MNCV(:,:,NN,1)*FAC + PCHEM_STATE%MNCV(:,:,NN,2)*(1.-FAC) + call MAPL_GetResource(MAPL, DELP, LABEL=trim(NAME)//"_DELP:" , DEFAULT=5000. ,RC=STATUS) + VERIFY_(STATUS) + DELP = max(DELP, 1.e-16) ! avoid division by zero + do j=1,jm do l=1,nlevs call INTERP_NO_EXTRAP( PROD(:,L), LATS(:,J), Prod1(:,L), PCHEM_STATE%LATS) @@ -1758,11 +1762,6 @@ subroutine UPDATE(NN,NAME,XX) enddo end do - call MAPL_GetResource(MAPL, DELP, LABEL=trim(NAME)//"_DELP:" , DEFAULT=5000. ,RC=STATUS) - VERIFY_(STATUS) - - DELP = max(DELP, 1.e-16) ! avoid division by zero - if(trim(NAME)=="H2O") then call MAPL_GetResource(MAPL, PCRIT, LABEL=trim(NAME)//"_PCRIT:", DEFAULT=20000. ,RC=STATUS) VERIFY_(STATUS) @@ -1775,10 +1774,20 @@ subroutine UPDATE(NN,NAME,XX) end where WRK = min(WRK, PCRIT) do L=1,LM + ! only contrained above the troposphere LOSS_INT(:,:,L) = (1./TAU) * max( min( (WRK-PL(:,:,L))/DELP, 1.0), 0.0) end do deallocate(WRK) + elseif(trim(NAME)=="OX") then + call MAPL_GetResource(MAPL, PCRIT, LABEL=trim(NAME)//"_PCRIT:", DEFAULT=15000. ,RC=STATUS) + VERIFY_(STATUS) + do L=1,LM + ! strongly constrained (TAU=DT) below the 150hPa + LOSS_INT(:,:,L) = (1./TAU) * ( max( min( (PCRIT-PL(:,:,L))/DELP, 1.0), 0.0)) + & + (1./DT ) * (1.0 - max( min( (PCRIT-PL(:,:,L))/DELP, 1.0), 0.0)) + end do else + ! relaxed by TAU everywhere call MAPL_GetResource(MAPL, PCRIT, LABEL=trim(NAME)//"_PCRIT:", DEFAULT=1.e+16 ,RC=STATUS) VERIFY_(STATUS) LOSS_INT = (1./TAU) * max( min( (PCRIT -PL)/DELP, 1.0), 0.0) diff --git a/HEMCO_GridComp/HEMCO_GridCompMod.F90 b/HEMCO_GridComp/HEMCO_GridCompMod.F90 index 7332e893..05322e51 100644 --- a/HEMCO_GridComp/HEMCO_GridCompMod.F90 +++ b/HEMCO_GridComp/HEMCO_GridCompMod.F90 @@ -592,9 +592,22 @@ SUBROUTINE Run1 ( GC, Import, Export, Clock, RC ) ! LOCAL VARIABLES: ! TYPE(Instance), POINTER :: ThisInst => NULL() + type(MAPL_MetaComp), pointer :: MAPL + type(ESMF_Alarm) :: ALARM + logical :: timeToDoWork __Iam__('Run1') + call MAPL_GetObjectFromGC ( GC, MAPL, _RC) + +! Get RUN_DT alarn from MAPL +! -------------------------- + call MAPL_Get(MAPL, RUNALARM=ALARM, _RC) + timeToDoWork = ESMF_AlarmIsRinging (ALARM, _RC) + if (.not. timeToDoWork) then + _RETURN(ESMF_SUCCESS) + end if + !======================================================================= ! Run1 begins here! !=======================================================================