Skip to content
Merged
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
7 changes: 5 additions & 2 deletions bld/namelist_files/namelist_defaults_cam.xml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me.

Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@
<!-- Time-variant chemistry surface values -->
<bndtvghg>atm/cam/ggas/ghg_hist_1765-2005_c091218.nc</bndtvghg>
<flbc_file>atm/waccm/lb/LBC_1765-2100_1.9x2.5_CCMI_RCP60_za_RNOCStrend_c141002.nc</flbc_file>
<flbc_file chem="ghg_mam4">atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc</flbc_file>
<flbc_file chem="ghg_mam4" phys="cam6">atm/waccm/lb/LBC_17500116-20150116_CMIP6_0p5degLat_c180905.nc</flbc_file>
<flbc_file phys="cam7">atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_OCSupdate_c250523.nc</flbc_file>

<!-- Time-variant CO2 fossil fuel emissions -->
<co2flux_fuel_file hgrid="0.9x1.25" sim_year="1850-2015">atm/cam/ggas/emissions-cmip6_CO2_anthro_surface_175001-201512_fv_0.9x1.25_c20181011.nc</co2flux_fuel_file>
Expand Down Expand Up @@ -866,6 +867,7 @@
<gw_prndl chem="trop_strat_mam4_slh">0.5d0 </gw_prndl>
<gw_prndl chem="trop_strat_mam5_slh">0.5d0 </gw_prndl>
<gw_oro_south_fac >1.d0 </gw_oro_south_fac>
<gw_oro_south_fac model_top="mt">1.d0 </gw_oro_south_fac>
Comment thread
cacraigucar marked this conversation as resolved.
<gw_oro_south_fac waccm_phys="1">2.d0 </gw_oro_south_fac>
<gw_oro_south_fac model_top="ht">2.d0 </gw_oro_south_fac>
<gw_oro_south_fac chem="geoschem_mam4">2.d0 </gw_oro_south_fac>
Expand All @@ -878,6 +880,7 @@
<gw_oro_south_fac carma="trop_strat_soa1">2.D0</gw_oro_south_fac>
<gw_oro_south_fac carma="trop_strat_soa5">2.D0</gw_oro_south_fac>
<gw_lndscl_sgh >.true. </gw_lndscl_sgh>
<gw_lndscl_sgh model_top="mt">.true. </gw_lndscl_sgh>
<gw_lndscl_sgh waccm_phys="1">.false.</gw_lndscl_sgh>
<gw_lndscl_sgh model_top="ht">.false.</gw_lndscl_sgh>
<gw_lndscl_sgh chem="geoschem_mam4">.false.</gw_lndscl_sgh>
Expand Down Expand Up @@ -2608,7 +2611,7 @@
<seasalt_emis_scale ver="mam7" >1.62D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" >0.90D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" clubb_sgs="1" >1.00D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" clubb_sgs="1" phys="cam7" >1.50D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" clubb_sgs="1" phys="cam7" >1.55D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" clubb_sgs="1" hgrid="1.9x2.5" phys="cam6">1.10D0</seasalt_emis_scale>
<seasalt_emis_scale ver="strat" clubb_sgs="1" silhs="1" >0.60D0</seasalt_emis_scale>

Expand Down
1 change: 0 additions & 1 deletion bld/namelist_files/use_cases/1850_cam_lt.xml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine to me.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine to me.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<solar_data_type> FIXED </solar_data_type>

<!-- LBC Files : -->
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_cycle_yr>1850</flbc_cycle_yr>
<flbc_type>'CYCLICAL'</flbc_type>
<flbc_list>'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'</flbc_list>
Expand Down
1 change: 0 additions & 1 deletion bld/namelist_files/use_cases/1850_cam_mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<solar_data_type> FIXED </solar_data_type>

<!-- LBC Files : -->
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_cycle_yr>1850</flbc_cycle_yr>
<flbc_type>'CYCLICAL'</flbc_type>
<flbc_list>'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'</flbc_list>
Expand Down
176 changes: 163 additions & 13 deletions bld/namelist_files/use_cases/1850_trop_strat_t4s_cam7.xml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no clue whether this is correct or not. I will let Simone or someone else reviews this

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that looks fine

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion bld/namelist_files/use_cases/hist_cam_lt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<solar_irrad_data_file>atm/cam/solar/SolarForcingCMIP7-4.6_18491230-20240101_sumEPP_c20250630.nc</solar_irrad_data_file>

<!-- LBC Files -->
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_type>'SERIAL'</flbc_type>
<flbc_list>'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'</flbc_list>

Expand Down
1 change: 0 additions & 1 deletion bld/namelist_files/use_cases/hist_cam_mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<solar_irrad_data_file>atm/cam/solar/SolarForcingCMIP7-4.6_18491230-20240101_sumEPP_c20250630.nc</solar_irrad_data_file>

<!-- LBC Files -->
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_type>'SERIAL'</flbc_type>
<flbc_list>'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'</flbc_list>

Expand Down
5 changes: 2 additions & 3 deletions bld/namelist_files/use_cases/hist_trop_strat_t4s_cam7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@

<!-- Lower boundary concentrations -->
<flbc_type>SERIAL</flbc_type>
<flbc_file>atm/waccm/lb/LBC_17500116-25001216_CMIP6_SSP585_0p5degLat_c20200824.nc</flbc_file>
<flbc_list>
'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'CFC114', 'CFC115', 'HCFC141B', 'HCFC142B', 'H2402', 'OCS', 'SF6', 'CFC11eq'
'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'CFC114', 'CFC115', 'HCFC141B', 'HCFC142B', 'CH2BR2', 'CHBR3', 'H2402', 'OCS', 'SF6', 'CFC11eq'
</flbc_list>

<!-- history output -->
Expand Down
3 changes: 1 addition & 2 deletions bld/namelist_files/use_cases/waccm_ma_hist_cam7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@

<!-- LBC, UBC Files -->
<flbc_type>SERIAL</flbc_type>
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_list>
'CCL4', 'CF2CLBR', 'CF3BR', 'CFC11', 'CFC113', 'CFC12', 'CH3BR', 'CH3CCL3', 'CH3CL', 'CH4', 'CO2', 'H2',
'HCFC22', 'N2O', 'CFC114', 'CFC115', 'HCFC141B', 'HCFC142B', 'CH2BR2', 'CHBR3', 'H2402', 'OCS', 'CFC11eq'
'HCFC22', 'N2O', 'CFC114', 'CFC115', 'HCFC141B', 'HCFC142B', 'CH2BR2', 'CHBR3', 'H2402', 'OCS', 'SF6', 'CFC11eq'
</flbc_list>

<!-- Upper Boundary -->
Expand Down
1 change: 0 additions & 1 deletion bld/namelist_files/use_cases/waccm_sc_hist_cam7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

<!-- LBC, UBC Files -->
<flbc_type>SERIAL</flbc_type>
<flbc_file>atm/waccm/lb/CMIP7/LBC_17500116-20221216_CMIP7_0p5degLat_c250326.nc</flbc_file>
<flbc_list>'CO2','CH4','N2O','CFC11','CFC12','CFC11eq'</flbc_list>

<!-- upper atmos forcings -->
Expand Down
10 changes: 10 additions & 0 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,16 @@
<option name="comment" >Medium-top CAM-Chem with simpler climate chemistry</option>
</options>
</test>
<test compset="1850C_CAM70%MT%CT4S2_CLM60%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV_SESP" grid="ne30pg3_ne30pg3_mt232" name="SMS_D_Ln9" testmods="cam/outfrq9s">
<machines>
<machine name="derecho" compiler="intel" category="camchem"/>
<machine name="derecho" compiler="intel" category="aux_cam"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
<option name="comment" >1850 Medium-top CAM-Chem with simpler climate chemistry</option>
</options>
</test>
<test compset="FW2000climo" grid="f09_f09_mg17" name="SMS_Ld1" testmods="cam/outfrq1d">
<machines>
<machine name="derecho" compiler="intel" category="aux_cam"/>
Expand Down
158 changes: 158 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,163 @@
===============================================================

Tag name: cam6_4_167
Originator(s): fvitt
Date: 23 Apr 2026
One-line Summary: Updates for cam7 compsets
Github PR URL: https://github.com/ESCOMP/CAM/pull/1534

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

Update LBC file for cam7 compsets #1539
Update default namelist settings for 1850 MTt4s and adjust default history fields #1527
Improve error messaging in O2 chemistry #1528

Describe any changes made to build system: N/A

Describe any changes made to the namelist: N/A

List any changes to the defaults for the boundary datasets: N/A

Describe any substantial timing or memory changes: N/A

Code reviewed by: cacraigucar, tilmes, cecilehannay

List all files eliminated: N/A

List all files added and what they do: N/A

List all existing files that have been modified, and describe the changes:

M bld/namelist_files/namelist_defaults_cam.xml
- update cam7 default namelist settings

M bld/namelist_files/use_cases/1850_cam_lt.xml
M bld/namelist_files/use_cases/1850_cam_mt.xml
M bld/namelist_files/use_cases/hist_cam_lt.xml
M bld/namelist_files/use_cases/hist_cam_mt.xml
M bld/namelist_files/use_cases/waccm_sc_hist_cam7.xml
- default LBC file is now specified in namelist_defaults_cam.xml

M bld/namelist_files/use_cases/1850_trop_strat_t4s_cam7.xml
- namelist updates for 1850 MTt4s

M bld/namelist_files/use_cases/waccm_ma_hist_cam7.xml
M bld/namelist_files/use_cases/hist_trop_strat_t4s_cam7.xml
- update flbc_list

M cime_config/testdefs/testlist_cam.xml
- add test for 1850 MTt4s

M src/chemistry/mozart/mo_jshort.F90
- improve error checking and reporting

M src/physics/cam/aerosol_optics_cam.F90
- modify history_aero_optics default fields

M src/physics/cam/ndrop.F90
- include CCN4 in history_amwg default fields

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

derecho/intel/aux_cam:

DIFF ERC_D_Ln9.mpasa120_mpasa120.FHISTC_LTso.derecho_intel.cam-outfrq9s_mpasa120
DIFF ERP_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_MTso.derecho_intel.cam-outfrq9s
DIFF ERP_Ld3.ne16pg3_ne16pg3_mg17.FHISTC_WAt1ma.derecho_intel.cam-reduced_hist1d
DIFF ERP_Ld3.ne30pg3_ne30pg3_mt232.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa
DIFF ERR_Ln9.ne16pg3_ne16pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s_bwic
DIFF ERS_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s_ctem
DIFF SMS_C2_D_Ln9.ne16pg3_ne16pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_MTso.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mt232.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust
DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WAma.derecho_intel.cam-outfrq9s
- expected differences due to updates in LBC file and seasalt_emis_scale factor

DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mt232.1850C_CAM70%MT%CT4S2_CLM60%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV_SESP.derecho_intel.cam-outfrq9s
- new test -- no baselines to compare against

DIFF ERC_D_Ln9.f09_f09_mt232.FHIST_BDRD.derecho_intel.cam-outfrq9s
DIFF ERC_D_Ln9.f19_f19_mt232.QPC6.derecho_intel.cam-outfrq3s_cosp
DIFF ERC_D_Ln9.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120
DIFF ERC_Ln9.C96_C96_mt232.F2000climo.derecho_intel.cam-outfrq9s
DIFF ERI_D_Ln18.f09_f09_mt232.FHIST.derecho_intel.cam-outfrq3s_eri
DIFF ERI_D_Ln18.f19_f19_mt232.FHIST_C5.derecho_intel.cam-outfrq3s_eri
DIFF ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s
DIFF ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s
DIFF ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s
DIFF ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s
DIFF ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s
DIFF ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday
DIFF SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f19_f19_mg17.FCARMA2000climo.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f19_f19_mg17.FCHIST_SLH.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s
DIFF SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4
DIFF SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase
DIFF SMS_D_Ln9.f19_f19_mt232.FHIST_C5.derecho_intel.cam-mam7
DIFF SMS_D_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s
DIFF SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d
DIFF SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d
DIFF SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d
DIFF SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h
DIFF SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp
DIFF SMS_D_Ln9_P1536x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s
- differ only in field list, otherwise bit-for-bit

derecho/nvhpc/aux_cam:
FAIL ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default COMPARE_base_rest
- pre-existing restart test failure

FAIL ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default NLCOMP
FAIL ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default BASELINE /glade/campaign/cesm/community/amwg/cam_baselines/cam6_4_166_nvhpc: DIFF
- expected differences due to updates in LBC file and seasalt_emis_scale factor

izumi/nag/aux_cam:
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol
- pre-existing failure -- see https://github.com/ESCOMP/CAM/issues/1514

DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-outfrq9s_nochem
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-cosp_rad_diags
- expected differences due to updates in LBC file and seasalt_emis_scale factor

DIFF ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s
DIFF ERC_D_Ln9.f10_f10_mt232.FHIST.izumi_nag.cam-outfrq3s_cospsathist
DIFF SMS_D_Ln9.f10_f10_mt232.F1850.izumi_nag.cam-outfrq9s
DIFF TMC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-mc_ttrac
- differ only in field list, otherwise bit-for-bit

izumi/gnu/aux_cam:
DIFF ERC_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s
DIFF ERC_D_Ln9.f10_f10_mg37.QPC4.izumi_gnu.cam-outfrq3s_diags
DIFF ERC_D_Ln9.f19_f19_mt232.FHIST.izumi_gnu.cam-lonlat_fv_diags
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST_C5.izumi_gnu.cam-carma_cosp_rad_diag_mam
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC5.izumi_gnu.cam-outfrq9s
DIFF ERS_Ln9_P24x1.mpasa480_mpasa480.F2000climo.izumi_gnu.cam-outfrq9s_mpasa480
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal0
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal1
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal3
DIFF SMS_D_Ln9.f10_f10_mg37.FWmaHIST.izumi_gnu.cam-outfrq9s_mee_fluxes
DIFF SUB_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-outfrq9s
- differ only in field list, otherwise bit-for-bit

DIFF ERC_D_Ln9.mpasa480_mpasa480_mt232.FHISTC_LTso.izumi_gnu.cam-outfrq9s_mpasa480
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_gnu.cam-sat_lcltod
- expected differences due to updates in LBC file and seasalt_emis_scale factor

NLFAIL SMS_D_Ln3.ne3pg3_ne3pg3_mt232.PC7.izumi_gnu.cam-pc7_ne3pg3
- new LBC file

Summarize any changes to answers:
Large than round-off due to updates in LBC file and seasalt_emis_scale factor

===============================================================
===============================================================

Tag name: cam6_4_166
Originator(s): huebleruwm, adamrher, cacraigucar
Date: April 21, 2026
Expand Down
37 changes: 28 additions & 9 deletions src/chemistry/mozart/mo_jshort.F90
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ subroutine get_crs( xs_short_file, sht_indexer )
else
write(iulog,*) 'get_crs : ',rxt_tag_lst(m)(:len_trim(rxt_tag_lst(m))),' alias ', &
pht_alias_lst(m,1)(:len_trim(pht_alias_lst(m,1))),' not in dataset'
call endrun
call endrun('mo_jshort::get_crs error')
end if
end if
end do
Expand Down Expand Up @@ -315,7 +315,7 @@ subroutine get_crs( xs_short_file, sht_indexer )
deallocate( xs_species )
if( ndx /= nj ) then
write(iulog,*) 'get_crs : ndx count /= cross section count'
call endrun
call endrun('mo_jshort::get_crs: ndx count /= cross section count')
end if
!------------------------------------------------------------------------------
! ... get jo3 cross sections
Expand Down Expand Up @@ -385,6 +385,7 @@ subroutine xs_init(xs_coef_file)
integer :: istat ! i/o status
integer :: i, j
character(len=256) :: locfn
character(len=256) :: errstr

!----------------------------------------------------------------------
! ... Get first strato photo rate file
Expand All @@ -403,8 +404,8 @@ subroutine xs_init(xs_coef_file)
!----------------------------------------------------------------------
! ... Open error exit
!----------------------------------------------------------------------
write(iulog,*) 'xs_init: error ',istat,' opening file ',trim(locfn)
call endrun
write(errstr,*) 'mo_jshort::xs_init: error ',istat,' opening file ',trim(locfn)
call endrun(trim(errstr))
end if
!----------------------------------------------------------------------
! ... read file
Expand All @@ -414,16 +415,16 @@ subroutine xs_init(xs_coef_file)
read(unit,903,iostat=istat) ac(i,:)
if( istat /= 0 ) then
write(iulog,*) 'xs_init: error ',istat,' reading ac'
call endrun
call endrun('mo_jshort::xs_init read file error')
end if
end do

read(unit,901)
do i = 1,20
read(unit,903,iostat=istat) bc(i,:)
if( istat /= 0 ) then
write(iulog,*) 'xs_init: error ',istat,' reading bc'
call endrun
write(errstr,*) 'xs_init: error ',istat,' reading bc'
call endrun(trim(errstr))
end if
end do
close( unit )
Expand Down Expand Up @@ -619,6 +620,9 @@ subroutine jshort_hrates( nlev, zen, o2_vmr, o3_vmr, o2cc, &
real(r8) :: tsrb(nlev,nsrbtuv) ! Transmission in the SRB
real(r8) :: xs_o2srb(nlev,nsrbtuv) ! Cross section * QY for O2 in SRB

! check for realistic O2 concentrations
call check_o2_col( o2cc )

allocate( fnorm(nlev,nw),stat=astat )
if( astat /= 0 ) then
call alloc_err( astat, 'jshort_hrates', 'fnorm', nw*nlev )
Expand Down Expand Up @@ -944,6 +948,9 @@ subroutine jshort_photo( nlev, zen, n2cc, o2cc, o3cc, &
real(r8) :: tsrb(nlev,nsrbtuv) ! Transmission in the SRB
real(r8) :: xs_o2srb(nlev,nsrbtuv) ! Cross section * QY for O2 in SRB

! check for realistic O2 concentrations
call check_o2_col( o2cc )

allocate( fnorm(nlev,nw),stat=astat )
if( astat /= 0 ) then
call alloc_err( astat, 'jshort_photo', 'fnorm', nw*nlev )
Expand Down Expand Up @@ -1487,6 +1494,7 @@ subroutine calc_o2srb( nlev, nid, o2col, tlev, tsrb, xscho2 )
real(r8) :: dtsrb(nlev)
real(r8) :: tsrb_rev(nlev,nsrbtuv)
real(r8) :: xs(nsrbtuv)
character(len=256) :: errstr

!------------------------------------------------------------------------------
! ... Calculate cross sections
Expand Down Expand Up @@ -1562,8 +1570,8 @@ subroutine calc_o2srb( nlev, nid, o2col, tlev, tsrb, xscho2 )
term1 = log( xscho2(k+1,i)/xscho2(k,i) )
term2 = log( o2col(k+1)/o2col(k) )
if( term2 == 0._r8 ) then
write(iulog,*) 'calc_o2srb : o2col(k:k+1),xscho2(k:k+1,i) = ',o2col(k:k+1),xscho2(k:k+1,i),' @ i,k = ',i,k
call endrun
write(errstr,*) 'calc_o2srb : o2col(k:k+1),xscho2(k:k+1,i) = ',o2col(k:k+1),xscho2(k:k+1,i),' @ i,k = ',i,k
call endrun(trim(errstr))
end if
den = 1._r8 + log( xscho2(k+1,i)/xscho2(k,i) )/log( o2col(k+1)/o2col(k) )
dto2 = abs(num/den)
Expand Down Expand Up @@ -1870,4 +1878,15 @@ end function pjno

end subroutine calc_jno

!----------------------------------------------------------------
subroutine check_o2_col( o2cc )
real(r8), intent(in) :: o2cc(:) ! o2 conc (mol/cm^3)

if (maxval(o2cc)<1.0_r8) then
write(*,*) 'mo_jshort input O2 (mol/cm^3): ',o2cc
call endrun('mo_jshort -- unrealistic O2 concentrations needed for absorption')
end if

end subroutine check_o2_col

end module mo_jshort
Loading
Loading