Skip to content

Commit

Permalink
Add some comments about some of this being temporary and point to the…
Browse files Browse the repository at this point in the history
… issue regarding it
  • Loading branch information
ekluzek committed Aug 22, 2024
1 parent 786252b commit 406edd4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
32 changes: 21 additions & 11 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1756,25 +1756,29 @@ sub process_namelist_inline_logic {
##################################
setup_logic_lightning_streams($opts, $nl_flags, $definition, $defaults, $nl);

######################################
############################################################################################
# namelist options for dust emissions
######################################
# NOTE: This MUST be done before other drv_flds_in settings (megan, drydep, fire_emis etc.)
############################################################################################
setup_logic_dust_emis($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref);
setup_logic_prigent_roughness($opts, $nl_flags, $definition, $defaults, $nl);

#################################
# namelist group: drydep_inparm #
#################################
#####################################
# namelist group: drydep_inparm #
# NOTE: After setup_logic_dust_emis #
#####################################
setup_logic_dry_deposition($opts, $nl_flags, $definition, $defaults, $nl);

#################################
# namelist group: fire_emis_nl #
#################################
#####################################
# namelist group: fire_emis_nl #
# NOTE: After setup_logic_dust_emis #
#####################################
setup_logic_fire_emis($opts, $nl_flags, $definition, $defaults, $nl);

#################################
# namelist group: megan_emis_nl #
#################################
#####################################
# namelist group: megan_emis_nl #
# NOTE: After setup_logic_dust_emis #
#####################################
setup_logic_megan($opts, $nl_flags, $definition, $defaults, $nl);

##################################
Expand Down Expand Up @@ -4041,6 +4045,8 @@ sub setup_logic_dust_emis {
my ($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref) = @_;

# Only set dust emission settings -- if not connected to CAM
# Longer term plan is to remove this logic and have CTSM just set it and for CAM to use what CLM decides
# See: https://github.com/ESCOMP/CTSM/issues/2713
my $lnd_sets_dust = logical_to_fortran($envxml_ref->{'LND_SETS_DUST_EMIS_DRV_FLDS'});
if ( &value_is_true( $lnd_sets_dust)) {

Expand Down Expand Up @@ -4094,8 +4100,12 @@ sub setup_logic_dust_emis {
}
}
# Now process the CAM drv_flds_in to get the dust settings
# This requires that the CAM drv_flds_in namelist be created BEFORE CLM
# and that the path below NOT be changed. Hence, there's some fragility here
# to future changes.
my $infile = $opts->{'envxml_dir'} . "/Buildconf/camconf/drv_flds_in";
$log->verbose_message("Read in the drv_flds_in file generated by CAM's build-namelist");
# When merging the CAM namelist in -- die with an error if there's a conflict between CAM and CLM
process_namelist_infile( $definition, $nl, $envxml_ref, $infile, 'die_on_conflict'=>1 );
}
}
Expand Down
1 change: 1 addition & 0 deletions cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
</entry>

<entry id="LND_SETS_DUST_EMIS_DRV_FLDS">
<!-- See https://github.com/ESCOMP/CTSM/issues/2713 we plan to phase this out -->
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>TRUE</default_value>
Expand Down

0 comments on commit 406edd4

Please sign in to comment.