Skip to content
Snippets Groups Projects
Verified Commit 7e1fdd31 authored by Lukas Kluft's avatar Lukas Kluft
Browse files

Skip files that have already been remapped

parent ea19eacd
No related branches found
No related tags found
No related merge requests found
......@@ -19,17 +19,21 @@ tgt_grid="hpz9"
infile=$1
outdir=$(dirname $infile)/healpix
outfile=${outdir}/$(basename $infile)
outfile_part=${outdir}/$(basename $infile).partial
mkdir -p $outdir
# Remap, chunk, and compress the given input file
cdo \
--format nc4 \
--compression_type zstd \
--chunktype auto \
--chunksize $((4**9)) \
--num_threads 4 \
-remap,$tgt_grid,"$weightsdir/weights_${src_grid}_${tgt_grid}.nc" \
$infile $outfile
ncrename -d cells,cell $outfile
if [ ! -f $outfile ]; then
# Remap, chunk, and compress the given input file
cdo \
--format nc4 \
--compression_type zstd \
--chunktype auto \
--chunksize $((4**9)) \
--num_threads 4 \
-remap,$tgt_grid,"$weightsdir/weights_${src_grid}_${tgt_grid}.nc" \
$infile $outfile_part
ncrename -d cells,cell $outfile_part
mv $outfile_part $outfile
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment