Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90	(revision 7256)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/forcing_tools.f90	(revision 7257)
@@ -590,5 +590,5 @@
     ENDIF
     !
-    IF ( forcing_tstep_ave <= one_day/4.0) THEN
+    IF ( forcing_tstep_ave <= one_day/3.0) THEN
        !
        ! Interpolate the dynamical variables to the time step at which the driver is for the moment.
@@ -1302,5 +1302,5 @@
     IF ( .NOT. ALLOCATED(time_tair) ) ALLOCATE(time_tair(slab_size))
     IF ( .NOT. ALLOCATED(timebnd_tair) ) ALLOCATE(timebnd_tair(slab_size,2))
-    IF ( forcing_tstep_ave >= one_day/4.0) THEN
+    IF ( forcing_tstep_ave >= one_day/3.0) THEN
        IF ( .NOT. ALLOCATED(tairmax_slab) ) ALLOCATE(tairmax_slab(nbpoint_proc,slab_size))
        IF ( .NOT. ALLOCATED(tairmin_slab) ) ALLOCATE(tairmin_slab(nbpoint_proc,slab_size))
@@ -1346,5 +1346,5 @@
        !
        ALLOCATE(tair_full(nbpoint_loc,slab_size))
-       IF ( forcing_tstep_ave >= one_day/4.0) THEN
+       IF ( forcing_tstep_ave >= one_day/3.0) THEN
           ALLOCATE(tairmax_full(nbpoint_loc,slab_size))
           ALLOCATE(tairmin_full(nbpoint_loc,slab_size))
@@ -1375,5 +1375,5 @@
        !
        ALLOCATE(tair_full(1,1))
-       IF ( forcing_tstep_ave >= one_day/4.0) THEN
+       IF ( forcing_tstep_ave >= one_day/3.0) THEN
           ALLOCATE(tairmax_full(1,1))
           ALLOCATE(tairmin_full(1,1))
@@ -1417,5 +1417,5 @@
     IF ( landonly ) THEN
        CALL scatter(tair_full, tair_slab)
-       IF ( forcing_tstep_ave >= one_day/4.0) THEN
+       IF ( forcing_tstep_ave >= one_day/3.0) THEN
           CALL scatter(tairmax_full, tairmax_slab)
           CALL scatter(tairmin_full, tairmin_slab)
@@ -1433,5 +1433,5 @@
     ELSE
        tair_slab(:,:) = tair_full(:,:)
-       IF ( forcing_tstep_ave >= one_day/4.0) THEN
+       IF ( forcing_tstep_ave >= one_day/3.0) THEN
           tairmax_slab(:,:) = tairmax_full(:,:)
           tairmin_slab(:,:) = tairmin_full(:,:)
@@ -1636,5 +1636,5 @@
           ! 
           !
-          IF ( forcing_tstep_ave >= one_day/4.0) THEN
+          IF ( forcing_tstep_ave >= one_day/3.0) THEN
              CALL forcing_varforslab(if, "Tairmax", nctstart, nctcount, inslabpos, tairmax, cellmethod)
              CALL forcing_varforslab(if, "Tairmin", nctstart, nctcount, inslabpos, tairmin, cellmethod)
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/orchideedriver.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/orchideedriver.f90	(revision 7256)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_driver/orchideedriver.f90	(revision 7257)
@@ -159,6 +159,11 @@
   REAL(r_std), DIMENSION(2) :: testpt=(/9999.99,9999.99/)
   INTEGER(i_std) :: ktest
+  INTEGER :: printlev_loc  !! local write level
 
   OFF_LINE_MODE = .TRUE. 
+
+  ! Set specific write level to orchideedriver using PRINTLEV_orchideedriver=[0-4] 
+  ! in run.def. The global printlev is used as default value. 
+  printlev_loc=get_printlev('orchideedriver')
 
   !-
@@ -264,5 +269,9 @@
   IF ( (zoom_lon(1)+180 < EPSILON(zoom_lon(1))) .AND. (zoom_lon(2)-180 < EPSILON(zoom_lon(2))) .AND.&
        &(zoom_lat(1)+90 < EPSILON(zoom_lat(1))) .AND. (zoom_lat(2)-90 < EPSILON(zoom_lat(2))) ) THEN
-     !
+
+     ! We are here only if zoom_lon and zoom_lat have there original values which
+     ! means that they have not been modified by the getin LIMIT_ above. 
+     ! Read WEST_EAST and SOUTH_NORTH from run.def.
+     
      !Config Key   = WEST_EAST
      !Config Desc  = Longitude interval to use from the forcing data
@@ -561,9 +570,15 @@
   !
   WRITE(*,*) "itau_offset : date0 : ", year_end, month_end, day_end, sec_end
-  !
+  
+  !!- Initialize module for output with XIOS
   CALL xios_orchidee_init( MPI_COMM_ORCH,                &
        date0,    year_end, month_end, day_end, julian_diff,  &
        lon,      lat,      znt)
-  !
+
+  CALL sechiba_xios_initialize 
+
+  CALL xios_orchidee_close_definition
+  IF (printlev_loc >= 2) WRITE(numout,*) 'After xios_orchidee_close_definition'
+
   !- Initialize IOIPSL sechiba output files
   itau_sechiba = itau+itau_offset
@@ -838,8 +853,8 @@
   !-
   !--
-  !
-  CALL xios_orchidee_context_finalize
+  ! Close IOIPSL history files
   CALL histclo
   IF(is_root_prc) THEN
+     ! Close restart files
      CALL restclo
      CALL getin_dump
@@ -874,4 +889,5 @@
   ENDIF
   !
+  ! Finalize MPI and XIOS
   CALL Finalize_mpi
   !
