Index: /NEMO/branch_check.sh
===================================================================
--- /NEMO/branch_check.sh	(revision 14182)
+++ /NEMO/branch_check.sh	(revision 14182)
@@ -0,0 +1,1 @@
+link ../utils/developer/branch_check.sh
Index: /NEMO/branch_stats.sh
===================================================================
--- /NEMO/branch_stats.sh	(revision 14182)
+++ /NEMO/branch_stats.sh	(revision 14182)
@@ -0,0 +1,1 @@
+link ../utils/developer/branch_stats.sh
Index: /utils/developer/branch_check.sh
===================================================================
--- /utils/developer/branch_check.sh	(revision 14182)
+++ /utils/developer/branch_check.sh	(revision 14182)
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+#set -ex
+
+[ -z "$*" ] && { echo 'No branch path(s) given => QUIT'; exit 2; }
+
+branches=$*
+
+## Find broken symlinks
+echo 'Broken links?'
+find $branches -xtype l -not \( -name "*.idx" -or -name "*WORK*" -or -name "*BLD*" \)
+echo
+
+## Check
+echo 'Files with superfluous -x perm?'
+find $branches -type f -perm -u+rwx -not       \
+     \( -name "*.sh"  -or -name "*.bash"   -or \
+        -name "*.t"   -or -name "*.p[lmy]" -or \
+        -name "*.exe" -or -name Makefile         \) \
+     -print -exec head -1 {} \;
+echo
+
+## Doc
+cd $branches/doc
+
+## Updating namelist blocks
+echo 'Updating namelist blocks'
+echo '   - namelist_ref'
+./tools/nlsts_update.sh -i ../cfgs/SHARED/namelist_ref        -o namelist_ref    > /dev/null
+echo '   - namelist_ice_ref'
+./tools/nlsts_update.sh -i ../cfgs/SHARED/namelist_ice_ref    -o namelist_ice    > /dev/null
+echo '   - namelist_pisces_ref'
+./tools/nlsts_update.sh -i ../cfgs/SHARED/namelist_pisces_ref -o namelist_pisces > /dev/null
+echo '   - namelist_top_ref'
+./tools/nlsts_update.sh -i ../cfgs/SHARED/namelist_top_ref    -o namelist_top    > /dev/null
+echo '   - namelist_trc_ref'
+./tools/nlsts_update.sh -i ../cfgs/SHARED/namelist_trc_ref    -o namelist_trc    > /dev/null
+echo 'Removal of unused namelists if any'
+mkdir namelist_new
+mv namelist_ice/* namelist_pisces/* namelist_ref/* namelist_top/* namelist_trc/* namelist_new/
+diff -arq namelist_new namelists | grep 'Only in namelists:' | cut -d: -f2 \
+   | xargs -n 1 -i svn rm namelists/{}
+rm -rf namelist_*
+
+## Compilation
+echo 'Testing doc build'
+./manual_build.sh all
+[ "$?" != 0 ] && exit 2
+
+## Undefined references in LaTeX
+if [ "$( grep 'undefined on' ./latex/*/build/*_manual.log )" ]; then
+   echo 'Undefined refs in doc'
+   grep 'undefined on' ./latex/*/build/*_manual.log
+   exit 2
+fi
+
+cd - > /dev/null
+
+exit 0
Index: /utils/developer/branch_stats.sh
===================================================================
--- /utils/developer/branch_stats.sh	(revision 14182)
+++ /utils/developer/branch_stats.sh	(revision 14182)
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+#set -ex
+
+## Rough statistics on routines (code / notes / blank)
+
+[ -z "$*" ] && { echo 'No branch path(s) given => QUIT'; exit 2; }
+
+branches=$*
+
+export LC_NUMERIC='en_GB.UTF-8' ## Decimal separator
+fmt='%-50s %7d(%4.1f%%) %7d(%4.1f%%) %7d(%4.1f%%) %7d\n'
+
+for branch in $branches; do
+
+   cod_sum=0; not_sum=0; blk_sum=0; lin_sum=0
+   paths="$branch/NEMOGCM/NEMO $branch/src"
+
+   [ -z "$( ls $paths 2> /dev/null )" ] && continue
+
+   printf "%-50s %7s(ratio) %7s(ratio) %7s(ratio) %7s\n" \
+           ''    code       notes      blank      all
+
+   for dir in $( find $paths -type d -mindepth 1 -maxdepth 1 2> /dev/null ); do
+
+      files=$( find $dir -name "*.[fFh]90" 2> /dev/null )
+
+      cod_nb=$( grep -h '^ *[^! ]' $files | wc -l ); not_nb=$( grep -h '^ *!'     $files | wc -l )
+      blk_nb=$( grep -h '^ *$'     $files | wc -l )
+      lin_nb=$(( cod_nb + not_nb + blk_nb ))
+
+      cod_ratio=$( echo "scale = 3; ( ${cod_nb} / ${lin_nb} ) * 100" | bc )
+      not_ratio=$( echo "scale = 3; ( ${not_nb} / ${lin_nb} ) * 100" | bc )
+      blk_ratio=$( echo "scale = 3; ( ${blk_nb} / ${lin_nb} ) * 100" | bc )
+
+      dir=$( echo $dir | awk -F/ '{printf "%s/%s/%s", $(NF-2), $(NF-1), $(NF)}' )
+      
+      printf "$fmt" $dir                                                                 \
+                    ${cod_nb} ${cod_ratio} ${not_nb} ${not_ratio} ${blk_nb} ${blk_ratio} \
+                    $lin_nb
+
+      cod_sum=$(( cod_sum + cod_nb )); not_sum=$(( not_sum + not_nb ))
+      blk_sum=$(( blk_sum + blk_nb )); lin_sum=$(( lin_sum + lin_nb ))
+
+   done
+
+   cod_ratio=$( echo "scale = 3; ( ${cod_sum} / ${lin_sum} ) * 100" | bc )
+   not_ratio=$( echo "scale = 3; ( ${not_sum} / ${lin_sum} ) * 100" | bc )
+   blk_ratio=$( echo "scale = 3; ( ${blk_sum} / ${lin_sum} ) * 100" | bc )
+
+   branch=$( echo $branch | awk -F/ '{print $NF}' )
+
+   printf "$fmt" $branch                                                                 \
+                 ${cod_sum} ${cod_ratio} ${not_sum} ${not_ratio} ${blk_sum} ${blk_ratio} \
+                 ${lin_sum}
+
+   echo
+   
+done
+
+exit 0
