Index: trunk/NEMOGCM/CONFIG/makenemo
===================================================================
--- trunk/NEMOGCM/CONFIG/makenemo	(revision 4528)
+++ trunk/NEMOGCM/CONFIG/makenemo	(revision 4990)
@@ -38,7 +38,8 @@
 #
 # - NEW_CONF    : configuration to be created
-# - REF_CONF    : reference configuration to build the new one
+# - REF_CONF    : reference configuration to build the new one from
 # - CMP_NAM     : compiler name
 # - NBR_PRC     : number of processes used to compile
+# - USP_CONF    : unsupported (external) configuration to build the new one from
 # - NEM_SUBDIR  : NEMO subdirectory used (specified)
 #
@@ -51,4 +52,9 @@
 # - TOOLS_DIR   :   "    "    "
 # - NEMO_DIR    :   "    "    "
+# - REMOTE_CTL  : URL link to a remote resource list for an external configuration 
+#                 which is not part of the reference suite
+# - LOCAL_REF   : Nearest reference configuration to an external configuration 
+#                 which is not part of the reference suite
+#                 (used to populate work directories if remote access is not available)
 #
 # EXAMPLES
@@ -83,4 +89,5 @@
 x_n="";
 x_r="";
+x_u="";
 x_m="";
 x_t="";
@@ -106,4 +113,6 @@
 export AGRIFUSE=10
 declare -a TAB
+declare -a REMOTE_CTL
+declare -a LOCAL_REF
 list_key=0
 chk_key=1
@@ -114,10 +123,10 @@
 #-
 #- Choice of the options ---
-while getopts :hd:n:r:m:j:e:s:v:t:k: V
+while getopts :hd:n:r:u:m:j:e:s:v:t:k: V
 do
     case $V in
 	(h) x_h=${OPTARG};
         echo "Usage	 : "${b_n} \
-	    " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]";
+	    " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-u conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]";
 	echo " -h	        : help";
 	echo " -h institute : specific help for consortium members";
@@ -126,4 +135,5 @@
 	echo " -d dir       : choose NEMO sub-directories";
 	echo " -r conf      : choose reference configuration";
+	echo " -u conf      : choose an unsupported (external) configuration";
         echo " -s Path      : choose alternative location for NEMO main directory";
         echo " -e Path      : choose alternative location for MY_SRC directory";
@@ -139,4 +149,6 @@
 	echo "Available configurations :"; cat ${CONFIG_DIR}/cfg.txt;
 	echo "";
+        echo "Available unsupported (external) configurations :"; cat ${CONFIG_DIR}/uspcfg.txt;
+	echo "";
 	echo "Example to remove bad configuration ";
 	echo "./makenemo -n MY_CONFIG clean_config";
@@ -161,4 +173,5 @@
 	(n)  x_n=${OPTARG};;
 	(r)  x_r=${OPTARG};;
+	(u)  x_u=${OPTARG};;
 	(m)  x_m=${OPTARG};;
 	(j)  x_j=${OPTARG};;
@@ -220,4 +233,5 @@
 NEM_SUBDIR=${x_d}
 REF_CONF=${x_r}
+USP_CONF=${x_u}
 NEMO_TDIR=${x_t:-$NEMO_TDIR}
 export NEMO_TDIR=${NEMO_TDIR:-$CONFIG_DIR}
@@ -228,4 +242,7 @@
     echo "Available configurations :"
     cat ${CONFIG_DIR}/cfg.txt
+    echo
+    echo "Available unsupported (external) configurations :" 
+    cat ${CONFIG_DIR}/uspcfg.txt
     exit
 fi
@@ -238,6 +255,6 @@
 
 if [ ${#NEW_CONF} -eq 0 ] ; then
-    if [ ${#NEM_SUBDIR} -eq 0 -a ${#REF_CONF} -eq 0 ]; then
-	echo "You are  installing a new configuration"
+    if [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then
+	echo "You are installing a new default (ORCA2_LIM) configuration"
 	ind=0
 	. ${COMPIL_DIR}/Fread_dir.sh OPA_SRC	 YES
@@ -248,6 +265,6 @@
 	. ${COMPIL_DIR}/Fread_dir.sh OFF_SRC	 NO
 	REF_CONF=ORCA2_LIM
-    elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ]; then
-	echo "You are  installing a new configuration"
+    elif [ ${#NEM_SUBDIR} -gt 0 ] && [ ${#REF_CONF} -eq 0 ] && [ ${#USP_CONF} -eq 0 ] ; then
+	echo "You are  installing a new configuration based on ORCA2_LIM"
 	TAB=( ${NEM_SUBDIR} )
 	REF_CONF=ORCA2_LIM
@@ -255,7 +272,19 @@
 	echo "You are  installing a new configuration based on ${REF_CONF}"
 	. ${COMPIL_DIR}/Fcopy_dir.sh ${REF_CONF}
+    elif [ ${#NEM_SUBDIR} -eq 0 ] && [ ${#USP_CONF} -gt 0 ]; then
+	echo "You are  installing a new configuration based on the unsupported (external) ${USP_CONF}"
+	. ${COMPIL_DIR}/Fcopy_extdir.sh ${USP_CONF}  
+        #echo "TTT " ${TAB}
+        #echo "RRR " ${REMOTE_CTL}
+        #echo "LLL " ${LOCAL_REF}
     fi
     NEW_CONF=${x_n}
-    . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF}
+
+    if [ ${#USP_CONF} -gt 0 ]; then
+      . ${COMPIL_DIR}/Fmake_extconfig.sh ${NEW_CONF} ${LOCAL_REF}
+      . ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} ${REMOTE_CTL}  
+    else
+      . ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${REF_CONF}
+    fi
 else
     sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/cfg.txt >  ${COMPIL_DIR}/cfg.tmp
