Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/split_ncvars/split_ncvars.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ foreach my $file (@ifiles) {
print " var=$var; timename=$timename; vlist=$vlist\n" if $Opt{VERBOSE} > 2;
my $appendopt = "";
$appendopt = "-A" if ( -f "$cwd/$tmp_var_filename" );
print "$ncks -h $appendopt -v $vlist $file $tmp_var_filename\n" if $Opt{VERBOSE};
print "$ncks -C -h $appendopt -v $vlist $file $tmp_var_filename\n" if $Opt{VERBOSE};
next if $TEST;
system("$ncks -h $appendopt -v $vlist $file $tmp_var_filename");
system("$ncks -C -h $appendopt -v $vlist $file $tmp_var_filename");
$ncstatus += $?;

# remove dimensions called "scalar_axis" (i.e., length = 1)
Expand Down Expand Up @@ -502,8 +502,8 @@ foreach my $file (@ifiles) {
# for an existing variable in a netCDF4 file. The netCDF4 format (unlike netCDF3) does not permit this.
if ( $Opt{onefile} ) {
my $vlist = join ",", @vlist;
print "$ncks -6 -h -A -v $vlist $file $Opt{onefile}\n" if $Opt{VERBOSE} > 0;
system("$ncks -6 -h -A -v $vlist $file $Opt{onefile}");
print "$ncks -C -6 -h -A -v $vlist $file $Opt{onefile}\n" if $Opt{VERBOSE} > 0;
system("$ncks -C -6 -h -A -v $vlist $file $Opt{onefile}");
$ncstatus += $?;

my @ncatted_opts = set_ncatted_opts( $Opt{onefile}, tailname( $Opt{onefile} ) );
Expand Down