Skip to content

Commit

Permalink
Bring PR #1992 up to date with the latest dev/no-diff-to-benchmark
Browse files Browse the repository at this point in the history
This merge brings the dev/no-diff-to-benchmark branch into the
branch for PR #1992 (Fix issues in the carbon simulation, branch
feature/carbon-sim-fixes).  The latest update in the dev/no-diff-to
benchmark was the merge of PR #2062 (Updates from GMAO for GEOS,
by @lizziel.)

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Jan 9, 2024
2 parents 5770377 + 2ba0a60 commit b1bc9ec
Show file tree
Hide file tree
Showing 96 changed files with 7,036 additions and 2,610 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new-feature-or-discussion.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Institution:

### Confirm you have reviewed the following documentation

- [ ] [Contributing guidelines](https://geos-chem.readthedocs.io/en/stable/reference/CONTRIBUTING.html)
- [ ] [Contributing guidelines](https://geos-chem.readthedocs.io/en/stable/help-and-reference/CONTRIBUTING.html)

### New GEOS-Chem feature or discussion

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Institution:

### Confirm you have reviewed the following documentation

- [ ] [Support guidelines](https://geos-chem.readthedocs.io/en/stable/reference/SUPPORT.html)
- [ ] [Support guidelines](https://geos-chem.readthedocs.io/en/stable/help-and-reference/SUPPORT.html)
- [ ] [User manuals](https://geos-chem.readthedocs.io/en/stable/geos-chem-shared-docs/supplemental-guides/related-docs.html)
- [ ] [Debugging GEOS-Chem and HEMCO errors](https://geos-chem.readthedocs.io/en/stable/geos-chem-shared-docs/supplemental-guides/debug-guide.html)
- [ ] [Current and past Github issues](https://github.com/geoschem/geos-chem/issues)
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Institution:

### Confirm you have reviewed the following documentation

- [ ] [Contributing guidelines](https://geos-chem.readthedocs.io/en/stable/reference/CONTRIBUTING.html)
- [ ] [Contributing guidelines](https://geos-chem.readthedocs.io/en/stable/help-and-reference/CONTRIBUTING.html)

### Describe the update

Expand Down
50 changes: 48 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,48 @@ This file documents all notable changes to the GEOS-Chem repository starting in

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]
## [Unreleased] - TBD
### Changed
- Now read the Hg restart file from `ExtData/GEOSCHEM_RESTARTS/v2023-12`
- Increse requested time limits in GCHP integration tests (compile 2h30m, run 5h)

### Fixed
- Added missing units in comments of `KPP/fullchem/commonIncludeVars.H`
- Use run directory (not absolute path) to determine the executable file name in integration & parallel tests.
- Fix issues that prevented single-species carbon simulations from running

### Removed
- Reduced timers saved out to essential list used for benchmarking model performance

### Added
- Added two new diagnostics to track number of negative concentrations after first and last KPP integration
- Added capability of running GEOS-Chem transport tracer simulation within the GEOS model

## [14.2.3] - 2023-12-01
### Added
- GEOS-Chem Classic rundir script `run/GCClassic/setupForRestarts.sh`

### Changed
- Added the `-n` aka `--no-bootstrap` option to integration tests to disable bootstrapping missing species in restart files
- Use integer parameters for species units instead of strings (for computational efficiency)
- Update error message for missing surface CH4 emissions with instructions on how to resolve the problem
- Change GCHP grid resolution threshold for lowering timesteps from C180 inclusive to C180 exclusive
- Read GEOS-Chem Classic restart file paths from the relevant `download_data.yml` file

### Fixed
- Prevent `POAEMISS` from being assigned a value if not allocated (in `carbon_mod.F90`)
- Changed incorrect comment about static H2O option in `GeosCore/input_mod.F90`
- Fixed typos (`GCClassic` -> `GCHP`) written to GCHP integration test log files
- Add fix to properly read GHGI v2 express extension emissions in CH4 and carbon simulations
- Move OH perturbation scale factor to outside EMISSIONS logical bracket in HEMCO_Config.rc files for CH4 and carbon simulations

### Removed
- Remove definition of METDIR from primary HEMCO_Config.rc files to ensure use of the definition in the HEMCO_Config.rc.*_metfields files

## [14.2.2] - 2023-10-23
### Changed
- Updated sample restart files for fullchem and TransportTracers simulations to files saved out from the 14.2.0 1-year benchmarks

## [14.2.1] - 2023-10-10
### Added
- Script `test/difference/diffTest.sh`, checks 2 different integration tests for differences
Expand Down Expand Up @@ -61,7 +99,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Removed
- Remove references to the obsolete tagged Hg simulation

## [Unreleased 14.2.0] - TBD
## [14.2.0] - 2023-10-05
### Added
- Added a printout of GEOS-Chem species and indices
- Added `NcdfUtil/README.md` file directing users to look for netCDF utility scripts at https://github.com/geoschem/netcdf-scripts
Expand Down Expand Up @@ -148,6 +186,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- Fixed entries for CH4 emissions in `HEMCO_Config.rc.carbon`

## [14.1.2] - 2023-10-20
### Added
- CESM-only update: Added option for correctConvUTLS for correcting buildup of soluble tracers in the UT/LS to match CAM-chem behavior

### Changed
- CESM-only update: extend existing KppError, KppStop to CESM for model stability
- CESM-only update: Removed mpi_bcast in ucx_mod NOXCOEFF_INIT to be handled at coupler level to support spectral-element dynamical core

## [14.1.1] - 2023-03-03
### Added
- New integration test functions in `test/GCClassic/integration` and `test/GCHP/integration`
Expand Down
9 changes: 5 additions & 4 deletions GeosCore/aero_drydep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
USE CMN_DIAG_MOD
USE DIAG_MOD, ONLY : AD44
#endif
USE UnitConv_Mod

IMPLICIT NONE
!
Expand Down Expand Up @@ -119,8 +120,8 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
nDryDep = State_Chm%nDryDep

! Check that species units are in [kg] (ewl, 8/13/15)
IF ( TRIM( State_Chm%Spc_Units ) /= 'kg' ) THEN
MSG = 'Incorrect species units: ' // TRIM(State_Chm%Spc_Units)
IF ( State_Chm%Spc_Units /= KG_SPECIES ) THEN
MSG = 'Incorrect species units: ' // TRIM(UNIT_STR(State_Chm%Spc_Units))
LOC = 'Routine AERO_DRYDEP in aero_drydep.F'
CALL GC_Error( MSG, RC, LOC )
ENDIF
Expand Down Expand Up @@ -530,9 +531,9 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
DepFreq => NULL()

! Check that species units are still in [kg] (ewl, 8/13/15)
IF ( TRIM( State_Chm%Spc_Units ) /= 'kg' ) THEN
IF ( State_Chm%Spc_Units /= KG_SPECIES ) THEN
MSG = 'Incorrect species units at end of routine: ' &
// TRIM(State_Chm%Spc_Units)
// TRIM(UNIT_STR(State_Chm%Spc_Units))
LOC = 'Routine AERO_DRYDEP in aero_drydep.F'
CALL GC_Error( MSG, RC, LOC )
ENDIF
Expand Down
40 changes: 27 additions & 13 deletions GeosCore/aerosol_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
USE State_Diag_Mod, ONLY : DgnState
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
USE UnitConv_Mod, ONLY : Convert_Spc_Units
USE UnitConv_Mod
USE TIME_MOD, ONLY : GET_MONTH
#ifdef TOMAS
USE TOMAS_MOD, ONLY : IBINS
Expand Down Expand Up @@ -251,7 +251,8 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
REAL(fp), POINTER :: KG_STRAT_AER(:,:,:,:)

! Other variables
CHARACTER(LEN=63) :: OrigUnit
INTEGER :: OrigUnit


! For spatially and seasonally varying OM/OC
CHARACTER(LEN=255) :: FIELDNAME
Expand Down Expand Up @@ -303,8 +304,14 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
REAA => State_Chm%Phot%REAA

! Convert species to [kg] for this routine
CALL Convert_Spc_Units( Input_Opt, State_Chm, State_Grid, State_Met, &
'kg', RC, OrigUnit=OrigUnit )
CALL Convert_Spc_Units( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Grid = State_Grid, &
State_Met = State_Met, &
outUnit = KG_SPECIES, &
origUnit = origUnit, &
RC = RC )

! Trap potential errors
IF ( RC /= GC_SUCCESS ) THEN
Expand Down Expand Up @@ -1011,8 +1018,14 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
!$OMP END PARALLEL DO

! Convert species back to original unit
CALL Convert_Spc_Units( Input_Opt, State_Chm, State_Grid, State_Met, &
OrigUnit, RC )
CALL Convert_Spc_Units( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Grid = State_Grid, &
State_Met = State_Met, &
outUnit = origUnit, &
RC = RC )

IF ( RC /= GC_SUCCESS ) THEN
CALL GC_Error('Unit conversion error', RC, &
'End of AEROSOL_CONC in aerosol_mod.F90')
Expand Down Expand Up @@ -2643,7 +2656,7 @@ SUBROUTINE Set_AerMass_Diagnostic( Input_Opt, State_Chm, State_Diag, &
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
USE PhysConstants, ONLY : MwCarb
USE UnitConv_Mod, ONLY : Convert_Spc_Units
USE UnitConv_Mod
!
! !INPUT PARAMETERS:
!
Expand Down Expand Up @@ -2679,7 +2692,7 @@ SUBROUTINE Set_AerMass_Diagnostic( Input_Opt, State_Chm, State_Diag, &
INTEGER :: I, J, L

! Strings
CHARACTER(LEN=63) :: OrigUnit
INTEGER :: origUnit
CHARACTER(LEN=255) :: ThisLoc
CHARACTER(LEN=512) :: ErrMsg

Expand Down Expand Up @@ -2711,13 +2724,14 @@ SUBROUTINE Set_AerMass_Diagnostic( Input_Opt, State_Chm, State_Diag, &

! Initialize
RC = GC_SUCCESS
ErrMsg = ''
ThisLoc = ' -> at Set_AerMass_Diagnostic (in module GeosCore/aerosol_mod.F90)'
errMsg = ''
thisLoc = &
' -> at Set_AerMass_Diagnostic (in module GeosCore/aerosol_mod.F90)'

! Check that species units are kg/kg dry air
IF ( TRIM( State_Chm%Spc_Units ) /= 'kg/kg dry' ) THEN
CALL GC_Error( 'Incorrect species units: ' // &
State_Chm%Spc_Units, RC, ThisLoc )
IF ( State_Chm%Spc_Units /= KG_SPECIES_PER_KG_DRY_AIR ) THEN
errMsg = 'Incorrect species units: ' // UNIT_STR( State_Chm%Spc_Units )
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF

Expand Down
26 changes: 20 additions & 6 deletions GeosCore/airs_ch4_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ SUBROUTINE CALC_AIRS_CH4_FORCE( Input_Opt, State_Chm, State_Grid, &
USE State_Chm_Mod, ONLY : ChmState, Ind_
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
USE UnitConv_Mod, ONLY : Convert_Spc_Units
USE UnitConv_Mod
!
! !INPUT PARAMETERS:
!
Expand Down Expand Up @@ -429,7 +429,7 @@ SUBROUTINE CALC_AIRS_CH4_FORCE( Input_Opt, State_Chm, State_Grid, &
INTEGER :: IOS
INTEGER, SAVE :: TotalObs = 0
CHARACTER(LEN=255) :: FILENAME
CHARACTER(LEN=63) :: OrigUnit
INTEGER :: origUnit
CHARACTER(LEN=255) :: ThisLoc
CHARACTER(LEN=512) :: ErrMsg
INTEGER :: RC
Expand Down Expand Up @@ -517,8 +517,15 @@ SUBROUTINE CALC_AIRS_CH4_FORCE( Input_Opt, State_Chm, State_Grid, &
print*, ' found # AIRS observations: ', NOBS

! Convert species units to [v/v] (mps, 6/12/2020)
CALL Convert_Spc_Units( Input_Opt, State_Chm, State_Grid, State_Met, &
'v/v dry', RC, OrigUnit=OrigUnit )
CALL Convert_Spc_Units( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Grid = State_Grid, &
State_Met = State_Met, &
outUnit = MOLES_SPECIES_PER_MOLES_DRY_AIR, &
origUnit = origUnit, &
RC = RC )

IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Unit conversion error (kg/kg dry -> v/v dry)'
CALL GC_Error( ErrMsg, RC, ThisLoc )
Expand Down Expand Up @@ -687,8 +694,15 @@ SUBROUTINE CALC_AIRS_CH4_FORCE( Input_Opt, State_Chm, State_Grid, &
!!$OMP END PARALLEL DO

! Convert species units back to original unit (mps, 6/12/2020)
CALL Convert_Spc_Units( Input_Opt, State_Chm, State_Grid, State_Met, &
OrigUnit, RC )
CALL Convert_Spc_Units( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Grid = State_Grid, &
State_Met = State_Met, &
outUnit = origUnit, &
RC = RC )

! Trap errors
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Unit conversion error'
CALL GC_Error( ErrMsg, RC, ThisLoc )
Expand Down
8 changes: 5 additions & 3 deletions GeosCore/calc_met_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ SUBROUTINE AIRQNT( Input_Opt, State_Chm, State_Grid, State_Met, &
USE Time_Mod, ONLY : Get_LocalTime
USE Time_Mod, ONLY : Get_LocalTime_In_Sec
USE Time_Mod, ONLY : Get_Ts_Dyn
USE UnitConv_Mod
!
! !INPUT PARAMETERS:
!
Expand Down Expand Up @@ -673,8 +674,8 @@ SUBROUTINE AIRQNT( Input_Opt, State_Chm, State_Grid, State_Met, &

! The concentration update formula works only for dry mixing ratios
! (kg/kg or v/v) so check if units are correct
IF ( State_Chm%Spc_units == 'kg/kg dry' .or. &
State_Chm%Spc_units == 'v/v dry' ) THEN
IF ( State_Chm%Spc_Units == KG_SPECIES_PER_KG_DRY_AIR .or. &
State_Chm%Spc_Units == MOLES_SPECIES_PER_MOLES_DRY_AIR ) THEN

!$OMP PARALLEL DO &
!$OMP DEFAULT( SHARED ) &
Expand All @@ -694,7 +695,8 @@ SUBROUTINE AIRQNT( Input_Opt, State_Chm, State_Grid, State_Met, &
!$OMP END PARALLEL DO

ELSE
ErrMsg = 'Incorrect species units: ' // TRIM( State_Chm%Spc_Units )
ErrMsg = 'Incorrect species units: ' // &
TRIM( UNIT_STR( State_Chm%Spc_Units ) )
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF
Expand Down
Loading

0 comments on commit b1bc9ec

Please sign in to comment.