Skip to content

cam6_4_028: Dust emissions #1104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
610e7a9
implement soil erod switch
fvitt Jan 27, 2023
5311341
implement soil erod switch for bulk model
fvitt Jan 31, 2023
0322253
Merge remote-tracking branch 'origin/soil_erod_switch' into dust_emis…
fvitt Jul 24, 2024
92b6bac
use Erik's CTSM branch
fvitt Jul 24, 2024
bfb1886
use shr_dust_emis_mod inquiry functions
fvitt Jul 25, 2024
9cb0551
add checking for consistent settings; old atm/zender method b4b
fvitt Jul 25, 2024
f7b9e5d
define and set default namelist variables
fvitt Jul 25, 2024
b01294f
fix issue with aqua-planet
fvitt Jul 26, 2024
37fae81
use new ctsm tag
fvitt Aug 5, 2024
e393c66
use Leung_2023 for cam7 phys
fvitt Aug 12, 2024
712dead
Use Erik's CTSM hash; fix issues in build-namelist
fvitt Aug 22, 2024
ba285ec
fix issue in build-namelist
fvitt Aug 23, 2024
e6d302c
fix bug in emis scaling when Leung is used
fvitt Aug 23, 2024
eb6518a
Default Zender for all configs; use tag ctsm5.2.027
fvitt Aug 29, 2024
62b248c
Merge remote-tracking branch 'ESCOMP/cam_development' into dust_emiss…
fvitt Aug 29, 2024
95c159b
regression test Leung dust emis scheme
fvitt Aug 29, 2024
caa1bd3
correct typo in testlist_cam
fvitt Aug 29, 2024
01c9a7a
Merge remote-tracking branch 'ESCOMP/cam_development' into dust_emiss…
fvitt Sep 3, 2024
28e02f1
Increase time for HEMCO test
fvitt Sep 3, 2024
1ea1baa
Remove soil_erod setting when Leung is used in buld dust; ChangeLog d…
fvitt Sep 3, 2024
a950fae
change megan setting appease the atm lnd drv_flds_in compare
fvitt Sep 3, 2024
c424825
Override LND_SETS_DUST_EMIS_DRV_FLDS only for cam7/clm6
fvitt Sep 4, 2024
e7627ac
update ChangeLog
fvitt Sep 4, 2024
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
5 changes: 2 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ fxDONOTUSEurl = https://github.com/NCAR/ParallelIO

[submodule "clm"]
path = components/clm
url = https://github.com/ESCOMP/CTSM
fxtag = ctsm5.2.009
url = https://github.com/ekluzek/CTSM
fxtag = 786252bb0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a reminder (more for me than you) to update this to the official CTSM tag when it is ready

Copy link

Choose a reason for hiding this comment

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

This can now be replaced with ctsm5.2.027

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @ekluzek
Updating to from ctsm5.2.009 to ctsm5.2.027 changes answers for the F compsets, even when Zender scheme is used. Is this expected? I see several namelist changes in lnd_in.

Copy link

Choose a reason for hiding this comment

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

Yes, this is expected. There's several rounds of answer changes between 009 and 027. I can map out what they are if you like and that would help.

Is it OK for your CAM tag to have CLM answer changes in it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We typically update answer changing externals for CAM runs in their own tag, so I'd like to pull it in separate. @fvitt - would you be willing to do this, or do we need to do this on the AMP side?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The exception to this is if @fvitt has independently already run the regression tests with his changes and they are BFB except for the test(s) which use the dust. If this has been done, he can document in the ChangeLog that he has independently tested that "the code changes were independently tested and were non-answer changing for all but the dust configurations. All answer changes to non-dust runs are due to updating CLM". If these tests haven't been run, then it probably makes sense to just split it into two CAM tags.

Copy link
Author

Choose a reason for hiding this comment

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

@cacraigucar Yes I can do the update of CTSM in a separate CAM tag.
@ekluzek Can you provide a summary of the ctsm changes that affect F compsets?

Copy link

Choose a reason for hiding this comment

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

Here's the list of things I expected to affect CAM F compsets in a substantial way:

  • ctsm5.2.016 -- changes answers for clm6_0 for crop grid cells
  • ctsm5.2.020 -- changes answers for all physics options for MEGAN BGVOC's which will affect CAM-Chem simulations
  • ctsm5.2.026 -- change answers for clm6_0 over urban grid cells

There's a few others that still might affect CAM F compsets, but I expect them to be much smaller. Go to the bottom of this wiki page to see a full description of CTSM answer changing tags:

https://github.com/ESCOMP/CTSM/wiki/Answer-changing-tags

fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/CTSM

Expand All @@ -189,4 +189,3 @@ url = https://github.com/ESCOMP/FMS_interface
fxtag = fi_240516
fxrequired = ToplevelRequired
fxDONOTUSEurl = https://github.com/ESCOMP/FMS_interface

67 changes: 42 additions & 25 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,14 @@ if ($cfg->get('debug')) {
my $prescribe_aerosols = $TRUE;
if ($simple_phys) {$prescribe_aerosols = $FALSE;}

# CTSM Dust emissions scheme
my $soil_erod_atm = $FALSE;
add_default($nl, 'dust_emis_method');
if ( $nl->get_value('dust_emis_method') =~ /Zender/ ) {
add_default($nl, 'zender_soil_erod_source');
if ($nl->get_value('zender_soil_erod_source') =~ /atm/) {$soil_erod_atm = $TRUE;}
}

# Chemistry deposition lists
if ( ($chem ne 'none') or ( $prog_species ) ){
my $chem_proc_src = $cfg->get('chem_proc_src');
Expand Down Expand Up @@ -1786,7 +1794,7 @@ if ( $prog_species ) {
add_default($nl, 'ghg_chem', 'val'=>".true.");
add_default($nl, 'bndtvg');
}
if ( $prog_species =~ /DST/ ) {
if ( $prog_species =~ /DST/ and $soil_erod_atm =~ /$TRUE/) {
add_default($nl, 'soil_erod_file' );
}

Expand Down Expand Up @@ -2076,9 +2084,11 @@ if ($chem =~ /geoschem/) {
add_default($nl, 'flbc_cycle_yr', 'val'=>'2000');
}

my @files;
# Datasets
@files = ( 'soil_erod_file', 'flbc_file' );
my @files = ( 'flbc_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2117,12 +2127,15 @@ if ($chem =~ /trop_mozart/ or $chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
my @files;
# Datasets
if ($chem =~ /trop_strat/ or $chem =~ /waccm_tsmlt/) {
@files = ( 'soil_erod_file', 'flbc_file',
@files = ( 'flbc_file',
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file' );
} else {
@files = ( 'soil_erod_file', 'flbc_file',
@files = ( 'flbc_file',
'xs_coef_file','xs_short_file','xs_long_file', 'rsf_file', 'exo_coldens_file', 'sulf_file' );
}
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2220,8 +2233,10 @@ if ($chem eq 'trop_mam3') {
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ( 'xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2725,8 +2740,10 @@ if (($chem eq 'trop_mam4') or ($chem eq 'waccm_sc_mam4') or ($chem eq 'ghg_mam4'
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ('xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2814,8 +2831,10 @@ if ($chem eq 'trop_mam7') {
add_default($nl, 'flbc_list', 'val'=>"' '");

# Datasets
my @files = ('soil_erod_file',
'xs_long_file', 'rsf_file', 'exo_coldens_file' );
my @files = ('xs_long_file', 'rsf_file', 'exo_coldens_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}
foreach my $file (@files) {
add_default($nl, $file);
}
Expand Down Expand Up @@ -2874,8 +2893,10 @@ if ($chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/) {
'photon_file', 'electron_file', 'igrf_geomag_coefs_file',
'euvac_file', 'solar_parms_data_file',
'depvel_lnd_file',
'xs_coef_file', 'xs_short_file','xs_long_file', 'rsf_file',
'soil_erod_file' );
'xs_coef_file', 'xs_short_file','xs_long_file', 'rsf_file' );
if ($soil_erod_atm =~ /$TRUE/) {
@files = ( @files, 'soil_erod_file' );
}

if (!$waccmx) { @files = (@files, 'tgcm_ubc_file', 'snoe_ubc_file' ); }

Expand Down Expand Up @@ -3713,19 +3734,15 @@ if ($cfg->get('microphys') eq 'rk') {
}

# Dust emissions tuning factor
# If dust is prognostic ==> supply the tuning factor
if ( length($nl->get_value('soil_erod_file'))>0 ) {
# check whether turbulent mountain stress parameterization is on
if ($nl->get_value('do_tms') =~ /$TRUE/io) {
add_default($nl, 'dust_emis_fact', 'tms'=>'1');
# check whether turbulent mountain stress parameterization is on
if ($nl->get_value('do_tms') =~ /$TRUE/io) {
add_default($nl, 'dust_emis_fact', 'tms'=>'1');
} else {
if ($chem =~ /trop_strat/ or $chem =~ /geoschem/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
add_default($nl, 'dust_emis_fact', 'ver'=>'chem');
}
else {
if ($chem =~ /trop_strat/ or $chem =~ /geoschem/ or $chem =~ /waccm_ma/ or $chem =~ /waccm_tsmlt/ or $chem =~ /trop_mozart/) {
add_default($nl, 'dust_emis_fact', 'ver'=>'chem');
}
else {
add_default($nl, 'dust_emis_fact');
}
add_default($nl, 'dust_emis_fact');
}
}
if (chem_has_species($cfg, 'NO')) {
Expand Down Expand Up @@ -4410,7 +4427,7 @@ my %nl_group = ();
foreach my $name (@nl_groups) { $nl_group{$name} = ''; }

# Dry deposition, MEGAN VOC emis and ozone namelists
@comp_groups = qw(drydep_inparm megan_emis_nl fire_emis_nl carma_inparm ndep_inparm ozone_coupling_nl lightning_coupling_nl);
@comp_groups = qw(drydep_inparm megan_emis_nl fire_emis_nl carma_inparm ndep_inparm ozone_coupling_nl lightning_coupling_nl dust_emis_inparm);

$outfile = "$opts{'dir'}/drv_flds_in";
$nl->write($outfile, 'groups'=>\@comp_groups);
Expand Down
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,11 @@
<dust_emis_fact hgrid="0.47x0.63" offline_dyn="1" phys="cam6" ver="chem">0.9D0</dust_emis_fact>
<dust_emis_fact hgrid="0.47x0.63" offline_dyn="1" phys="cam7" ver="chem">0.9D0</dust_emis_fact>

<!-- dust emissions method -->
<dust_emis_method>Zender_2003</dust_emis_method>
<dust_emis_method phys='cam7'>Leung_2023</dust_emis_method>
<zender_soil_erod_source>atm</zender_soil_erod_source>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could these lines get spread out a little more for readability? Also, just a reminder that cam7 is going to default to the old setting for now.

Copy link
Author

Choose a reason for hiding this comment

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

Default is now Zender_2003 for all configurations.

Copy link

Choose a reason for hiding this comment

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

@cacraigucar I assume that means there will be a follow on CAM tag where Leung is turned on for CAM7? Or will we just be in experimental mode for awhile and then change the default much later? Just curious how this is going to go...

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ekluzek - When(if) the scientists tell us that they want to change the default setting, we will do so. This will be part of the tunings that will be happening and I suspect that we'll be adjusting quite a few settings/defaults, not just this one.


<!-- seasalt emission tuning factor -->
<!-- Note that ver="strat" when modal_accum_coarse_exch=.true. -->
<seasalt_emis_scale >1.35D0</seasalt_emis_scale>
Expand Down
15 changes: 15 additions & 0 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7698,6 +7698,21 @@ List of fluxes needed by the CARMA model, from CLM to CAM.
Default: set by build-namelist.
</entry>

<entry id="dust_emis_method" type="char*80" category="dust_emissions"
group="dust_emis_inparm" valid_values="Zender_2003,Leung_2023" >
Which dust emission method is going to be used.
Either the Zender 2003 scheme or the Leung 2023 scheme.
Default: set by build-namelist.
</entry>

<entry id="zender_soil_erod_source" type="char*80" category="dust_emissions"
group="dust_emis_inparm" valid_values="none,lnd,atm" >
Option only applying for the Zender_2003 method for whether the soil erodibility
file is handled in the active LAND model or in the ATM model.
(only used when dust_emis_method is Zender_2003)
Default: set by build-namelist.
</entry>

<!-- Ozone namelist variables shared between CAM and driver -->

<entry id="atm_ozone_frequency" type="char*64" category="ozone_coupling"
Expand Down
6 changes: 6 additions & 0 deletions cime_config/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,12 @@
</values>
</entry>

<entry id="LND_SETS_DUST_EMIS_DRV_FLDS">
<values match="first">
<value compset="_CAM.*_CLM">FALSE</value>
</values>
</entry>

</entries>

</compsets>
2 changes: 1 addition & 1 deletion components/clm
Submodule clm updated 213 files
86 changes: 66 additions & 20 deletions src/chemistry/bulk_aero/dust_model.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
!===============================================================================
! Dust for Bulk Aerosol Model
!===============================================================================
module dust_model
module dust_model
use shr_kind_mod, only: r8 => shr_kind_r8, cl => shr_kind_cl
use spmd_utils, only: masterproc
use cam_abortutils, only: endrun
use cam_logfile, only: iulog
use shr_dust_emis_mod,only: is_dust_emis_zender, is_zender_soil_erod_from_atm

implicit none
private
Expand Down Expand Up @@ -36,6 +38,7 @@ module dust_model

real(r8) :: dust_emis_fact = -1.e36_r8 ! tuning parameter for dust emissions
character(len=cl) :: soil_erod_file = 'soil_erod_file' ! full pathname for soil erodibility dataset

contains

!=============================================================================
Expand All @@ -44,8 +47,8 @@ module dust_model
subroutine dust_readnl(nlfile)

use namelist_utils, only: find_group_name
use units, only: getunit, freeunit
use mpishorthand
use spmd_utils, only: mpicom, masterprocid, mpi_character, mpi_real8, mpi_success
use shr_dust_emis_mod, only: shr_dust_emis_readnl

character(len=*), intent(in) :: nlfile ! filepath for file containing namelist input

Expand All @@ -59,8 +62,7 @@ subroutine dust_readnl(nlfile)

! Read namelist
if (masterproc) then
unitn = getunit()
open( unitn, file=trim(nlfile), status='old' )
open( newunit=unitn, file=trim(nlfile), status='old' )
call find_group_name(unitn, 'dust_nl', status=ierr)
if (ierr == 0) then
read(unitn, dust_nl, iostat=ierr)
Expand All @@ -69,14 +71,34 @@ subroutine dust_readnl(nlfile)
end if
end if
close(unitn)
call freeunit(unitn)
end if

#ifdef SPMD
! Broadcast namelist variables
call mpibcast(dust_emis_fact, 1, mpir8, 0, mpicom)
call mpibcast(soil_erod_file, len(soil_erod_file), mpichar, 0, mpicom)
#endif
call mpi_bcast(soil_erod_file, len(soil_erod_file), mpi_character, masterprocid, mpicom, ierr)
if (ierr/=mpi_success) then
call endrun(subname//' MPI_BCAST ERROR: soil_erod_file')
end if
call mpi_bcast(dust_emis_fact, 1, mpi_real8, masterprocid, mpicom, ierr)
if (ierr/=mpi_success) then
call endrun(subname//' MPI_BCAST ERROR: dust_emis_fact')
end if

call shr_dust_emis_readnl(mpicom, 'drv_flds_in')

if ((soil_erod_file /= 'none') .and. (.not.is_zender_soil_erod_from_atm())) then
call endrun(subname//': should not specify soil_erod_file if Zender soil erosion is not in CAM')
end if

if (masterproc) then
if (is_dust_emis_zender()) then
write(iulog,*) subname,': Zender_2003 dust emission method is being used.'
end if
if (is_zender_soil_erod_from_atm()) then
write(iulog,*) subname,': Zender soil erod file is handled in atm'
write(iulog,*) subname,': soil_erod_file = ',trim(soil_erod_file)
write(iulog,*) subname,': dust_emis_fact = ',dust_emis_fact
end if
end if

end subroutine dust_readnl

Expand All @@ -95,7 +117,9 @@ subroutine dust_init()
dust_active = any(dust_indices(:) > 0)
if (.not.dust_active) return

call soil_erod_init( dust_emis_fact, soil_erod_file )
if (is_zender_soil_erod_from_atm()) then
call soil_erod_init( dust_emis_fact, soil_erod_file )
endif

call dust_set_params( dust_nbin, dust_dmt_grd, dust_dmt_vwr, dust_stk_crc )

Expand All @@ -106,6 +130,7 @@ end subroutine dust_init
subroutine dust_emis( ncol, lchnk, dust_flux_in, cflx, soil_erod )
use soil_erod_mod, only : soil_erod_fact
use soil_erod_mod, only : soil_erodibility
use cam_history_support, only : fillvalue

! args
integer, intent(in) :: ncol, lchnk
Expand All @@ -115,25 +140,46 @@ subroutine dust_emis( ncol, lchnk, dust_flux_in, cflx, soil_erod )

! local vars
integer :: i, m, idst
real(r8) :: erodfctr(ncol)
real(r8), parameter :: dust_emis_sclfctr(dust_nbin) &
= (/ 0.011_r8/0.032456_r8, 0.087_r8/0.174216_r8, 0.277_r8/0.4085517_r8, 0.625_r8/0.384811_r8 /)

! set dust emissions

col_loop: do i =1,ncol
if (is_zender_soil_erod_from_atm()) then

soil_erod(i) = soil_erodibility( i, lchnk )
col_loop1: do i =1,ncol

! adjust emissions based on soil erosion
do m = 1,dust_nbin
soil_erod(i) = soil_erodibility( i, lchnk )

idst = dust_indices(m)
cflx(i,idst) = -dust_flux_in(i,m) &
* dust_emis_sclfctr(m)*soil_erod(i)/soil_erod_fact*1.15_r8
! adjust emissions based on soil erosion
do m = 1,dust_nbin

enddo
idst = dust_indices(m)
cflx(i,idst) = -dust_flux_in(i,m) &
* dust_emis_sclfctr(m)*soil_erod(i)/dust_emis_fact*1.15_r8

end do col_loop
enddo

end do col_loop1

else

col_loop2: do i =1,ncol

soil_erod(i) = soil_erodibility( i, lchnk )

! adjust emissions based on soil erosion
do m = 1,dust_nbin

idst = dust_indices(m)
cflx(i,idst) = -dust_flux_in(i,m) * dust_emis_sclfctr(m) / dust_emis_fact

enddo

end do col_loop2

end if

end subroutine dust_emis

Expand Down
Loading
Loading