Index: NEMO/trunk/src/OCE/IOM/iom.F90
===================================================================
--- NEMO/trunk/src/OCE/IOM/iom.F90	(revision 10521)
+++ NEMO/trunk/src/OCE/IOM/iom.F90	(revision 10522)
@@ -17,5 +17,4 @@
    !!   iom_close      : close a file or all files opened by iom
    !!   iom_get        : read a field (interfaced to several routines)
-   !!   iom_gettime    : read the time axis cdvar in the file
    !!   iom_varid      : get the id of a variable in a file
    !!   iom_rstput     : write a field in a restart file (interfaced to several routines)
@@ -58,5 +57,5 @@
 #endif
    PUBLIC iom_init, iom_swap, iom_open, iom_close, iom_setkt, iom_varid, iom_get
-   PUBLIC iom_chkatt, iom_getatt, iom_putatt, iom_gettime, iom_rstput, iom_delay_rst, iom_put
+   PUBLIC iom_chkatt, iom_getatt, iom_putatt, iom_getszuld, iom_rstput, iom_delay_rst, iom_put
    PUBLIC iom_use, iom_context_finalize
 
@@ -1342,59 +1341,23 @@
 
 
-   SUBROUTINE iom_gettime( kiomid, ptime, cdvar, kntime, cdunits, cdcalendar )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE iom_gettime  ***
-      !!
-      !! ** Purpose : read the time axis cdvar in the file 
-      !!--------------------------------------------------------------------
-      INTEGER                    , INTENT(in   ) ::   kiomid     ! file Identifier
-      REAL(wp), DIMENSION(:)     , INTENT(  out) ::   ptime      ! the time axis
-      CHARACTER(len=*), OPTIONAL , INTENT(in   ) ::   cdvar      ! time axis name
-      INTEGER         , OPTIONAL , INTENT(  out) ::   kntime     ! number of times in file
-      CHARACTER(len=*), OPTIONAL , INTENT(  out) ::   cdunits    ! units attribute of time coordinate
-      CHARACTER(len=*), OPTIONAL , INTENT(  out) ::   cdcalendar ! calendar attribute of 
-      !
-      INTEGER, DIMENSION(1) :: kdimsz
-      INTEGER            ::   idvar    ! id of the variable
-      CHARACTER(LEN=32)  ::   tname    ! local name of time coordinate
-      CHARACTER(LEN=100) ::   clinfo   ! info character
-      !---------------------------------------------------------------------
-      !
-      IF ( PRESENT(cdvar) ) THEN
-         tname = cdvar
-      ELSE
-         tname = iom_file(kiomid)%uldname
-      ENDIF
+   FUNCTION iom_getszuld ( kiomid )  
+      !!-----------------------------------------------------------------------
+      !!                  ***  FUNCTION  iom_getszuld  ***
+      !!
+      !! ** Purpose : get the size of the unlimited dimension in a file
+      !!              (return -1 if not found)
+      !!-----------------------------------------------------------------------
+      INTEGER, INTENT(in   ) ::   kiomid   ! file Identifier
+      !
+      INTEGER                ::   iom_getszuld
+      !!-----------------------------------------------------------------------
+      iom_getszuld = -1
       IF( kiomid > 0 ) THEN
-         clinfo = 'iom_gettime, file: '//trim(iom_file(kiomid)%name)//', var: '//trim(tname)
-         IF ( PRESENT(kntime) ) THEN
-            idvar  = iom_varid( kiomid, tname, kdimsz = kdimsz )
-            kntime = kdimsz(1)
-         ELSE
-            idvar = iom_varid( kiomid, tname )
+         IF( iom_file(kiomid)%iduld .GE. 0 ) THEN
+            iom_getszuld = iom_file(kiomid)%lenuld
          ENDIF
-         !
-         ptime(:) = 0. ! default definition
-         IF( idvar > 0 ) THEN
-            IF( iom_file(kiomid)%ndims(idvar) == 1 ) THEN
-               IF( iom_file(kiomid)%luld(idvar) ) THEN
-                  IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN
-                     CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar )
-                  ELSE
-                     WRITE(ctmp1,*) 'error with the size of ptime ',size(ptime),iom_file(kiomid)%dimsz(1,idvar)
-                     CALL ctl_stop( trim(clinfo), trim(ctmp1) )
-                  ENDIF
-               ELSE
-                  CALL ctl_stop( trim(clinfo), 'variable dimension is not unlimited... use iom_get' )
-               ENDIF
-            ELSE
-               CALL ctl_stop( trim(clinfo), 'the variable has more than 1 dimension' )
-            ENDIF
-         ELSE
-            CALL ctl_stop( trim(clinfo), 'variable not found in '//iom_file(kiomid)%name )
-         ENDIF
-      ENDIF
-      !
-   END SUBROUTINE iom_gettime
+      ENDIF
+   END FUNCTION iom_getszuld
+   
 
    !!----------------------------------------------------------------------
Index: NEMO/trunk/src/OCE/IOM/iom_nf90.F90
===================================================================
--- NEMO/trunk/src/OCE/IOM/iom_nf90.F90	(revision 10521)
+++ NEMO/trunk/src/OCE/IOM/iom_nf90.F90	(revision 10522)
@@ -15,5 +15,4 @@
    !!   iom_close      : close a file or all files opened by iom
    !!   iom_get        : read a field (interfaced to several routines)
-   !!   iom_gettime    : read the time axis kvid in the file
    !!   iom_varid      : get the id of a variable in a file
    !!   iom_rstput     : write a field in a restart file (interfaced to several routines)
@@ -29,5 +28,5 @@
    PRIVATE
 
-   PUBLIC iom_nf90_open  , iom_nf90_close, iom_nf90_varid, iom_nf90_get, iom_nf90_gettime, iom_nf90_rstput
+   PUBLIC iom_nf90_open  , iom_nf90_close, iom_nf90_varid, iom_nf90_get, iom_nf90_rstput
    PUBLIC iom_nf90_chkatt, iom_nf90_getatt, iom_nf90_putatt
 
@@ -493,33 +492,4 @@
 
 
-   SUBROUTINE iom_nf90_gettime( kiomid, kvid, ptime, cdunits, cdcalendar )
-      !!--------------------------------------------------------------------
-      !!                   ***  SUBROUTINE iom_gettime  ***
-      !!
-      !! ** Purpose : read the time axis kvid in the file with NF90
-      !!--------------------------------------------------------------------
-      INTEGER                   , INTENT(in   ) ::   kiomid     ! file Identifier
-      INTEGER                   , INTENT(in   ) ::   kvid       ! variable id
-      REAL(wp), DIMENSION(:)    , INTENT(  out) ::   ptime      ! the time axis
-      CHARACTER(len=*), OPTIONAL, INTENT(  out) ::   cdunits    ! units attribute
-      CHARACTER(len=*), OPTIONAL, INTENT(  out) ::   cdcalendar ! calendar attribute
-      !
-      CHARACTER(LEN=100) ::   clinfo     ! info character
-      !---------------------------------------------------------------------
-      clinfo = 'iom_nf90_gettime, file: '//TRIM(iom_file(kiomid)%name)//', var: '//TRIM(iom_file(kiomid)%cn_var(kvid))
-      CALL iom_nf90_check(NF90_GET_VAR(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), ptime(:),   &
-            &                           start=(/ 1 /), count=(/ iom_file(kiomid)%dimsz(1, kvid) /)), clinfo)
-      IF ( PRESENT(cdunits) ) THEN 
-         CALL iom_nf90_check(NF90_GET_ATT(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), "units", &
-            &                           values=cdunits), clinfo)
-      ENDIF
-      IF ( PRESENT(cdcalendar) ) THEN 
-         CALL iom_nf90_check(NF90_GET_ATT(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), "calendar", &
-            &                           values=cdcalendar), clinfo)
-      ENDIF
-      !
-   END SUBROUTINE iom_nf90_gettime
-
-
    SUBROUTINE iom_nf90_rp0123d( kt, kwrite, kiomid, cdvar , kvid  , ktype,   &
          &                                  pv_r0d, pv_r1d, pv_r2d, pv_r3d )
Index: NEMO/trunk/src/OCE/SBC/sbcrnf.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 10521)
+++ NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 10522)
@@ -240,5 +240,4 @@
       INTEGER           ::   nbrec         ! temporary integer
       REAL(wp)          ::   zacoef  
-      REAL(wp), DIMENSION(12)                 :: zrec             ! times records
       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zrnfcl    
       REAL(wp), DIMENSION(:,:  ), ALLOCATABLE :: zrnf
@@ -372,5 +371,5 @@
 
          CALL iom_open( TRIM( sn_rnf%clname ), inum )    !  open runoff file
-         CALL iom_gettime( inum, zrec, kntime=nbrec)
+         nbrec = iom_getszuld( inum )
          ALLOCATE( zrnfcl(jpi,jpj,nbrec) )     ;      ALLOCATE( zrnf(jpi,jpj) )
          DO jm = 1, nbrec
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 10521)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 10522)
@@ -389,5 +389,4 @@
       !!----------------------------------------------------------------------
       INTEGER :: numpar, ierr, ios   ! Local integer 
-      REAL(wp), DIMENSION(nbtimes) ::   zsteps   ! times records
       !
       CHARACTER(len=100) ::  cn_dir          ! Root directory for location of ssr files
@@ -434,5 +433,5 @@
 
          CALL iom_open (  TRIM( sn_par%clname ) , numpar )
-         CALL iom_gettime( numpar, zsteps, kntime=ntimes_par)  ! get number of record in file
+         ntimes_par = iom_getszuld( numpar )   ! get number of record in file
       ENDIF
       !
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90	(revision 10521)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90	(revision 10522)
@@ -211,5 +211,4 @@
       REAL(wp) :: zexpide, zdenitide, zmaskt, zsurfc, zsurfp,ze3t, ze3t2, zcslp
       REAL(wp) :: ztimes_dust, ztimes_riv, ztimes_ndep 
-      REAL(wp), DIMENSION(nbtimes) :: zsteps                 ! times records
       REAL(wp), DIMENSION(:), ALLOCATABLE :: rivinput
       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zriver, zcmask
@@ -309,5 +308,5 @@
             ! Get total input dust ; need to compute total atmospheric supply of Si in a year
             CALL iom_open (  TRIM( sn_dust%clname ) , numdust )
-            CALL iom_gettime( numdust, zsteps, kntime=ntimes_dust)  ! get number of record in file
+            ntimes_dust = iom_getszuld( numdust )   ! get number of record in file
          END IF
       END IF
@@ -331,5 +330,5 @@
          ! get number of record in file
          CALL iom_open (  TRIM( sn_solub%clname ) , numsolub )
-         CALL iom_gettime( numsolub, zsteps, kntime=ntimes_solub)  ! get number of record in file
+         ntimes_solub = iom_getszuld( numsolub )   ! get number of record in file
          CALL iom_close( numsolub )
       ENDIF
@@ -360,5 +359,5 @@
             DO ifpr = 1, jpriv
                CALL iom_open ( TRIM( slf_river(ifpr)%clname ), numriv )
-               CALL iom_gettime( numriv, zsteps, kntime=ntimes_riv)
+               ntimes_riv = iom_getszuld( numriv )
                ALLOCATE( zriver(jpi,jpj,ntimes_riv) )
                DO jm = 1, ntimes_riv
@@ -407,5 +406,5 @@
             ! Get total input dust ; need to compute total atmospheric supply of N in a year
             CALL iom_open ( TRIM( sn_ndepo%clname ), numdepo )
-            CALL iom_gettime( numdepo, zsteps, kntime=ntimes_ndep)
+            ntimes_ndep = iom_getszuld( numdepo )
          ENDIF
       ENDIF
