Skip to content

Commit 398fd72

Browse files
author
mvertens
committed
strip surrounding quotes before comparison
1 parent 0544821 commit 398fd72

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bld/build-namelist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,11 @@ if (!($simple_phys or $aqua_mode)) {
736736
stream_co2_surface_source_year_last,
737737
stream_co2_surface_source_year_align\n";
738738
}
739+
# get_value preserves the quotes from the namelist, so strip them before comparing
739740
my $mapalgo = $nl->get_value('stream_co2_surface_source_mapalgo');
740741
my $mesh = $nl->get_value('stream_co2_surface_source_mesh_filename');
742+
$mapalgo =~ s/^['"]+|['"]+$//g;
743+
$mesh =~ s/^['"]+|['"]+$//g;
741744
if (($mapalgo eq 'nearest_lat') and ($mesh ne 'none')) {
742745
die "$ProgName - ERROR: stream_co2_surface_source_mesh_filename must be set to 'none' " .
743746
"when stream_co2_surface_source_mapalgo is 'nearest_lat'\n";

0 commit comments

Comments
 (0)