Index: /LMDZ.3.3/branches/rel-LF/makegcm
===================================================================
--- /LMDZ.3.3/branches/rel-LF/makegcm	(revision 495)
+++ /LMDZ.3.3/branches/rel-LF/makegcm	(revision 496)
@@ -14,5 +14,6 @@
 set couple=false
 set veget=true
-set OPT_STACK='-Wf,-init stack=zero'
+set psmile=false
+set OPT_STACK='-Wf,-init stack=nan'
 set OPT_STACK=' '
 set OPTIMI='-C debug -eC'
@@ -38,8 +39,8 @@
   cd $localdir
   if ( `hostname` == rhodes ) then
-#    set NCDFINC=`grep sxnec ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
-#    set NCDFLIB=`grep sxnec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
-     set NCDFINC="$NETCDF_I8R8"
-     set NCDFLIB="$NETCDF_I8R8"
+    set NCDFINC=`grep sxnec ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
+    set NCDFLIB=`grep sxnec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
+#     set NCDFINC="$NETCDF_I8R8"
+#     set NCDFLIB="$NETCDF_I8R8"
   else
     if ( `hostname` == nymphea0 ) then
@@ -214,6 +215,7 @@
    set mod_suffix="mod"
 else if $XNEC then
-   set optim90=' -clear -float0 -ew -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
-   set optimtru90=' -clear -f4 -float0 -ew -R2 -R3 -R4 -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume"'
+   set optdbl='-dw -Wf\"-A dbl4\"'
+   set optim90=' -clear -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
+   set optimtru90=' -clear -f4 -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R2 -R3 -R4 -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume"'
    set optim="$optim90"
    set optimbis=" "
@@ -307,4 +309,7 @@
            pour selectionner le mode force (par defaut) ou couple
 
+-psmile false|true
+           pour selectionner le mode psmile ou non (par defaut)
+
 -v true|false
            pour selectionner la vegetation (par defaut) ou non
@@ -370,4 +375,7 @@
         set veget="$2" ; shift ; shift ; goto top
 
+     case -psmile
+        set psmile="$2" ; shift ; shift ; goto top
+  
      case -t
         set ntrac=$2 ; shift ; shift ; goto top
@@ -497,5 +505,5 @@
 
 if ( $XNEC ) then
-  set include="$include $NCDFINC -I$IOIPSLDIR"
+  set include="$include -I$NCDFINC -I$IOIPSLDIR"
 else
   set include="$include -I$NCDFINC -I$IOIPSLDIR"
@@ -689,10 +697,12 @@
      endif
      if ($couple == true) then
-       set opt_link="$opt_link -lsxioipsl -loasis2.4_mpi2 -float0 -ew -P static $NCDFLIB "
+       set opt_link="$opt_link -lsxioipsl -loasis2.4_mpi2 -float0 $optdbl -P static $NCDFLIB "
+       if ($psmile == true) then
+       endif
      else
-       set opt_link="$opt_link -lsxioipsl -float0 -ew -P static $NCDFLIB "
+       set opt_link="$opt_link -lsxioipsl -float0 $optdbl -P static $NCDFLIB "
      endif
    else
-     set opt_link=" -C hopt -float0 -ew -P static -L$MODIPSLDIR -lsxsechiba -lsxparameters -lsxstomate -lsxioipsl $NETCDF_I8R8 "
+     set opt_link=" -C hopt -float0 $optdbl -P static -L$MODIPSLDIR -lsxsechiba -lsxparameters -lsxstomate -lsxioipsl $NCDFLIB "
    endif
    set mod_loc_dir="./"
