Skip to content

Commit

Permalink
Merge pull request #12 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Preparing for GMI release v1.2.0
  • Loading branch information
mmanyin authored Dec 7, 2023
2 parents 1d1945c + 7e1b250 commit a04e01e
Show file tree
Hide file tree
Showing 15 changed files with 700 additions and 573 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

# Anchors to prevent forgetting to update a version
baselibs_version: &baselibs_version v7.7.0
bcs_version: &bcs_version v10.23.0
# Anchors in case we need to override the defaults from the orb
#baselibs_version: &baselibs_version v7.14.0
#bcs_version: &bcs_version v11.1.0

orbs:
ci: geos-esm/circleci-tools@1
Expand All @@ -18,7 +18,7 @@ workflows:
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
#baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
Expand Down
28 changes: 24 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,36 @@ 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]

### Fixed
### Added

### Changed
### Removed
### Deprecated


## [1.2.0] - 2023-12-07

### Fixed

### Removed
- QQJK diag calc had bug, used time(t+dt) constituents ibstead of time(t) fields, fixed on 2023Jul19
- Fixed bug in Emissions and Deposition where SZA degrees was used instead of cosine(SZA)
- Fixed units for degassing volcano point emissions
- Improved handling of phot_opt cases; allows for phot_opt == 0 again
- Improved handling of sad_opt cases; allows for sad_opt == 0 again

### Deprecated
### Added

- Capability for AERO_PROVIDER=GOCART2G data-driven (GOCART.data)
- Export OCS_JRATE for use by ACHEM

### Changed

- Update CI to use Baselibs default from the CircleCI orb
- Changed a few SAD reactions to use JPL 2019 approach
- ExtData now uses Benchmark G configuration
- Emissions including 2D, 3D and point source (volcano) now are done as in Benchmark G
- Isoprene scaling changed from 1 to 0.7
- Boundary condition file now includes HFCs, and no longer includes extra Br (when HFC mech is chosen)


## [1.1.0] - 2023-04-24
Expand Down
626 changes: 234 additions & 392 deletions GMI_GridComp/GMI_ExtData.yaml

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion GMI_GridComp/GmiChem_GridCompClassMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ MODULE GmiChem_GCCMod
REAL(KIND=DBL), allocatable :: rmult(:) ! vector of multipliers
CHARACTER(LEN=RXN_LONGNAME_LENGTH), pointer :: rdesc(:) ! vector of reaction long names

! for exporting OCS_JRATE
! -----------------------
CHARACTER (LEN=20) :: ocs_jrate_name

! Extra diagnostics
! -----------------
LOGICAL :: verbose
Expand Down Expand Up @@ -325,6 +329,10 @@ SUBROUTINE GmiChemistry_GridCompInitialize( self, bgg, bxx, impChem, expChem, ny
& label="do_grav_set:", default=.false., rc=STATUS)
VERIFY_(STATUS)

call ESMF_ConfigGetAttribute(gmiConfig, value=self%ocs_jrate_name, &
& label="OCS_JRATE:", default='UNDEFINED_OCS_JRATE', rc=STATUS)
VERIFY_(STATUS)

!------------------------------
! Emission related variables
!------------------------------
Expand Down Expand Up @@ -722,7 +730,7 @@ SUBROUTINE GmiChemistry_GridCompRun ( self, bgg, bxx, impChem, expChem, nymd, nh

! Exports not part of internal state
! ----------------------------------
REAL, POINTER, DIMENSION(:,:,:) :: O3ppmv, O3, stOX_loss
REAL, POINTER, DIMENSION(:,:,:) :: O3ppmv, O3, stOX_loss, OCS_jrate

! Exports for reactions diagnostics
! ---------------------------------
Expand Down Expand Up @@ -1090,6 +1098,23 @@ SUBROUTINE FillExports(rc)
IF(ASSOCIATED(O3)) &
O3(i1:i2,j1:j2,1:km) = bgg%qa(ic)%data3d(i1:i2,j1:j2,1:km)*(MAPL_O3MW/MAPL_AIRMW)

IF(ASSOCIATED(OCS_jrate)) THEN
! Assume name is QJnnn
READ( self%ocs_jrate_name(3:5),*,IOSTAT=rc) rxn_index
_ASSERT(rc==0, TRIM(Iam)//': trouble extracting index from '//TRIM(self%ocs_jrate_name))

! IF(MAPL_AM_I_ROOT( ))PRINT *,TRIM(IAm),': DEFINE OCS_JRATE as '//TRIM(self%ocs_jrate_name)//' index ',rxn_index

SELECT CASE (self%ocs_jrate_name(1:2))

CASE("QJ")
OCS_jrate(i1:i2,j1:j2,1:km) = gmiQJ(rxn_index)%pArray3D(i1:i2,j1:j2,km:1:-1)
CASE DEFAULT
_ASSERT(.FALSE., TRIM(Iam)//': reaction must be QJ : '//TRIM(self%ocs_jrate_name))

END SELECT
END IF

! --------------------------------------------------------------------
! Reaction rate constants (q) and rates (qq)
! --------------------------------------------------------------------
Expand Down Expand Up @@ -1340,6 +1365,8 @@ SUBROUTINE FindPointers(rc)
VERIFY_(STATUS)
CALL MAPL_GetPointer(expChem, stOX_loss, 'stOX_loss', RC=STATUS)
VERIFY_(STATUS)
CALL MAPL_GetPointer(expChem, OCS_jrate, 'OCS_JRATE', RC=STATUS)
VERIFY_(STATUS)

#include "Reactions_GetPointer___.h"

Expand Down
15 changes: 13 additions & 2 deletions GMI_GridComp/GmiChemistry/GmiUpdateChemistry_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ subroutine updateChemistry ( savedVars, rootProc, do_ftiming, &
!
implicit none

# include "gmi_sad_constants.h"
# include "setkin_par.h"
# include "gmi_AerDust_const.h"
!
Expand Down Expand Up @@ -119,6 +118,7 @@ subroutine updateChemistry ( savedVars, rootProc, do_ftiming, &
integer :: ix
integer :: num_loops
real*8 :: chemintv
type (t_GmiArrayBundle) :: tm1Conc(num_species)
!
! !REVISION HISTORY:
! Initial code.
Expand All @@ -135,6 +135,14 @@ subroutine updateChemistry ( savedVars, rootProc, do_ftiming, &
else
num_loops = 1
end if
!
!... save initial concentration for calc of qqj/qqk diags
if (pr_qqjk .and. .not. do_qqjk_inchem) then
do ix = 1, num_species
allocate ( tm1Conc(ix)%pArray3D (i1:i2, ju1:j2, k1:k2) )
tm1Conc(ix)%pArray3D(:,:,:) = concentration(ix)%pArray3D(:,:,:)
enddo
end if

do ix = 1, num_loops
call Update_Smv2chem (savedVars, chemintv, surfEmissForChem, &
Expand All @@ -149,10 +157,13 @@ subroutine updateChemistry ( savedVars, rootProc, do_ftiming, &
end do

if (pr_qqjk .and. .not. do_qqjk_inchem) then
call Accum_Qqjk (do_qqjk_reset, imgas_num, concentration, &
call Accum_Qqjk (do_qqjk_reset, imgas_num, tm1Conc, &
qjgmi, qkgmi, qqjgmi, qqkgmi, num_molefrac, &
num_species, num_qks, num_qjs, num_qjo, &
pr_diag, loc_proc, ilong, i1, i2, ju1, j2, k1, k2)
do ix = 1, num_species
deallocate ( tm1Conc(ix)%pArray3D )
enddo
end if

return
Expand Down
79 changes: 62 additions & 17 deletions GMI_GridComp/GmiChemistry/StratTrop_HFC_S/GMI_GridComp.rc
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,22 @@ MEK_biom
CO_biom
NO_biom
NO_air
ALD2_biof
ALK4_fosf
ALK4_biof
C2H6_fosf
C2H6_biof
PRPE_fosf
PRPE_biof
C3H8_fosf
C3H8_biof
CH2O_biof
MEK_fosf
MEK_biof
CO_fosf
CO_biof
NO_fosf
NO_biof
SO2_FIRES-FLUX
SO2_NONENERGY-FLUX
SO2_ENERGY-FLUX
Expand Down Expand Up @@ -176,32 +185,51 @@ emissionSpeciesLayers::
1
1
1
1
1
1
1
1
1
1
1
1
72
::

emissionPointFilenames::
SO2:volcano:/discover/nobackup/projects/gmao/share/dao_ops/fvInput_nc3/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc
SO2:volcano:ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_Carns.%y4%m2%d2.rc
::
#SO2:volcano:/discover/nobackup/projects/gmao/share/dao_ops/fvInput_nc3/PIESA/sfc/volcanic_v7/so2_volcanic_effusive.v2.rc
# NOTE: Units for the volcano point source files: kg(S)/s
# Units that GMI wants : kg(SO2)/s
# GMI does the conversion in Refresh_Daily within the Emission section
# from GOCART2G SU (AMIP):
# ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_Carns.%y4%m2%d2.rc
# from GOCART2G SU (OPS):
# ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_CARN_v202106.degassing_only.rc
# includes eruptions:
# /discover/nobackup/projects/gmao/share/dao_ops/fvInput_nc3/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc
# does not include eruptions:
# /discover/nobackup/projects/gmao/share/dao_ops/fvInput_nc3/PIESA/sfc/volcanic_v7/so2_volcanic_effusive.v2.rc

# Ship Emissions requires SHIP_NO in ExtData:
do_ShipEmission: T
doMEGANemission: T
doMEGANviaHEMCO: F

isop_scale::
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
1.0d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
0.7d0
::

soil_infile_name: ExtData/g5chem/x/GMI_SoilType.asc
Expand Down Expand Up @@ -262,7 +290,11 @@ forc_bc_kmax: 2
#forc_bc_infile_name: /discover/nobackup/ldoman/fvInput/RCP6.0_5BrWMO2014_ch4latvar_1950_2100.asc
#forc_bc_infile_name: ExtData/g5chem/x/GMI/RCP6.0_5BrWMO2014_ch4latvar_1950_2100.asc
#forc_bc_infile_name: ExtData/g5chem/x/GMI/RCP6.0_5BrWMO2018_ch4latvar_1950_2100.asc
forc_bc_infile_name: ExtData/g5chem/x/GMI/ccmiRefD1_GMIbc_1950_2018.asc
#forc_bc_infile_name: ExtData/g5chem/x/GMI/ccmiRefD1_GMIbc_1950_2018.asc
#forc_bc_infile_name: /discover/nobackup/projects/gmao/ccmdev/mmanyin/bench/bench_10-26-0_gmi_free_c360_72lev/INPUT/BC/ccmiRefD1_GMIbc_plusHFC_1950_2018.asc
forc_bc_infile_name: /discover/nobackup/projects/gmao/ccmdev/mmanyin/bench/GOLF/INPUT/BC/ccmiRefD1_GMIbc_plusHFC_no5Br_1950_2018.asc

#alternative /discover/nobackup/projects/gmi/gmidata2/users/steenrod/input/source_gas/RCP6.0_WMO2018_QingHFCs_ch4latvarGMDscl_1950_2022Hindcast.asc

forcedBcSpeciesNames::
CFC11
Expand All @@ -283,8 +315,19 @@ CH3Br
CH3Cl
CH4
N2O
HFC23
HFC32
HFC125
HFC134A
HFC143A
HFC152A
xxx
xxx
::

# The xxx entries above are for SF6 and CO2


# ----------------------------------------------------
# sad_opt
# 0: do not allocate or process SAD array
Expand Down Expand Up @@ -371,8 +414,8 @@ do_ozone_inFastJX: F

## For FastJX 6.5 & JPL10
fastj_opt: 4
# cross_section_file: ExtData/g5chem/x/photolysis/FastJX_6.5/xsec_jx65_jpl10update2_JNOx1_0.dat
cross_section_file: ExtData/g5chem/x/photolysis/FastJX_6.5/xsec_jx65wSO4_jpl10update2_JNOx1_0.dat
# cross_section_file: ExtData/g5chem/x/photolysis/FastJX_6.5/xsec_jx65_jpl10update2_JNOx1_0.dat
# rate_file not needed for FastJX6.5; new approach only differs by roundoff
# rate_file: ExtData/g5chem/x/photolysis/FastJX/ratec_124spc_jx_gmiv2.dat
# rate_file: ExtData/g5chem/x/photolysis/FastJX/ratec_119spc_jx_gmiv3.dat
Expand Down Expand Up @@ -414,7 +457,7 @@ FeedBack_QV: T
NoPSCZone: 45
PSC_Max_P_hPa: 175
# Upper limit for HNO3COND [integer, ppbv]
Condensed_HNO3_limit: 25
Condensed_HNO3_limit: 75
# Upper limit for HCl [real, ppbv]
HCl_limit: 5.0

Expand Down Expand Up @@ -447,3 +490,5 @@ stOX_loss_reactions::
QQK324 1.0 'NO2 = 0.50 HNO2 + 0.50 HNO3'
QQK331 1.0 'O3 + SO2 = H2SO4'
::

OCS_JRATE: QJ075
1 change: 1 addition & 0 deletions GMI_GridComp/GmiChemistry/StratTrop_HFC_S/GMI_Registry.rc
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
ICESAD | cm+2 cm-3 | xyz | C | | | | | ice_surface_area_density
LBSSAD | cm+2 cm-3 | xyz | C | | | | | LBS_surface_area_density
AIRMASS | kg m-2 | xyz | C | | | | | mass_of_air_in_layer
OCS_JRATE | s-1 | xyz | C | | | | | Jrate_for_OCS
# ------------------|----------------|-----|---|----|---|---|-----|---------------------------------
</ExportSpec>

Expand Down
Loading

0 comments on commit a04e01e

Please sign in to comment.