Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small updates to group unpack and rats provider checks #269

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions GEOSCHEMchem_GridComp/GEOSCHEMchem_Registry.rc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
#======================
# O3PPMV | ppmv | xyz | C | | | | | ozone_volume_mixing_ratio_in_ppm
# OX_TEND | kg kg-1 s-1 | xyz | C | | | | | tendency_of_odd_oxygen_mixing_ratio_due_to_chemistry
H2O_TEND | kg kg-1 s-1 | xyz | C | | | | | Tendency_of_water_vapor_mixing_ratio_due_to_chemistry
# H2O_TEND | kg kg-1 s-1 | xyz | C | | | | | Tendency_of_water_vapor_mixing_ratio_due_to_chemistry
#===========
# GCHP only:
#===========
Expand Down Expand Up @@ -250,12 +250,12 @@
SO2AfterChem | vv-1 | xyz | C | | | | | | | | S | soluble_fraction_SO2
KPPHvalue | 1 | xyz | C | | | | | | | | S | HSAVE_for_KPP
SESQ_CARBDENS | kgCm-3 | xyz | C | | | | | | | | S | sesquiterpene_conc_restart
Iso_Hplus_coarse | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_H+_concentration_coarse
Iso_Hplus_fine | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_H+_concentration_fine
Iso_sulfate | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_sulfate_concentratio
Iso_nitrate_coarse | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_Na+_concentration_coarse
Iso_nitrate_fine | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_Na+_concentration_fine
Iso_bisulfate | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_bisulfate_concentration
# Iso_Hplus_coarse | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_H+_concentration_coarse
# Iso_Hplus_fine | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_H+_concentration_fine
# Iso_sulfate | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_sulfate_concentratio
# Iso_nitrate_coarse | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_Na+_concentration_coarse
# Iso_nitrate_fine | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_Na+_concentration_fine
# Iso_bisulfate | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_bisulfate_concentration
### the following are not needed
# Iso_acidpur | molL-1 | xyz | C | | | | |0.0 | | | S | Isorropia_acid
# Iso_pH | 1 | xyz | C | | | | |0.0 | | | S | Isorropia_aerosol_pH
Expand Down
22 changes: 11 additions & 11 deletions GEOS_ChemGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -555,21 +555,21 @@ subroutine SetServices ( GC, RC )
! Ozone mole fraction needed by GOCART for
! CFC-12 photolysis. For GMICHEM case, see below.
! ------------------------------------------------
IF(myState%enable_GOCART .AND. myState%enable_PCHEM) then
IF(myState%enable_GOCART .AND. myState%enable_PCHEM .AND. RATsProviderNumber(1)==PCHEM ) THEN
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"OX"/), &
DST_NAME = (/"O3"/), &
DST_ID = GOCART, SRC_ID = PCHEM, __RC__ )
ENDIF

IF(myState%enable_GOCART .AND. myState%enable_STRATCHEM) then
IF(myState%enable_GOCART .AND. myState%enable_STRATCHEM .AND. RATsProviderNumber(1)==STRATCHEM ) then
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"O3CHEM"/), &
DST_NAME = (/"O3"/), &
DST_ID = GOCART, SRC_ID = STRATCHEM, __RC__ )
ENDIF

IF(myState%enable_ACHEM .AND. myState%enable_PCHEM) then
IF(myState%enable_ACHEM .AND. myState%enable_PCHEM .AND. RATsProviderNumber(1)==ACHEM ) then
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"O3"/), &
DST_NAME = (/"O3"/), &
Expand Down Expand Up @@ -732,10 +732,12 @@ subroutine SetServices ( GC, RC )

! ... For GOCART::CFC
! -------------------
IF( RATsProviderNumber(1)==GMICHEM ) then
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"OX"/), &
DST_NAME = (/"O3"/), &
DST_ID=GOCART, SRC_ID=GMICHEM, __RC__)
END IF

END IF

Expand Down Expand Up @@ -781,14 +783,12 @@ subroutine SetServices ( GC, RC )
END IF

! GOCART needs ozone for CFC12 photolysis.
! Only provide it from GEOS-Chem if PCHEM is not running.
IF(myState%enable_GOCART .AND. myState%enable_GEOSCHEM) then
IF ( .NOT. myState%enable_PCHEM ) THEN
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"TRC_O3"/), &
DST_NAME = (/"O3"/), &
DST_ID=GOCART, SRC_ID=GEOSCHEM, __RC__ )
ENDIF
! Provide from GEOS-Chem if it is the OX provider
IF(myState%enable_GOCART .AND. myState%enable_GEOSCHEM .AND. RATsProviderNumber(1)==GEOSCHEM ) then
CALL MAPL_AddConnectivity ( GC, &
SRC_NAME = (/"OX"/), &
DST_NAME = (/"O3"/), &
DST_ID=GOCART, SRC_ID=GEOSCHEM, __RC__ )
ENDIF

! GEOS-Chem import of CO2
Expand Down
19 changes: 13 additions & 6 deletions Shared/Chem_Shared/Chem_GroupMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ END SUBROUTINE Pack_Chem_Groups
! !INTERFACE:

#ifdef CHEM_INFO
SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate, bry_ratio, aBRCL, aCL2, aOCLO, aCL2O2, aCLO, aHCL, aHOCL, zBRCL, zCL2, zOCLO, zCL2O2, zCLO, zHCL, zHOCL, zBRY, aCLY, zCLY )
SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate, verbose, bry_ratio, aBRCL, aCL2, aOCLO, aCL2O2, aCLO, aHCL, aHOCL, zBRCL, zCL2, zOCLO, zCL2O2, zCLO, zHCL, zHOCL, zBRY, aCLY, zCLY )
#else
SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate)
SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate, verbose )
#endif

IMPLICIT NONE
Expand All @@ -470,6 +470,7 @@ SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate)
REAL*4, POINTER, DIMENSION(:,:,:), INTENT(IN), OPTIONAL :: Q_separate ! water vapor [kg vapor / kg moist air]
! option to provide Q separate from the advection bundle,
! otherwise we get Q from that bundle (TRADV)
LOGICAL, INTENT(IN), OPTIONAL :: verbose ! if true (default), print CL/N LOOP COUNT
#ifdef CHEM_INFO
REAL*4, POINTER, DIMENSION(:,:,:) :: bry_ratio, aBRCL, aCL2, aOCLO, aCL2O2, aCLO, aHCL, aHOCL
REAL*4, POINTER, DIMENSION(:,:,:) :: zBRCL, zCL2, zOCLO, zCL2O2, zCLO, zHCL, zHOCL
Expand Down Expand Up @@ -513,8 +514,14 @@ SUBROUTINE Unpack_Chem_Groups(state, PLE, AREA, Q_separate)
REAL, PARAMETER :: MAXFRAC = 0.99 ! Do not reduce more than this
REAL, PARAMETER :: VERY_SMALL = 1.0e-25

LOGICAL :: verb

Iam = "Unpack_Chem_Groups"

! verbose flag
verb = .TRUE.
IF ( PRESENT(verbose) ) verb = verbose

IF ( GMI_groups_active ) THEN

! IF (MAPL_AM_I_ROOT()) print*,'Unpacking GMI groups Bry and Cly'
Expand Down Expand Up @@ -1274,7 +1281,7 @@ SUBROUTINE GMI_reduce_Cly_vmr ( )

END DO

IF ( loop_count > 0 ) print*,'CL LOOP COUNT = ', loop_count, COUNT(in_play(:))
IF ( loop_count > 0 .and. verb ) print*,'CL LOOP COUNT = ', loop_count, COUNT(in_play(:))

if ( vsum_EXTRA > 0.0d0 ) then
print*,'Cannot conserve Cl !!'
Expand Down Expand Up @@ -1474,7 +1481,7 @@ SUBROUTINE GMI_reduce_N_vmr ( )

END DO

IF ( loop_count > 0 ) print*,'N LOOP COUNT = ', loop_count, COUNT(in_play(:))
IF ( loop_count > 0 .and. verb ) print*,'N LOOP COUNT = ', loop_count, COUNT(in_play(:))

if ( vsum_EXTRA > 0.0d0 ) then
print*,'Cannot conserve N!!'
Expand Down Expand Up @@ -1698,7 +1705,7 @@ SUBROUTINE GCC_reduce_Cly_mmr ( )

END DO

IF ( loop_count > 0 ) print*,'CL LOOP COUNT = ', loop_count, COUNT(in_play(:))
IF ( loop_count > 0 .and. verb ) print*,'CL LOOP COUNT = ', loop_count, COUNT(in_play(:))

if ( vsum_EXTRA > 0.0d0 ) then
print*,'Cannot conserve Cl !!'
Expand Down Expand Up @@ -1879,7 +1886,7 @@ SUBROUTINE GCC_reduce_N_mmr ( )

END DO

IF ( loop_count > 0 ) print*,'N LOOP COUNT = ', loop_count, COUNT(in_play(:))
IF ( loop_count > 0 .and. verb ) print*,'N LOOP COUNT = ', loop_count, COUNT(in_play(:))

if ( vsum_EXTRA > 0.0d0 ) then
print*,'Cannot conserve N!!'
Expand Down
Loading