Skip to content

Commit

Permalink
Merge pull request #2855 from slevis-lmwg/moab_prism_fsurdat
Browse files Browse the repository at this point in the history
Improve CLMBuildNamelist ability to detect NEON runs
  • Loading branch information
slevis-lmwg authored Nov 6, 2024
2 parents 4d8f308 + 073e742 commit d2cadec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,11 @@ sub setup_cmdl_chk_res {
}
}

sub begins_with
{
return substr($_[0], 0, length($_[1])) eq $_[1];
}

sub setup_cmdl_resolution {
my ($opts, $nl_flags, $definition, $defaults, $envxml_ref) = @_;

Expand Down Expand Up @@ -713,7 +718,7 @@ sub setup_cmdl_resolution {
$nl_flags->{'neon'} = ".false.";
$nl_flags->{'neonsite'} = "";
if ( $nl_flags->{'res'} eq "CLM_USRDAT" ) {
if ( $opts->{'clm_usr_name'} eq "NEON" ) {
if ( begins_with($opts->{'clm_usr_name'}, "NEON") ) {
$nl_flags->{'neon'} = ".true.";
$nl_flags->{'neonsite'} = $envxml_ref->{'NEONSITE'};
$log->verbose_message( "This is a NEON site with NEONSITE = " . $nl_flags->{'neonsite'} );
Expand Down

0 comments on commit d2cadec

Please sign in to comment.