Skip to content

Commit

Permalink
Merge branch 'dev/14.3.0' into feature/updates_from_gmao
Browse files Browse the repository at this point in the history
  • Loading branch information
lizziel authored Dec 14, 2023
2 parents 0e396f6 + e4145fe commit 5b4b385
Show file tree
Hide file tree
Showing 68 changed files with 31,380 additions and 26,752 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@ 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 14.3.0] - TBD
### Added
- Added capability for TOMAS simulations in GCHP
- Added State_Chm%nTomasBins to replace hardcoded bins in TOMAS diagnostics

### Changed
- Updated fullchem mechanism following JPL/IUPAC. See `KPP/fullchem/CHANGELOG_fullchem.md` for details.
- Converted TOMAS bpch diagnostics to netCDF

### Fixed
- Fixed bug in stratospheric aerosols optical depths passed to Fast-JX
- Restored consideration of both isSnow and isIce in dry deposition
- Fixed calculation of FRLAND_NOSNO_NOICE in `calc_met_mod.F90`

### Added
- Added interface to Cloud-J package for computing photolysis rates
- Added compile-time option FASTJX to use legacy Fast-JX photolysis instead of Cloud-J
- Added new diagnostics OD600 and TCOD600 for 600 nm optical depths (per-level and total column) used for computing J-values in either Fast-JX or Cloud-J

## [14.2.3] - 2023-12-01
### Added
- GEOS-Chem Classic rundir script `run/GCClassic/setupForRestarts.sh`
Expand Down
1 change: 1 addition & 0 deletions GeosCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ add_library(GeosCore
carbon_gases_mod.F90
chemistry_mod.F90
cldice_HBrHOBr_rxn.F90
cldj_interface_mod.F90
cleanup.F90
co2_mod.F90
convection_mod.F90
Expand Down
48 changes: 27 additions & 21 deletions GeosCore/aero_drydep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
!
! !DESCRIPTION: Subroutine AERO\_DRYDEP removes size-resolved aerosol number
! and mass by dry deposition. The deposition velocities are calcualted from
! drydep_mod.f and only aerosol number NK1-NK30 are really treated as dry
! drydep_mod.f and only aerosol number NK01-NK30 are really treated as dry
! depositing species while each of the mass species are depositing accordingly
! with number.
!\\
Expand Down Expand Up @@ -72,11 +72,11 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
LOGICAL, SAVE :: FIRST = .TRUE.
INTEGER, SAVE :: H2SO4ID
INTEGER, SAVE :: id_H2SO4
INTEGER, SAVE :: id_NK1
INTEGER, SAVE :: id_NK01

! Scalars
INTEGER :: nDryDep
INTEGER :: I, J, L
INTEGER :: nDryDep, IBINS
INTEGER :: I, J, L, AS
INTEGER :: N, JC, BIN, ID
REAL(fp) :: DTCHEM, AREA_CM2, FLUX, X, Y
REAL(fp) :: Y0, RKT, DEN, DP, PDP
Expand All @@ -90,20 +90,20 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
REAL(fp) :: TC(State_Grid%NZ)
REAL(fp) :: TC0(State_Grid%NZ)
REAL(fp) :: VTS(State_Grid%NZ) ! Settling V [m/s]
REAL(fp) :: NU0(State_Grid%NX,State_Grid%NY,State_Grid%NZ,IBINS)
REAL(fp) :: DU0(State_Grid%NX,State_Grid%NY,State_Grid%NZ,IBINS)
REAL(fp) :: SIZ_DIA(State_Grid%NX,State_Grid%NY,IBINS)
REAL(fp) :: SIZ_DEN(State_Grid%NX,State_Grid%NY,IBINS)
REAL(fp) :: X0(IBINS,ICOMP-IDIAG+1 )
REAL(fp) :: NU0(State_Grid%NX,State_Grid%NY,State_Grid%NZ,State_Chm%nTomasBins)
REAL(fp) :: DU0(State_Grid%NX,State_Grid%NY,State_Grid%NZ,State_Chm%nTomasBins)
REAL(fp) :: SIZ_DIA(State_Grid%NX,State_Grid%NY,State_Chm%nTomasBins)
REAL(fp) :: SIZ_DEN(State_Grid%NX,State_Grid%NY,State_Chm%nTomasBins)
REAL(fp) :: X0(State_Chm%nTomasBins,ICOMP-IDIAG+1 )

! Pointers
TYPE(SpcConc), POINTER :: Spc (: )
REAL(fp), POINTER :: BXHEIGHT(:,:,: )
REAL(fp), POINTER :: T (:,:,: )
REAL(fp), POINTER :: DepFreq (:,:,: ) ! IM, JM, nDryDep
REAL(fp), POINTER :: DepFreq (:,:,: ) ! IM, JM, nDryDep

! SAVEd arrays
INTEGER, SAVE :: DRYD(IBINS)
INTEGER, SAVE, ALLOCATABLE :: DRYD(:)

! Debug
!integer :: ii, jj , ix, jx, bb, ll
Expand All @@ -119,6 +119,9 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
! Number of dry-deposited species
nDryDep = State_Chm%nDryDep

! Number of bins
IBINS = State_Chm%nTomasBins

! Check that species units are in [kg] (ewl, 8/13/15)
IF ( State_Chm%Spc_Units /= KG_SPECIES ) THEN
MSG = 'Incorrect species units: ' // TRIM(UNIT_STR(State_Chm%Spc_Units))
Expand All @@ -140,26 +143,29 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &

! Define species ID flags
id_H2SO4 = Ind_('H2SO4')
id_NK1 = Ind_('NK1' )
id_NK01 = Ind_('NK01' )

! Make sure species are defined
IF ( id_H2SO4 < 0 ) THEN
MSG = 'H2SO4 is not a defined species!'
LOC = 'Routine AERO_DRYDEP in aero_drydep.F'
CALL ERROR_STOP( MSG, LOC )
ENDIF
IF ( id_NK1 < 0 ) THEN
MSG = 'NK1 is not a defined species!'
IF ( id_NK01 < 0 ) THEN
MSG = 'NK01 is not a defined species!'
LOC = 'Routine AERO_DRYDEP in aero_drydep.F'
CALL ERROR_STOP( MSG, LOC )
ENDIF

ALLOCATE( DRYD( State_Chm%nTomasBins ), STAT=AS )
IF ( AS /= 0 ) CALL ALLOC_ERR( 'DRYD (aero_drydep.F90)' )
DRYD = 0

! First identify if the size-resolved aerosol species have their
! deposition velocity calculated.
! dryd is an array that keeps the drydep species ID. So if the
! aerosol component has dryd = 0, that means it was not included
! as a dry depositting species.
DRYD = 0
DO BIN = 1, IBINS
DO N = 1, nDryDep
!just want to match only once (win, 5/24/06)
Expand All @@ -169,9 +175,9 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
! Debug
!print *, 'DRYDEP Species:',N
ENDIF
IF ( State_Chm%Map_DryDep(N) == ( id_NK1-1+BIN ) )THEN
IF ( State_Chm%Map_DryDep(N) == ( id_NK01-1+BIN ) )THEN
! Debug
!print *,'Match species:',IDTNK1-1+bin,'Bin',bin
!print *,'Match species:',IDTNK01-1+bin,'Bin',bin
DRYD( BIN ) = N
GOTO 100
ENDIF
Expand Down Expand Up @@ -213,7 +219,7 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &

! SIZ_DIA [=] m and SIZ_DEN [=] kg/m3
CALL AERO_DIADEN( 1, Input_Opt, State_Chm, State_Grid, State_Met, &
SIZ_DIA, SIZ_DEN, RC )
State_Diag, SIZ_DIA, SIZ_DEN, RC )
IF ( RC /= GC_SUCCESS ) THEN
CALL ERROR_STOP('CALL AERO_DIADEN', 'AERO_DRYDEP in aero_drydep.F')
ENDIF
Expand Down Expand Up @@ -286,7 +292,7 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
ENDDO ! L-loop

DO JC = 1, ICOMP-IDIAG+1
ID = id_NK1 - 1 + BIN + ( IBINS * (JC-1) )
ID = id_NK01 - 1 + BIN + ( IBINS * (JC-1) )

! Debug
!IF (i==ix .and. j==jx .and. l==ll) THEN
Expand Down Expand Up @@ -408,7 +414,7 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
! Save the initial 30-bin number and icomp-1 mass component
DO JC = 1, ICOMP-IDIAG+1
DO BIN = 1, IBINS
ID = id_NK1 - 1 + BIN + ( IBINS * (JC-1) )
ID = id_NK01 - 1 + BIN + ( IBINS * (JC-1) )
X0(BIN,JC) = Spc(ID)%Conc(I,J,L)
ENDDO
ENDDO
Expand All @@ -425,7 +431,7 @@ SUBROUTINE AERO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
DO JC = 1, ICOMP-IDIAG+1
DO BIN = 1, IBINS
X = 0d0
ID = id_NK1 - 1 + BIN + (( JC-1 )* IBINS)
ID = id_NK01 - 1 + BIN + (( JC-1 )* IBINS)

! *******************************************************************
! NOTE: I'm not sure if this is now covered by dry-deposition in
Expand Down
11 changes: 4 additions & 7 deletions GeosCore/aerosol_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MODULE AEROSOL_MOD
INTEGER :: id_POA1, id_POA2, id_OPOA1, id_OPOA2
INTEGER :: id_TSOA1, id_TSOA2, id_TSOA3, id_TSOA0
INTEGER :: id_ASOAN, id_ASOA1, id_ASOA2, id_ASOA3
INTEGER :: id_DUST1, id_SOAS, id_SALACL, id_HMS ! (jmm, 06/29/18)
INTEGER :: id_DUST01, id_SOAS, id_SALACL, id_HMS ! (jmm, 06/29/18)
INTEGER :: id_SOAGX, id_SOAIE
INTEGER :: id_INDIOL,id_LVOCOA

Expand Down Expand Up @@ -133,9 +133,6 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
USE State_Met_Mod, ONLY : MetState
USE UnitConv_Mod
USE TIME_MOD, ONLY : GET_MONTH
#ifdef TOMAS
USE TOMAS_MOD, ONLY : IBINS
#endif
!
! !INPUT PARAMETERS:
!
Expand Down Expand Up @@ -545,10 +542,10 @@ SUBROUTINE AEROSOL_CONC( Input_Opt, State_Chm, State_Diag, &
SOILDUST(I,J,L,:) = 0.e0_fp

! Loop over the # of TOMAS dust bins
DO K = 1, IBINS
DO K = 1, State_Chm%nTomasBins

! Get the overall species index for species K
N = id_DUST1 + K - 1
N = id_DUST01 + K - 1

! Effective aerosol radius [m]
REFF = State_Chm%SpcData(N)%Info%Radius
Expand Down Expand Up @@ -2268,7 +2265,7 @@ SUBROUTINE Init_Aerosol( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
id_DST2 = Ind_( 'DST2' )
id_DST3 = Ind_( 'DST3' )
id_DST4 = Ind_( 'DST4' )
id_DUST1 = Ind_( 'DUST1' )
id_DUST01 = Ind_( 'DUST01' )
id_NH4 = Ind_( 'NH4' )
id_NIT = Ind_( 'NIT' )
id_OCPO = Ind_( 'OCPO' )
Expand Down
Loading

0 comments on commit 5b4b385

Please sign in to comment.