Skip to content

Commit

Permalink
Merge 14.3.1 release into dev/14.4.0 (PR #2232)
Browse files Browse the repository at this point in the history
Resolved conflicts in:
	CHANGELOG.md
	GeosCore/global_ch4_mod.F90
	run/CESM/geoschem_config.yml

Signed-off-by: Melissa Sulprizio <[email protected]>
  • Loading branch information
msulprizio committed Apr 3, 2024
2 parents 4279f83 + 20e2402 commit 4ebe899
Show file tree
Hide file tree
Showing 134 changed files with 8,088 additions and 10,369 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,55 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Legacy binary punch diagnostic code contained within `#ifdef BPCH_DIAG` blocks
- `IU_BPCH` logical file unit (in `GeosUtil/file_mod.F90`)

## [14.3.1] - 2024-04-02
### Added
- Added operational run scripts for the Imperial College London (ICL) cluster
- Added new vertical region option to budget diagnostic for fixed bottom and top levels
- Added GEOS-IT processed lat-lon fields as a valid option when creating GCHP run directories
- Functions `charArr2str` and `str2CharArr` in `Headers/charpak_mod.F90`
- Field `State_Diag%Obspack_CharArray` as a 2-D character array
- Added util folder in run/CESM to include .cdl file used to generate CESM NetCDF input file for deposition
- Add GCClassic operational example environment files for Harvard Cannon
- Added new GCHP history collections for advection diagnostics
- Added slash in front of names of LUT files read into `photolysis_mod.F90` to avoid needing it in path

### Changed
- Updated Harvard Cannon operational run scripts to use `huce_cascade` instead of `huce_intel`; also added `sapphire`
- Changed exponent 'e' to 'd' for one entry in KPP to prevent precision error in external models
- Changed GCHP sample run scripts to not print script execution commands to log
- Changed offline emissions grid resolution templates in config files to be more descriptive
- Read `obspack_id` from netCDF files into a character array, then convert to string
- Add `#SBATCH -c 1` to GCHP integration test scripts and sample run scripts for Harvard Cannon
- In GCC/GCHP integration tests, passing `-s none` will run compile-only tests. Query user to proceed or to exit.
- GCC/GCHP integration tests will exit immediately if `scheduler` is omitted.
- Now use `raw` instead of `native` in GCHP run directory scripts & templates
- Rename env var `RUNDIR_METLIGHTNING_DIR_NATIVE` to `RUNDIR_METLIGHTNING_DIR`
- Rename env var `RUNDIR_METLIGHTNING_NATIVE_RES` to `RUNDIR_METLIGHTNING_RES`
- Updated config files used in CESM from GEOS-Chem 14.1 to 14.3
- Don't create run directories for integration/parallel tests if invoked with `-t compile`
- Refactor integration and parallel test scripts to reduce the number of input arguments
- Copy utility scripts that allow you to resubmit failed to integration and parallel test root directories
- Update GCHP operational example environment files for Harvard Cannon
- Do not run GCClassic integration test compile jobs in the background
- Updated integration tests to pass quick option to compile scripts
- Removed emissions handling from `global_ch4_mod.F90` and `carbon_gases_mod.F90` and instead apply scale factors to emissions directly in `HEMCO_Config.rc`
- Loop over advected species CH4 chemistry routines to allow for multiple CH4 tracers within analytical inversion framework
- Updated CH4 global anthropogenic emission inventory from EDGARv7 to EDGARv8

### Fixed
- Fixed unit conversions in GEOS-only code
- Fixed GEOS-IT native lat-lon filenames used for clusters other than discover
- Fixed offline emission paths set when using GEOS-IT meteorology
- Fixed format issue in input_mod RRTMG print statement caught by some compilers
- Fixed GEOS-IT SLP and TROPP scaling in pre-processed files used in GCHP
- Fixed reading of NEI emissions through HEMCO
- Fixed incorrect units metadata for `State_Met%PHIS`
- Fixed bug in transport tracer ST80 mask criteria which prevented mask from ever being zero

### Removed
- Removed MPI broadcasts in CESM-only photolysis code; will read on all cores
- Removed State_Chm%CH4_EMIS

## [14.3.0] - 2024-02-07
### Added
- Added capability for TOMAS simulations in GCHP
Expand Down
135 changes: 0 additions & 135 deletions GeosCore/carbon_gases_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ MODULE Carbon_Gases_Mod
PUBLIC :: Init_Carbon_Gases
PUBLIC :: Cleanup_Carbon_Gases
!
! !PUBLIC DATA MEMBERS:
!
REAL(fp), ALLOCATABLE, PUBLIC :: CH4_EMIS_J(:,:,:) ! [kg/m2/s]
!
! !REVISION HISTORY:
! 04 Apr 2022 - M.S. Long - Initial version, based on work by B. Bukosa
! See https://github.com/geoschem/geos-chem for complete history
Expand Down Expand Up @@ -116,13 +112,6 @@ SUBROUTINE Emiss_Carbon_Gases( Input_Opt, State_Chm, State_Diag, &
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Success or failure?
!
! !REMARKS:
! WARNING: Soil absorption has to be the 15th field in CH4_EMIS
! Also: the ND58 diagnostics have now been removed. We still need to
! read the HEMCO manual diagnostics into CH4_EMIS for the analytical
! inversion. Therefore, we will keep EmissCh4 for the time-being
! but only remove the bpch diagnostic.
!EOP
!------------------------------------------------------------------------------
!BOC
Expand Down Expand Up @@ -180,102 +169,6 @@ SUBROUTINE Emiss_Carbon_Gases( Input_Opt, State_Chm, State_Diag, &
! Emission timestep
dtSrce = HcoState%TS_EMIS

!========================================================================
! CH4 emissions
!
! --> All emission calculations are now done through HEMCO
! HEMCO stores emissions of all species internally in the HEMCO
! state object. Here, we pass these emissions into module array
! CH4_EMIS in units kg/m2/s. These values are then either added to
! the species array (full mixing scheme) or used later on in
! vdiff_mod.F90 if the non-local PBL mixing scheme is used.
!
! The CH4_EMIS array is mostly used for backwards compatibility
! (especially the diagnostics). It is also used to ensure that
! in a multi-species simulation, species 1 (total CH4) is properly
! defined.
! (ckeller, 9/12/2013)
!========================================================================
IF ( id_CH4 > 0 ) THEN

! Initialize
CH4_EMIS_J = 0.0_fp
CH4scale = 1.0_hp
CH4diag(1) = 'CH4'
CH4diag(2) = 'CH4_OIL'
CH4diag(3) = 'CH4_GAS'
CH4diag(4) = 'CH4_COAL'
CH4diag(5) = 'CH4_LIVESTOCK'
CH4diag(6) = 'CH4_LANDFILLS'
CH4diag(7) = 'CH4_WASTEWATER'
CH4diag(8) = 'CH4_RICE'
CH4diag(9) = 'CH4_ANTHROTHER'
CH4diag(10) = 'CH4_BIOMASS'
CH4diag(11) = 'CH4_WETLAND'
CH4diag(12) = 'CH4_SEEPS'
CH4diag(13) = 'CH4_LAKES'
CH4diag(14) = 'CH4_TERMITES'
CH4diag(15) = 'CH4_SOILABSORB' ! CH4 soilabsorb values are negative!
CH4diag(16) = 'CH4_RESERVOIRS'
CH4scale(15) = -1.0_hp ! Need to convert to positive

! Loop over manual CH4 diagnostics
DO N = 2, N_CH4_DIAGS

! Get a pointer to the emissions
CALL HCO_GC_GetDiagn( Input_Opt, State_Grid, CH4diag(N), &
.FALSE., RC, Ptr2D=Ptr2D )

! Trap potential errors
IF ( RC /= HCO_SUCCESS ) THEN
errMsg = 'Cannot get pointer to HEMCO field ' // TRIM(CH4diag(N))
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
IF ( .not. ASSOCIATED( Ptr2D ) ) THEN
errMsg = 'Cannot get pointer to HEMCO field ' // TRIM(CH4diag(N))
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF

! Store emissions in CH4_EMIS_J [kg/m2/s]
! CH4scale is either -1 (for soil absorption) or 1 (everything else)
CH4_EMIS_J(:,:,N) = Ptr2D * CH4scale(N)

! Free pointer for next iteration
Ptr2D => NULL()
ENDDO

!---------------------------------------------------------------------
! Total emission: sum of all emissions - (2*soil absorption)
! We have to substract soil absorption twice because it is added
! to other emissions in the SUM function. (ccc, 7/23/09)
!---------------------------------------------------------------------
CH4_EMIS_J(:,:,1) = SUM( CH4_EMIS_J, 3 ) &
- ( 2.0_fp * CH4_EMIS_J(:,:,15) )

IF ( Input_Opt%Verbose ) THEN
WRITE(*,*) 'CH4_EMIS (kg/m2/s):'
WRITE(*,*) 'Total : ', SUM( CH4_EMIS_J(:,:,1 ) )
WRITE(*,*) 'Oil : ', SUM( CH4_EMIS_J(:,:,2 ) )
WRITE(*,*) 'Gas : ', SUM( CH4_EMIS_J(:,:,3 ) )
WRITE(*,*) 'Coal : ', SUM( CH4_EMIS_J(:,:,4 ) )
WRITE(*,*) 'Livestock : ', SUM( CH4_EMIS_J(:,:,5 ) )
WRITE(*,*) 'Landfills : ', SUM( CH4_EMIS_J(:,:,6 ) )
WRITE(*,*) 'Wastewater : ', SUM( CH4_EMIS_J(:,:,7 ) )
WRITE(*,*) 'Rice : ', SUM( CH4_EMIS_J(:,:,8 ) )
WRITE(*,*) 'Other anth : ', SUM( CH4_EMIS_J(:,:,9 ) )
WRITE(*,*) 'Biomass burn : ', SUM( CH4_EMIS_J(:,:,10) )
WRITE(*,*) 'Wetlands : ', SUM( CH4_EMIS_J(:,:,11) )
WRITE(*,*) 'Seeps : ', SUM( CH4_EMIS_J(:,:,12) )
WRITE(*,*) 'Lakes : ', SUM( CH4_EMIS_J(:,:,13) )
WRITE(*,*) 'Termites : ', SUM( CH4_EMIS_J(:,:,14) )
WRITE(*,*) 'Soil absorb : ', SUM( CH4_EMIS_J(:,:,15) )
WRITE(*,*) 'Reservoirs : ', SUM( CH4_EMIS_J(:,:,16) )
ENDIF

ENDIF

!========================================================================
! CO2 production from CO oxidation
!========================================================================
Expand Down Expand Up @@ -1287,27 +1180,6 @@ SUBROUTINE Init_Carbon_Gases( Input_Opt, State_Chm, State_Diag, &
IF ( RC /= GC_SUCCESS ) RETURN
sumOfCosSza = 0.0_fp

!========================================================================
! Initialize variables for CH4 chemistry
!========================================================================
IF ( id_CH4 > 0 ) THEN
ALLOCATE( CH4_EMIS_J( State_Grid%NX, State_Grid%NY, N_CH4_DIAGS ), &
STAT=RC )
CALL GC_CheckVar( 'carbon_gases_mod.F90:CH4_EMIS', 0, RC )
IF ( RC /= GC_SUCCESS ) RETURN
CH4_EMIS_J = 0.0_fp
ENDIF

!========================================================================
! Initialize variables for CO2 chemistry
!========================================================================
! none yet

!========================================================================
! Initialize variables for OCS chemistry
!========================================================================
! none yet

END SUBROUTINE Init_Carbon_Gases
!EOC
!------------------------------------------------------------------------------
Expand Down Expand Up @@ -1343,13 +1215,6 @@ SUBROUTINE Cleanup_Carbon_Gases( RC )
! Initialize
RC = GC_SUCCESS

! Deallocate
IF ( ALLOCATED( CH4_EMIS_J ) ) THEN
DEALLOCATE( CH4_EMIS_J, STAT=RC )
CALL GC_CheckVar( 'carbon_gases_mod.F90:CH4_EMIS', 2, RC )
RETURN
ENDIF

IF ( ALLOCATED( sumOfCosSza ) ) THEN
DEALLOCATE( sumOfCosSza, STAT=RC )
CALL GC_CheckVar( 'carbon_gases_mod.F90:sumOfCosSza', 2, RC )
Expand Down
8 changes: 8 additions & 0 deletions GeosCore/chemistry_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ SUBROUTINE Do_Chemistry( Input_Opt, State_Chm, State_Diag, &
CALL Compute_Budget_Diagnostics( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Diag = State_Diag, &
State_Grid = State_Grid, &
State_Met = State_Met, &
isFull = State_Diag%Archive_BudgetChemistryFull, &
Expand All @@ -179,6 +180,9 @@ SUBROUTINE Do_Chemistry( Input_Opt, State_Chm, State_Diag, &
isPBL = State_Diag%Archive_BudgetChemistryPBL, &
diagPBL = NULL(), &
mapDataPBL = State_Diag%Map_BudgetChemistryPBL, &
isLevs = State_Diag%Archive_BudgetChemistryLevs, &
diagLevs = NULL(), &
mapDataLevs = State_Diag%Map_BudgetChemistryLevs, &
colMass = State_Diag%BudgetColumnMass, &
before_op = .TRUE., &
RC = RC )
Expand Down Expand Up @@ -1101,6 +1105,7 @@ SUBROUTINE Do_Chemistry( Input_Opt, State_Chm, State_Diag, &
CALL Compute_Budget_Diagnostics( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Diag = State_Diag, &
State_Grid = State_Grid, &
State_Met = State_Met, &
isFull = State_Diag%Archive_BudgetChemistryFull, &
Expand All @@ -1112,6 +1117,9 @@ SUBROUTINE Do_Chemistry( Input_Opt, State_Chm, State_Diag, &
isPBL = State_Diag%Archive_BudgetChemistryPBL, &
diagPBL = State_Diag%BudgetChemistryPBL, &
mapDataPBL = State_Diag%Map_BudgetChemistryPBL, &
isLevs = State_Diag%Archive_BudgetChemistryLevs, &
diagLevs = State_Diag%BudgetChemistryLevs, &
mapDataLevs = State_Diag%Map_BudgetChemistryLevs, &
colMass = State_Diag%BudgetColumnMass, &
timeStep = DT_Chem, &
RC = RC )
Expand Down
2 changes: 1 addition & 1 deletion GeosCore/cldj_interface_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ SUBROUTINE Run_CloudJ( Input_Opt, State_Chm, State_Diag, &
USE Cldj_Cmn_Mod, ONLY : L_, L1_, W_, S_, LWEPAR
USE Cldj_Cmn_Mod, ONLY : JVN_, AN_, NQD_, W_r
USE Cldj_Cmn_Mod, ONLY : JIND, JFACTA, FL, QAA, RAA, SAA
USE Cld_Sub_Mod, ONLY : Cloud_JX
USE Cldj_Sub_Mod, ONLY : Cloud_JX
USE Cmn_Size_Mod, ONLY : NRHAER, NRH, NDUST
USE ErrCode_Mod
USE Input_Opt_Mod, ONLY : OptInput
Expand Down
8 changes: 8 additions & 0 deletions GeosCore/convection_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ SUBROUTINE DO_CONVECTION( Input_Opt, State_Chm, State_Diag, &
CALL Compute_Budget_Diagnostics( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Diag = State_Diag, &
State_Grid = State_Grid, &
State_Met = State_Met, &
isFull = State_Diag%Archive_BudgetConvectionFull, &
Expand All @@ -148,6 +149,9 @@ SUBROUTINE DO_CONVECTION( Input_Opt, State_Chm, State_Diag, &
isPBL = State_Diag%Archive_BudgetConvectionPBL, &
diagPBL = NULL(), &
mapDataPBL = State_Diag%Map_BudgetConvectionPBL, &
isLevs = State_Diag%Archive_BudgetConvectionLevs, &
diagLevs = NULL(), &
mapDataLevs = State_Diag%Map_BudgetConvectionLevs, &
colMass = State_Diag%BudgetColumnMass, &
before_op = .TRUE., &
RC = RC )
Expand Down Expand Up @@ -350,6 +354,7 @@ SUBROUTINE DO_CONVECTION( Input_Opt, State_Chm, State_Diag, &
CALL Compute_Budget_Diagnostics( &
Input_Opt = Input_Opt, &
State_Chm = State_Chm, &
State_Diag = State_Diag, &
State_Grid = State_Grid, &
State_Met = State_Met, &
isFull = State_Diag%Archive_BudgetConvectionFull, &
Expand All @@ -361,6 +366,9 @@ SUBROUTINE DO_CONVECTION( Input_Opt, State_Chm, State_Diag, &
isPBL = State_Diag%Archive_BudgetConvectionPBL, &
diagPBL = State_Diag%BudgetConvectionPBL, &
mapDataPBL = State_Diag%Map_BudgetConvectionPBL, &
isLevs = State_Diag%Archive_BudgetConvectionLevs, &
diagLevs = State_Diag%BudgetConvectionLevs, &
mapDataLevs = State_Diag%Map_BudgetConvectionLevs, &
colMass = State_Diag%BudgetColumnMass, &
timeStep = DT_Conv, &
RC = RC )
Expand Down
Loading

0 comments on commit 4ebe899

Please sign in to comment.