Skip to content

Commit

Permalink
Fixes an ELM setup error related to FAN model
Browse files Browse the repository at this point in the history
Changes the check to determine if the FAN model is active.

Fixes #6141
[BFB]
  • Loading branch information
bishtgautam committed Jan 6, 2024
1 parent b191030 commit cfd410a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/elm/bld/ELMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3005,7 +3005,7 @@ sub setup_logic_fan {
# Flags to control FAN (Flow of Agricultural Nitrogen) nitrogen deposition (manure and fertilizer)
#
if ( $nl_flags->{'bgc_mode'} =~/cn|bgc/ ) {
if( $opts->{'fan'} ) {
if( $nl_flags->{'use_fan'} eq ".true." ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_fan',
'use_cn'=>$nl_flags->{'use_cn'} );
$nl_flags->{'use_fan'} = $nl->get_value('use_fan');
Expand All @@ -3021,7 +3021,7 @@ sub setup_logic_fan {
fatal_error('Cannot use_fan if use_crop is false');
} #

if( $opts->{'fan'} ) {
if( $nl_flags->{'use_fan'} eq ".true." ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "fanmapalgo", 'phys'=>$nl_flags->{'phys'},
'use_cn'=>$nl_flags->{'use_cn'}, 'hgrid'=>$nl_flags->{'res'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "stream_year_first_fan", 'phys'=>$nl_flags->{'phys'},
Expand Down

0 comments on commit cfd410a

Please sign in to comment.