Commit f9886158 authored by Domingo Manubens's avatar Domingo Manubens
Browse files

Merge branch 'master' into develop

parents 04cf8dc9 48c4b098
......@@ -62,6 +62,10 @@ ln -sf ${CON_FILES}/mesh_mask_nemo.${NEMOVERSION}.nc mesh_hgr.nc
ln -sf ${CON_FILES}/mesh_mask_nemo.${NEMOVERSION}.nc mesh_zgr.nc
ln -sf ${CON_FILES}/mesh_mask_nemo.${NEMOVERSION}.nc mask.nc
ln -sf ${CON_FILES}/new_maskglo.${NEMOVERSION}.nc new_maskglo.nc
if [[ ! -f mask.nc ]] ; then
echo "No configuration files for cdftools"
exit
fi
###############################################################################
# Reduced number of variables in diag files to save disk space #
......@@ -136,16 +140,14 @@ done
typeset var listroots
case $8 in
'diags' )
if [[ $(($5 -$4 + 1)) -gt $6 ]] ; then
listroots="t3d heat_sal_mxl ice moc psi sal_0-300m sal_300-5400m"
if [[ `ls sstsimld*` != '' ]] ; then
listroots=$listroots" sstsimld"
elif [[ `ls sstsssmld*` != '' ]] ; then
listroots=$listroots" sstsssmld"
else
listroots=$listroots" oce"
fi
fi
listroots="t3d heat_sal_mxl ice moc psi sal_0-300m sal_300-5400m"
if [[ `ls sstsimld*` != '' ]] ; then
listroots=$listroots" sstsimld"
elif [[ `ls sstsssmld*` != '' ]] ; then
listroots=$listroots" sstsssmld"
else
listroots=$listroots" oce"
fi
;;
'MMO' ) listroots=$lstypes ;;
esac
......@@ -175,6 +177,12 @@ for root in ${listroots[@]} ; do
ncatted -O -a valid_min,votemper,d,, $file $file
done
fi
if [[ $root == 'heat_sal_mxl' ]] ; then
for file in $lstfiles ; do
ncatted -O -a valid_max,somxlheatc,d,, $file $file
ncatted -O -a valid_min,somxlheatc,d,, $file $file
done
fi
fi
outfile=${root}_$2_$1_fc$3_$(($yyyy0+(10#$mm0+$4-2)/12))$(printf "%02d" $(((10#$mm0+$4-2)%12+1)))_${year2}$(printf "%02d" $mon2).nc
......@@ -320,7 +328,13 @@ typeset var mon2=$(((10#$mm0+$5-2)%12+1))
typeset var listroots
case $6 in
'diags' ) listroots="t3d" ;;
'MMO' ) listroots=${7} ;;
'MMO' )
if [ -z "${7}" ] ; then
listroots="grid_T grid_U grid_V grid_W icemod"
else
listroots=${7}
fi
;;
esac
typeset var root
typeset var lstfiles
......@@ -765,7 +779,7 @@ cp ${CON_FILES}/ice_template.nc toto_N.nc
cp ${CON_FILES}/ice_template.nc toto_S.nc
case ${NEMOVERSION} in
'Ec3.0_O1L46'|'Ec3.0_O25L46') for var in `cdo showvar $1 | head -1`
'Ec3.0_O1L46'|'Ec3.0_O25L46'|'Ec3.0_O25L75') for var in `cdo showvar $1 | head -1`
do
[[ $var = "ice_pres" || $var = "iiceconc" ]] && ncrename -v $var,ileadfra $1
done;;
......
......@@ -500,9 +500,8 @@ for ((yeari=$syeari;yeari<=$syearf;yeari=$(($yeari+intsdate)))) ; do
if [ -e ${pathout}/${prefix}${lsmbsb}_${lsyrsh} ] ; then
cp ${pathout}/${prefix}${lsmbsb}_${lsyrsh} .
lsmbsh=0-${listmemb[${#listmemb[@]}-1]}
gather_memb ${prefix} _${lsyrsh} ${prefix}${lsmbsh}_${lsyrsh}
fi
# gather_memb ${prefix} _${lsyrsh} ${prefix}${lsmbsh}_${lsyrsh}
gather_memb ${prefix} _${lsyrsh} ${prefix}${lsmbsh}_${lsyrsh}
for jmemb in ${listmemb[@]} ; do
rm -f ${prefix}${jmemb}_${lsyrsh}
done
......
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