Index: LMDZ5/branches/testing/libf/dyn3dmem/conf_gcm.F
===================================================================
--- LMDZ5/branches/testing/libf/dyn3dmem/conf_gcm.F	(revision 1669)
+++ LMDZ5/branches/testing/libf/dyn3dmem/conf_gcm.F	(revision 1707)
@@ -1,4 +1,4 @@
 !
-! $Id: conf_gcm.F 1403 2010-07-01 09:02:53Z fairhead $
+! $Id$
 !
 c
@@ -6,4 +6,5 @@
       SUBROUTINE conf_gcm( tapedef, etatinit, clesphy0 )
 c
+      USE control_mod
 #ifdef CPP_IOIPSL
       use IOIPSL
@@ -17,5 +18,7 @@
       use mod_hallo, ONLY : use_mpi_alloc
       use parallel, ONLY : omp_chunk
-      USE control_mod
+      USE infotrac, ONLY : type_trac
+      use assert_m, only: assert
+
       IMPLICIT NONE
 c-----------------------------------------------------------------------
@@ -43,10 +46,10 @@
 #include "serre.h"
 #include "comdissnew.h"
-!#include "clesphys.h"
-#include "iniprint.h"
 #include "temps.h"
 #include "comconst.h"
 
 ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
+! #include "clesphys.h"
+#include "iniprint.h"
 c
 c
@@ -103,5 +106,6 @@
       CALL getin('lunout', lunout)
       IF (lunout /= 5 .and. lunout /= 6) THEN
-        OPEN(lunout,FILE='lmdz.out')
+        OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write', 
+     &          STATUS='unknown',FORM='formatted')
       ENDIF
 
@@ -166,4 +170,12 @@
       CALL getin('nday',nday)
 
+!Config  Key  = starttime
+!Config  Desc = Heure de depart de la simulation
+!Config  Def  = 0
+!Config  Help = Heure de depart de la simulation
+!Config         en jour
+      starttime = 0
+      CALL getin('starttime',starttime)
+
 !Config  Key  = day_step
 !Config  Desc = nombre de pas par jour
@@ -175,8 +187,4 @@
 
 !Config  Key  = nsplit_phys
-!Config  Desc = nombre d'iteration de la physique
-!Config  Def  = 240 
-!Config  Help = nombre d'itration de la physique
-!
        nsplit_phys = 1 
        CALL getin('nsplit_phys',nsplit_phys)
@@ -226,11 +234,12 @@
        CALL getin('output_grads_dyn',output_grads_dyn)
 
-!Config  Key  = idissip
+!Config  Key  = dissip_period
 !Config  Desc = periode de la dissipation 
-!Config  Def  = 10
+!Config  Def  = 0
 !Config  Help = periode de la dissipation 
-!Config         (en pas) ... a completer !
-       idissip = 10
-       CALL getin('idissip',idissip)
+!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
+!Config  dissip_period>0 => on prend cette valeur
+       dissip_period = 0
+       CALL getin('dissip_period',dissip_period)
 
 ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
@@ -314,5 +323,4 @@
        CALL getin('tau_top_bound',tau_top_bound)
 
-!
 !Config  Key  = coefdis
 !Config  Desc = coefficient pour gamdissip
@@ -579,4 +587,22 @@
        offline = .FALSE.
        CALL getin('offline',offline)
+       IF (offline .AND. adjust) THEN
+          WRITE(lunout,*) 
+     &         'WARNING : option offline does not work with adjust=y :'
+          WRITE(lunout,*) 'the files defstoke.nc, fluxstoke.nc ', 
+     &         'and fluxstokev.nc will not be created'
+          WRITE(lunout,*) 
+     &         'only the file phystoke.nc will still be created ' 
+       END IF
+       
+!Config  Key  = type_trac
+!Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
+!Config  Def  = lmdz
+!Config  Help = 
+!Config         'lmdz' = pas de couplage, pur LMDZ
+!Config         'inca' = model de chime INCA 
+!Config         'repr' = model de chime REPROBUS
+      type_trac = 'lmdz'
+      CALL getin('type_trac',type_trac)
 
 !Config  Key  = config_inca
@@ -628,5 +654,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
@@ -651,4 +677,5 @@
       write(lunout,*)' tauyy = ', tauyy
       write(lunout,*)' offline = ', offline
+      write(lunout,*)' type_trac = ', type_trac
       write(lunout,*)' config_inca = ', config_inca
       write(lunout,*)' ok_dynzon = ', ok_dynzon 
@@ -769,4 +796,22 @@
        offline = .FALSE.
        CALL getin('offline',offline)
+       IF (offline .AND. adjust) THEN
+          WRITE(lunout,*) 
+     &         'WARNING : option offline does not work with adjust=y :'
+          WRITE(lunout,*) 'the files defstoke.nc, fluxstoke.nc ', 
+     &         'and fluxstokev.nc will not be created'
+          WRITE(lunout,*) 
+     &         'only the file phystoke.nc will still be created ' 
+       END IF
+
+!Config  Key  = type_trac
+!Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
+!Config  Def  = lmdz
+!Config  Help = 
+!Config         'lmdz' = pas de couplage, pur LMDZ
+!Config         'inca' = model de chime INCA 
+!Config         'repr' = model de chime REPROBUS
+      type_trac = 'lmdz'
+      CALL getin('type_trac',type_trac)
 
 !Config  Key  = config_inca
@@ -781,5 +826,5 @@
 
 !Config  Key  = ok_dynzon 
-!Config  Desc = calcul et sortie des transports 
+!Config  Desc = sortie des transports zonaux dans la dynamique
 !Config  Def  = n 
 !Config  Help = Permet de mettre en route le calcul des transports 
@@ -817,5 +862,5 @@
         write(lunout,*)"Le zoom en longitude est incompatible",
      &                 " avec l'utilisation du filtre FFT ",
-     &                 "---> filtre FFT dÃ©sactivÃ© "
+     &                 "---> FFT filter not active"
        use_filtre_fft=.FALSE.
       ENDIF
@@ -851,4 +896,9 @@
       CALL getin('ok_strato',ok_strato)
 
+      vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
+      CALL getin('vert_prof_dissip', vert_prof_dissip)
+      call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1,
+     $     "bad value for vert_prof_dissip")
+
 !Config  Key  = ok_gradsfile
 !Config  Desc = activation des sorties grads du guidage
@@ -874,4 +924,10 @@
       ok_etat0 = .TRUE.
       CALL getin('ok_etat0',ok_etat0)
+
+!Config  Key  = grilles_gcm_netcdf
+!Config  Desc = creation de fichier grilles_gcm.nc dans create_etat0_limit
+!Config  Def  = n
+      grilles_gcm_netcdf = .FALSE.
+      CALL getin('grilles_gcm_netcdf',grilles_gcm_netcdf)
 
       write(lunout,*)' #########################################'
@@ -889,5 +945,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
@@ -912,6 +968,7 @@
       write(lunout,*)' tauy = ', tauy
       write(lunout,*)' offline = ', offline
+      write(lunout,*)' type_trac = ', type_trac
       write(lunout,*)' config_inca = ', config_inca
-      write(lunout,*)' ok_dynzon = ', ok_dynzon 
+      write(lunout,*)' ok_dynzon = ', ok_dynzon
       write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 
       write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 
@@ -923,4 +980,5 @@
       write(lunout,*)' ok_limit = ', ok_limit
       write(lunout,*)' ok_etat0 = ', ok_etat0
+      write(lunout,*)' grilles_gcm_netcdf = ', grilles_gcm_netcdf
 c
       RETURN
