Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/xios_orchidee.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/xios_orchidee.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/xios_orchidee.f90	(revision 8504)
@@ -718,7 +718,9 @@
     REAL(r_std), DIMENSION(axlen), INTENT(IN) :: axval
     !
+#ifdef XIOS
     IF (xios_orchidee_ok .AND. is_omp_root) THEN
        CALL xios_set_axis_attr(axname, n_glo=axlen, VALUE=axval)
     ENDIF
+#endif
     !
   END SUBROUTINE xios_orchidee_addaxis
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing.f90	(revision 8504)
@@ -473,5 +473,5 @@
 
   SUBROUTINE routing_xios_initialize
-    USE xios
+    USE xios_orchidee
     IMPLICIT NONE
 
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_highres.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_highres.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_highres.f90	(revision 8504)
@@ -665,5 +665,5 @@
 
   SUBROUTINE routing_highres_xios_initialize
-    USE xios
+    USE xios_orchidee
     IMPLICIT NONE
 
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native.f90	(revision 8504)
@@ -44,5 +44,5 @@
 
 MODULE routing_native_mod
-
+#ifdef XIOS
   USE ioipsl   
   USE xios_orchidee
@@ -579,4 +579,4 @@
 
   END SUBROUTINE routing_native_clear
-  
+#endif  
 END MODULE routing_native_mod
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_flow.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_flow.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_flow.f90	(revision 8504)
@@ -1,4 +1,4 @@
 MODULE routing_native_flow_mod
-
+#ifdef XIOS
   USE ioipsl   
   USE xios_orchidee
@@ -2358,4 +2358,4 @@
   END SUBROUTINE routing_flow_clear
 
-
+#endif
 END MODULE routing_native_flow_mod
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_irrig.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_irrig.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_irrig.f90	(revision 8504)
@@ -1,3 +1,4 @@
 MODULE routing_native_irrig_mod
+#ifdef XIOS
   USE constantes
 
@@ -770,4 +771,4 @@
   
 
-
+#endif
 END MODULE routing_native_irrig_mod
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_lake.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_lake.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_lake.f90	(revision 8504)
@@ -1,3 +1,4 @@
 MODULE routing_native_lake_mod
+#ifdef XIOS
   USE constantes
    
@@ -288,4 +289,4 @@
  
   END SUBROUTINE routing_lake_main
-
+#endif
 END MODULE routing_native_lake_mod
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_para.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_para.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_para.f90	(revision 8504)
@@ -1,4 +1,4 @@
 MODULE routing_native_para
-
+#ifdef XIOS
  PRIVATE
 
@@ -267,4 +267,4 @@
 
   END SUBROUTINE update_halo_real
-
+#endif
 END MODULE routing_native_para
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_simple.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_simple.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_simple.f90	(revision 8504)
@@ -44,5 +44,5 @@
 
 MODULE routing_simple
-
+#ifdef XIOS
   USE ioipsl   
   USE xios_orchidee
@@ -2689,4 +2689,4 @@
 
   END SUBROUTINE routing_simple_lake
-
+#endif
 END MODULE routing_simple
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_wrapper.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_wrapper.f90	(revision 8468)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_wrapper.f90	(revision 8504)
@@ -76,7 +76,12 @@
        CALL routing_highres_xios_initialize
     ELSEIF(routing_method=='simple') THEN  
+#ifdef XIOS
        CALL routing_simple_xios_initialize
     ELSEIF(routing_method=='native') THEN
        CALL routing_native_xios_initialize
+#else
+       CALL ipslerr_p(3,'routing_wrapper_xios_inititalize','ROUTING_METHOD simple and native needs XIOS',&
+                        'You must compile XIOS and then ORCHIDEE with cpp key XIOS','')
+#endif
     ENDIF
 
@@ -176,5 +181,5 @@
 
     ELSE IF(routing_method== 'simple') THEN 
-
+#ifdef XIOS
        CALL routing_simple_initialize(    kjit,        nbpt,           index,                 &
                                           rest_id,     hist_id,        hist2_id,   lalo,      &
@@ -182,5 +187,5 @@
                                           returnflow,  reinfiltration, irrigation, riverflow, &
                                           coastalflow, flood_frac,     flood_res )
-
+#endif
        riverflow(:) = zero
        coastalflow(:) = zero
@@ -192,5 +197,5 @@
    
     ELSE IF(routing_method== 'native') THEN
-
+#ifdef XIOS
        CALL routing_native_initialize(    kjit,        nbpt,           index,                 &
                                           rest_id,     hist_id,        hist2_id,   lalo,      &
@@ -198,5 +203,5 @@
                                           returnflow,  reinfiltration, irrigation, riverflow, &
                                           coastalflow, flood_frac,     flood_res , irrigated_next)
-
+#endif
        riverflow(:) = zero
        coastalflow(:) = zero
@@ -298,5 +303,5 @@
 
     ELSE IF(routing_method=='simple') THEN 
-
+#ifdef XIOS
        CALL routing_simple_main (kjit, nbpt, index, &
             lalo, neighbours, resolution, contfrac, totfrac_nobio, veget_max, floodout, runoff, &
@@ -304,7 +309,7 @@
             stempdiag, reinf_slope, returnflow, reinfiltration, irrigation, riverflow, coastalflow, &
             rest_id, hist_id, hist2_id) 
-
+#endif
     ELSE IF(routing_method=='native') THEN
-
+#ifdef XIOS
        CALL routing_native_main (kjit, nbpt, index, &
             lalo, neighbours, resolution, contfrac, totfrac_nobio, veget_max, floodout, runoff, &
@@ -313,4 +318,5 @@
             rest_id, hist_id, hist2_id, &
             soiltile, root_deficit, irrigated_next, irrig_frac, fraction_aeirrig_sw) 
+#endif
     ENDIF
 
@@ -356,11 +362,11 @@
 
     ELSE IF(routing_method=='simple') THEN 
-
+#ifdef XIOS
        CALL routing_simple_finalize( kjit, nbpt, rest_id, flood_frac, flood_res )
-
+#endif
     ELSE IF(routing_method=='native') THEN
-
+#ifdef XIOS
        CALL routing_native_finalize( kjit, nbpt, rest_id, flood_frac, flood_res )
-
+#endif
     ENDIF
 
@@ -393,10 +399,11 @@
 
     ELSE IF(routing_method=='simple') THEN 
-
+#ifdef XIOS
        CALL routing_simple_clear
-    
+#endif    
     ELSE IF(routing_method=='native') THEN
-
+#ifdef XIOS
        CALL routing_native_clear
+#endif
     ENDIF
 
