Skip to content

Commit

Permalink
Merge pull request #312 from ceblanton/311.split-ncvars.format
Browse files Browse the repository at this point in the history
Let split_ncvars split large Netcdf-4 files
  • Loading branch information
ceblanton authored Oct 1, 2024
2 parents 077d618 + 4d6bfd0 commit ff110dc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions postprocessing/split_ncvars/split_ncvars.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,12 @@

my $ncrcat = `which ncrcat 2>&1`;
die "Unable to locate ncrcat, cannot continue.\n" if $ncrcat =~ /(: no)|(not found)/;
chomp $ncrcat; $ncrcat .= " --64 -t 2 --header_pad 16384";
chomp $ncrcat; $ncrcat .= " -t 2 --header_pad 65536";

my $ncks = `which ncks 2>&1`;
die "Unable to locate ncks, cannot continue.\n" if $ncks =~ /(: no)|(not found)/;
chomp $ncks;
# NCO changed options between 4.5.4 and 4.5.5 and 4.6. Hopefully they stopped those schenanigans.
my $tmp = qx{$ncks --version 2>&1};
$ncks .= ($tmp =~ /4\.5\.4/ ? ' --64bit'
: $tmp =~ /4\.5\.5/ ? ' --64bit_offset'
: ' --fl_fmt=64bit_offset')
. ' --header_pad 16384';
$ncks .= ' --header_pad 65536';

my $list_ncvars = `which list_ncvars.csh 2>&1`;
die "Unable to locate list_ncvars.csh, cannot continue.\n" if $list_ncvars =~ /(: no)|(not found)/;
Expand Down

0 comments on commit ff110dc

Please sign in to comment.