Index: BOL/Replay/replay_clean.sh
===================================================================
--- BOL/Replay/replay_clean.sh	(revision 4659)
+++ BOL/Replay/replay_clean.sh	(revision 4668)
@@ -4,5 +4,6 @@
 replay_comment="replay automatic include"
 if [ $# = 0 ] ; then
-   \rm -f dump_replay*.h dump_param.h dump_ini.h  input tmp tmp2 tmp3 tmp2_cpp
+   \rm -f dump_replay*.h dump_param.h dump_ini.h  input tmp_get_subroutine_arg  tmp_include_line  tmp_include_line*  tmp_include_line*_cpp  tmp_include_line*
+
    for file in `grep "$replay_comment" *F90 | cut -d: -f1` ; do
       sed -i"" -e "/$replay_comment/d" $file
Index: BOL/Replay/replay_equip.sh
===================================================================
--- BOL/Replay/replay_equip.sh	(revision 4659)
+++ BOL/Replay/replay_equip.sh	(revision 4668)
@@ -1,5 +1,5 @@
 #!/bin/bash
 
-# set -vx
+#set -vx
 
 #=============================================================================
@@ -117,5 +117,5 @@
    wake|wake_popdyn_1|wake_popdyn_2|vdif_kcay|ustarhb) param_ini=wake_ini ; inimod=lmdz_wake_ini ; klon=klon ; klev=klev ;;
    ratqs_main|ratqs_inter|ratqs_oro|ratqs_hetero|ratqs_tke) param_ini=ratqs_ini ; inimod=lmdz_ratqs_ini ; klon=klon ; klev=klev ;;
-   lscp) param_ini=lscp_ini ; inimod=lscp_ini_mod ; klon=klon ; klev=klev ;;
+   lscp|fisrtilp) param_ini=lscp_ini ; inimod=lmdz_lscp_ini ; klon=klon ; klev=klev ;;
    *) echo Cas non prevu ; exit
 esac
@@ -136,8 +136,9 @@
 
 function get_subroutine_arg(){
-   cat $2 | tr '[A-Z]' '[a-z]' > tmp
-   line1=`sed -n -e '/subrou.*'\`echo $1 | tr '[A-Z]' '[a-z]'\`'.*(/=' tmp | head -1 `
-   line2=`tail -n +$line1 tmp | sed -n -e '/)/=' | head -1`
-   tail -n +$line1 tmp | sed -n -e 1,${line2}p
+   tmp=tmp_get_subroutine_arg
+   cat $2 | tr '[A-Z]' '[a-z]' > ${tmp}
+   line1=`sed -n -e '/subrou.*'\`echo $1 | tr '[A-Z]' '[a-z]'\`'.*(/=' ${tmp} | head -1 `
+   line2=`tail -n +$line1 ${tmp} | sed -n -e '/)/=' | head -1`
+   tail -n +$line1 ${tmp} | sed -n -e 1,${line2}p
 }
 
@@ -169,11 +170,12 @@
    # $2 nom du fichier
    # input <- routine under treatment with small caps only
-   ( cpp $2 2>/dev/null ) | tr '[A-Z]' '[a-z]' > tmp
+   tmp=tmp_extract_subroutine
+   ( cpp $2 2>/dev/null ) | tr '[A-Z]' '[a-z]' > ${tmp}
    name_min=`echo $1 | tr '[A-Z]' '[a-z]'`
-   line1=`sed -n -e "/subrou.*${name_min}.*(/=" tmp | head -1 `
-   tail -n +$line1 tmp > tmp2
-   line2=`sed -n -e "/[Rr][Ee][Tt][Uu][Rr][Nn]/=" tmp2 | head -1`
-   head -$line2 tmp2  > input
-   \rm -f tmp tmp2
+   line1=`sed -n -e "/subrou.*${name_min}.*(/=" ${tmp} | head -1 `
+   tail -n +$line1 ${tmp} > ${tmp}2
+   line2=`sed -n -e "/[Rr][Ee][Tt][Uu][Rr][Nn]/=" ${tmp}2 | head -1`
+   head -$line2 ${tmp}2  > input
+   \rm -f ${tmp} ${tmp}2
 }
 
@@ -199,4 +201,5 @@
    # Including param_dump*.h in the parameterization
    #set -vx
+   tmp=tmp_include_line
    line_to_be_included=$1  ; shift
    param_=$1 ; shift
@@ -204,12 +207,12 @@
    name_min=`echo $param_ | tr [A-Z] [a-z]`
    line_subroutine=`cat $paramfile_ | tr '[A-Z]' '[a-z]' | sed -n -e "/subrou.*${name_min}.*(/=" | head -1 `
-   tail -n +$line_subroutine $paramfile_ > tmp # file starting at the subroutine instruction
-   line_return=`sed -n -e "/[Rr][Ee][Tt][Uu][Rr][Nn]/=" tmp | head -1`
-   head -$line_return tmp > tmp2               # file containing the routine
-   sed -e 's/\!.*$//' tmp2 > tmp3
-   cpp tmp2 > tmp3 2>/dev/null
-   cat tmp3 | tr '[A-Z]' '[a-z]' > tmp2_cpp   # same after cpp filtering
-   last_line_declaration2="`sed -n -e 's/\!.*$//' -e 's/^/ /' -e '/[\ ,]real[\ ,]/p' -e '/[\ ,]integer[\ ,]/p' -e '/[\ ,]logical[\ ,]/p' -e '/[\ ,]character[\ ,]/p' tmp2_cpp | tail -1 | sed -e 's/  / /g' -e 's/ /.*/g'`"
-   line_last_declaration=`cat tmp2 | tr '[A-Z]' '[a-z]' | sed -n -e "/$last_line_declaration2/="`
+   tail -n +$line_subroutine $paramfile_ > ${tmp} # file starting at the subroutine instruction
+   line_return=`sed -n -e "/[Rr][Ee][Tt][Uu][Rr][Nn]/=" ${tmp} | head -1`
+   head -$line_return ${tmp} > ${tmp}2               # file containing the routine
+   sed -e 's/\!.*$//' ${tmp}2 > ${tmp}3
+   cpp ${tmp}2 > ${tmp}3 2>/dev/null
+   cat ${tmp}3 | tr '[A-Z]' '[a-z]' > ${tmp}2_cpp   # same after cpp filtering
+   last_line_declaration2="`sed -n -e 's/\!.*$//' -e 's/^/ /' -e '/[\ ,]real[\ ,]/p' -e '/[\ ,]integer[\ ,]/p' -e '/[\ ,]logical[\ ,]/p' -e '/[\ ,]character[\ ,]/p' ${tmp}2_cpp | tail -1 | sed -e 's/  / /g' -e 's/ /.*/g'`"
+   line_last_declaration=`cat ${tmp}2 | tr '[A-Z]' '[a-z]' | sed -n -e "/$last_line_declaration2/="`
    echo OK0
    if [ "`grep -i 'end.*module' $paramfile_`" = "" ] ; then echo aka ;  line_end_module=`wc -l $paramfile_ | awk ' { print $1 } '` ; else echo akb ; line_end_module=`sed -n -e '/[eE][nN][dD] .*[mM][oO][dD][uU][lL][eE]/=' $paramfile_` ; fi
@@ -223,5 +226,5 @@
          -before_return)           targeted_line=$line_return ;;
          -before_end_module)       targeted_line=$line_end_module ;;
-         -before_line|-after_line) linestr=`echo $1 | sed -e "s/$wtype //"` ; targeted_line=`sed -n -e "/$linestr/=" tmp2` ;;
+         -before_line|-after_line) linestr=`echo $1 | sed -e "s/$wtype //"` ; targeted_line=`sed -n -e "/$linestr/=" ${tmp}2` ;;
          *)                  echo Cas non prevu 0 where=$where in include_file
       esac
@@ -429,7 +432,7 @@
    close(90)
 ...eod...............................................
+   for var_ in $varinmod ; do echo "print*,'Interface $param_ini $var_',$var_" >> $iniinc ; done
    include_line "include \"$iniinc\"" $param_ini $inimod.F90  -before_return
 fi # nconly = false
-
 
 #-----------------------------------------------------------------------------
