Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lkluft/lumi-transfer
1 result
Show changes
Commits on Source (2)
......@@ -10,7 +10,7 @@ set -o errexit -o nounset -o xtrace
export HDF5_PLUGIN_PATH='/appl/local/climatedt/sw/netcdf-plugins/'
# Pre-computed remapping weights (ICON > HEALPix)
weightsdir='/appl/local/climatedt/pool/data/ICON/healpix_weights'
weightsdir='/appl/local/climatedt/pool/data/ICON/healpix_weights/weights'
src_grid="R02B10"
tgt_grid="hpz9"
......@@ -23,6 +23,13 @@ outfile_part=${outdir}/$(basename $infile).partial
mkdir -p $outdir
# Choose ocean/atmosphere remapping weights
if [[ $infile == *oce* ]]; then
weightsfile="$weightsdir/weights_${src_grid}_O_${tgt_grid}.nc"
else
weightsfile="$weightsdir/weights_${src_grid}_G_${tgt_grid}.nc"
fi
if [ ! -f $outfile ]; then
# Remap, chunk, and compress the given input file
cdo \
......@@ -31,7 +38,7 @@ if [ ! -f $outfile ]; then
--chunktype auto \
--chunksize $((4**9)) \
--num_threads 4 \
-remap,$tgt_grid,"$weightsdir/weights_${src_grid}_${tgt_grid}.nc" \
-remap,$tgt_grid,$weightsfile \
$infile $outfile_part
ncrename -d cells,cell $outfile_part
......