Commit 04ae0185 authored by Virginie Guemas's avatar Virginie Guemas
Browse files

Bug-fix new cdo version for 1.5.9 also

parent 48c4b098
......@@ -170,7 +170,7 @@ for root in ${listroots[@]} ; do
cdo_version=`cdo -V &> ff ; grep Climate ff | cut -d \ -f 5`
rm ff
#test on cdo version: if >1.5.6, remove valid_min/max attributes to avoid values out of that range to be replaced by NaN
if [[ "$cdo_version" = "`echo -e "$cdo_version\n1.5.6" | sort -V | head -n1`" ]] ; then
if [[ "$cdo_version" = "`echo -e "$cdo_version\n1.5.6" | sort -V | head -n1`" || "$cdo_version" = "`echo -e "$cdo_version\n1.5.9" | sort -V | head -n1`" ]] ; then
if [[ $root == 'grid_T' || $root == 't3d' ]] ; then
for file in $lstfiles ; do
ncatted -O -a valid_max,votemper,d,, $file $file
......@@ -367,7 +367,7 @@ for jt in $(seq 1 $ntime); do
list=$list" "outputvertmeansal_$jt.nc
rm -f intvertmeansal.nc
#test on cdo version: if >1.5.6, remove valid_min/max attributes to avoid values out of that range to be replaced by NaN
if [[ "$cdo_version" = "`echo -e "$cdo_version\n1.5.6" | sort -V | head -n1`" ]] ; then
if [[ "$cdo_version" = "`echo -e "$cdo_version\n1.5.6" | sort -V | head -n1`" || "$cdo_version" = "`echo -e "$cdo_version\n1.5.9" | sort -V | head -n1`" ]] ; then
ncatted -O -a valid_max,vertmeansal,d,, outputvertmeansal_$jt.nc outputvertmeansal_$jt.nc
ncatted -O -a valid_min,vertmeansal,d,, outputvertmeansal_$jt.nc outputvertmeansal_$jt.nc
fi
......
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