Skip to content

Commit

Permalink
Merge pull request #299 from NOAA-GFDL/297.split-dimensionless-vars
Browse files Browse the repository at this point in the history
Change split_ncvars.pl regex to work for both dimensionless and with-dimensions
  • Loading branch information
chanwilson authored Jun 7, 2024
2 parents aef4249 + fe89052 commit 9758ee9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion postprocessing/split_ncvars/split_ncvars.pl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
$var =~ s/^\s+//; $var =~ s/\s+$//;

# skip this variable if it does not exist
if ($dump !~ /\t\w+ $var\s+;/) {
# the second clause below is needed for dimensionless variables
if ($dump !~ /\t\w+ $var\(.+\)/ and $dump !~ /\t\w+ $var\s+;/) {
print "WARNING: variable $var does not exist ... skipping.\n" if !$Opt{QUIET};
next;
}
Expand Down

0 comments on commit 9758ee9

Please sign in to comment.