Index: BOL/Replay/replay_equip.sh
===================================================================
--- BOL/Replay/replay_equip.sh	(revision 4635)
+++ BOL/Replay/replay_equip.sh	(revision 4656)
@@ -1,5 +1,5 @@
 #!/bin/bash
 
-#set -vx
+# set -vx
 
 #=============================================================================
@@ -44,5 +44,5 @@
 #  Le script a comme argument le nom de la routine à traiter, nommée $param
 #   Des correpspondances en déduisent :
-#   paramini=wake_ini  # nom de la subroutine d'intialisation
+#   param_ini=wake_ini  # nom de la subroutine d'intialisation
 #   inimod= # nom du module contenant $param_ini
 #   klon=klon ; klev=klev  # nom des dimensions horiz; vert utilisée
@@ -110,11 +110,12 @@
 
 case $param in
-   vdif_k) paramini=None ; inimod=None ; klon=ngrid ; klev=nlay ;;
+   vdif_k|vdif_cd|vdif|my_25) param_ini=vdif_ini_ ; inimod=vdif_ini ; klon=ngrid ; klev=nlay ;;
    thermcell_main|thermcell_plume_6A|thermcell_env|thermcell_height|thermcell_dry|\
       thermcell_closure|thermcell_height|thermcell_dq|thermcell_flux2|thermcell_down| \
       thermcell_updown_dq) \
-      paramini=thermcell_ini ; inimod=lmdz_thermcell_ini ; klon=ngrid ; klev=nlay ;;
-   wake|wake_popdyn_1|wake_popdyn_2) paramini=wake_ini ; inimod=lmdz_wake_ini ; klon=klon ; klev=klev ;;
-   ratqs_main|ratqs_inter|ratqs_oro|ratqs_hetero|ratqs_tke) paramini=ratqs_ini ; inimod=lmdz_ratqs_ini ; klon=klon ; klev=klev ;;
+      param_ini=thermcell_ini ; inimod=lmdz_thermcell_ini ; klon=ngrid ; klev=nlay ;;
+   wake|wake_popdyn_1|wake_popdyn_2|vdif_kcay) 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 ;;
    *) echo Cas non prevu ; exit
 esac
@@ -290,6 +291,6 @@
       sed -i"" -e "/$replay_comment/d" $file
    done
-   line=`sed -n -e "/CALL wake_ini/=" physiq_mod.F90 | head -1`
-   sed -i"" -e "${line}s/$/\n   CALL iophys_ini(pdtphys) ! $replay_comment  ! $replay_comment/" physiq_mod.F90
+   line=`sed -n -e "/CALL "$param_ini"/=" physiq_mod.F90 | head -1`
+   sed -i"" -e "${line}s/^/   CALL iophys_ini(pdtphys) ! $replay_comment  ! $replay_comment\n/" physiq_mod.F90
 fi
 
@@ -343,5 +344,5 @@
 
 for var in $varinout0 ; do
-    sed -e 's/::/ :: /' -e 's/,/ , /g' -e 's/$/ /' input | grep 'intent.*inout.*::.* '$var' ' | sed -e 's/ //g' -e 's/,intent(.*[nt])//' | sed -e 's/::.*$/, allocatable, save :: '$var'_Replay0/' | sed -e 's/'$klon'/:/' -e 's/'$klev'/:/' >> call_param_replay.F90
+    sed -e 's/::/ :: /' -e 's/,/ , /g' -e 's/$/ /' input | grep 'intent.*inout.*::.* '$var' ' | sed -e 's/ //g' -e 's/,intent(.*[nt])//' | sed -e 's/::.*$/, allocatable, save :: '$var'_Replay0/' | sed -e 's/'$klon'/:/' -e 's/'${klev}'+1/:/' -e 's/'${klev}'/:/' >> call_param_replay.F90
 done
 # Initalisation, shared with dump_param1.sh
@@ -420,5 +421,5 @@
 #-----------------------------------------------------------------------------
 
-if [ $nconly = false -a $paramini != None ] ; then
+if [ $nconly = false -a $param_ini != None ] ; then
    varinmod=`grep -i 'intent.in' $inimod.F90 | sed -e 's/\!.*$//' | cut -d: -f3 | sed -e 's/,/ /g'`
    varinmodv=`echo $varinmod | sed -e 's/ /,/g'`
@@ -428,5 +429,5 @@
    close(90)
 ...eod...............................................
-   include_line "include \"$iniinc\"" $paramini $inimod.F90  -before_return
+   include_line "include \"$iniinc\"" $param_ini $inimod.F90  -before_return
 fi # nconly = false
 
@@ -435,5 +436,5 @@
 # call_ini_replay.F90 gere l'initialisation du module en mode replay
 #-----------------------------------------------------------------------------
-if [ $nconly = false -a $paramini != None ] ; then
+if [ $nconly = false -a $param_ini != None ] ; then
     cat > call_ini_replay.F90 <<....eod............................................
     subroutine call_ini_replay
@@ -447,6 +448,6 @@
     close(90)
 ....eod...........................................
-    #get_subroutine_arg $paramini $inimod.F90 ; exit
-    get_subroutine_arg $paramini $inimod.F90 | sed -e 's/subroutine/call/' >> call_ini_replay.F90
+    #get_subroutine_arg $param_ini $inimod.F90 ; exit
+    get_subroutine_arg $param_ini $inimod.F90 | sed -e 's/subroutine/call/' >> call_ini_replay.F90
     cat >> call_ini_replay.F90 <<....eod...........................................
     return
