Index: /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/ablrst.F90
===================================================================
--- /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/ablrst.F90	(revision 11858)
+++ /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/ablrst.F90	(revision 11858)
@@ -0,0 +1,183 @@
+MODULE ablrst
+   !!======================================================================
+   !!                     ***  MODULE  ablrst  ***
+   !!       abl :  write/read the abl restart file
+   !!======================================================================
+   !! History:   4.0  !  2018     (some people)                         ABL
+   !!----------------------------------------------------------------------
+   !!   abl_rst_opn   : open  restart file
+   !!   abl_rst_write : write restart file 
+   !!   abl_rst_read  : read  restart file 
+   !!----------------------------------------------------------------------
+   USE abl            ! abl variables
+   USE par_abl        ! abl parameters
+   USE dom_oce        ! ocean domain
+   USE sbc_oce , ONLY : nn_fsbc, jpka
+   !
+   USE in_out_manager ! I/O manager
+   USE iom            ! I/O manager library
+   USE lib_mpp        ! MPP library
+   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   abl_rst_opn     ! called by ablstp
+   PUBLIC   abl_rst_write   ! called by ablstp
+   PUBLIC   abl_rst_read    ! called by abl_init
+
+   !!----------------------------------------------------------------------
+   !! NEMO/ABL 4.0 , NEMO Consortium (2018)
+   !! $Id: ablrst.F90 11413 2019-08-06 15:59:22Z gsamson $
+   !! Software governed by the CeCILL license (see ./LICENSE)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE abl_rst_opn( kt )
+      !!----------------------------------------------------------------------
+      !!                    ***  abl_rst_opn  ***
+      !!
+      !! ** purpose  :   open restart file
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt       ! number of iteration
+      !
+      CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character
+      CHARACTER(len=50)   ::   clname   ! abl output restart file name
+      CHARACTER(len=256)  ::   clpath   ! full path to abl output restart file 
+      !!----------------------------------------------------------------------
+      !
+      IF( kt == nit000 )   lrst_abl = .FALSE.   ! default definition
+
+      IF( ln_rst_list .OR. nn_stock /= -1 ) THEN
+      ! in order to get better performances with NetCDF format, we open and define the abl restart file 
+      ! one abl time step before writing the data (-> at nitrst - 2*nn_fsbc + 1), except if we write abl 
+      ! restart files every abl time step or if an abl restart file was writen at nitend - 2*nn_fsbc + 1
+      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nn_stock == nn_fsbc    &
+         &                             .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_abl ) ) THEN
+         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN
+            ! beware of the format used to write kt (default is i8.8, that should be large enough...)
+            IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+            ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst
+            ENDIF
+            ! create the file
+            clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ablrst_out)
+            clpath = TRIM(cn_ablrst_outdir) 
+            IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/'
+            IF(lwp) THEN
+               WRITE(numout,*)
+               WRITE(numout,*) '             open abl restart NetCDF file: ',TRIM(clpath)//clname
+               IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN
+                  WRITE(numout,*) '             kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp
+               ELSE
+                  WRITE(numout,*) '             kt = '                         , kt,' date= ', ndastp
+               ENDIF
+            ENDIF
+            !
+            CALL iom_open( TRIM(clpath)//TRIM(clname), numraw, ldwrt = .TRUE., kdlev = jpka )
+            lrst_abl = .TRUE.
+         ENDIF
+      ENDIF
+      ENDIF
+      !
+   END SUBROUTINE abl_rst_opn
+
+
+   SUBROUTINE abl_rst_write( kt )
+      !!----------------------------------------------------------------------
+      !!                    ***  abl_rst_write  ***
+      !!
+      !! ** purpose  :   write restart file
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT(in) ::   kt     ! number of iteration
+      !!
+      INTEGER ::   iter
+      !!----------------------------------------------------------------------
+
+      iter = kt + nn_fsbc - 1   ! abl restarts are written at kt == nitrst - nn_fsbc + 1
+
+      IF( iter == nitrst ) THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'abl_rst_write : write abl restart file  kt =', kt
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'         
+      ENDIF
+
+      ! Write in numraw (if iter == nitrst)
+      ! ------------------ 
+      !                                                                        ! calendar control
+      CALL iom_rstput( iter, nitrst, numraw, 'nn_fsbc', REAL( nn_fsbc, wp ) )      ! time-step 
+      CALL iom_rstput( iter, nitrst, numraw, 'kt_abl' , REAL( iter   , wp ) )      ! date
+      CALL iom_delay_rst( 'WRITE', 'ABL', numraw )   ! save only abl delayed global communication variables
+
+      ! Prognostic variables
+      CALL iom_rstput( iter, nitrst, numraw,   'u_abl',   u_abl(:,:,:,nt_n      ) )
+      CALL iom_rstput( iter, nitrst, numraw,   'v_abl',   v_abl(:,:,:,nt_n      ) )
+      CALL iom_rstput( iter, nitrst, numraw,   't_abl',  tq_abl(:,:,:,nt_n,jp_ta) )
+      CALL iom_rstput( iter, nitrst, numraw,   'q_abl',  tq_abl(:,:,:,nt_n,jp_qa) )
+      CALL iom_rstput( iter, nitrst, numraw, 'tke_abl', tke_abl(:,:,:,nt_n      ) )
+      CALL iom_rstput( iter, nitrst, numraw, 'avm_abl', avm_abl(:,:,:           ) )
+      CALL iom_rstput( iter, nitrst, numraw, 'avt_abl', avt_abl(:,:,:           ) )
+      CALL iom_rstput( iter, nitrst, numraw, 'mxl_abl', mxl_abl(:,:,:           ) )
+      CALL iom_rstput( iter, nitrst, numraw,    'pblh',    pblh(:,:             ) )
+      !
+
+      ! close restart file
+      ! ------------------
+      IF( iter == nitrst ) THEN
+         CALL iom_close( numraw )
+         lrst_abl = .FALSE.
+      ENDIF
+      !
+   END SUBROUTINE abl_rst_write
+
+
+   SUBROUTINE abl_rst_read
+      !!----------------------------------------------------------------------
+      !!                    ***  abl_rst_read  ***
+      !!
+      !! ** purpose  :   read restart file
+      !!----------------------------------------------------------------------
+      REAL(wp)          ::   zfabl, ziter
+      !!----------------------------------------------------------------------
+
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'abl_rst_read: read abl NetCDF restart file'
+         WRITE(numout,*) '~~~~~~~~~~~~'
+      ENDIF
+
+      CALL iom_open ( TRIM(cn_ablrst_indir)//'/'//cn_ablrst_in, numrar, kdlev = jpka )
+
+      ! Time info
+      CALL iom_get( numrar, 'nn_fsbc', zfabl )
+      CALL iom_get( numrar, 'kt_abl' , ziter )    
+      IF(lwp) WRITE(numout,*) '   read abl restart file at time step    : ', ziter
+      IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1
+
+      ! Control of date
+      IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 )   &
+         &     CALL ctl_stop( 'abl_rst_read ===>>>> : problem with nit000 in abl restart',  &
+         &                   '   verify the file or rerun with the value 0 for the',        &
+         &                   '   control of time parameter  nrstdt' )
+      IF( NINT(zfabl) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   &
+         &     CALL ctl_stop( 'abl_rst_read ===>>>> : problem with nn_fsbc in abl restart',  &
+         &                   '   verify the file or rerun with the value 0 for the',         &
+         &                   '   control of time parameter  nrstdt' )
+
+      ! --- mandatory fields --- ! 
+      CALL iom_get( numrar, jpdom_autoglo,   'u_abl',   u_abl(:,:,:,nt_n      ) )
+      CALL iom_get( numrar, jpdom_autoglo,   'v_abl',   v_abl(:,:,:,nt_n      ) )
+      CALL iom_get( numrar, jpdom_autoglo,   't_abl',  tq_abl(:,:,:,nt_n,jp_ta) )
+      tq_abl(:,:,:,nt_n,jp_ta) = MAX( 0.1_wp, tq_abl(:,:,:,nt_n,jp_ta) )
+      CALL iom_get( numrar, jpdom_autoglo,   'q_abl',  tq_abl(:,:,:,nt_n,jp_qa) )
+      CALL iom_get( numrar, jpdom_autoglo, 'tke_abl', tke_abl(:,:,:,nt_n      ) )
+      CALL iom_get( numrar, jpdom_autoglo, 'avm_abl', avm_abl(:,:,:           ) )
+      CALL iom_get( numrar, jpdom_autoglo, 'avt_abl', avt_abl(:,:,:           ) )
+      CALL iom_get( numrar, jpdom_autoglo, 'mxl_abl', mxl_abl(:,:,:           ) )
+      CALL iom_get( numrar, jpdom_autoglo,    'pblh',    pblh(:,:             ) )
+      CALL iom_delay_rst( 'READ', 'ABL', numrar )   ! read only abl delayed global communication variables
+
+   END SUBROUTINE abl_rst_read
+
+
+   !!======================================================================
+END MODULE ablrst
Index: /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/par_abl.F90
===================================================================
--- /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/par_abl.F90	(revision 11857)
+++ /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/par_abl.F90	(revision 11858)
@@ -28,4 +28,9 @@
    LOGICAL , PUBLIC            ::   ln_hpgls_frc   !: forcing of ABL winds by large-scale pressure gradient 
    LOGICAL , PUBLIC            ::   ln_smth_pblh   !: smoothing of atmospheric PBL height 
+
+   CHARACTER(len=256), PUBLIC ::   cn_ablrst_in     !: suffix of abl restart name (input)
+   CHARACTER(len=256), PUBLIC ::   cn_ablrst_out    !: suffix of abl restart name (output)
+   CHARACTER(len=256), PUBLIC ::   cn_ablrst_indir  !: abl restart input directory
+   CHARACTER(len=256), PUBLIC ::   cn_ablrst_outdir !: abl restart output directory
 
    !!---------------------------------------------------------------------
Index: /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/sbcabl.F90
===================================================================
--- /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/sbcabl.F90	(revision 11857)
+++ /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/ABL/sbcabl.F90	(revision 11858)
@@ -16,4 +16,5 @@
    USE par_abl        ! abl parameters
    USE ablmod
+   USE ablrst
 
    USE phycst         ! physical constants
@@ -67,6 +68,7 @@
       REAL(wp)           ::   zcff,zcff1
       LOGICAL            ::   lluldl
-      NAMELIST/namsbc_abl/ cn_dir , cn_dom, ln_hpgls_frc, ln_geos_winds,          &
-         &                 nn_dyn_restore,                                        &
+      NAMELIST/namsbc_abl/ cn_dir, cn_dom, cn_ablrst_in, cn_ablrst_out,           &
+         &                 cn_ablrst_indir, cn_ablrst_outdir,                     &
+         &                 ln_hpgls_frc, ln_geos_winds, nn_dyn_restore,           &
          &                 rn_ldyn_min , rn_ldyn_max, rn_ltra_min, rn_ltra_max,   &
          &                 nn_amxl, rn_cm, rn_ct, rn_ce, rn_ceps, rn_Rod, rn_Ric, &
@@ -267,36 +269,32 @@
       CALL sbc_blk_init
 
-      ! initialize ABL from data or restart
-      !!GS  disabled for now
-      !IF( ln_rstart ) THEN
-      !  CALL ctl_stop( 'STOP', 'sbc_abl_init: restart mode not supported yet' )
-      !ELSE
-
-      CALL fld_read( nit000, nn_fsbc, sf ) ! input fields provided at the first time-step
-
       ! Initialize the time index for now time (nt_n) and after time (nt_a)
       nt_n = 1 + MOD( nit000  , 2)
       nt_a = 1 + MOD( nit000+1, 2)
 
-       u_abl(:,:,:,nt_n      ) = sf(jp_wndi)%fnow(:,:,:)
-       v_abl(:,:,:,nt_n      ) = sf(jp_wndj)%fnow(:,:,:)
-      tq_abl(:,:,:,nt_n,jp_ta) = sf(jp_tair)%fnow(:,:,:)
-      tq_abl(:,:,:,nt_n,jp_qa) = sf(jp_humi)%fnow(:,:,:)
-
-      tke_abl(:,:,:,nt_n     ) = tke_min
-      avm_abl(:,:,:          ) = avm_bak
-      avt_abl(:,:,:          ) = avt_bak
-      mxl_abl(:,:,:          ) = mxl_min 
-      pblh   (:,:            ) = ghw_abl( 3 )  !<-- assume that the pbl contains 3 grid points 
-      u_abl  (:,:,:,nt_a     ) = 0._wp
-      v_abl  (:,:,:,nt_a     ) = 0._wp
-      tq_abl (:,:,:,nt_a,:   ) = 0._wp
-      tke_abl(:,:,:,nt_a     ) = 0._wp
-      !ENDIF
-      !!GS restart case not supported
+      ! initialize ABL from data or restart
+      IF( ln_rstart ) THEN
+         CALL abl_rst_read
+      ELSE
+         CALL fld_read( nit000, nn_fsbc, sf ) ! input fields provided at the first time-step
+
+          u_abl(:,:,:,nt_n      ) = sf(jp_wndi)%fnow(:,:,:)
+          v_abl(:,:,:,nt_n      ) = sf(jp_wndj)%fnow(:,:,:)
+         tq_abl(:,:,:,nt_n,jp_ta) = sf(jp_tair)%fnow(:,:,:)
+         tq_abl(:,:,:,nt_n,jp_qa) = sf(jp_humi)%fnow(:,:,:)
+   
+         tke_abl(:,:,:,nt_n     ) = tke_min
+         avm_abl(:,:,:          ) = avm_bak
+         avt_abl(:,:,:          ) = avt_bak
+         mxl_abl(:,:,:          ) = mxl_min 
+         pblh   (:,:            ) = ghw_abl( 3 )  !<-- assume that the pbl contains 3 grid points 
+         u_abl  (:,:,:,nt_a     ) = 0._wp
+         v_abl  (:,:,:,nt_a     ) = 0._wp
+         tq_abl (:,:,:,nt_a,:   ) = 0._wp
+         tke_abl(:,:,:,nt_a     ) = 0._wp
+      ENDIF
 	  
    END SUBROUTINE sbc_abl_init
 
-  
 
    SUBROUTINE sbc_abl( kt )
@@ -379,4 +377,7 @@
          &            sst_m, zsen, zevp                                )
 
+      CALL abl_rst_opn( kt )                       ! Open abl restart file (if necessary) 
+      IF( lrst_abl ) CALL abl_rst_write( kt )      ! -- abl restart file 
+
 #if defined key_si3
       ! Avoid a USE abl in icesbc module
Index: /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/in_out_manager.F90
===================================================================
--- /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/in_out_manager.F90	(revision 11857)
+++ /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/in_out_manager.F90	(revision 11858)
@@ -87,8 +87,11 @@
    LOGICAL ::   lrst_oce              !: logical to control the oce restart write 
    LOGICAL ::   lrst_ice              !: logical to control the ice restart write 
+   LOGICAL ::   lrst_abl              !: logical to control the abl restart write 
    INTEGER ::   numror = 0            !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90)
    INTEGER ::   numrir                !: logical unit for ice   restart (read)
+   INTEGER ::   numrar                !: logical unit for abl   restart (read)
    INTEGER ::   numrow                !: logical unit for ocean restart (write)
    INTEGER ::   numriw                !: logical unit for ice   restart (write)
+   INTEGER ::   numraw                !: logical unit for abl   restart (write)
    INTEGER ::   nrst_lst              !: number of restart to output next
 
Index: /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/iom_nf90.F90
===================================================================
--- /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/iom_nf90.F90	(revision 11857)
+++ /NEMO/branches/2019/dev_r11265_ASINTER-01_Guillaume_ABL1D/src/OCE/IOM/iom_nf90.F90	(revision 11858)
@@ -19,4 +19,5 @@
    !!----------------------------------------------------------------------
    USE dom_oce         ! ocean space and time domain
+   USE sbc_oce, ONLY: jpka, ght_abl ! abl vertical level number and height
    USE lbclnk          ! lateal boundary condition / mpp exchanges
    USE iom_def         ! iom variables definitions
@@ -56,5 +57,5 @@
       LOGICAL                , INTENT(in   )           ::   ldok        ! check the existence 
       INTEGER, DIMENSION(2,5), INTENT(in   ), OPTIONAL ::   kdompar     ! domain parameters: 
-      INTEGER                , INTENT(in   ), OPTIONAL ::   kdlev       ! size of the third dimension
+      INTEGER                , INTENT(in   ), OPTIONAL ::   kdlev       ! size of the ice/abl third dimension
 
       CHARACTER(LEN=256) ::   clinfo           ! info character
@@ -69,5 +70,5 @@
       INTEGER            ::   ihdf5            ! local variable for retrieval of value for NF90_HDF5
       LOGICAL            ::   llclobber        ! local definition of ln_clobber
-      INTEGER            ::   ilevels           ! vertical levels
+      INTEGER            ::   ilevels          ! vertical levels
       !---------------------------------------------------------------------
       !
@@ -76,6 +77,6 @@
       !
       !                 !number of vertical levels
-      IF( PRESENT(kdlev) ) THEN   ;   ilevels = kdlev    ! use input value (useful for sea-ice)
-      ELSE                        ;   ilevels = jpk      ! by default jpk
+      IF( PRESENT(kdlev) )   THEN   ;   ilevels = kdlev    ! use input value (useful for sea-ice and abl)
+      ELSE                          ;   ilevels = jpk      ! by default jpk
       ENDIF
       !
@@ -126,8 +127,17 @@
             CALL iom_nf90_check(NF90_DEF_DIM( if90id,            'x',   kdompar(1,1), idmy ), clinfo)
             CALL iom_nf90_check(NF90_DEF_DIM( if90id,            'y',   kdompar(2,1), idmy ), clinfo)
-            CALL iom_nf90_check(NF90_DEF_DIM( if90id,      'nav_lev',            jpk, idmy ), clinfo)
-            CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo)
-            IF( PRESENT(kdlev) )   &
-               CALL iom_nf90_check(NF90_DEF_DIM( if90id,    'numcat',          kdlev, idmy ), clinfo)
+            IF( PRESENT(kdlev) ) THEN
+              IF( kdlev == jpka ) THEN
+                 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev',          kdlev, idmy ), clinfo)
+                 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo)
+              ELSE
+                 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev',            jpk, idmy ), clinfo)
+                 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo)
+                 CALL iom_nf90_check(NF90_DEF_DIM( if90id,  'numcat',          kdlev, idmy ), clinfo)
+              ENDIF
+            ELSE
+               CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev',            jpk, idmy ), clinfo)
+               CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo)
+            ENDIF
             ! global attributes
             CALL iom_nf90_check(NF90_PUT_ATT( if90id, NF90_GLOBAL, 'DOMAIN_number_total'   , jpnij              ), clinfo)
@@ -584,12 +594,12 @@
          IF(     PRESENT(pv_r0d) ) THEN   ;   idims = 0
          ELSEIF( PRESENT(pv_r1d) ) THEN
-            IF( SIZE(pv_r1d,1) == jpk ) THEN   ;   idim3 = 3
-            ELSE                               ;   idim3 = 5
+            IF(( SIZE(pv_r1d,1) == jpk ).OR.( SIZE(pv_r1d,1) == jpka )) THEN   ;   idim3 = 3
+            ELSE                                                               ;   idim3 = 5
             ENDIF
                                               idims = 2   ;   idimid(1:idims) = (/idim3,4/)
          ELSEIF( PRESENT(pv_r2d) ) THEN   ;   idims = 3   ;   idimid(1:idims) = (/1,2  ,4/)
          ELSEIF( PRESENT(pv_r3d) ) THEN
-            IF( SIZE(pv_r3d,3) == jpk ) THEN   ;   idim3 = 3
-            ELSE                               ;   idim3 = 5
+            IF(( SIZE(pv_r3d,3) == jpk ).OR.( SIZE(pv_r3d,3) == jpka )) THEN   ;   idim3 = 3
+            ELSE                                                               ;   idim3 = 5
             ENDIF
                                               idims = 4   ;   idimid(1:idims) = (/1,2,idim3,4/)
@@ -674,5 +684,7 @@
                CALL iom_nf90_check( NF90_PUT_VAR  ( if90id, idmy, gphit(ix1:ix2, iy1:iy2) ), clinfo )
                CALL iom_nf90_check( NF90_INQ_VARID( if90id, 'nav_lev'     , idmy ), clinfo )
-               CALL iom_nf90_check( NF90_PUT_VAR  ( if90id, idmy, gdept_1d       ), clinfo )
+               IF (iom_file(kiomid)%nlev == jpka) THEN   ;   CALL iom_nf90_check( NF90_PUT_VAR  ( if90id, idmy,  ght_abl), clinfo )
+               ELSE                                      ;   CALL iom_nf90_check( NF90_PUT_VAR  ( if90id, idmy, gdept_1d), clinfo )
+               ENDIF
                IF( NF90_INQ_VARID( if90id, 'numcat', idmy ) == nf90_noerr ) THEN
                   CALL iom_nf90_check( NF90_PUT_VAR  ( if90id, idmy, (/ (idlv, idlv = 1,iom_file(kiomid)%nlev) /)), clinfo )
