Skip to content

Commit

Permalink
Expand photolysis menu to set Cloud-J options at run-time
Browse files Browse the repository at this point in the history
Besides options previously in input file CJ77.dat, there is now the
option to turn off the UV absorption by water vapor.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
  • Loading branch information
lizziel committed Aug 13, 2024
1 parent acd3354 commit cb6caae
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 13 deletions.
18 changes: 15 additions & 3 deletions GeosCore/cldj_interface_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,21 @@ 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, Input_Opt%Nlevs_Phot_Cloud, &
TITLEJXX, JVN_, NJXX, RC)
CALL Init_CldJ(Input_Opt%amIRoot, &
Input_Opt%CloudJ_Dir, &
State_Grid%NZ, &
Input_Opt%Nlevs_Phot_Cloud, &
TITLEJXX, &
JVN_, &
Input_Opt%OD_Increase_Factor, &
Input_Opt%Min_Cloud_OD, &
Input_Opt%Num_WV_Bins, &
Input_Opt%Cloud_Flag, &
Input_Opt%Cloud_Corr, &
Input_Opt%Num_Max_Overlap, &
Input_Opt%Use_H2O_UV_Abs, &
NJXX, &
RC)
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Error encountered in subroutine Init_Cldj within Cloud-J photolysis'
CALL GC_Error( ErrMsg, RC, ThisLoc )
Expand Down
116 changes: 113 additions & 3 deletions GeosCore/input_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,7 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
Input_Opt%Do_Photolysis = v_bool

!------------------------------------------------------------------------
! Number levels with clouds to use in photolysis
! Number levels with clouds to use in photolysis (Cloud-J var LWEPAR)
!------------------------------------------------------------------------
key = "operations%photolysis%num_levs_with_cloud"
v_int = MISSING_INT
Expand All @@ -2807,6 +2807,109 @@ SUBROUTINE Config_Photolysis( Config, Input_Opt, RC )
ENDIF
Input_Opt%NLevs_Phot_Cloud = v_int

!------------------------------------------------------------------------
! Cloud-J cloud scheme flag (Cloud-J var CLDFLAG)
!------------------------------------------------------------------------
key = "operations%photolysis%cloud_scheme_flag"
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%Cloud_Flag = v_int

!------------------------------------------------------------------------
! Factor increase in cloud OD from layer to next below (Cloud-J var ATAU)
! NOTE: used for inserting extra cloud layers in Cloud-J
!------------------------------------------------------------------------
key = "operations%photolysis%opt_depth_increase_factor"
v_str = MISSING_STR
CALL QFYAML_Add_Get( Config, TRIM( key ), v_str, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Input_Opt%OD_Increase_Factor = Cast_and_RoundOff( v_str, places=4 )

!------------------------------------------------------------------------
! Minimum cloud OD in uppermost inserted layer (Cloud-J var ATAU0)
! NOTE: used for inserting extra cloud layers in Cloud-J
!------------------------------------------------------------------------
key = "operations%photolysis%min_top_inserted_cloud_OD"
v_str = MISSING_STR
CALL QFYAML_Add_Get( Config, TRIM( key ), v_str, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Input_Opt%Min_Cloud_OD = Cast_and_RoundOff( v_str, places=4 )

!------------------------------------------------------------------------
! Cloud correlation between max-overlap blocks (will set Cloud-J var CLDCOR)
! NOTE:
! - only used for cloud schemes 5 and above
! - 0.00 = random
!------------------------------------------------------------------------
key = "operations%photolysis%cloud_overlap_correlation"
v_str = MISSING_STR
CALL QFYAML_Add_Get( Config, TRIM( key ), v_str, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Input_Opt%Cloud_Corr = Cast_and_RoundOff( v_str, places=3 )

!------------------------------------------------------------------------
! Number of blocks with correlated cloud overlap (will set Cloud-J var LNRG)
! NOTE:
! - only used for cloud schemes 5 and above
! - limited values possible: 0 = max-ran @ gaps, 3 = alt blocks, 6 = max-overlap
!------------------------------------------------------------------------
key = "operations%photolysis%num_cloud_overlap_blocks"
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%Num_Max_Overlap = v_int

!------------------------------------------------------------------------
! Number of wavelength bins in UV-Vis (will set Cloud-J var NWBIN)
! NOTE: limited values possible
! 18 = standard full Fast-J
! 12 = trop-only (0% err in trop, 33% performance savings)
! 8 = trop-only (1-2% error in J-02 and J-OCS in upper trop, big savings)
!------------------------------------------------------------------------
key = "operations%photolysis%num_wavelength_bins"
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%Num_WV_Bins = v_int

!------------------------------------------------------------------------
! Whether to use absorption of UV by water vapor
!------------------------------------------------------------------------
key = "operations%photolysis%use_H2O_UV_absorption"
v_bool = MISSING_BOOL
CALL QFYAML_Add_Get( Config, TRIM( key ), v_bool, "", RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Input_Opt%USE_H2O_UV_Abs = v_bool

!------------------------------------------------------------------------
! Directories with photolysis input files
!------------------------------------------------------------------------
Expand Down Expand Up @@ -3014,12 +3117,19 @@ 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 : ', &
TRIM( Input_Opt%CloudJ_Dir )
WRITE( 6,130 ) 'Number levels with cloud : ', &
Input_Opt%Nlevs_Phot_Cloud
WRITE( 6,130 ) 'Cloud-J cloud flag : ', Input_Opt%Cloud_Flag
WRITE( 6,105 ) 'Layer OD increase factor : ', Input_Opt%OD_Increase_Factor
WRITE( 6,105 ) 'Min cloud OD at top : ', Input_Opt%Min_Cloud_OD
WRITE( 6,105 ) 'Cloud correlation : ', Input_Opt%Cloud_Corr
WRITE( 6,130 ) 'Max # of overlap bins : ', Input_Opt%Num_Max_Overlap
WRITE( 6,130 ) 'Number of wavelength bins : ', Input_Opt%Num_WV_Bins
WRITE( 6,100 ) 'Use H2O UV absorption? : ', Input_Opt%USE_H2O_UV_Abs
WRITE( 6,100 ) 'Use online ozone? : ', Input_Opt%USE_ONLINE_O3
WRITE( 6,100 ) 'Use ozone from met? : ', &
Input_Opt%USE_O3_FROM_MET
Expand Down
16 changes: 15 additions & 1 deletion Headers/input_opt_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,14 @@ MODULE Input_Opt_Mod
LOGICAL :: Do_Photolysis
CHARACTER(LEN=255) :: FAST_JX_DIR
CHARACTER(LEN=255) :: CloudJ_Dir
INTEGER :: Nlevs_Phot_Cloud
INTEGER :: Nlevs_Phot_Cloud ! Cloud-J var LWEPAR
INTEGER :: Cloud_Flag ! Cloud-J var CLDFLAG
REAL(fp) :: OD_Increase_Factor ! Cloud-J var ATAU
REAL(fp) :: Min_Cloud_OD ! Cloud-J var ATAU0
REAL(fp) :: Cloud_Corr ! Cloud-J var CLDCOR
INTEGER :: Num_Max_Overlap ! Cloud-J var LNRG
INTEGER :: Num_WV_Bins ! Cloud-J var NWBIN
LOGICAL :: USE_H2O_UV_Abs ! Cloud-J var USEH2OUV
LOGICAL :: USE_ONLINE_O3
LOGICAL :: USE_O3_FROM_MET
LOGICAL :: USE_TOMS_O3
Expand Down Expand Up @@ -673,6 +680,13 @@ SUBROUTINE Set_Input_Opt( am_I_Root, Input_Opt, RC )
Input_Opt%FAST_JX_DIR = ''
Input_Opt%CloudJ_Dir = ''
Input_Opt%Nlevs_Phot_Cloud = 0
Input_Opt%Cloud_Flag = 0
Input_Opt%OD_Increase_Factor = 0.0_fp
Input_Opt%Min_Cloud_OD = 0.0_fp
Input_Opt%Cloud_Corr = 0
Input_Opt%Num_Max_Overlap = 0
Input_Opt%Num_WV_Bins = 0
Input_Opt%USE_H2O_UV_Abs = .FALSE.
Input_Opt%USE_ONLINE_O3 = .FALSE.
Input_Opt%USE_O3_FROM_MET = .FALSE.
Input_Opt%USE_TOMS_O3 = .FALSE.
Expand Down
7 changes: 7 additions & 0 deletions run/CESM/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: 22
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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 @@ -66,9 +66,16 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: ${RUNDIR_PHOT_CLD_NLEV}
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: ${RUNDIR_USE_ONLINE_O3}
use_column_O3_from_met: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,16 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: ${RUNDIR_PHOT_CLD_NLEV}
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: false
use_column_O3_from_met: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,16 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: ${RUNDIR_PHOT_CLD_NLEV}
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: ${RUNDIR_USE_ONLINE_O3}
use_column_O3_from_met: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: ${RUNDIR_PHOT_CLD_NLEV}
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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/
cloudj_input_dir: ${RUNDIR_DATA_ROOT}/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: ${RUNDIR_USE_ONLINE_O3}
use_column_O3_from_met: true
Expand Down
9 changes: 8 additions & 1 deletion run/GEOS/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ operations:
photolysis:
activate: true
num_levs_with_cloud: 34
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
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/
cloudj_input_dir: /discover/nobackup/projects/gmao/share/dasilva/fvInput/ExtData/chemistry/GEOSCHEMchem/v0.0.0/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: true
use_column_O3_from_met: true
Expand Down
12 changes: 11 additions & 1 deletion run/WRF/fullchem/geoschem_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,18 @@ operations:
use_non_local_pbl: true

photolysis:
input_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/CHEM_INPUTS/FAST_JX/v2021-10/
activate: true
num_levs_with_cloud: 20
cloud_scheme_flag: 3
opt_depth_increase_factor: 1.050
min_top_inserted_cloud_OD: 0.005
cloud_overlap_correlation: 0.33
num_cloud_overlap_blocks: 6
num_wavelength_bins: 18
use_H2O_UV_absorption: true
input_directories:
fastjx_input_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/CHEM_INPUTS/FAST_JX/v2024-05/
cloudj_input_dir: /n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/CHEM_INPUTS/CLOUD_J/v2024-08/
overhead_O3:
use_online_O3_from_model: true
use_column_O3_from_met: true
Expand Down

0 comments on commit cb6caae

Please sign in to comment.