Skip to content

Commit

Permalink
Add if statement to CLMBuildNamelist for correct trigger of error
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Dec 13, 2024
1 parent 80a32ba commit 9b0be80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3395,9 +3395,11 @@ sub setup_logic_mineral_nitrogen_dynamics {
}
}

my $var = $nl->get_value('nfix_method');
if ( $var ne "'Houlton'" && $var ne "'Bytnerowicz'" ) {
$log->fatal_error("$var is incorrect entry for the namelist variable nfix_method; expected Houlton or Bytnerowicz");
if ( &value_is_true($nl_flags->{'use_cn'}) && &value_is_true($nl->get_value('use_fun')) ) {
my $var = $nl->get_value('nfix_method');
if ( $var ne "'Houlton'" && $var ne "'Bytnerowicz'" ) {
$log->fatal_error("$var is incorrect entry for the namelist variable nfix_method; expected Houlton or Bytnerowicz");
}
}

}
Expand Down

0 comments on commit 9b0be80

Please sign in to comment.