Index: branches/2013/dev_r3411_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsiom.F90
===================================================================
--- branches/2013/dev_r3411_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsiom.F90	(revision 3860)
+++ branches/2013/dev_r3411_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/CRS/crsiom.F90	(revision 3864)
@@ -31,13 +31,8 @@
    !! jes. 28 Jun 2012. TODO. make sure of variable declarations to be placed here or crs_dom.F90
    !!--------------------------------------------------------------------
-   USE timing
+   USE dom_oce         ! ocean space and time domain
    USE crs
-   USE dom_oce         ! ocean space and time domain
-   USE iom_def         ! iom variables definitions
-   USE netcdf          ! NetCDF library
    USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! MPP library
    USE iom             ! I/O library
-   USE par_kind, ONLY: wp   
 
 
@@ -45,22 +40,7 @@
    PRIVATE
 
-   PUBLIC crs_iom_open, crs_iom_close, crs_iom_rstput, crs_iom_put
-
-!   PUBLIC crs_iom_varid, crs_iom_get, crs_iom_gettime
-
-
-   INTEGER, PARAMETER ::   jpdomcrs_data          = 1   !: ( 1  :jpiglo_crs, 1  :jpjglo_crs)
-   INTEGER, PARAMETER ::   jpdomcrs_global        = 2   !: ( 1  :jpiglo_crs, 1  :jpjglo_crs)
-   INTEGER, PARAMETER ::   jpdomcrs_local         = 3   !: One of the 3 following cases
-   INTEGER, PARAMETER ::   jpdomcrs_local_full    = 4   !: ( 1  :jpi_crs   , 1  :jpj_crs   )
-   INTEGER, PARAMETER ::   jpdomcrs_local_noextra = 5   !: ( 1  :nlci_crs  , 1  :nlcj_crs  )
-   INTEGER, PARAMETER ::   jpdomcrs_local_noovlap = 6   !: (nldi_crs:nlei_crs  ,nldj_crs:nlej_crs  )
-   INTEGER, PARAMETER ::   jpdomcrs_unknown       = 7   !: No dimension checking
-   INTEGER, PARAMETER ::   jpdomcrs_autoglo       = 8   !:
-   INTEGER, PARAMETER ::   jpdomcrs_autodta       = 9   !:
-   INTEGER            ::   ipdomcrs_local_noovlap_crs, ipdomcrs_local_full_crs, idomcrs_local_noextra_crs
+   PUBLIC crs_iom_open, crs_iom_rstput, crs_iom_put
 
    INTEGER                 ::   idomcrs     ! Type of domain to be written (default = jpdom_local_noovlap)
-   INTEGER, DIMENSION(2,5) ::   idompar_crs ! domain parameters:    
    LOGICAL                 ::   llnoov      ! local definition to read overlap
 
@@ -85,6 +65,6 @@
 
       llnoov = (jpni * jpnj ) == jpnij .AND. .NOT. lk_agrif 
-      IF( llnoov ) THEN   ;   idomcrs = jpdomcrs_local_noovlap   ! default definition
-      ELSE                ;   idomcrs = jpdomcrs_local_full      ! default definition
+      IF( llnoov ) THEN   ;   idomcrs = jpdom_local_noovlap   ! default definition
+      ELSE                ;   idomcrs = jpdom_local_full      ! default definition
       ENDIF
       IF ( PRESENT(kdom) ) idomcrs = kdom
@@ -92,30 +72,7 @@
       CALL iom_open( cdname, kiomid, ldwrt, idomcrs, kiolib )
 
-      WRITE(numout,*) 'crs_iom_open. after iom_open call kiomid=', kiomid
-
       CALL dom_grid_glo   ! Return to parent grid domain
 
    END SUBROUTINE crs_iom_open
-
-
-   SUBROUTINE crs_iom_close( kiomid )
-      !!--------------------------------------------------------------------
-      !!                       ***  MODULE crs_iom_open  ***
-      !!
-      !! ** Purpose : open an input file with NF90 on coarsened grid
-      !!---------------------------------------------------------------------
-      !! Arguments
-      INTEGER                , INTENT(inout)           ::   kiomid      ! nf90 identifier of the opened file
-      !! Local variable
-      CHARACTER(LEN=100)  ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      WRITE(numout,*) 'crs_iom_close. kiomid=', kiomid
-
-      CALL iom_close( kiomid )
-      WRITE(numout,*) 'crs_iom_close. after iom_open call kiomid=', kiomid
-
-      !    
-   END SUBROUTINE crs_iom_close
 
 
@@ -180,4 +137,5 @@
       ELSEIF( PRESENT(pv_r3d) ) THEN   ;  CALL iom_put( cdvar, pv_r3d )
       ENDIF
+
       CALL dom_grid_glo   ! Return to parent grid domain
 
