Commit 1bda1eca authored by Pierre-Antoine Bretonnière's avatar Pierre-Antoine Bretonnière
Browse files

Merge branch 'develop-bugs' into 'master'

Develop bugs

Hi,

   I have just corrected a bug in the ohc function. cdo sometimes change the name of the dimensions, in that case from x to x_2, which prevents the cdftools to work properly. I have corrected this renaming when it happens on tmpohc.nc in the ohc function.

Best regards
Virginie
parents fe4bff70 96bdd6bb
......@@ -943,6 +943,13 @@ typeset var list=""
typeset var jt
for jt in $(seq 1 $ntime) ; do
cdo seltimestep,$jt $1 tmpohc.nc
lstdims=`ncdump -h tmpohc.nc | awk /dimensions:/,/variables:/ | grep -v dimensions: | grep -v variables: | awk '{print $1}'`
if [[ ${lstdims/x_2} != ${lstdims} ]] ; then
if [[ ${lstdims/x} != ${lstdims} ]] ; then
ncwa -O -a x tmpohc.nc tmpohc.nc
fi
ncrename -d x_2,x tmpohc.nc
fi
if [[ ${lstvars/somxl010} != ${lstvars} ]] ; then
ncks -v somxl010 tmpohc.nc mxl.nc
else
......
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