Skip to content

Commit

Permalink
Also run FATES for the NEON sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ekluzek committed Sep 11, 2024
1 parent 9c4e66a commit 10ffe8a
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile {
#
# Figure out number of tests that will run
#
my $ntests = 3859;
my $ntests = 3994;

if ( defined($opts{'compare'}) ) {
$ntests += 2347;
$ntests += 2437;
}
plan( tests=>$ntests );

Expand Down Expand Up @@ -393,20 +393,24 @@ sub cat_and_create_namelistinfile {
my $namelistfile = "temp.namelistinfile_$site";
&cat_and_create_namelistinfile( $neondefaultfile, $neonsitefile, $namelistfile );
#
# Now run the site
# Now run the site for both bgc and non-FATES
#
my $options = "--res CLM_USRDAT --clm_usr_name NEON --no-megan --bgc bgc --use_case 2018_control --infile $namelistfile";
eval{ system( "$bldnml -envxml_dir . $options > $tempfile 2>&1 " ); };
is( $@, '', "options: $options" );
$cfiles->checkfilesexist( "$options", $mode );
$cfiles->shownmldiff( "default", $mode );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->dodiffonfile( "lnd_in", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
$cfiles->copyfiles( "$options", $mode );
foreach my $bgc ( "bgc", "fates") {
if ( ($bgc eq "bgc") or ($site ne "STER" and $site ne "KONA")) {
my $options = "--res CLM_USRDAT --clm_usr_name NEON --no-megan --bgc $bgc --use_case 2018_control --infile $namelistfile";
eval{ system( "$bldnml -envxml_dir . $options > $tempfile 2>&1 " ); };
is( $@, '', "options: $options" );
$cfiles->checkfilesexist( "$options", $mode );
$cfiles->shownmldiff( "default", $mode );
if ( defined($opts{'compare'}) ) {
$cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode );
$cfiles->dodiffonfile( "lnd_in", "$options", $mode );
$cfiles->comparefiles( "$options", $mode, $opts{'compare'} );
}
if ( defined($opts{'generate'}) ) {
$cfiles->copyfiles( "$options", $mode );
}
}
}
system( "/bin/rm $namelistfile" );
&cleanup();
Expand Down

0 comments on commit 10ffe8a

Please sign in to comment.