Skip to content

Commit

Permalink
change logic for use_do3_streams
Browse files Browse the repository at this point in the history
  • Loading branch information
adrifoster committed May 6, 2024
1 parent 87c2183 commit f1778be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4247,7 +4247,7 @@ sub setup_logic_do3_streams {
} else {
if ( defined($nl->get_value('stream_fldfilename_do3'))) {
$log->fatal_error("One of the do3 streams namelist items (stream_fldfilename_do3, " .
" is defined, but use_do3_streams option NOT set to true");
" is defined, but use_do3_streams option set to false");
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1733,8 +1733,7 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c
<lai_mapalgo hgrid="5x5_amazon" >nn</lai_mapalgo>

<!-- do3 streams namelist defaults -->
<use_do3_streams>.false.</use_do3_streams>

<use_do3_streams>.true.</use_do3_streams>
<stream_fldfilename_do3>/glade/work/afoster/ozone_update/ozone_damage_files/converted/diurnal_factor_O3surface_ssp370_2015-2024_c20220502.nc</stream_fldfilename_do3>
<stream_meshfile_do3>share/meshes/fv0.9x1.25_141008_polemod_ESMFmesh.nc</stream_meshfile_do3>
<do3_mapalgo>bilinear</do3_mapalgo>
Expand Down
5 changes: 3 additions & 2 deletions src/biogeophys/OzoneMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module OzoneMod
use shr_ozone_coupling_mod , only : atm_ozone_frequency_multiday_average, shr_ozone_coupling_readnl
use DiurnalOzoneType , only : diurnal_ozone_anom_type
use diurnalOzoneStreamMod , only : read_O3_stream
use controlMod , only : use_do3_streams

implicit none
save
Expand Down Expand Up @@ -162,7 +163,7 @@ subroutine Init(this, bounds, o3_veg_stress_method)

! if we have multi-day average input ozone, we need to convert to sub-daily using
! an input anomaly file
if (this%atm_ozone_freq == atm_ozone_frequency_multiday_average) then
if (this%atm_ozone_freq == atm_ozone_frequency_multiday_average .and. use_do3_streams) then
! initialize and read in data for diurnal O3 anomaly stream
call read_O3_stream(this%diurnalOzoneAnomInst, bounds)
end if
Expand Down Expand Up @@ -440,7 +441,7 @@ subroutine CalcOzoneUptake(this, bounds, num_exposedvegp, filter_exposedvegp, &
tlai_old => this%tlai_old_patch & ! Output: [real(r8) (:)] tlai from last time step
)

if (this%atm_ozone_freq == atm_ozone_frequency_multiday_average) then
if (this%atm_ozone_freq == atm_ozone_frequency_multiday_average .and. use_do3_streams) then
call this%diurnalOzoneAnomInst%Interp(bounds, forc_o3, forc_o3_down)
else
forc_o3_down(bounds%begg:bounds%endg) = forc_o3(bounds%begg:bounds%endg)
Expand Down
2 changes: 1 addition & 1 deletion src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module clm_varctl
character(len=64), public :: o3_veg_stress_method = 'unset'

! o3_streams parameters
logical, public :: use_do3_streams = .false.
logical, public :: use_do3_streams = .true.
character(len=fname_len), public :: stream_fldfilename_do3
character(len=fname_len), public :: stream_meshfile_do3
character(len=fname_len), public :: do3_mapalgo
Expand Down

0 comments on commit f1778be

Please sign in to comment.