Index: branches/2017/dev_r7881_no_wrk_alloc/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90
===================================================================
--- branches/2017/dev_r7881_no_wrk_alloc/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 7909)
+++ branches/2017/dev_r7881_no_wrk_alloc/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 7910)
@@ -21,5 +21,4 @@
    USE in_out_manager
    USE lib_mpp          ! MPP library
-   USE wrk_nemo         ! work arrays
    USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
     
@@ -73,29 +72,29 @@
       !!
       INTEGER ::   ji       ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:) ::   zqcmlts        ! energy due to surface melting
-      REAL(wp), POINTER, DIMENSION(:) ::   zqcmltb        ! energy due to bottom melting
-      REAL(wp), POINTER, DIMENSION(:) ::   ztsmlt         ! snow/ice surface melting temperature
-      REAL(wp), POINTER, DIMENSION(:) ::   ztbif          ! int. temp. at the mid-point of the 1st layer of the snow/ice sys. 
-      REAL(wp), POINTER, DIMENSION(:) ::   zksn           ! effective conductivity of snow
-      REAL(wp), POINTER, DIMENSION(:) ::   zkic           ! effective conductivity of ice
-      REAL(wp), POINTER, DIMENSION(:) ::   zksndh         ! thermal cond. at the mid-point of the 1st layer of the snow/ice sys. 
-      REAL(wp), POINTER, DIMENSION(:) ::   zfcsu          ! conductive heat flux at the surface of the snow/ice system 
-      REAL(wp), POINTER, DIMENSION(:) ::   zfcsudt        ! = zfcsu * dt
-      REAL(wp), POINTER, DIMENSION(:) ::   zi0            ! frac. of the net SW rad. which is not absorbed at the surface
-      REAL(wp), POINTER, DIMENSION(:) ::   z1mi0          ! fraction of the net SW radiation absorbed at the surface
-      REAL(wp), POINTER, DIMENSION(:) ::   zqmax          ! maximum energy stored in brine pockets
-      REAL(wp), POINTER, DIMENSION(:) ::   zrcpdt         ! h_su*rho_su*cp_su/dt(h_su being the thick. of surf. layer)
-      REAL(wp), POINTER, DIMENSION(:) ::   zts_old        ! previous surface temperature
-      REAL(wp), POINTER, DIMENSION(:) ::   zidsn , z1midsn , zidsnic ! temporary variables
-      REAL(wp), POINTER, DIMENSION(:) ::   zfnet          ! net heat flux at the top surface( incl. conductive heat flux)
-      REAL(wp), POINTER, DIMENSION(:) ::   zsprecip       ! snow accumulation
-      REAL(wp), POINTER, DIMENSION(:) ::   zhsnw_old      ! previous snow thickness
-      REAL(wp), POINTER, DIMENSION(:) ::   zdhictop       ! change in ice thickness due to top surf ablation/accretion
-      REAL(wp), POINTER, DIMENSION(:) ::   zdhicbot       ! change in ice thickness due to bottom surf abl/acc
-      REAL(wp), POINTER, DIMENSION(:) ::   zqsup          ! energy transmitted to ocean (coming from top surf abl/acc)
-      REAL(wp), POINTER, DIMENSION(:) ::   zqocea         ! energy transmitted to ocean (coming from bottom sur abl/acc)
-      REAL(wp), POINTER, DIMENSION(:) ::   zfrl_old       ! previous sea/ice fraction
-      REAL(wp), POINTER, DIMENSION(:) ::   zfrld_1d       ! new sea/ice fraction
-      REAL(wp), POINTER, DIMENSION(:) ::   zep            ! internal temperature of the 2nd layer of the snow/ice system
+      REAL(wp), DIMENSION(jpij) ::   zqcmlts        ! energy due to surface melting
+      REAL(wp), DIMENSION(jpij) ::   zqcmltb        ! energy due to bottom melting
+      REAL(wp), DIMENSION(jpij) ::   ztsmlt         ! snow/ice surface melting temperature
+      REAL(wp), DIMENSION(jpij) ::   ztbif          ! int. temp. at the mid-point of the 1st layer of the snow/ice sys. 
+      REAL(wp), DIMENSION(jpij) ::   zksn           ! effective conductivity of snow
+      REAL(wp), DIMENSION(jpij) ::   zkic           ! effective conductivity of ice
+      REAL(wp), DIMENSION(jpij) ::   zksndh         ! thermal cond. at the mid-point of the 1st layer of the snow/ice sys. 
+      REAL(wp), DIMENSION(jpij) ::   zfcsu          ! conductive heat flux at the surface of the snow/ice system 
+      REAL(wp), DIMENSION(jpij) ::   zfcsudt        ! = zfcsu * dt
+      REAL(wp), DIMENSION(jpij) ::   zi0            ! frac. of the net SW rad. which is not absorbed at the surface
+      REAL(wp), DIMENSION(jpij) ::   z1mi0          ! fraction of the net SW radiation absorbed at the surface
+      REAL(wp), DIMENSION(jpij) ::   zqmax          ! maximum energy stored in brine pockets
+      REAL(wp), DIMENSION(jpij) ::   zrcpdt         ! h_su*rho_su*cp_su/dt(h_su being the thick. of surf. layer)
+      REAL(wp), DIMENSION(jpij) ::   zts_old        ! previous surface temperature
+      REAL(wp), DIMENSION(jpij) ::   zidsn , z1midsn , zidsnic ! temporary variables
+      REAL(wp), DIMENSION(jpij) ::   zfnet          ! net heat flux at the top surface( incl. conductive heat flux)
+      REAL(wp), DIMENSION(jpij) ::   zsprecip       ! snow accumulation
+      REAL(wp), DIMENSION(jpij) ::   zhsnw_old      ! previous snow thickness
+      REAL(wp), DIMENSION(jpij) ::   zdhictop       ! change in ice thickness due to top surf ablation/accretion
+      REAL(wp), DIMENSION(jpij) ::   zdhicbot       ! change in ice thickness due to bottom surf abl/acc
+      REAL(wp), DIMENSION(jpij) ::   zqsup          ! energy transmitted to ocean (coming from top surf abl/acc)
+      REAL(wp), DIMENSION(jpij) ::   zqocea         ! energy transmitted to ocean (coming from bottom sur abl/acc)
+      REAL(wp), DIMENSION(jpij) ::   zfrl_old       ! previous sea/ice fraction
+      REAL(wp), DIMENSION(jpij) ::   zfrld_1d       ! new sea/ice fraction
+      REAL(wp), DIMENSION(jpij) ::   zep            ! internal temperature of the 2nd layer of the snow/ice system
       REAL(wp), DIMENSION(3) :: & 
             zplediag  &    ! principle diagonal, subdiag. and supdiag. of the 
@@ -164,7 +163,4 @@
           , zibmlt, ziqr, zihgnew, zind, ztmp        ! temporary scalars
        !!----------------------------------------------------------------------
-       CALL wrk_alloc( jpij, ztsmlt, ztbif  , zksn    , zkic    , zksndh , zfcsu  , zfcsudt , zi0      , z1mi0   , zqmax    )
-       CALL wrk_alloc( jpij, zrcpdt, zts_old, zidsn   , z1midsn , zidsnic, zfnet  , zsprecip, zhsnw_old, zdhictop, zdhicbot )
-       CALL wrk_alloc( jpij, zqsup , zqocea , zfrl_old, zfrld_1d, zep    , zqcmlts, zqcmltb                                 )
 
        !-----------------------------------------------------------------------
@@ -809,7 +805,4 @@
        END DO
        ! 
-       CALL wrk_dealloc( jpij, ztsmlt, ztbif  , zksn    , zkic    , zksndh , zfcsu  , zfcsudt , zi0      , z1mi0   , zqmax    )
-       CALL wrk_dealloc( jpij, zrcpdt, zts_old, zidsn   , z1midsn , zidsnic, zfnet  , zsprecip, zhsnw_old, zdhictop, zdhicbot )
-       CALL wrk_dealloc( jpij, zqsup , zqocea , zfrl_old, zfrld_1d, zep    , zqcmlts, zqcmltb                                 )
        !
     END SUBROUTINE lim_thd_zdf_2
