Commit ac1f271e authored by Willi Rath's avatar Willi Rath

Also conv to nc4c

parent e1ec0b43
......@@ -22,3 +22,4 @@ pre_processing:
post_processing:
- util/make_CF_compliant.sh
- util/convert_to_netCDF4_classic.sh
#!/bin/bash
function _convert_to_nc4c {
infile=$1
tmpfile=_tmp_`date +%s%N`_`basename ${infile}`
nccopy -s -7 -d 1 \
-c"sigma0/1,latitude/90,longitude/90" \
-c"pressure/1,latitude/90,longitude/90" \
-c"latitude/90,longitude/90" \
-c"time/1,sigma0/1,latitude/90,longitude/90" \
-c"time/1,pressure/1,latitude/90,longitude/90" \
-c"time/1,latitude/90,longitude/90" \
${infile} ${tmpfile}
cdo diff ${tmpfile} ${infile} && mv ${tmpfile} ${infile}
}
export -f _convert_to_nc4c
find data -type f -name \*.nc -print0 | \
xargs -0 -n1 -P8 -I {} bash -c "_convert_to_nc4c {}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment