Index: modipsl/trunk/util/mod.def
===================================================================
--- modipsl/trunk/util/mod.def	(revision 6657)
+++ modipsl/trunk/util/mod.def	(revision 6671)
@@ -318,16 +318,16 @@
 #-H- IPSLCM7_work  CONFIG/IPSLCM7 rev HEAD
 #-H- IPSLCM7_work  libIGCM trunk rev 1552
-#-C- IPSLCM7_work  master                		        3558d704         21   DYNAMICO       modeles
-#-C- IPSLCM7_work  ICOSA_LMDZ                                       4616         20   ICOSA_LMDZ     modeles
-#-C- IPSLCM7_work  IOIPSL/tags/v2_2_5                               6058         8   IOIPSL         modeles
-#-C- IPSLCM7_work  branches/ORCHIDEE_2_2/ORCHIDEE                   7991        14   ORCHIDEE_2_2   modeles
-#-C- IPSLCM7_work  trunk/ORCHIDEE                                   8175        14   ORCHIDEE_trunk modeles
-#-C- IPSLCM7_work  CPL/oasis3-mct/branches/OASIS3-MCT_5.0_branch    6331         8   oasis3-mct     .
-#-C- IPSLCM7_work  LMDZ6/trunk          		            4515        20   LMDZ           modeles
-#-C- IPSLCM7_work  CONFIG/UNIFORM/v7/IPSLCM7                        HEAD         8   IPSLCM7        config
-#-C- IPSLCM7_work  trunk/libIGCM                                    1581        10   libIGCM        .
-#-C- IPSLCM7_work  4.2.0                                            HEAD         22  NEMO           modeles
-#-C- IPSLCM7_work  trunk/INCA6                                      1091     	 9   INCA           modeles
-#-C- IPSLCM7_work  XIOS2/trunk                                      2439        12   XIOS           modeles
+#-C- IPSLCM7_work  master                		        3558d704         21  DYNAMICO       modeles   DYNAMICO 
+#-C- IPSLCM7_work  ICOSA_LMDZ                                       4616         20  ICOSA_LMDZ     modeles   DYNAMICO
+#-C- IPSLCM7_work  IOIPSL/tags/v2_2_5                               6058         8   IOIPSL         modeles   IOIPSL
+#-C- IPSLCM7_work  branches/ORCHIDEE_2_2/ORCHIDEE                   7991        14   ORCHIDEE_2_2   modeles   ORCHIDEE
+#-C- IPSLCM7_work  trunk/ORCHIDEE                                   8175        14   ORCHIDEE_trunk modeles   ORCHIDEE
+#-C- IPSLCM7_work  CPL/oasis3-mct/branches/OASIS3-MCT_5.0_branch    6331         8   oasis3-mct     .         OASIS
+#-C- IPSLCM7_work  LMDZ6/trunk          		            4515        20   LMDZ           modeles   LMDZ
+#-C- IPSLCM7_work  CONFIG/UNIFORM/v7/IPSLCM7                        HEAD         8   IPSLCM7        config    CONFIG
+#-C- IPSLCM7_work  trunk/libIGCM                                    1581        10   libIGCM        .         libIGCM
+#-C- IPSLCM7_work  4.2.0                                            HEAD         22  NEMO           modeles   NEMO
+#-C- IPSLCM7_work  trunk/INCA6                                      1091     	 9   INCA           modeles   INCA
+#-C- IPSLCM7_work  XIOS2/trunk                                      2439        12   XIOS           modeles   XIOS
 
 
Index: modipsl/trunk/util/model
===================================================================
--- modipsl/trunk/util/model	(revision 6657)
+++ modipsl/trunk/util/model	(revision 6671)
@@ -45,7 +45,9 @@
 # Retrieve the model name
 #-
-[[ ${#} -gt 1 ]] && \
+[[ ${#} -gt 2 ]] && \
   { echo 'Only one model can be specified' 1>&2; exit 3; }
 [[ ${#} -eq 1 ]] && { m_n="${1}"; }
+sub_conf="FULL"
+[[ ${#} -eq 2 ]] && { m_n="${1}"; sub_conf="${2}"; }
 [[ ${m_a} != 'help' && -z ${m_n} ]] && \
  {
@@ -54,4 +56,33 @@
   exit 3;
  }
+
+case ${m_n} in
+    ( IPSLCM7* )
+    # subconfiguration is optional
+    if [ ${sub_conf} == "LMDZOR" ] ; then
+	comp_to_exclude="NEMO OASIS INCA DYNAMICO"
+    elif [ ${sub_conf} == "LMDZORINCA" ] ; then
+	comp_to_exclude="NEMO OASIS DYNAMICO"
+    elif [ ${sub_conf} == "ICOLMDZOR" ] ; then
+	comp_to_exclude="NEMO OASIS INCA"
+    elif [ ${sub_conf} == "ICOLMDZORINCA" ] ; then
+	comp_to_exclude="NEMO OASIS"
+    elif [ ${sub_conf} == "FULL" ] ; then
+	comp_to_exculde=" "
+    else
+	echo Sub-configuration ${sub_conf} is not supported.
+	echo Choose between ICOLMDZOR, ICOLMDZORINCA, LMDZOR or LMDZORINCA
+	echo For full configuration, do not specify the second argument or choose FULL
+	exit
+    fi
+    ;;
+    ( * )
+    # sub configuration is not possible
+    if [ ${sub_conf} != "FULL" ] ; then
+	echo Extraction of a sub-configuration is not supported for this model. Remove second argument and retry.
+	exit
+    fi
+esac
+
 #-
 # Test availability of the definition file
@@ -102,8 +133,8 @@
     unset v0 v1 v2 v3;
     #- Extract the model informations
-    qi=0;
-    while read v0 v1 v2 v3 v4 v5 v6
+    qi=0;  
+    while read v0 v1 v2 v3 v4 v5 v6 v7
       do
-        [[ -n "${v1}" && "${v1}" = "${m_n}" ]] && \
+	 [[ -n "${v1}" && "${v1}" = "${m_n}" ]] && \
          {
           #- model manager email address
@@ -148,8 +179,10 @@
             m_l[${qi}]=${v6};
             [[ -z "${m_l[${qi}]}" ]] && { m_l[${qi}]="modeles"; }
+	    m_7[${qi}]=${v7};
+            [[ -z "${m_7[${qi}]}" ]] && { m_7[${qi}]="none"; }
            }
          }
       done <${F_DEF}
-    unset v0 v1 v2 v3 v4 v5 v6
+    unset v0 v1 v2 v3 v4 v5 v6 v7
     #- Validate the model informations
     #- m_m: model manager email address. If not found in mod.def then set default adress.
@@ -202,4 +235,5 @@
   else
     echo 'model : '${m_n};
+    [[ ${sub_conf} != "FULL" ]] && echo "Subconfiguration : ${sub_conf} (following components will not be extracted:  ${comp_to_exclude})"
     echo ' ';
     while read v0 v1 v2
@@ -215,4 +249,12 @@
       do
         ((qi=qi+1));
+	
+	# Check if the component is in the list of compents to exclude from installation
+	# If that's the case, continue to next component
+	z7=${m_7[${qi}]}
+	if [ "X$( echo ${comp_to_exclude} | grep $z7 )" != "X" ] ; then
+	    [[ ${m_v} = 'verbose' ]] && { echo Component ${z7} will not be extracted. ; }
+	    continue
+	fi
         echo 'Component '${qi}' : '${m_c[${qi}]};
         echo 'Revision  '${qi}' : '${m_t[${qi}]};
@@ -221,4 +263,6 @@
         echo 'Directory '${qi}' : '${m_d[${qi}]};
         echo 'Local Dir '${qi}' : '${m_l[${qi}]};
+	echo 'Comp name '${qi}' : '${z7};
+	echo ''
       done
   fi
@@ -272,5 +316,13 @@
     zp=${m_p[${qi}]}; zs=${m_s[${qi}]};
     zd=${m_d[${qi}]}; zl=${m_l[${qi}]};
-    
+    z7=${m_7[${qi}]};
+
+    # Check if the component is in the list of compents to exclude from installation
+    # If that's the case, continue to next component
+    if [ "X$( echo ${comp_to_exclude} | grep $z7 )" != "X" ] ; then
+	[[ ${m_v} = 'verbose' ]] && { echo Component ${z7} will not be extracted. ; }
+	continue
+    fi
+
 # Maybe change some information marked with DEFAULT. 
 # Check if key word DEFAULT is used in component name
@@ -305,4 +357,5 @@
        echo '--- Directory  : '${zd};
        echo '--- Local Dir  : '${zl};
+       echo '--- Component name : '${z7};
     else
        echo '--- Component : '${zd};
@@ -317,5 +370,6 @@
        echo '--- Server     : '${zs};
        echo '--- Directory  : '${zd};
-       echo '--- Local Dir  : '${zl}; } >>"${F_LOG}"
+       echo '--- Local Dir  : '${zl};
+       echo '--- Component name  : '${z7}; } >>"${F_LOG}"
 #---
     [[ ${zp} = 'cvs' ]] && \
@@ -447,4 +501,21 @@
 esac
 
+case ${m_n} in ( IPSLCM7* )
+	       if [ ${sub_conf} == "LMDZOR" ] ; then
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM*
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/ICOLMDZ*
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/*INCA*
+	       elif [ ${sub_conf} == "LMDZORINCA" ] ; then
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM*
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/ICOLMDZ*
+	       elif [ ${sub_conf} == "ICOLMDZOR" ] ; then
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM*
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/*INCA*
+	       elif [ ${sub_conf} == "ICOLMDZORINCA" ] ; then
+		   rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM*
+	       fi
+	       ;;
+esac
+
 #--- Create Makefiles using the script ins_make
 #    ins_make will detect target machine among predefined targets in AA_make.gdef and 
