Skip to content

Commit

Permalink
Read number of levels with clouds from geoschem_config.yml; pass to c…
Browse files Browse the repository at this point in the history
…loud-j

Updates include:
 - Add new Input_Opt setting Nlevs_Phot_Cloud
 - Set Input_Opt%Nlevs_Phot_Cloud from new setting in geoschem_config.yml
   photolysis menu
 - Move a few existing settings in input_opt_mod.F90 to photolysis menu
   since that is now where they are stored in geoschem_config.yml
 - Update all geoschem_config.yml templates. All use 34 as number of levels
   with clouds except CESM which uses 22.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
  • Loading branch information
lizziel committed Jun 20, 2024
1 parent 16ac9fc commit 5cb776e
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fixed formatting error in `.github/workflows/stale.yml` that caused the Mark Stale Issues action not to run
- Fixed typo `$GCAPVERTRESL` -> `$GCAPVERTRES` in `HEMCO_Config.rc.fullchem` template file

### Added
- Added number of levels with clouds for photolysis to geoschem_config.yml and Input_Opt to pass to Cloud-J

## [14.4.0] - 2024-05-30
### Added
- Added `SpcConc%Units` for species-specific unit conversion
Expand Down
5 changes: 3 additions & 2 deletions GeosCore/cldj_interface_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ SUBROUTINE INIT_CLOUDJ( Input_Opt, State_Grid, State_Diag, State_Chm, RC )
! Initialize Cloud-J. Includes reading input data files
! FJX_spec.dat (RD_XXX), FJX_scat-aer.dat (RD_MIE), and
! FJX_j2j.dat (RD_JS_JX)
CALL Init_CldJ(Input_Opt%amIRoot, Input_Opt%CloudJ_Dir, &
State_Grid%NZ, TITLEJXX, JVN_, NJXX)
CALL Init_CldJ(Input_Opt%amIRoot, Input_Opt%CloudJ_Dir, &
State_Grid%NZ, Input_Opt%Nlevs_Phot_Cloud, &
TITLEJXX, JVN_, NJXX)

! Store # of photolysis reactions in State_Chm object
State_Chm%Phot%nPhotRxns = NRatJ
Expand Down
19 changes: 18 additions & 1 deletion GeosCore/input_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2762,6 +2762,7 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
!
! Scalars
LOGICAL :: v_bool
INTEGER :: v_int
REAL(yp) :: v_real

! Strings
Expand Down Expand Up @@ -2793,6 +2794,19 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
ENDIF
Input_Opt%Do_Photolysis = v_bool

!------------------------------------------------------------------------
! Number levels with clouds to use in photolysis
!------------------------------------------------------------------------
key = "operations%photolysis%num_levs_with_cloud"
v_int = MISSING_INT
CALL QFYAML_Add_Get( Config, TRIM( key ), v_int, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Input_Opt%NLevs_Phot_Cloud = v_int

!------------------------------------------------------------------------
! Directories with photolysis input files
!------------------------------------------------------------------------
Expand Down Expand Up @@ -3000,6 +3014,8 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
WRITE( 6,90 ) 'PHOTOLYSIS SETTINGS'
WRITE( 6,95 ) '-------------------'
WRITE( 6,100 ) 'Turn on photolysis? : ', Input_Opt%Do_Photolysis
WRITE( 6,130 ) 'Number levels with cloud : ', &
Input_Opt%Nlevs_Phot_Cloud
WRITE( 6,120 ) 'FAST-JX input directory : ', &
TRIM( Input_Opt%FAST_JX_DIR )
WRITE( 6,120 ) 'Cloud-J input directory : ', &
Expand Down Expand Up @@ -3031,7 +3047,8 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
105 FORMAT( A, F8.3 )
110 FORMAT( A, F4.2 )
120 FORMAT( A, A )

130 FORMAT( A, I5 )

END SUBROUTINE Config_Photolysis
!EOC
!------------------------------------------------------------------------------
Expand Down
36 changes: 19 additions & 17 deletions Headers/input_opt_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ MODULE Input_Opt_Mod
LOGICAL :: LBCAE
REAL(fp) :: BCAE_1
REAL(fp) :: BCAE_2
! for nitrate aerosol photolysis (TMS, 23/08/2018)
LOGICAL :: hvAerNIT
REAL(fp) :: hvAerNIT_JNIT
REAL(fp) :: hvAerNIT_JNITs
REAL(fp) :: JNITChanA
REAL(fp) :: JNITChanB

!----------------------------------------
! EMISSIONS fields
Expand Down Expand Up @@ -171,9 +165,6 @@ MODULE Input_Opt_Mod
REAL(fp) :: GAMMA_HO2
LOGICAL :: LACTIVEH2O
LOGICAL :: LINITSPEC
LOGICAL :: USE_ONLINE_O3
LOGICAL :: USE_O3_FROM_MET
LOGICAL :: USE_TOMS_O3
LOGICAL :: USE_AUTOREDUCE
LOGICAL :: AUTOREDUCE_IS_KEEPACTIVE
LOGICAL :: AUTOREDUCE_IS_KEY_THRESHOLD
Expand All @@ -192,6 +183,16 @@ MODULE Input_Opt_Mod
LOGICAL :: Do_Photolysis
CHARACTER(LEN=255) :: FAST_JX_DIR
CHARACTER(LEN=255) :: CloudJ_Dir
INTEGER :: Nlevs_Phot_Cloud
LOGICAL :: USE_ONLINE_O3
LOGICAL :: USE_O3_FROM_MET
LOGICAL :: USE_TOMS_O3
! for nitrate aerosol photolysis (TMS, 23/08/2018)
LOGICAL :: hvAerNIT
REAL(fp) :: hvAerNIT_JNIT
REAL(fp) :: hvAerNIT_JNITs
REAL(fp) :: JNITChanA
REAL(fp) :: JNITChanB

!----------------------------------------
! RADIATION MENU fields
Expand Down Expand Up @@ -612,11 +613,6 @@ SUBROUTINE Set_Input_Opt( am_I_Root, Input_Opt, RC )
Input_Opt%P_ICE_SUPERSAT = 0.0_fp
Input_Opt%LPSCCHEM = .FALSE.
Input_Opt%LSTRATOD = .FALSE.
Input_Opt%hvAerNIT = .FALSE.
Input_Opt%hvAerNIT_JNIT = 0.0_fp
Input_Opt%hvAerNIT_JNITs = 0.0_fp
Input_Opt%JNITChanA = 0.0_fp
Input_Opt%JNITChanB = 0.0_fp

!----------------------------------------
! EMISSIONS MENU fields
Expand Down Expand Up @@ -661,9 +657,6 @@ SUBROUTINE Set_Input_Opt( am_I_Root, Input_Opt, RC )
Input_Opt%GAMMA_HO2 = 0.0_fp
Input_Opt%LACTIVEH2O = .FALSE.
Input_Opt%LINITSPEC = .FALSE.
Input_Opt%USE_ONLINE_O3 = .FALSE.
Input_Opt%USE_O3_FROM_MET = .FALSE.
Input_Opt%USE_TOMS_O3 = .FALSE.

Input_Opt%USE_AUTOREDUCE = .FALSE.
Input_Opt%AUTOREDUCE_IS_KEY_THRESHOLD = .TRUE.
Expand All @@ -679,6 +672,15 @@ SUBROUTINE Set_Input_Opt( am_I_Root, Input_Opt, RC )
Input_Opt%Do_Photolysis = .FALSE.
Input_Opt%FAST_JX_DIR = ''
Input_Opt%CloudJ_Dir = ''
Input_Opt%Nlevs_Phot_Cloud = 0
Input_Opt%USE_ONLINE_O3 = .FALSE.
Input_Opt%USE_O3_FROM_MET = .FALSE.
Input_Opt%USE_TOMS_O3 = .FALSE.
Input_Opt%hvAerNIT = .FALSE.
Input_Opt%hvAerNIT_JNIT = 0.0_fp
Input_Opt%hvAerNIT_JNITs = 0.0_fp
Input_Opt%JNITChanA = 0.0_fp
Input_Opt%JNITChanB = 0.0_fp

!----------------------------------------
! RADIATION MENU fields (for RRTMG only)
Expand Down
1 change: 1 addition & 0 deletions run/CESM/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 22
input_directories:
fastjx_input_dir: /see/namelist/file
cloudj_input_dir: /see/namelist/file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 34
input_directories:
fastjx_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/FAST_JX/v2024-05-Hg/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2024-05/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 34
input_directories:
fastjx_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/FAST_JX/v2024-05/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2023-05/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 34
input_directories:
fastjx_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/FAST_JX/v2024-05/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2023-05/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 34
input_directories:
fastjx_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/FAST_JX/v2024-05/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2023-05/
Expand Down
1 change: 1 addition & 0 deletions run/GEOS/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ operations:

photolysis:
activate: true
num_levs_with_cloud: 34
input_directories:
fastjx_input_dir: /discover/nobackup/projects/gmao/share/dasilva/fvInput/ExtData/chemistry/GEOSCHEMchem/v0.0.0/CHEM_INPUTS/FAST_JX/v2023-10/
cloudj_input_dir: /discover/nobackup/projects/gmao/share/dasilva/fvInput/ExtData/chemistry/GEOSCHEMchem/v0.0.0/CHEM_INPUTS/CLOUD_J/v2023-05/
Expand Down
1 change: 1 addition & 0 deletions run/WRF/fullchem/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ operations:

photolysis:
input_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/CHEM_INPUTS/FAST_JX/v2021-10/
num_levs_with_cloud: 20
overhead_O3:
use_online_O3_from_model: true
use_column_O3_from_met: true
Expand Down

0 comments on commit 5cb776e

Please sign in to comment.