Index: XIOS/trunk/src/interface/c/icdata.cpp
===================================================================
--- XIOS/trunk/src/interface/c/icdata.cpp	(revision 460)
+++ XIOS/trunk/src/interface/c/icdata.cpp	(revision 461)
@@ -75,4 +75,15 @@
    }
  
+   void cxios_context_is_initialized(const char * context_id , int len_context_id, bool* initialized)
+   {
+     std::string str; 
+     
+     if (!cstr2string(context_id, len_context_id, str)) return;
+     CTimer::get("XIOS").resume() ;
+     CContext* context = CContext::get(str,str) ;
+     *initialized=context->isInitialized() ;
+     CTimer::get("XIOS").suspend() ;
+   }  
+   
     void cxios_context_close_definition()
    {
Index: XIOS/trunk/src/interface/fortran/idata.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/idata.F90	(revision 460)
+++ XIOS/trunk/src/interface/fortran/idata.F90	(revision 461)
@@ -25,4 +25,12 @@
       END SUBROUTINE cxios_context_initialize
 
+      SUBROUTINE cxios_context_is_initialized(context_id,len_context_id,initialized) BIND(C)
+         USE ISO_C_BINDING
+         CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: context_id
+         INTEGER  (kind = C_INT)     , VALUE        :: len_context_id
+         LOGICAL  (kind = C_BOOL)                   :: initialized
+      END SUBROUTINE cxios_context_is_initialized
+      
+      
        SUBROUTINE  cxios_context_close_definition() BIND(C)
          USE ISO_C_BINDING
@@ -130,5 +138,17 @@
  
     END SUBROUTINE  xios(context_initialize)
-    
+
+
+   LOGICAL FUNCTION  xios(context_is_initialized)(context_id)
+   USE ISO_C_BINDING
+   IMPLICIT NONE
+   CHARACTER(LEN=*),INTENT(IN)  :: context_id
+   LOGICAL(KIND=C_BOOL) :: is_init
+         
+      CALL cxios_context_is_initialized(context_id, LEN(context_id), is_init)
+      xios(context_is_initialized) = is_init
+ 
+    END FUNCTION xios(context_is_initialized)   
+
     
    SUBROUTINE  xios(finalize)
Index: XIOS/trunk/src/interface/fortran/ixios.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ixios.F90	(revision 460)
+++ XIOS/trunk/src/interface/fortran/ixios.F90	(revision 461)
@@ -12,5 +12,5 @@
                                                
 USE idata, ONLY : xios(initialize),xios(init_server), xios(finalize), xios(context_initialize),  &
-                  xios(close_context_definition),xios(solve_inheritance),       &
+                  xios(context_is_initialized), xios(close_context_definition),xios(solve_inheritance),       &
                   xios(context_finalize), xios(send_field_r8_1d), xios(send_field_r8_2d), &
                   xios(send_field_r8_3d), xios(send_field_r4_1d), xios(send_field_r4_2d), &
@@ -155,6 +155,7 @@
  PUBLIC :: xios(set_current_context)  
  PUBLIC :: xios(set_timestep),xios(update_calendar)
- PUBLIC :: xios(initialize), xios(init_server), xios(finalize), xios(context_initialize),xios(solve_inheritance), &
-           xios(close_context_definition), xios(context_finalize), xios(send_field),xios(field_is_active)
+ PUBLIC :: xios(initialize), xios(init_server), xios(finalize), xios(context_initialize),xios(context_is_initialized), &
+           xios(solve_inheritance), xios(close_context_definition), xios(context_finalize), xios(send_field),          &
+           xios(field_is_active)
 
 END MODULE XIOS
Index: XIOS/trunk/src/node/context.cpp
===================================================================
--- XIOS/trunk/src/node/context.cpp	(revision 460)
+++ XIOS/trunk/src/node/context.cpp	(revision 461)
@@ -260,4 +260,9 @@
    } 
 
+   bool CContext::isInitialized(void)
+   {
+     return hasClient ;
+   }
+    
    void CContext::initServer(MPI_Comm intraComm,MPI_Comm interComm)
    {
Index: XIOS/trunk/src/node/context.hpp
===================================================================
--- XIOS/trunk/src/node/context.hpp	(revision 460)
+++ XIOS/trunk/src/node/context.hpp	(revision 461)
@@ -103,4 +103,5 @@
          void initServer(MPI_Comm intraComm, MPI_Comm interComm) ;
          void initClient(MPI_Comm intraComm, MPI_Comm interComm) ;
+         bool isInitialized(void) ;
          CContextServer* server ;
          CContextClient* client ;
