Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/albedoice.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/albedoice.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/albedoice.F90	(revision 8373)
@@ -10,4 +10,5 @@
    !!   albedo_init   : initialisation of albedo computation
    !!----------------------------------------------------------------------
+   USE ice, ONLY : jpl
    USE phycst         ! physical constants
    USE in_out_manager ! I/O manager
@@ -82,26 +83,20 @@
       REAL(wp), INTENT(  out), DIMENSION(:,:,:) ::   pa_ice_cs           !  albedo of ice under clear    sky
       REAL(wp), INTENT(  out), DIMENSION(:,:,:) ::   pa_ice_os           !  albedo of ice under overcast sky
-      !!
+      !
       INTEGER  ::   ji, jj, jl                                           ! dummy loop indices
-      INTEGER  ::   ijpl                                                 ! number of ice categories (3rd dim of ice input arrays)
-      REAL(wp)                            ::   zswitch, z1_c1, z1_c2
-      REAL(wp)                            ::   zhref_pnd                                 
-      REAL(wp)                            ::   zalb_sm, zalb_sf, zalb_st ! albedo of snow melting, freezing, total
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalb_it             ! intermediate variable & albedo of ice (snow free)
+      REAL(wp) ::   zswitch, z1_c1, z1_c2
+      REAL(wp) ::   zhref_pnd                                 
+      REAL(wp) ::   zalb_sm, zalb_sf, zalb_st ! albedo of snow melting, freezing, total
+      !
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb, zalb_it             ! intermediate variable & albedo of ice (snow free)
 !! MV MP
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb_pnd                  ! ponded sea ice albedo
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb_ice                  ! bare sea ice albedo
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb_snw                  ! snow-covered sea ice albedo
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zafrac_snw                ! relative snow fraction
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zafrac_ice                ! relative ice fraction
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zafrac_pnd                ! relative ice fraction (effective)
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_pnd                  ! ponded sea ice albedo
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_ice                  ! bare sea ice albedo
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_snw                  ! snow-covered sea ice albedo
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zafrac_snw                ! relative snow fraction
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zafrac_ice                ! relative ice fraction
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zafrac_pnd                ! relative ice fraction (effective)
       !!
       !!---------------------------------------------------------------------
-
-      ijpl = SIZE( pt_ice, 3 )                     ! number of ice categories
-      
-      CALL wrk_alloc( jpi,jpj,ijpl, zalb, zalb_it )
-      CALL wrk_alloc( jpi,jpj,ijpl, zalb_pnd, zalb_ice, zalb_snw )
-      CALL wrk_alloc( jpi,jpj,ijpl, zalb_pnd, zafrac_snw, zafrac_ice, zafrac_pnd )
 
       IF( albd_init == 0 )   CALL albedo_init      ! initialization 
@@ -148,5 +143,5 @@
          ENDIF 
 
-         DO jl = 1, ijpl
+         DO jl = 1, jpl
             DO jj = 1, jpj
                DO ji = 1, jpi
@@ -224,5 +219,5 @@
          
          ! Overcast sky surface albedo (accounting for snow, ice melt ponds)
-         DO jl = 1, ijpl
+         DO jl = 1, jpl
             DO jj = 1, jpj
                DO ji = 1, jpi
@@ -309,8 +304,4 @@
 
       END SELECT
-      
-      CALL wrk_dealloc( jpi,jpj,ijpl, zalb, zalb_it )
-      CALL wrk_dealloc( jpi,jpj,ijpl, zalb_pnd, zalb_ice, zalb_snw )
-      CALL wrk_dealloc( jpi,jpj,ijpl, zalb_pnd, zafrac_snw, zafrac_ice, zafrac_pnd )
       !
    END SUBROUTINE albedo_ice
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icestp.F90	(revision 8373)
@@ -113,6 +113,6 @@
       !!
       INTEGER  ::   jl                 ! dummy loop index
-      REAL(wp), POINTER, DIMENSION(:,:,:)   ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky
-      REAL(wp), POINTER, DIMENSION(:,:  )   ::   zutau_ice, zvtau_ice 
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky
+      REAL(wp), DIMENSION(jpi,jpj)     ::   zutau_ice, zvtau_ice 
       !!----------------------------------------------------------------------
 
@@ -158,9 +158,7 @@
 
          IF( ln_mixcpl) THEN                                                       ! Case of a mixed Bulk/Coupled formulation
-            CALL wrk_alloc( jpi,jpj    , zutau_ice, zvtau_ice)
                                       CALL sbc_cpl_ice_tau( zutau_ice , zvtau_ice )
             utau_ice(:,:) = utau_ice(:,:) * xcplmask(:,:,0) + zutau_ice(:,:) * ( 1. - xcplmask(:,:,0) )
             vtau_ice(:,:) = vtau_ice(:,:) * xcplmask(:,:,0) + zvtau_ice(:,:) * ( 1. - xcplmask(:,:,0) )
-            CALL wrk_dealloc( jpi,jpj  , zutau_ice, zvtau_ice)
          ENDIF
 
@@ -209,5 +207,4 @@
          ! fr1_i0  , fr2_i0   : 1sr & 2nd fraction of qsr penetration in ice             [%]
          !----------------------------------------------------------------------------------------
-         CALL wrk_alloc( jpi,jpj,jpl, zalb_os, zalb_cs )
          
                                       CALL albedo_ice( t_su, ht_i, ht_s, a_ip_frac, h_ip, ln_pnd_rad, zalb_cs, zalb_os ) ! cloud-sky and overcast-sky ice albedos MV MP 2016
@@ -227,6 +224,4 @@
                IF( nn_limflx == 2 )   CALL ice_lim_flx( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx )
          END SELECT
-
-         CALL wrk_dealloc( jpi,jpj,jpl, zalb_os, zalb_cs )
 
          !----------------------------!
@@ -520,12 +515,12 @@
       INTEGER  ::   jl      ! dummy loop index
       !
-      REAL(wp), POINTER, DIMENSION(:,:) :: zalb_m    ! Mean albedo over all categories
-      REAL(wp), POINTER, DIMENSION(:,:) :: ztem_m    ! Mean temperature over all categories
-      !
-      REAL(wp), POINTER, DIMENSION(:,:) :: z_qsr_m   ! Mean solar heat flux over all categories
-      REAL(wp), POINTER, DIMENSION(:,:) :: z_qns_m   ! Mean non solar heat flux over all categories
-      REAL(wp), POINTER, DIMENSION(:,:) :: z_evap_m  ! Mean sublimation over all categories
-      REAL(wp), POINTER, DIMENSION(:,:) :: z_dqn_m   ! Mean d(qns)/dT over all categories
-      REAL(wp), POINTER, DIMENSION(:,:) :: z_devap_m ! Mean d(evap)/dT over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: zalb_m    ! Mean albedo over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: ztem_m    ! Mean temperature over all categories
+      !
+      REAL(wp), DIMENSION(jpi,jpj) :: z_qsr_m   ! Mean solar heat flux over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: z_qns_m   ! Mean non solar heat flux over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: z_evap_m  ! Mean sublimation over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: z_dqn_m   ! Mean d(qns)/dT over all categories
+      REAL(wp), DIMENSION(jpi,jpj) :: z_devap_m ! Mean d(evap)/dT over all categories
       !!----------------------------------------------------------------------
       !
@@ -534,5 +529,4 @@
       SELECT CASE( k_limflx )                              !==  averaged on all ice categories  ==!
       CASE( 0 , 1 )
-         CALL wrk_alloc( jpi,jpj, z_qsr_m, z_qns_m, z_evap_m, z_dqn_m, z_devap_m)
          !
          z_qns_m  (:,:) = fice_ice_ave ( pqns_ice (:,:,:) )
@@ -552,10 +546,8 @@
          END DO
          !
-         CALL wrk_dealloc( jpi,jpj, z_qsr_m, z_qns_m, z_evap_m, z_dqn_m, z_devap_m)
       END SELECT
       !
       SELECT CASE( k_limflx )                              !==  redistribution on all ice categories  ==!
       CASE( 1 , 2 )
-         CALL wrk_alloc( jpi,jpj, zalb_m, ztem_m )
          !
          zalb_m(:,:) = fice_ice_ave ( palb_ice (:,:,:) )
@@ -567,5 +559,4 @@
          END DO
          !
-         CALL wrk_dealloc( jpi,jpj, zalb_m, ztem_m )
       END SELECT
       !
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_prather.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_prather.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_prather.F90	(revision 8373)
@@ -65,11 +65,8 @@
       REAL(wp) ::   zs1new, zalf , zalfq , zbt           !   -      -
       REAL(wp) ::   zs2new, zalf1, zalf1q, zbt1          !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zf0 , zfx  , zfy   , zbet   ! 2D workspace
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zfm , zfxx , zfyy  , zfxy   !  -      -
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zalg, zalg1, zalg1q         !  -      -
+      REAL(wp), DIMENSION(jpi,jpj) ::   zf0 , zfx  , zfy   , zbet   ! 2D workspace
+      REAL(wp), DIMENSION(jpi,jpj) ::   zfm , zfxx , zfyy  , zfxy   !  -      -
+      REAL(wp), DIMENSION(jpi,jpj) ::   zalg, zalg1, zalg1q         !  -      -
       !---------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zf0 , zfx , zfy , zbet, zfm )
-      CALL wrk_alloc( jpi, jpj, zfxx, zfyy, zfxy, zalg, zalg1, zalg1q )
 
       ! Limitation of moments.                                           
@@ -217,7 +214,4 @@
          CALL prt_ctl(tab2d_1=psxy , clinfo1=' lim_adv_x: psxy :')
       ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, zf0 , zfx , zfy , zbet, zfm )
-      CALL wrk_dealloc( jpi, jpj, zfxx, zfyy, zfxy, zalg, zalg1, zalg1q )
       !
    END SUBROUTINE lim_adv_x
@@ -250,11 +244,8 @@
       REAL(wp) ::   zs1new, zalf , zalfq , zbt           !    -         -
       REAL(wp) ::   zs2new, zalf1, zalf1q, zbt1          !    -         -
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zf0, zfx , zfy , zbet   ! 2D workspace
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zfm, zfxx, zfyy, zfxy   !  -      -
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zalg, zalg1, zalg1q     !  -      -
+      REAL(wp), DIMENSION(jpi,jpj) ::   zf0, zfx , zfy , zbet   ! 2D workspace
+      REAL(wp), DIMENSION(jpi,jpj) ::   zfm, zfxx, zfyy, zfxy   !  -      -
+      REAL(wp), DIMENSION(jpi,jpj) ::   zalg, zalg1, zalg1q     !  -      -
       !---------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, zf0 , zfx , zfy , zbet, zfm )
-      CALL wrk_alloc( jpi, jpj, zfxx, zfyy, zfxy, zalg, zalg1, zalg1q )
 
       ! Limitation of moments.
@@ -404,7 +395,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, zf0 , zfx , zfy , zbet, zfm )
-      CALL wrk_dealloc( jpi, jpj, zfxx, zfyy, zfxy, zalg, zalg1, zalg1q )
-      !
    END SUBROUTINE lim_adv_y
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_umx.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_umx.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limadv_umx.F90	(revision 8373)
@@ -65,11 +65,8 @@
       REAL(wp) ::   zfp_ui, zfp_vj   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj   !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) :: zt_ups, zfu_ups, zfv_ups, ztrd, zfu_ho, zfv_ho, zt_u, zt_v
+      REAL(wp), DIMENSION(jpi,jpj) :: zt_ups, zfu_ups, zfv_ups, ztrd, zfu_ho, zfv_ho, zt_u, zt_v
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('lim_adv_umx')
-      !
-      CALL wrk_alloc( jpi,jpj,   zt_ups, zfu_ups, zfv_ups, ztrd, zfu_ho, zfv_ho, zt_u, zt_v )
-      !
       !
       !  upstream advection with initial mass fluxes & intermediate update
@@ -145,7 +142,4 @@
       CALL lbc_lnk( ptc(:,:) , 'T',  1. )
       !
-      !
-      CALL wrk_dealloc( jpi,jpj,   zt_ups, zfu_ups, zfv_ups, ztrd, zfu_ho, zfv_ho, zt_u, zt_v )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('lim_adv_umx')
       !
@@ -174,10 +168,8 @@
       INTEGER  ::   ji, jj    ! dummy loop indices
       REAL(wp) ::   zc_box    !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) :: zzt
+      REAL(wp), DIMENSION(jpi,jpj) :: zzt
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('macho')
-      !
-      CALL wrk_alloc( jpi,jpj,   zzt )
       !
       IF( MOD( (kt - 1) / nn_fsbc , 2 ) == 0 ) THEN         !==  odd ice time step:  adv_x then adv_y  ==!
@@ -219,6 +211,4 @@
       ENDIF      
       !
-      CALL wrk_dealloc( jpi,jpj,   zzt )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('macho')
       !
@@ -245,10 +235,8 @@
       INTEGER  ::   ji, jj       ! dummy loop indices
       REAL(wp) ::   zcu, zdx2, zdx4    !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) :: ztu1, ztu2, ztu3, ztu4
+      REAL(wp), DIMENSION(jpi,jpj) :: ztu1, ztu2, ztu3, ztu4
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('ultimate_x')
-      !
-      CALL wrk_alloc( jpi,jpj,   ztu1, ztu2, ztu3, ztu4 )
       !
       !                                                     !--  Laplacian in i-direction  --!
@@ -346,6 +334,4 @@
       END SELECT
       !
-      CALL wrk_dealloc( jpi,jpj,   ztu1, ztu2, ztu3, ztu4 )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('ultimate_x')
       !
@@ -372,10 +358,8 @@
       INTEGER  ::   ji, jj       ! dummy loop indices
       REAL(wp) ::   zcv, zdy2, zdy4    !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) :: ztv1, ztv2, ztv3, ztv4
+      REAL(wp), DIMENSION(jpi,jpj) :: ztv1, ztv2, ztv3, ztv4
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('ultimate_y')
-      !
-      CALL wrk_alloc( jpi,jpj,   ztv1, ztv2, ztv3, ztv4 )
       !
       !                                                     !--  Laplacian in j-direction  --!
@@ -474,6 +458,4 @@
       END SELECT
       !
-      CALL wrk_dealloc( jpi,jpj,   ztv1, ztv2, ztv3, ztv4 )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('ultimate_y')
       !
@@ -502,10 +484,8 @@
       REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zsml, z1_dt   ! local scalars
       REAL(wp) ::   zau, zbu, zcu, zav, zbv, zcv, zup, zdo            !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:) :: zbetup, zbetdo, zbup, zbdo, zmsk, zdiv
+      REAL(wp), DIMENSION(jpi,jpj) :: zbetup, zbetdo, zbup, zbdo, zmsk, zdiv
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('nonosc_2d')
-      !
-      CALL wrk_alloc( jpi,jpj,   zbetup, zbetdo, zbup, zbdo, zmsk, zdiv )
       !
       zbig = 1.e+40_wp
@@ -578,6 +558,4 @@
       CALL lbc_lnk_multi( paa, 'U', -1., pbb, 'V', -1. )   ! lateral boundary condition (changed sign)
       !
-      CALL wrk_dealloc( jpi,jpj,   zbetup, zbetdo, zbup, zbdo, zmsk, zdiv )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('nonosc_2d')
       !
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 8373)
@@ -83,15 +83,10 @@
       INTEGER    :: i_hemis, i_fill, jl0
       REAL(wp)   :: zarg, zV, zconv, zdv
-      REAL(wp), POINTER, DIMENSION(:,:)   :: zswitch    ! ice indicator
-      REAL(wp), POINTER, DIMENSION(:,:)   :: zht_i_ini, zat_i_ini, zvt_i_ini            !data from namelist or nc file
-      REAL(wp), POINTER, DIMENSION(:,:)   :: zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zh_i_ini, za_i_ini                         !data by cattegories to fill
-      INTEGER , POINTER, DIMENSION(:)     :: itest
-      !--------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, jpl, zh_i_ini,  za_i_ini )
-      CALL wrk_alloc( jpi, jpj,      zht_i_ini, zat_i_ini, zvt_i_ini, zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini )
-      CALL wrk_alloc( jpi, jpj,      zswitch )
-      Call wrk_alloc( 4,             itest )
+      REAL(wp), DIMENSION(jpi,jpj)     :: zswitch    ! ice indicator
+      REAL(wp), DIMENSION(jpi,jpj)     :: zht_i_ini, zat_i_ini, zvt_i_ini            !data from namelist or nc file
+      REAL(wp), DIMENSION(jpi,jpj)     :: zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file
+      REAL(wp), DIMENSION(jpi,jpj,jpl) :: zh_i_ini, za_i_ini                         !data by cattegories to fill
+      INTEGER , DIMENSION(4)           :: itest
+      !--------------------------------------------------------------------
 
       IF(lwp) WRITE(numout,*)
@@ -503,9 +498,4 @@
 !!!      
 
-      CALL wrk_dealloc( jpi, jpj, jpl, zh_i_ini,  za_i_ini )
-      CALL wrk_dealloc( jpi, jpj,      zht_i_ini, zat_i_ini, zvt_i_ini, zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini )
-      CALL wrk_dealloc( jpi, jpj,      zswitch )
-      Call wrk_dealloc( 4,             itest )
-
    END SUBROUTINE lim_istate
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 8373)
@@ -110,9 +110,9 @@
       REAL(wp) ::   za, zfac              ! local scalar
       CHARACTER (len = 15) ::   fieldid
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   closing_net     ! net rate at which area is removed    (1/s)
+      REAL(wp), DIMENSION(jpi,jpj)   ::   closing_net     ! net rate at which area is removed    (1/s)
                                                                ! (ridging ice area - area of new ridges) / dt
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   divu_adv        ! divu as implied by transport scheme  (1/s)
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   opning          ! rate of opening due to divergence/shear
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   closing_gross   ! rate at which area removed, not counting area of new ridges
+      REAL(wp), DIMENSION(jpi,jpj)   ::   divu_adv        ! divu as implied by transport scheme  (1/s)
+      REAL(wp), DIMENSION(jpi,jpj)   ::   opning          ! rate of opening due to divergence/shear
+      REAL(wp), DIMENSION(jpi,jpj)   ::   closing_gross   ! rate at which area removed, not counting area of new ridges
       !
       INTEGER, PARAMETER ::   nitermax = 20    
@@ -121,6 +121,4 @@
       !!-----------------------------------------------------------------------------
       IF( nn_timing == 1 )  CALL timing_start('limitd_me')
-
-      CALL wrk_alloc( jpi,jpj, closing_net, divu_adv, opning, closing_gross )
 
       ! conservation test
@@ -288,6 +286,4 @@
       ! control prints
       IF( ln_ctl )       CALL lim_prt3D( 'limitd_me' )
-
-      CALL wrk_dealloc( jpi, jpj, closing_net, divu_adv, opning, closing_gross )
       !
       IF( nn_timing == 1 )  CALL timing_stop('limitd_me')
@@ -303,10 +299,8 @@
       !!              participating in ridging and of the resulting ridges.
       !!---------------------------------------------------------------------!
-      INTEGER ::   ji,jj, jl    ! dummy loop indices
+      INTEGER  ::   ji,jj, jl    ! dummy loop indices
       REAL(wp) ::   Gstari, astari, hrmean, zdummy   ! local scalar
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   Gsum      ! Gsum(n) = sum of areas in categories 0 to n
-      !------------------------------------------------------------------------------!
-
-      CALL wrk_alloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 )
+      REAL(wp), DIMENSION(jpi,jpj,-1:jpl) ::   Gsum      ! Gsum(n) = sum of areas in categories 0 to n
+      !------------------------------------------------------------------------------!
 
       Gstari     = 1.0/rn_gstar    
@@ -477,5 +471,4 @@
       END DO
       !
-      CALL wrk_dealloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 )
       !
    END SUBROUTINE lim_itd_me_ridgeprep
@@ -502,55 +495,41 @@
       REAL(wp) ::   zwfx_snw         ! snow mass flux increment
 
-      INTEGER , POINTER, DIMENSION(:) ::   indxi, indxj   ! compressed indices
-      REAL(wp), POINTER, DIMENSION(:) ::   zswitch, fvol   ! new ridge volume going to n2
-
-      REAL(wp), POINTER, DIMENSION(:) ::   afrac            ! fraction of category area ridged 
-      REAL(wp), POINTER, DIMENSION(:) ::   ardg1 , ardg2    ! area of ice ridged & new ridges
-      REAL(wp), POINTER, DIMENSION(:) ::   vsrdg , esrdg    ! snow volume & energy of ridging ice
+      INTEGER , DIMENSION(jpij) ::   indxi, indxj   ! compressed indices
+      REAL(wp), DIMENSION(jpij) ::   zswitch, fvol   ! new ridge volume going to n2
+
+      REAL(wp), DIMENSION(jpij) ::   afrac            ! fraction of category area ridged 
+      REAL(wp), DIMENSION(jpij) ::   ardg1 , ardg2    ! area of ice ridged & new ridges
+      REAL(wp), DIMENSION(jpij) ::   vsrdg , esrdg    ! snow volume & energy of ridging ice
       ! MV MP 2016
-      REAL(wp), POINTER, DIMENSION(:) ::   vprdg            ! pond volume of ridging ice
-      REAL(wp), POINTER, DIMENSION(:) ::   aprdg1           ! pond area of ridging ice
-      REAL(wp), POINTER, DIMENSION(:) ::   aprdg2           ! pond area of ridging ice
+      REAL(wp), DIMENSION(jpij) ::   vprdg            ! pond volume of ridging ice
+      REAL(wp), DIMENSION(jpij) ::   aprdg1           ! pond area of ridging ice
+      REAL(wp), DIMENSION(jpij) ::   aprdg2           ! pond area of ridging ice
       ! END MV MP 2016
-      REAL(wp), POINTER, DIMENSION(:) ::   dhr   , dhr2     ! hrmax - hrmin  &  hrmax^2 - hrmin^2
-
-      REAL(wp), POINTER, DIMENSION(:) ::   vrdg1   ! volume of ice ridged
-      REAL(wp), POINTER, DIMENSION(:) ::   vrdg2   ! volume of new ridges
-      REAL(wp), POINTER, DIMENSION(:) ::   vsw     ! volume of seawater trapped into ridges
-      REAL(wp), POINTER, DIMENSION(:) ::   srdg1   ! sal*volume of ice ridged
-      REAL(wp), POINTER, DIMENSION(:) ::   srdg2   ! sal*volume of new ridges
-      REAL(wp), POINTER, DIMENSION(:) ::   smsw    ! sal*volume of water trapped into ridges
-      REAL(wp), POINTER, DIMENSION(:) ::   oirdg1, oirdg2   ! ice age of ice ridged
-
-      REAL(wp), POINTER, DIMENSION(:) ::   afrft            ! fraction of category area rafted
-      REAL(wp), POINTER, DIMENSION(:) ::   arft1 , arft2    ! area of ice rafted and new rafted zone
-      REAL(wp), POINTER, DIMENSION(:) ::   virft , vsrft    ! ice & snow volume of rafting ice
+      REAL(wp), DIMENSION(jpij) ::   dhr   , dhr2     ! hrmax - hrmin  &  hrmax^2 - hrmin^2
+
+      REAL(wp), DIMENSION(jpij) ::   vrdg1   ! volume of ice ridged
+      REAL(wp), DIMENSION(jpij) ::   vrdg2   ! volume of new ridges
+      REAL(wp), DIMENSION(jpij) ::   vsw     ! volume of seawater trapped into ridges
+      REAL(wp), DIMENSION(jpij) ::   srdg1   ! sal*volume of ice ridged
+      REAL(wp), DIMENSION(jpij) ::   srdg2   ! sal*volume of new ridges
+      REAL(wp), DIMENSION(jpij) ::   smsw    ! sal*volume of water trapped into ridges
+      REAL(wp), DIMENSION(jpij) ::   oirdg1, oirdg2   ! ice age of ice ridged
+
+      REAL(wp), DIMENSION(jpij) ::   afrft            ! fraction of category area rafted
+      REAL(wp), DIMENSION(jpij) ::   arft1 , arft2    ! area of ice rafted and new rafted zone
+      REAL(wp), DIMENSION(jpij) ::   virft , vsrft    ! ice & snow volume of rafting ice
       ! MV MP 2016
-      REAL(wp), POINTER, DIMENSION(:) ::   vprft            ! pond volume of rafting ice
-      REAL(wp), POINTER, DIMENSION(:) ::   aprft1           ! pond area of rafted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   aprft2           ! pond area of new rafted ice
+      REAL(wp), DIMENSION(jpij) ::   vprft            ! pond volume of rafting ice
+      REAL(wp), DIMENSION(jpij) ::   aprft1           ! pond area of rafted ice
+      REAL(wp), DIMENSION(jpij) ::   aprft2           ! pond area of new rafted ice
       ! END MV MP 2016
-      REAL(wp), POINTER, DIMENSION(:) ::   esrft , smrft    ! snow energy & salinity of rafting ice
-      REAL(wp), POINTER, DIMENSION(:) ::   oirft1, oirft2   ! ice age of ice rafted
-
-      REAL(wp), POINTER, DIMENSION(:,:) ::   eirft      ! ice energy of rafting ice
-      REAL(wp), POINTER, DIMENSION(:,:) ::   erdg1      ! enth*volume of ice ridged
-      REAL(wp), POINTER, DIMENSION(:,:) ::   erdg2      ! enth*volume of new ridges
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ersw       ! enth of water trapped into ridges
+      REAL(wp), DIMENSION(jpij) ::   esrft , smrft    ! snow energy & salinity of rafting ice
+      REAL(wp), DIMENSION(jpij) ::   oirft1, oirft2   ! ice age of ice rafted
+
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   eirft      ! ice energy of rafting ice
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   erdg1      ! enth*volume of ice ridged
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   erdg2      ! enth*volume of new ridges
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   ersw       ! enth of water trapped into ridges
       !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpij,        indxi, indxj )
-      CALL wrk_alloc( jpij,        zswitch, fvol )
-      ! MV MP 2016
-      !CALL wrk_alloc( jpij,        afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
-      CALL wrk_alloc( jpij,        afrac, ardg1, ardg2, vsrdg, esrdg, vprdg, aprdg1, aprdg2, dhr, dhr2 )
-      ! END MV MP 2016
-      CALL wrk_alloc( jpij,        vrdg1, vrdg2, vsw  , srdg1, srdg2, smsw, oirdg1, oirdg2 )
-      ! MV MP 2016
-      !CALL wrk_alloc( jpij,        afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
-      CALL wrk_alloc(  jpij,        afrft, arft1, arft2, virft, vsrft, esrft, aprft1, aprft2)
-      CALL wrk_alloc ( jpij,        vprft, smrft, oirft1, oirft2 )
-      ! END MV MP 2016
-      CALL wrk_alloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
 
       !-------------------------------------------------------------------------------
@@ -794,19 +773,5 @@
       ! SIMIP diagnostics
       diag_dmi_dyn(:,:) = - wfx_dyn(:,:)     + rhoic * diag_trp_vi(:,:)
-      diag_dms_dyn(:,:) = - wfx_snw_dyn(:,:) + rhosn * diag_trp_vs(:,:)
-      
-      !
-      CALL wrk_dealloc( jpij,        indxi, indxj )
-      CALL wrk_dealloc( jpij,        zswitch, fvol )
-      ! MV MP 2016
-      !CALL wrk_dealloc( jpij,        afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
-      CALL wrk_dealloc( jpij,        afrac, ardg1, ardg2, vsrdg, esrdg, vprdg, aprdg1, aprdg2,  dhr, dhr2 )
-      ! END MV MP 2016
-      CALL wrk_dealloc( jpij,        vrdg1, vrdg2, vsw  , srdg1, srdg2, smsw, oirdg1, oirdg2 )
-      ! MV MP 2016
-      !CALL wrk_dealloc( jpij,        afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
-      CALL wrk_dealloc( jpij,        afrft, arft1, arft2, virft, vsrft, esrft, aprft1, aprft2, vprft )
-      CALL wrk_dealloc( jpij,        smrft, oirft1, oirft2 )
-      CALL wrk_dealloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
+      diag_dms_dyn(:,:) = - wfx_snw_dyn(:,:) + rhosn * diag_trp_vs(:,:)      
       !
    END SUBROUTINE lim_itd_me_ridgeshift
@@ -831,9 +796,7 @@
       INTEGER             ::   numts_rm    ! number of time steps for the P smoothing
       REAL(wp)            ::   zp, z1_3    ! local scalars
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zworka           ! temporary array used here
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zstrp1, zstrp2   ! strength at previous time steps
+      REAL(wp), DIMENSION(jpi,jpj) ::   zworka           ! temporary array used here
+      REAL(wp), DIMENSION(jpi,jpj) ::   zstrp1, zstrp2   ! strength at previous time steps
       !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj, zworka, zstrp1, zstrp2 )
 
       !------------------------------------------------------------------------------!
@@ -966,6 +929,4 @@
 
       ENDIF ! ksmooth
-
-      CALL wrk_dealloc( jpi,jpj, zworka, zstrp1, zstrp2 )
       !
    END SUBROUTINE lim_itd_me_icestrength
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limmp.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limmp.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limmp.F90	(revision 8373)
@@ -249,32 +249,26 @@
        !!-------------------------------------------------------------------
 
-       INTEGER, POINTER, DIMENSION(:)      :: indxi             ! compressed indices for cells with ice melting
-       INTEGER, POINTER, DIMENSION(:)      :: indxj             !
-
-       REAL(wp), POINTER, DIMENSION(:,:)   :: zwfx_mlw          ! available meltwater for melt ponding
-       REAL(wp), POINTER, DIMENSION(:,:,:) :: zrfrac            ! fraction of available meltwater retained for melt ponding
-
-       REAL(wp), PARAMETER                 :: zrmin  = 0.15_wp  ! minimum fraction of available meltwater retained for melt ponding
-       REAL(wp), PARAMETER                 :: zrmax  = 0.70_wp  ! maximum   ''           ''       ''        ''            ''
-       REAL(wp), PARAMETER                 :: zrexp  = 0.01_wp  ! rate constant to refreeze melt ponds
-       REAL(wp), PARAMETER                 :: zpnd_aspect = 0.8_wp ! pond aspect ratio
-
-       REAL(wp)                            :: zhi               ! dummy ice thickness
-       REAL(wp)                            :: zhs               ! dummy snow depth
-       REAL(wp)                            :: zTp               ! reference temperature
-       REAL(wp)                            :: zdTs              ! dummy temperature difference
-       REAL(wp)                            :: z1_rhofw          ! inverse freshwater density
-       REAL(wp)                            :: z1_zpnd_aspect    ! inverse pond aspect ratio
-       REAL(wp)                            :: zvpold            ! dummy pond volume
-
-       INTEGER                             :: ji, jj, jl, ij    ! loop indices
-       INTEGER                             :: icells            ! size of dummy array
-
+       INTEGER, DIMENSION(jpij)         :: indxi             ! compressed indices for cells with ice melting
+       INTEGER, DIMENSION(jpij)         :: indxj             !
+
+       REAL(wp), DIMENSION(jpi,jpj)     :: zwfx_mlw          ! available meltwater for melt ponding
+       REAL(wp), DIMENSION(jpi,jpj,jpl) :: zrfrac            ! fraction of available meltwater retained for melt ponding
+
+       REAL(wp), PARAMETER :: zrmin  = 0.15_wp  ! minimum fraction of available meltwater retained for melt ponding
+       REAL(wp), PARAMETER :: zrmax  = 0.70_wp  ! maximum   ''           ''       ''        ''            ''
+       REAL(wp), PARAMETER :: zrexp  = 0.01_wp  ! rate constant to refreeze melt ponds
+       REAL(wp), PARAMETER :: zpnd_aspect = 0.8_wp ! pond aspect ratio
+
+       REAL(wp) :: zhi               ! dummy ice thickness
+       REAL(wp) :: zhs               ! dummy snow depth
+       REAL(wp) :: zTp               ! reference temperature
+       REAL(wp) :: zdTs              ! dummy temperature difference
+       REAL(wp) :: z1_rhofw          ! inverse freshwater density
+       REAL(wp) :: z1_zpnd_aspect    ! inverse pond aspect ratio
+       REAL(wp) :: zvpold            ! dummy pond volume
+
+       INTEGER  :: ji, jj, jl, ij    ! loop indices
+       INTEGER  :: icells            ! size of dummy array
        !!-------------------------------------------------------------------
-
-        CALL wrk_alloc( jpi*jpj, indxi, indxj)
-        CALL wrk_alloc( jpi,jpj,     zwfx_mlw )
-        CALL wrk_alloc( jpi,jpj,jpl, zrfrac   )
-
         z1_rhofw       = 1. / rhofw 
         z1_zpnd_aspect = 1. / zpnd_aspect
@@ -390,8 +384,4 @@
 
         ENDIF
-
-       CALL wrk_dealloc( jpi*jpj, indxi, indxj)
-       CALL wrk_dealloc( jpi,jpj,     zwfx_mlw )
-       CALL wrk_dealloc( jpi,jpj,jpl, zrfrac   )
 
    END SUBROUTINE lim_mp_cesm
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 8373)
@@ -123,39 +123,31 @@
       REAL(wp) ::   zfac_x, zfac_y
       
-      REAL(wp), POINTER, DIMENSION(:,:) ::   z1_e1t0, z1_e2t0                ! scale factors
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zp_delt                         ! P/delta at T points
-      !
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zaU   , zaV                     ! ice fraction on U/V points
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zmU_t, zmV_t                    ! ice/snow mass/dt on U/V points
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zmf                             ! coriolis parameter at T points
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zTauU_ia , ztauV_ia             ! ice-atm. stress at U-V points
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zspgU , zspgV                   ! surface pressure gradient at U/V points
-      REAL(wp), POINTER, DIMENSION(:,:) ::   v_oceU, u_oceV, v_iceU, u_iceV  ! ocean/ice u/v component on V/U points                           
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zfU   , zfV                     ! internal stresses
+      REAL(wp), DIMENSION(jpi,jpj) ::   z1_e1t0, z1_e2t0                ! scale factors
+      REAL(wp), DIMENSION(jpi,jpj) ::   zp_delt                         ! P/delta at T points
+      !
+      REAL(wp), DIMENSION(jpi,jpj) ::   zaU   , zaV                     ! ice fraction on U/V points
+      REAL(wp), DIMENSION(jpi,jpj) ::   zmU_t, zmV_t                    ! ice/snow mass/dt on U/V points
+      REAL(wp), DIMENSION(jpi,jpj) ::   zmf                             ! coriolis parameter at T points
+      REAL(wp), DIMENSION(jpi,jpj) ::   zTauU_ia , ztauV_ia             ! ice-atm. stress at U-V points
+      REAL(wp), DIMENSION(jpi,jpj) ::   zspgU , zspgV                   ! surface pressure gradient at U/V points
+      REAL(wp), DIMENSION(jpi,jpj) ::   v_oceU, u_oceV, v_iceU, u_iceV  ! ocean/ice u/v component on V/U points                           
+      REAL(wp), DIMENSION(jpi,jpj) ::   zfU   , zfV                     ! internal stresses
       
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zds                             ! shear
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zs1, zs2, zs12                  ! stress tensor components
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr           ! check convergence
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zpice                           ! array used for the calculation of ice surface slope:
+      REAL(wp), DIMENSION(jpi,jpj) ::   zds                             ! shear
+      REAL(wp), DIMENSION(jpi,jpj) ::   zs1, zs2, zs12                  ! stress tensor components
+      REAL(wp), DIMENSION(jpi,jpj) ::   zu_ice, zv_ice, zresr           ! check convergence
+      REAL(wp), DIMENSION(jpi,jpj) ::   zpice                           ! array used for the calculation of ice surface slope:
                                                                              !   ocean surface (ssh_m) if ice is not embedded
                                                                              !   ice top surface if ice is embedded   
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zCorx, zCory                    ! Coriolis stress array
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztaux_oi, ztauy_oi              ! Ocean-to-ice stress array
-
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zswitchU, zswitchV              ! dummy arrays
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zmaskU, zmaskV                  ! mask for ice presence
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zfmask, zwf                     ! mask at F points for the ice
-
-      REAL(wp), PARAMETER               ::   zepsi  = 1.0e-20_wp             ! tolerance parameter
-      REAL(wp), PARAMETER               ::   zmmin  = 1._wp                  ! ice mass (kg/m2) below which ice velocity equals ocean velocity
+      REAL(wp), DIMENSION(jpi,jpj) ::   zCorx, zCory                    ! Coriolis stress array
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_oi, ztauy_oi              ! Ocean-to-ice stress array
+
+      REAL(wp), DIMENSION(jpi,jpj) ::   zswitchU, zswitchV              ! dummy arrays
+      REAL(wp), DIMENSION(jpi,jpj) ::   zmaskU, zmaskV                  ! mask for ice presence
+      REAL(wp), DIMENSION(jpi,jpj) ::   zfmask, zwf                     ! mask at F points for the ice
+
+      REAL(wp), PARAMETER          ::   zepsi  = 1.0e-20_wp             ! tolerance parameter
+      REAL(wp), PARAMETER          ::   zmmin  = 1._wp                  ! ice mass (kg/m2) below which ice velocity equals ocean velocity
       !!-------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi,jpj, z1_e1t0, z1_e2t0, zp_delt )
-      CALL wrk_alloc( jpi,jpj, zaU, zaV, zmU_t, zmV_t, zmf, zTauU_ia, ztauV_ia )
-      CALL wrk_alloc( jpi,jpj, zspgU, zspgV, v_oceU, u_oceV, v_iceU, u_iceV, zfU, zfV )
-      CALL wrk_alloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice )
-      CALL wrk_alloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf )
-      CALL wrk_alloc( jpi,jpj, zCorx, zCory)
-      CALL wrk_alloc( jpi,jpj, ztaux_oi, ztauy_oi)
 
 #if defined key_agrif 
@@ -762,14 +754,5 @@
          ENDIF
       ENDIF
-      !     
-      
-      CALL wrk_dealloc( jpi,jpj, z1_e1t0, z1_e2t0, zp_delt )
-      CALL wrk_dealloc( jpi,jpj, zaU, zaV, zmU_t, zmV_t, zmf, zTauU_ia, ztauV_ia )
-      CALL wrk_dealloc( jpi,jpj, zspgU, zspgV, v_oceU, u_oceV, v_iceU, u_iceV, zfU, zfV )
-      CALL wrk_dealloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice )
-      CALL wrk_dealloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf )
-      CALL wrk_dealloc( jpi,jpj, zCorx, zCory )
-      CALL wrk_dealloc( jpi,jpj, ztaux_oi, ztauy_oi )
-
+      !
    END SUBROUTINE lim_rhg
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 8373)
@@ -106,8 +106,6 @@
       CHARACTER(len=25) ::   znam
       CHARACTER(len=2)  ::   zchar, zchar1
-      REAL(wp), POINTER, DIMENSION(:,:) :: z2d
-      !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, z2d )
+      REAL(wp), DIMENSION(jpi,jpj) :: z2d
+      !!----------------------------------------------------------------------
 
       iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1
@@ -355,5 +353,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpi, jpj, z2d )
       !
    END SUBROUTINE lim_rst_write
@@ -366,7 +363,7 @@
       !! ** purpose  :   read of sea-ice variable restart in a netcdf file
       !!----------------------------------------------------------------------
-      INTEGER :: ji, jj, jk, jl
-      REAL(wp) ::   zfice, ziter
-      REAL(wp), POINTER, DIMENSION(:,:) ::   z2d
+      INTEGER  :: ji, jj, jk, jl
+      REAL(wp) :: zfice, ziter
+      REAL(wp), DIMENSION(jpi,jpj) ::   z2d
       CHARACTER(len=25) ::   znam
       CHARACTER(len=2)  ::   zchar, zchar1
@@ -374,6 +371,4 @@
       LOGICAL           ::   llok
       !!----------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, z2d )
 
       IF(lwp) THEN
@@ -638,6 +633,4 @@
       !CALL iom_close( numrir ) !clem: closed in icestp.F90
       !
-      CALL wrk_dealloc( jpi, jpj, z2d )
-      !
    END SUBROUTINE lim_rst_read
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 8373)
@@ -87,11 +87,9 @@
       REAL(wp), PARAMETER :: zfric_umin = 0._wp           ! lower bound for the friction velocity (cice value=5.e-04)
       REAL(wp), PARAMETER :: zch        = 0.0057_wp       ! heat transfer coefficient
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_io, zv_io, zfric   ! ice-ocean velocity (m/s) and frictional velocity (m2/s2)
+      REAL(wp), DIMENSION(jpi,jpj) ::   zu_io, zv_io, zfric   ! ice-ocean velocity (m/s) and frictional velocity (m2/s2)
       !
       !!-------------------------------------------------------------------
 
       IF( nn_timing == 1 )   CALL timing_start('limthd')
-
-      CALL wrk_alloc( jpi,jpj, zu_io, zv_io, zfric )
 
       IF( kt == nit000 .AND. lwp ) THEN
@@ -322,6 +320,4 @@
 
       IF( ln_ctl )       CALL lim_prt3D( 'limthd' )  ! Control print
-      !
-      CALL wrk_dealloc( jpi,jpj, zu_io, zv_io, zfric )
       !
       IF( nn_timing == 1 )  CALL timing_stop('limthd')
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dh.F90	(revision 8373)
@@ -85,21 +85,21 @@
       REAL(wp) ::   zfmdt        ! exchange mass flux x time step (J/m2), >0 towards the ocean
 
-      REAL(wp), POINTER, DIMENSION(:) ::   zqprec      ! energy of fallen snow                       (J.m-3)
-      REAL(wp), POINTER, DIMENSION(:) ::   zq_su       ! heat for surface ablation                   (J.m-2)
-      REAL(wp), POINTER, DIMENSION(:) ::   zq_bo       ! heat for bottom ablation                    (J.m-2)
-      REAL(wp), POINTER, DIMENSION(:) ::   zq_rema     ! remaining heat at the end of the routine    (J.m-2)
-      REAL(wp), POINTER, DIMENSION(:) ::   zf_tt       ! Heat budget to determine melting or freezing(W.m-2)
-      REAL(wp), POINTER, DIMENSION(:) ::   zevap_rema  ! remaining mass flux from sublimation        (kg.m-2)
-
-      REAL(wp), POINTER, DIMENSION(:) ::   zdh_s_mel   ! snow melt 
-      REAL(wp), POINTER, DIMENSION(:) ::   zdh_s_pre   ! snow precipitation 
-      REAL(wp), POINTER, DIMENSION(:) ::   zdh_s_sub   ! snow sublimation
-
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zdeltah
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zh_i      ! ice layer thickness
-      INTEGER , POINTER, DIMENSION(:,:) ::   icount    ! number of layers vanished by melting 
-
-      REAL(wp), POINTER, DIMENSION(:) ::   zeh_i       ! total ice heat content  (J.m-2)
-      REAL(wp), POINTER, DIMENSION(:) ::   zsnw        ! distribution of snow after wind blowing
+      REAL(wp), DIMENSION(jpij) ::   zqprec      ! energy of fallen snow                       (J.m-3)
+      REAL(wp), DIMENSION(jpij) ::   zq_su       ! heat for surface ablation                   (J.m-2)
+      REAL(wp), DIMENSION(jpij) ::   zq_bo       ! heat for bottom ablation                    (J.m-2)
+      REAL(wp), DIMENSION(jpij) ::   zq_rema     ! remaining heat at the end of the routine    (J.m-2)
+      REAL(wp), DIMENSION(jpij) ::   zf_tt       ! Heat budget to determine melting or freezing(W.m-2)
+      REAL(wp), DIMENSION(jpij) ::   zevap_rema  ! remaining mass flux from sublimation        (kg.m-2)
+
+      REAL(wp), DIMENSION(jpij) ::   zdh_s_mel   ! snow melt 
+      REAL(wp), DIMENSION(jpij) ::   zdh_s_pre   ! snow precipitation 
+      REAL(wp), DIMENSION(jpij) ::   zdh_s_sub   ! snow sublimation
+
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   zdeltah
+      REAL(wp), DIMENSION(jpij,nlay_i) ::   zh_i      ! ice layer thickness
+      INTEGER , DIMENSION(jpij,nlay_i) ::   icount    ! number of layers vanished by melting 
+
+      REAL(wp), DIMENSION(jpij) ::   zeh_i       ! total ice heat content  (J.m-2)
+      REAL(wp), DIMENSION(jpij) ::   zsnw        ! distribution of snow after wind blowing
 
       REAL(wp) :: zswitch_sal
@@ -107,33 +107,21 @@
       ! Heat conservation 
       INTEGER  ::   num_iter_max
-
       !!------------------------------------------------------------------
 
       ! Discriminate between varying salinity (nn_icesal=2) and prescribed cases (other values)
       SELECT CASE( nn_icesal )                  ! varying salinity or not
-         CASE( 1, 3 ) ;   zswitch_sal = 0       ! prescribed salinity profile
-         CASE( 2 )    ;   zswitch_sal = 1       ! varying salinity profile
+         CASE( 1, 3 ) ;   zswitch_sal = 0._wp   ! prescribed salinity profile
+         CASE( 2 )    ;   zswitch_sal = 1._wp   ! varying salinity profile
       END SELECT
 
-      CALL wrk_alloc( jpij, zqprec, zq_su, zq_bo, zf_tt, zq_rema, zsnw, zevap_rema )
-      CALL wrk_alloc( jpij, zdh_s_mel, zdh_s_pre, zdh_s_sub, zeh_i )
-      CALL wrk_alloc( jpij, nlay_i, zdeltah, zh_i )
-      CALL wrk_alloc( jpij, nlay_i, icount )
-       
-      zqprec   (:) = 0._wp ; zq_su    (:) = 0._wp ; zq_bo    (:) = 0._wp ; zf_tt(:) = 0._wp
-      zq_rema  (:) = 0._wp ; zsnw     (:) = 0._wp ; zevap_rema(:) = 0._wp ;
-      zdh_s_mel(:) = 0._wp ; zdh_s_pre(:) = 0._wp ; zdh_s_sub(:) = 0._wp ; zeh_i(:) = 0._wp
-
-      zdeltah(:,:) = 0._wp ; zh_i(:,:) = 0._wp       
-      icount (:,:) = 0
-
-      ! Initialize enthalpy at nlay_i+1
-      DO ji = 1, nidx
-         e_i_1d(ji,nlay_i+1) = 0._wp
+      DO ji = 1, nidx
+         icount (ji,:) = 0
+         zdh_s_mel(ji) = 0._wp
+         e_i_1d(ji,nlay_i+1) = 0._wp ! Initialize enthalpy at nlay_i+1
       END DO
 
       ! initialize layer thicknesses and enthalpies
-      h_i_old (:,0:nlay_i+1) = 0._wp
-      eh_i_old(:,0:nlay_i+1) = 0._wp
+      h_i_old (1:nidx,0:nlay_i+1) = 0._wp
+      eh_i_old(1:nidx,0:nlay_i+1) = 0._wp
       DO jk = 1, nlay_i
          DO ji = 1, nidx
@@ -204,5 +192,5 @@
       CALL lim_thd_snwblow( 1. - at_i_1d(1:nidx), zsnw(1:nidx) ) ! snow distribution over ice after wind blowing
 
-      zdeltah(:,:) = 0._wp
+      zdeltah(1:nidx,:) = 0._wp
       DO ji = 1, nidx
          !-----------
@@ -239,5 +227,5 @@
 
       ! If heat still available (zq_su > 0), then melt more snow
-      zdeltah(:,:) = 0._wp
+      zdeltah(1:nidx,:) = 0._wp
       DO jk = 1, nlay_s
          DO ji = 1, nidx
@@ -263,5 +251,5 @@
       ! qla_ice is always >=0 (upwards), heat goes to the atmosphere, therefore snow sublimates
       ! clem comment: not counted in mass/heat exchange in limsbc since this is an exchange with atm. (not ocean)
-      zdeltah(:,:) = 0._wp
+      zdeltah(1:nidx,:) = 0._wp
       DO ji = 1, nidx
          zdh_s_sub(ji)  = MAX( - ht_s_1d(ji) , - evap_ice_1d(ji) * r1_rhosn * rdt_ice )
@@ -303,5 +291,5 @@
       ! 3.4 Surface ice ablation 
       !--------------------------
-      zdeltah(:,:) = 0._wp ! important
+      zdeltah(1:nidx,:) = 0._wp ! important
       DO jk = 1, nlay_i
          DO ji = 1, nidx
@@ -498,5 +486,5 @@
       ! 4.2 Basal melt
       !----------------
-      zdeltah(:,:) = 0._wp ! important
+      zdeltah(1:nidx,:) = 0._wp ! important
       DO jk = nlay_i, 1, -1
          DO ji = 1, nidx
@@ -583,5 +571,5 @@
       ! If heat still available for melting and snow remains, then melt more snow
       !-------------------------------------------
-      zdeltah(:,:) = 0._wp ! important
+      zdeltah(1:nidx,:) = 0._wp ! important
       DO ji = 1, nidx
          zq_rema(ji)     = zq_su(ji) + zq_bo(ji) 
@@ -668,11 +656,5 @@
       DO ji = 1, nidx
          IF( ht_i_1d(ji) == 0._wp )   a_i_1d(ji) = 0._wp
-      END DO
-         
-      CALL wrk_dealloc( jpij, zqprec, zq_su, zq_bo, zf_tt, zq_rema, zsnw, zevap_rema )
-      CALL wrk_dealloc( jpij, zdh_s_mel, zdh_s_pre, zdh_s_sub, zeh_i )
-      CALL wrk_dealloc( jpij, nlay_i, zdeltah, zh_i )
-      CALL wrk_dealloc( jpij, nlay_i, icount )
-      !
+      END DO         
       !
    END SUBROUTINE lim_thd_dh
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 8373)
@@ -95,6 +95,6 @@
       INTEGER ::   iconv_max = 50 ! max number of iterations in iterative procedure
       
-      INTEGER, POINTER, DIMENSION(:) ::   numeqmin   ! reference number of top equation
-      INTEGER, POINTER, DIMENSION(:) ::   numeqmax   ! reference number of bottom equation
+      INTEGER, DIMENSION(jpij) ::   numeqmin   ! reference number of top equation
+      INTEGER, DIMENSION(jpij) ::   numeqmax   ! reference number of bottom equation
       
       REAL(wp) ::   zg1s      =  2._wp        ! for the tridiagonal system
@@ -110,66 +110,52 @@
       REAL(wp) ::   zdti_bnd = 1.e-4_wp       ! maximal authorized error on temperature 
       
-      REAL(wp), POINTER, DIMENSION(:)     ::   isnow       ! switch for presence (1) or absence (0) of snow
-      REAL(wp), POINTER, DIMENSION(:)     ::   ztsub       ! old surface temperature (before the iterative procedure )
-      REAL(wp), POINTER, DIMENSION(:)     ::   ztsubit     ! surface temperature at previous iteration
-      REAL(wp), POINTER, DIMENSION(:)     ::   zh_i        ! ice layer thickness
-      REAL(wp), POINTER, DIMENSION(:)     ::   zh_s        ! snow layer thickness
-      REAL(wp), POINTER, DIMENSION(:)     ::   zfsw        ! solar radiation absorbed at the surface
-      REAL(wp), POINTER, DIMENSION(:)     ::   zqns_ice_b  ! solar radiation absorbed at the surface
-      REAL(wp), POINTER, DIMENSION(:)     ::   zf          ! surface flux function
-      REAL(wp), POINTER, DIMENSION(:)     ::   dzf         ! derivative of the surface flux function
-      REAL(wp), POINTER, DIMENSION(:)     ::   zdti        ! current error on temperature
-      REAL(wp), POINTER, DIMENSION(:)     ::   zdifcase    ! case of the equation resolution (1->4)
-      REAL(wp), POINTER, DIMENSION(:)     ::   zftrice     ! solar radiation transmitted through the ice
-      REAL(wp), POINTER, DIMENSION(:)     ::   zihic
+      REAL(wp), DIMENSION(jpij)     ::   isnow       ! switch for presence (1) or absence (0) of snow
+      REAL(wp), DIMENSION(jpij)     ::   ztsub       ! old surface temperature (before the iterative procedure )
+      REAL(wp), DIMENSION(jpij)     ::   ztsubit     ! surface temperature at previous iteration
+      REAL(wp), DIMENSION(jpij)     ::   zh_i        ! ice layer thickness
+      REAL(wp), DIMENSION(jpij)     ::   zh_s        ! snow layer thickness
+      REAL(wp), DIMENSION(jpij)     ::   zfsw        ! solar radiation absorbed at the surface
+      REAL(wp), DIMENSION(jpij)     ::   zqns_ice_b  ! solar radiation absorbed at the surface
+      REAL(wp), DIMENSION(jpij)     ::   zf          ! surface flux function
+      REAL(wp), DIMENSION(jpij)     ::   dzf         ! derivative of the surface flux function
+      REAL(wp), DIMENSION(jpij)     ::   zdti        ! current error on temperature
+      REAL(wp), DIMENSION(jpij)     ::   zdifcase    ! case of the equation resolution (1->4)
+      REAL(wp), DIMENSION(jpij)     ::   zftrice     ! solar radiation transmitted through the ice
+      REAL(wp), DIMENSION(jpij)     ::   zihic
       
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztcond_i    ! Ice thermal conductivity
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zradtr_i    ! Radiation transmitted through the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zradab_i    ! Radiation absorbed in the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zkappa_i    ! Kappa factor in the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztib        ! Old temperature in the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zeta_i      ! Eta factor in the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztitemp     ! Temporary temperature in the ice to check the convergence
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zspeche_i   ! Ice specific heat
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   z_i         ! Vertical cotes of the layers in the ice
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zradtr_s    ! Radiation transmited through the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zradab_s    ! Radiation absorbed in the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zkappa_s    ! Kappa factor in the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zeta_s      ! Eta factor in the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztstemp     ! Temporary temperature in the snow to check the convergence
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   ztsb        ! Temporary temperature in the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   z_s         ! Vertical cotes of the layers in the snow
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zindterm    ! 'Ind'ependent term
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zindtbis    ! Temporary 'ind'ependent term
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zdiagbis    ! Temporary 'dia'gonal term
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrid       ! Tridiagonal system terms
-      
-      ! diag errors on heat
-      REAL(wp), POINTER, DIMENSION(:)     :: zdq, zq_ini, zhfx_err
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   ztcond_i    ! Ice thermal conductivity
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zradtr_i    ! Radiation transmitted through the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zradab_i    ! Radiation absorbed in the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zkappa_i    ! Kappa factor in the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   ztib        ! Old temperature in the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zeta_i      ! Eta factor in the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   ztitemp     ! Temporary temperature in the ice to check the convergence
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zspeche_i   ! Ice specific heat
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   z_i         ! Vertical cotes of the layers in the ice
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zradtr_s    ! Radiation transmited through the snow
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zradab_s    ! Radiation absorbed in the snow
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zkappa_s    ! Kappa factor in the snow
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zeta_s      ! Eta factor in the snow
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   ztstemp     ! Temporary temperature in the snow to check the convergence
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   ztsb        ! Temporary temperature in the snow
+      REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   z_s         ! Vertical cotes of the layers in the snow
+      REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zindterm    ! 'Ind'ependent term
+      REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zindtbis    ! Temporary 'ind'ependent term
+      REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zdiagbis    ! Temporary 'dia'gonal term
+      REAL(wp), DIMENSION(jpij,nlay_i+3,3) ::   ztrid       ! Tridiagonal system terms
+      REAL(wp), DIMENSION(jpij)            ::   zdq, zq_ini, zhfx_err ! diag errors on heat
+      REAL(wp), DIMENSION(jpij)            ::   zghe        ! G(he), th. conduct enhancement factor, mono-cat
       
       ! Mono-category
-      REAL(wp)                            :: zepsilon      ! determines thres. above which computation of G(h) is done
-      REAL(wp)                            :: zratio_s      ! dummy factor
-      REAL(wp)                            :: zratio_i      ! dummy factor
-      REAL(wp)                            :: zh_thres      ! thickness thres. for G(h) computation
-      REAL(wp)                            :: zhe           ! dummy factor
-      REAL(wp)                            :: zkimean       ! mean sea ice thermal conductivity
-      REAL(wp)                            :: zfac          ! dummy factor
-      REAL(wp)                            :: zihe          ! dummy factor
-      REAL(wp)                            :: zheshth       ! dummy factor
-      
-      REAL(wp), POINTER, DIMENSION(:)     :: zghe          ! G(he), th. conduct enhancement factor, mono-cat
-      
+      REAL(wp) :: zepsilon      ! determines thres. above which computation of G(h) is done
+      REAL(wp) :: zratio_s      ! dummy factor
+      REAL(wp) :: zratio_i      ! dummy factor
+      REAL(wp) :: zh_thres      ! thickness thres. for G(h) computation
+      REAL(wp) :: zhe           ! dummy factor
+      REAL(wp) :: zkimean       ! mean sea ice thermal conductivity
+      REAL(wp) :: zfac          ! dummy factor
+      REAL(wp) :: zihe          ! dummy factor
+      REAL(wp) :: zheshth       ! dummy factor
       !!------------------------------------------------------------------     
-      ! 
-      CALL wrk_alloc( jpij, numeqmin, numeqmax )
-      CALL wrk_alloc( jpij, isnow, ztsub, ztsubit, zh_i, zh_s, zfsw )
-      CALL wrk_alloc( jpij, zf, dzf, zqns_ice_b, zdti, zdifcase, zftrice, zihic, zghe )
-      CALL wrk_alloc( jpij,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart=0 )
-      CALL wrk_alloc( jpij,nlay_s+1,           zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart=0 )
-      CALL wrk_alloc( jpij,nlay_i+3, zindterm, zindtbis, zdiagbis  )
-      CALL wrk_alloc( jpij,nlay_i+3,3, ztrid )
-
-      CALL wrk_alloc( jpij, zdq, zq_ini, zhfx_err )
 
       ! --- diag error on heat diffusion - PART 1 --- !
@@ -808,13 +794,4 @@
       END DO   
       !
-      CALL wrk_dealloc( jpij, numeqmin, numeqmax )
-      CALL wrk_dealloc( jpij, isnow, ztsub, ztsubit, zh_i, zh_s, zfsw )
-      CALL wrk_dealloc( jpij, zf, dzf, zqns_ice_b, zdti, zdifcase, zftrice, zihic, zghe )
-      CALL wrk_dealloc( jpij,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart = 0 )
-      CALL wrk_dealloc( jpij,nlay_s+1,           zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart = 0 )
-      CALL wrk_dealloc( jpij,nlay_i+3, zindterm, zindtbis, zdiagbis )
-      CALL wrk_dealloc( jpij,nlay_i+3,3, ztrid )
-      CALL wrk_dealloc( jpij, zdq, zq_ini, zhfx_err )
-
    END SUBROUTINE lim_thd_dif
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 8373)
@@ -73,12 +73,8 @@
       INTEGER  :: jk0, jk1   !  old/new layer indices
       !
-      REAL(wp), POINTER, DIMENSION(:,:) :: zeh_cum0, zh_cum0   ! old cumulative enthlapies and layers interfaces
-      REAL(wp), POINTER, DIMENSION(:,:) :: zeh_cum1, zh_cum1   ! new cumulative enthlapies and layers interfaces
-      REAL(wp), POINTER, DIMENSION(:)   :: zhnew               ! new layers thicknesses
+      REAL(wp), DIMENSION(jpij,0:nlay_i+2) :: zeh_cum0, zh_cum0   ! old cumulative enthlapies and layers interfaces
+      REAL(wp), DIMENSION(jpij,0:nlay_i)   :: zeh_cum1, zh_cum1   ! new cumulative enthlapies and layers interfaces
+      REAL(wp), DIMENSION(jpij)            :: zhnew               ! new layers thicknesses
       !!-------------------------------------------------------------------
-
-      CALL wrk_alloc( jpij, nlay_i+3, zeh_cum0, zh_cum0, kjstart = 0 )
-      CALL wrk_alloc( jpij, nlay_i+1, zeh_cum1, zh_cum1, kjstart = 0 )
-      CALL wrk_alloc( jpij, zhnew )
 
       !--------------------------------------------------------------------------
@@ -142,9 +138,4 @@
       END DO
       
-      !
-      CALL wrk_dealloc( jpij, nlay_i+3, zeh_cum0, zh_cum0, kjstart = 0 )
-      CALL wrk_dealloc( jpij, nlay_i+1, zeh_cum1, zh_cum1, kjstart = 0 )
-      CALL wrk_dealloc( jpij, zhnew )
-      !
    END SUBROUTINE lim_thd_ent
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90	(revision 8373)
@@ -83,38 +83,31 @@
       REAL(wp) ::   zv_newfra
   
-      INTEGER , POINTER, DIMENSION(:) ::   jcat        ! indexes of categories where new ice grows
-      REAL(wp), POINTER, DIMENSION(:) ::   zswinew     ! switch for new ice or not
-
-      REAL(wp), POINTER, DIMENSION(:) ::   zv_newice   ! volume of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   za_newice   ! fractional area of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   zh_newice   ! thickness of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   ze_newice   ! heat content of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   zs_newice   ! salinity of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   zo_newice   ! age of accreted ice
-      REAL(wp), POINTER, DIMENSION(:) ::   zdv_res     ! residual volume in case of excessive heat budget
-      REAL(wp), POINTER, DIMENSION(:) ::   zda_res     ! residual area in case of excessive heat budget
-      REAL(wp), POINTER, DIMENSION(:) ::   zat_i_1d    ! total ice fraction    
-      REAL(wp), POINTER, DIMENSION(:) ::   zv_frazb    ! accretion of frazil ice at the ice bottom
-      REAL(wp), POINTER, DIMENSION(:) ::   zvrel_1d    ! relative ice / frazil velocity (1D vector)
-
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zv_b      ! old volume of ice in category jl
-      REAL(wp), POINTER, DIMENSION(:,:) ::   za_b      ! old area of ice in category jl
-      REAL(wp), POINTER, DIMENSION(:,:) ::   za_i_1d   ! 1-D version of a_i
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zv_i_1d   ! 1-D version of v_i
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zsmv_i_1d ! 1-D version of smv_i
-
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ze_i_1d !: 1-D version of e_i
-
-      REAL(wp), POINTER, DIMENSION(:,:) ::   zvrel     ! relative ice / frazil velocity
+      INTEGER , DIMENSION(jpij) ::   jcat        ! indexes of categories where new ice grows
+      REAL(wp), DIMENSION(jpij) ::   zswinew     ! switch for new ice or not
+
+      REAL(wp), DIMENSION(jpij) ::   zv_newice   ! volume of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   za_newice   ! fractional area of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   zh_newice   ! thickness of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   ze_newice   ! heat content of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   zs_newice   ! salinity of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   zo_newice   ! age of accreted ice
+      REAL(wp), DIMENSION(jpij) ::   zdv_res     ! residual volume in case of excessive heat budget
+      REAL(wp), DIMENSION(jpij) ::   zda_res     ! residual area in case of excessive heat budget
+      REAL(wp), DIMENSION(jpij) ::   zat_i_1d    ! total ice fraction    
+      REAL(wp), DIMENSION(jpij) ::   zv_frazb    ! accretion of frazil ice at the ice bottom
+      REAL(wp), DIMENSION(jpij) ::   zvrel_1d    ! relative ice / frazil velocity (1D vector)
+
+      REAL(wp), DIMENSION(jpij,jpl) ::   zv_b      ! old volume of ice in category jl
+      REAL(wp), DIMENSION(jpij,jpl) ::   za_b      ! old area of ice in category jl
+      REAL(wp), DIMENSION(jpij,jpl) ::   za_i_1d   ! 1-D version of a_i
+      REAL(wp), DIMENSION(jpij,jpl) ::   zv_i_1d   ! 1-D version of v_i
+      REAL(wp), DIMENSION(jpij,jpl) ::   zsmv_i_1d ! 1-D version of smv_i
+
+      REAL(wp), DIMENSION(jpij,nlay_i,jpl) ::   ze_i_1d !: 1-D version of e_i
+
+      REAL(wp), DIMENSION(jpi,jpj) ::   zvrel     ! relative ice / frazil velocity
 
       REAL(wp) :: zcai = 1.4e-3_wp                     ! ice-air drag (clem: should be dependent on coupling/forcing used)
       !!-----------------------------------------------------------------------!
-
-      CALL wrk_alloc( jpij, jcat )   ! integer
-      CALL wrk_alloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice )
-      CALL wrk_alloc( jpij, zdv_res, zda_res, zat_i_1d, zv_frazb, zvrel_1d )
-      CALL wrk_alloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, zsmv_i_1d )
-      CALL wrk_alloc( jpij,nlay_i,jpl, ze_i_1d )
-      CALL wrk_alloc( jpi,jpj, zvrel )
 
       CALL lim_var_agg(1)
@@ -211,6 +204,5 @@
          END DO 
          ! 
-         CALL lbc_lnk( zvrel, 'T', 1. )
-         CALL lbc_lnk( hicol, 'T', 1. )
+         CALL lbc_lnk_multi( zvrel, 'T', 1., hicol, 'T', 1.  )
 
       ENDIF ! End of computation of frazil ice collection thickness
@@ -234,18 +226,4 @@
       END DO
 
-      ! debug point to follow
-      jiindex_1d = 0
-      IF( ln_limctl ) THEN
-         DO ji = mi0(iiceprt), mi1(iiceprt)
-            DO jj = mj0(jiceprt), mj1(jiceprt)
-               IF ( qlead(ji,jj)  <  0._wp ) THEN
-                  jiindex_1d = (jj - 1) * jpi + ji
-               ENDIF
-            END DO
-         END DO
-      ENDIF
-   
-      IF( ln_limctl ) WRITE(numout,*) 'lim_thd_lac : nidx = ', nidx
-
       !------------------------------
       ! Move from 2-D to 1-D vectors
@@ -497,11 +475,4 @@
       ENDIF ! nidx > 0
       !
-      CALL wrk_dealloc( jpij, jcat )   ! integer
-      CALL wrk_dealloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice )
-      CALL wrk_dealloc( jpij, zdv_res, zda_res, zat_i_1d, zv_frazb, zvrel_1d )
-      CALL wrk_dealloc( jpij,jpl, zv_b, za_b, za_i_1d, zv_i_1d, zsmv_i_1d )
-      CALL wrk_dealloc( jpij,nlay_i,jpl, ze_i_1d )
-      CALL wrk_dealloc( jpi,jpj, zvrel )
-      !
    END SUBROUTINE lim_thd_lac
 
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 8373)
@@ -71,6 +71,6 @@
       REAL(wp) ::    zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b
       REAL(wp) ::    zdv, zda
-      REAL(wp), POINTER, DIMENSION(:,:)      ::   zatold, zeiold, zesold, zsmvold 
-      REAL(wp), POINTER, DIMENSION(:,:,:)    ::   zhimax, zviold, zvsold
+      REAL(wp), DIMENSION(jpi,jpj)           ::   zatold, zeiold, zesold, zsmvold 
+      REAL(wp), DIMENSION(jpi,jpj,jpl)       ::   zhimax, zviold, zvsold
       ! --- ultimate macho only --- !
       REAL(wp)                               ::   zdt
@@ -88,7 +88,4 @@
       !!---------------------------------------------------------------------
       IF( nn_timing == 1 )  CALL timing_start('limtrp')
-
-      CALL wrk_alloc( jpi,jpj,                            zatold, zeiold, zesold, zsmvold )
-      CALL wrk_alloc( jpi,jpj,jpl,                        zhimax, zviold, zvsold )
  
       IF( kt == nit000 .AND. lwp ) THEN
@@ -134,6 +131,6 @@
             END DO
          END DO
-         CALL lbc_lnk(zhimax(:,:,jl),'T',1.)
       END DO
+      CALL lbc_lnk( zhimax(:,:,:), 'T', 1. )
          
       ! --- If ice drift field is too fast, use an appropriate time step for advection --- !        
@@ -523,7 +520,4 @@
       IF( ln_limctl )   CALL lim_prt( kt, iiceprt, jiceprt,-1, ' - ice dyn & trp - ' )
       !
-      CALL wrk_dealloc( jpi,jpj,                            zatold, zeiold, zesold, zsmvold )
-      CALL wrk_dealloc( jpi,jpj,jpl,                        zhimax, zviold, zvsold )
-      !
       IF( nn_timing == 1 )  CALL timing_stop('limtrp')
       !
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90	(revision 8373)
@@ -141,6 +141,5 @@
       END DO
       !lateral boundary conditions
-      CALL lbc_lnk( u_ice(:,:), 'U', -1. )
-      CALL lbc_lnk( v_ice(:,:), 'V', -1. )
+      CALL lbc_lnk_multi( u_ice(:,:), 'U', -1., v_ice(:,:), 'V', -1. )
       !mask velocities
       u_ice(:,:) = u_ice(:,:) * umask(:,:,1)
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90	(revision 8373)
@@ -302,10 +302,8 @@
       REAL(wp) ::   zfac0, zfac1, zsal
       REAL(wp) ::   zswi0, zswi01, zargtemp , zs_zero   
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   z_slope_s, zalpha
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_slope_s, zalpha
       REAL(wp), PARAMETER :: zsi0 = 3.5_wp
       REAL(wp), PARAMETER :: zsi1 = 4.5_wp
       !!------------------------------------------------------------------
-
-      CALL wrk_alloc( jpi, jpj, jpl, z_slope_s, zalpha )
 
       !---------------------------------------
@@ -391,6 +389,4 @@
       ENDIF ! nn_icesal
       !
-      CALL wrk_dealloc( jpi, jpj, jpl, z_slope_s, zalpha )
-      !
    END SUBROUTINE lim_var_salprof
 
@@ -444,10 +440,8 @@
       REAL(wp) ::   zalpha, zswi0, zswi01, zs_zero              !   -      -
       !
-      REAL(wp), POINTER, DIMENSION(:) ::   z_slope_s
+      REAL(wp), DIMENSION(jpij) ::   z_slope_s
       REAL(wp), PARAMETER :: zsi0 = 3.5_wp
       REAL(wp), PARAMETER :: zsi1 = 4.5_wp
       !!---------------------------------------------------------------------
-
-      CALL wrk_alloc( jpij, z_slope_s )
 
       !---------------------------------------
@@ -511,6 +505,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( jpij, z_slope_s )
-      !
    END SUBROUTINE lim_var_salprof1d
 
@@ -652,7 +644,6 @@
       REAL(wp), DIMENSION(:),   INTENT(in)    ::   zhti, zhts, zai    ! input ice/snow variables
       REAL(wp), DIMENSION(:,:), INTENT(inout) ::   zht_i, zht_s, za_i ! output ice/snow variables
-      INTEGER , POINTER, DIMENSION(:)         ::   itest
+      INTEGER , DIMENSION(4)                  ::   itest
  
-      CALL wrk_alloc( 4, itest )
       !--------------------------------------------------------------------
       ! initialisation of variables
@@ -777,6 +768,4 @@
          ENDDO
       ENDDO
-
-      CALL wrk_dealloc( 4, itest )
       !
     END SUBROUTINE lim_var_itd
Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 8372)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 8373)
@@ -55,9 +55,9 @@
       REAL(wp) ::  z2da, z2db, ztmp, zrho1, zrho2, zmiss_val
       REAL(wp) ::  zs12, zshear
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zswi2, zmiss2
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  z2d, zswi, zmiss !  2D workspace
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  zfb              ! ice freeboard
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  zamask, zamask15 ! 15% concentration mask
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  zsig1, zsig2, zsig3
+      REAL(wp), DIMENSION(jpi,jpj,jpl) ::  zswi2, zmiss2
+      REAL(wp), DIMENSION(jpi,jpj)   ::  z2d, zswi, zmiss !  2D workspace
+      REAL(wp), DIMENSION(jpi,jpj)   ::  zfb              ! ice freeboard
+      REAL(wp), DIMENSION(jpi,jpj)   ::  zamask, zamask15 ! 15% concentration mask
+      REAL(wp), DIMENSION(jpi,jpj)   ::  zsig1, zsig2, zsig3
 
       ! Global ice diagnostics (SIMIP)
@@ -72,9 +72,4 @@
 
       IF( nn_timing == 1 )  CALL timing_start('limwri')
-
-      CALL wrk_alloc( jpi,jpj, jpl, zswi2, zmiss2 )
-      CALL wrk_alloc( jpi,jpj     , z2d, zswi, zmiss )
-      CALL wrk_alloc( jpi,jpj     , zfb, zamask, zamask15 )
-      CALL wrk_alloc( jpi,jpj     , zsig1, zsig2, zsig3 )
 
       !----------------------------------------
@@ -428,9 +423,4 @@
       !     not yet implemented
       
-      CALL wrk_dealloc( jpi, jpj, jpl, zswi2, zmiss2 )
-      CALL wrk_dealloc( jpi, jpj     , z2d, zswi, zmiss )
-      CALL wrk_dealloc( jpi, jpj     , zfb, zamask, zamask15 )
-      CALL wrk_dealloc( jpi, jpj     , zsig1, zsig2, zsig3 )
-
       IF( nn_timing == 1 )  CALL timing_stop('limwri')
       
