Skip to content
Snippets Groups Projects
Unverified 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" ...@@ -19,17 +19,21 @@ tgt_grid="hpz9"
infile=$1 infile=$1
outdir=$(dirname $infile)/healpix outdir=$(dirname $infile)/healpix
outfile=${outdir}/$(basename $infile) outfile=${outdir}/$(basename $infile)
outfile_part=${outdir}/$(basename $infile).partial
mkdir -p $outdir mkdir -p $outdir
# Remap, chunk, and compress the given input file if [ ! -f $outfile ]; then
cdo \ # Remap, chunk, and compress the given input file
--format nc4 \ cdo \
--compression_type zstd \ --format nc4 \
--chunktype auto \ --compression_type zstd \
--chunksize $((4**9)) \ --chunktype auto \
--num_threads 4 \ --chunksize $((4**9)) \
-remap,$tgt_grid,"$weightsdir/weights_${src_grid}_${tgt_grid}.nc" \ --num_threads 4 \
$infile $outfile -remap,$tgt_grid,"$weightsdir/weights_${src_grid}_${tgt_grid}.nc" \
$infile $outfile_part
ncrename -d cells,cell $outfile
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