Skip to content

Commit

Permalink
Add new namelist entry for aerosol optical property files
Browse files Browse the repository at this point in the history
These files are used in GEOS-Chem outside of Cloud-J photolysis.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
  • Loading branch information
lizziel committed Jun 26, 2024
1 parent 18b73fb commit a126198
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,7 @@ if ($chem =~ /geoschem/) {

# Input directories
add_default($nl, 'geoschem_chem_inputs');
add_default($nl, 'geoschem_aeropt_inputs');
add_default($nl, 'geoschem_photol_inputs');

# Species with fixed lower boundary
Expand Down
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3522,6 +3522,7 @@

<!-- GEOS-Chem chemistry -->
<geoschem_chem_inputs chem="geoschem_mam4">atm/cam/geoschem/emis/ExtData/CHEM_INPUTS</geoschem_chem_inputs>
<geoschem_aeropt_inputs chem="geoschem_mam4">atm/cam/geoschem/emis/ExtData/CHEM_INPUTS/FAST_JX/v2024-05/</geoschem_aeropt_inputs>
<geoschem_photol_inputs chem="geoschem_mam4">atm/cam/geoschem/emis/ExtData/CHEM_INPUTS/CLOUD_J/v2023-05/</geoschem_photol_inputs>

</namelist_defaults>
6 changes: 6 additions & 0 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,12 @@ Full pathname of the GEOS-Chem chemistry inputs directory.
Default: set by build-namelist.
</entry>

<entry id="geoschem_aeropt_inputs" type="char*256" input_pathname="abs" category="geoschem"
group="geoschem_nl" valid_values="" >
Full pathname of the aerosols optical property inputs directory used in GEOS-Chem outside of Cloud-J.
Default: set by build-namelist.
</entry>

<entry id="geoschem_photol_inputs" type="char*256" input_pathname="abs" category="geoschem"
group="geoschem_nl" valid_values="" >
Full pathname of the Cloud-J photolysis inputs directory used in GEOS-Chem.
Expand Down
12 changes: 10 additions & 2 deletions src/chemistry/geoschem/chemistry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module chemistry
CHARACTER(LEN=500) :: speciesDB = 'species_database.yml'

CHARACTER(LEN=shr_kind_cl) :: geoschem_chem_inputs
CHARACTER(LEN=shr_kind_cl) :: geoschem_aeropt_inputs
CHARACTER(LEN=shr_kind_cl) :: geoschem_photol_inputs

! Debugging
Expand Down Expand Up @@ -1163,10 +1164,11 @@ subroutine chem_init(phys_state, pbuf2d)
State_Grid = maxGrid, &
RC = RC )

! First setup directories
! First setup directories. FAST-JX directory is still used for
! optical properties of aerosols outside of Cloud-J.
Input_Opt%Chem_Inputs_Dir = TRIM(geoschem_chem_inputs)
Input_Opt%SpcDatabaseFile = TRIM(speciesDB)
Input_Opt%FAST_JX_DIR = TRIM(geoschem_photol_inputs)
Input_Opt%FAST_JX_DIR = TRIM(geoschem_aeropt_inputs)
Input_Opt%CLOUDJ_DIR = TRIM(geoschem_photol_inputs)

!----------------------------------------------------------
Expand Down Expand Up @@ -1812,6 +1814,7 @@ subroutine geoschem_readnl(nlfile)
character(len=*), parameter :: subname = 'geoschem_readnl'

namelist /geoschem_nl/ geoschem_chem_inputs
namelist /geoschem_nl/ geoschem_aeropt_inputs
namelist /geoschem_nl/ geoschem_photol_inputs

! Read namelist
Expand All @@ -1835,6 +1838,11 @@ subroutine geoschem_readnl(nlfile)
CALL endrun(subname//': MPI_BCAST ERROR: geoschem_chem_inputs')
ENDIF

CALL mpi_bcast(geoschem_aeropt_inputs, LEN(geoschem_aeropt_inputs), mpi_character, masterprocid, mpicom, ierr)
IF ( ierr /= mpi_success ) then
CALL endrun(subname//': MPI_BCAST ERROR: geoschem_aeropt_inputs')
ENDIF

CALL mpi_bcast(geoschem_photol_inputs, LEN(geoschem_photol_inputs), mpi_character, masterprocid, mpicom, ierr)
IF ( ierr /= mpi_success ) then
CALL endrun(subname//': MPI_BCAST ERROR: geoschem_photol_inputs')
Expand Down

0 comments on commit a126198

Please sign in to comment.