Index: LMDZ5/branches/testing/makelmdz_fcm
===================================================================
--- LMDZ5/branches/testing/makelmdz_fcm	(revision 2298)
+++ LMDZ5/branches/testing/makelmdz_fcm	(revision 2408)
@@ -34,4 +34,5 @@
 job=1
 full=''
+libphy=false
 
 LMDGCM=`/bin/pwd`
@@ -43,4 +44,5 @@
 DYN_PHYS_PATH=$LMDGCM/.void_dir
 DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
+PHY_COMMON_PATH=$LMDGCM/.void_dir
 RRTM_PATH=$LMDGCM/.void_dir
 SISVAT_PATH=$LMDGCM/.void_dir
@@ -96,4 +98,5 @@
 [-j n]                     : active parallel compiling on ntask
 [-full]                    : full recompiling 
+[-libphy]                  : only compile physics package (no dynamics or main program)
 [-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
 [-ext_src path]            : path to an additional set of routines to compile with the model
@@ -170,8 +173,13 @@
       "-ext_src")
 	  EXT_SRC=$2 ; shift ; shift ;;
+
       "-j")
 	  job=$2 ; shift ; shift ;;
+
       "-full")
 	  full="-full" ; shift ;;
+
+      "-libphy")
+	  libphy="true" ; shift ;;
 
       "-arch")
@@ -182,12 +190,4 @@
   esac
 done
-
-if [[ $code = ce0l && $paramem = mem ]]
-then
-    echo "There is no parallel version of ce0l at the moment."
-    echo "Please compile the sequential version of the code to produce the" \
-	"executable ce0l."
-    exit 1
-fi
 
 ###############################################################
@@ -252,4 +252,6 @@
    CPP_KEY="$CPP_KEY CPP_EARTH"
    fi
+   # set physics common utilities path
+   PHY_COMMON_PATH="${LIBFGCM}/phy_common"
    # set the dyn/phys interface path
    DYN_PHYS_PATH="${LIBFGCM}/dynlonlat_phylonlat"
@@ -541,4 +543,19 @@
 fi
 
+if [[ $libphy == "true" ]]
+then
+  # special case where we compile only the physics
+  DYN=$LMDGCM/.void_dir
+  DYN_COMMON_PATH=$LMDGCM/.void_dir
+  FILTRE_PATH=$LMDGCM/.void_dir
+  DYN_PHYS_PATH=$LMDGCM/.void_dir
+  DYN_PHYS_SUB_PATH=$LMDGCM/.void_dir
+  #and there is no main program to generate
+  code=""
+  SUFF_NAME=""
+else
+  SUFF_NAME=${SUFF_NAME}.e
+fi
+
 cd $LMDGCM
 config_fcm="config.fcm"
@@ -557,4 +574,5 @@
 echo "%DYN           $DYN"           >> $config_fcm
 echo "%DYN_COMMON    $DYN_COMMON_PATH" >> $config_fcm
+echo "%PHY_COMMON    $PHY_COMMON_PATH" >> $config_fcm
 echo "%FILTRE        $FILTRE_PATH"   >> $config_fcm
 echo "%PHYS          phy${physique}" >> $config_fcm
@@ -588,5 +606,5 @@
 rm -rf config
 ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config config
-ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src
+ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/ppsrc tmp_src
 
 
