Index: LMDZ.3.3/trunk/makegcm
===================================================================
--- LMDZ.3.3/trunk/makegcm	(revision 169)
+++ LMDZ.3.3/trunk/makegcm	(revision 170)
@@ -1,8 +1,9 @@
 #!/bin/csh
+# $Header$
 #set verbose echo
 ########################################################################
 # options par defaut pour la commande make
 ########################################################################
-set dim="72x46x19"
+set dim="72x45x19"
 set physique=lmd
 set phys="PHYS=$physique"
@@ -33,8 +34,13 @@
     set NCDFLIB=`grep sxnec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
   else
-    echo 'Probleme de definition des variables NCDFINC et NCDFLIB'
+    if ( `hostname` == nymphea0 ) then
+      set NCDFINC=`grep fjvpp ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
+      set NCDFLIB=`grep fjvpp ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
+    else
+      echo 'Probleme de definition des variables NCDFINC et NCDFLIB'
+    endif 
   endif 
-  cp libf/phylmd/oasis.F libf/phylmd/oasis.dummy
-  cp libf/phylmd/oasis.true libf/phylmd/oasis.F
+  \cp libf/phylmd/oasis.F libf/phylmd/oasis.dummy
+  \cp libf/phylmd/oasis.true libf/phylmd/oasis.F
 else
   if ( ! $?LMDGCM ) then
@@ -64,4 +70,13 @@
 set model=$LMDGCM
 set libo=$LIBOGCM
+
+#Force/couple
+set COUPLE=0
+set ocean=`grep '^      parameter (ocean' libf/phylmd/physiq.F | awk -F\' '{print $2}'`
+banner $ocean
+if ($ocean == couple) then
+  set COUPLE=1
+endif
+
 
 ########################################################################
@@ -168,8 +183,13 @@
 #   set optim="-Dasuxm  -On, -g -Ad -Potilax -Eciplume -Si"
 #   set optimbis="  -Wv,-m3 -Wp,-DVPP -Z $LMDGCM/listage"
-   set optimbis=" -Z $LMDGCM/listage"
-   set optim90="$optim $optimbis -w"
-   set opt_link="-Wg,-c -L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
-   set oplink=" "
+   set optimbis=" -Wp,-DNC_DOUBLE -Ad -Z $LMDGCM/listage"
+   set optim90="$optim $optimbis -X9 -w"
+   if $COUPLE then
+     set opt_link="-Wg,-c $IOIPSLDIR/liboasis2.4_mpi2.a /usr/lang/mpi2/lib64/libmpi.a /usr/lang/mpi2/lib64/libmp.a /usr/local/lib/lib64/libnetcdf_cc.a -L$IOIPSLDIR -lioipsl"
+     set oplink="-Wl,-t,-P,-dy "
+   else
+     set opt_link="-Wg,-c /usr/local/lib/lib64/libnetcdf_cc.a -L$IOIPSLDIR -lioipsl"
+     set oplink="-Wl,-t,-dy "
+   endif
    set mod_loc_dir=$IOIPSLDIR
    set mod_suffix=mod
@@ -198,8 +218,14 @@
    set optimbis=" "
    if $MODIPSL then
-     set opt_link="-L$IOIPSLDIR -lsxioipsl -loasis2.4_mpi2 -float0 -ew -P stack -I$NCDFINC $NCDFLIB "
-     set mod_loc_dir="$localdir/../lib"
+     if $COUPLE then
+       set opt_link="-L$IOIPSLDIR -lsxioipsl -loasis2.4_mpi2 -Wl,-f nan, -float0 -ew -P stack -I$NCDFINC $NCDFLIB "
+       set opt_link="-L$IOIPSLDIR -lsxioipsl -loasis2.4_mpi2 -float0 -ew -P stack -I$NCDFINC $NCDFLIB "
+#       set opt_link="-L$IOIPSLDIR -lsxioipsl -loasis2.4_mpi2 -float0 -ew -eC -P stack -I$NCDFINC $NCDFLIB "
+     else
+       set opt_link="-L$IOIPSLDIR -lsxioipsl -float0 -ew -P stack -I$NCDFINC $NCDFLIB "
+     endif
+     set mod_loc_dir="./"
    else
-     set opt_link=" -C hopt -float0 -ew -P stack -L$IOIPSLDIR -lioipsl -L /u/rech/psl/rpsl003/IOIPSL -lnetcdf_i8r8_v -I$NCDFINC "
+     set opt_link=" -C hopt -float0 -ew -P stack -L$IOIPSLDIR -lsxioipsl -L /u/rech/psl/rpsl003/IOIPSL -lnetcdf_i8r8_v -I$NCDFINC "
      set mod_loc_dir="."
    endif
@@ -682,4 +708,5 @@
 if $VPP then
   set optim90=" $optim90 -Am -M$libo"
+  set optimtru90="$optim90"
  \cp $IOIPSLDIR/*.mod $libo
 else if $SUN then
