Index: /BOL/script_install/install_lmdz.sh
===================================================================
--- /BOL/script_install/install_lmdz.sh	(revision 5761)
+++ /BOL/script_install/install_lmdz.sh	(revision 5762)
@@ -33,5 +33,6 @@
 #      but with -r4 for netcdf. Variable real must be set to
 #      r4 or r8 at the beginning of the script below.
-#
+# Modif 04/03/2025, AI
+#     correction in XIOS
 # Modif 04/03/2025, AI
 #     correction in XIOS
@@ -163,4 +164,6 @@
     save_pub=0
     save_pub_dir=$HOME/LMDZ/pub
+    config_name=Bench
+
 }
 
@@ -211,5 +214,7 @@
             "-save_pub") save_pub=1 ; shift ;;
             "-save_pub_dir") save_pub_dir=$2 ; shift 2 ;;
-            "-h" | *) cat <<........fin
+	    "-config") config_name=$2 ; shift 2 ;;
+            "-build_dir") build_dir=$2 ; shift 2 ;;
+	    "-h" | *) cat <<........fin
         $0 [ -v version ] [ -r svn_release ]
                [ -parallel PARA ] [ -d GRID_RESOLUTION ] [ -bench 0/1 ]
@@ -271,4 +276,8 @@
 
         -verbose    to print every executed command
+
+        -config     config name
+
+        -build_dir  directory in which your build is to be done
 
 ........fin
@@ -845,5 +854,6 @@
 
     # Compile
-    local makelmdz="makelmdz_fcm $optim_flag -arch $arch -j $make_j"
+    local build_opt="-config $config_name"; if [[ ! -z ${build_dir+x} ]]; then build_opt="$build_opt -build_dir $build_dir"; fi
+    local makelmdz="makelmdz_fcm $optim_flag $build_opt -arch $arch -j $make_j"
     local para_compile_opt="-mem -parallel $parallel"; if [[ $parallel = "none" ]]; then para_compile_opt=""; fi
     do_compile_sh "LMDZ" "$jobcmd ./$makelmdz $opt_rad $opt_cosp $opt_makelmdz_xios $opt_aer $opt_inlandsis $opt_strataer $opt_isotopes -p $compphysiq -d ${grid_resolution} -v $fcm_veget_version $para_compile_opt $fortran_file"
@@ -852,4 +862,9 @@
     # Check executable
     # FHTBD : Nettoyer tout ça en douceur mais sans trainer
+    # name of executable changed with new makelmdz_fcm (revision 5743)
+    if [[ -z ${build_dir+x} ]]; then build_dir=libo; fi
+    if [[ -x $build_dir/$config_name/gcm ]]; then
+	exe_name=$build_dir/$config_name/gcm
+    fi
     if [ $bench = 1 -o $bench = compile_only ] ; then
         if [[ ! -f $exe_name ]]; then
