Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 3350)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90	(revision 3351)
@@ -102,44 +102,7 @@
       INTEGER ::   nconv       ! number of iterations in iterative procedure
       INTEGER ::   minnumeqmin, maxnumeqmax
-
-      INTEGER , POINTER, DIMENSION(:) ::   numeqmin   ! reference number of top equation
-      INTEGER , POINTER, DIMENSION(:) ::   numeqmax   ! reference number of bottom equation
-      INTEGER , POINTER, DIMENSION(:) ::   isnow      ! switch for presence (1) or absence (0) of snow
-
-      !! * New local variables       
-      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(:,:) ::   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(:,:) ::   ztiold      !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(:,:) ::   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(:,:) ::   ztsold      !Temporary temperature in the snow
-      REAL(wp), POINTER, DIMENSION(:,:) ::   z_s         !Vertical cotes of the layers in the snow
-
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zindterm    ! Independent term
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zindtbis    ! temporary independent term
-      REAL(wp), POINTER, DIMENSION(:,:)   ::   zdiagbis
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrid       ! tridiagonal system terms
-
-      REAL(wp), POINTER, DIMENSION(:) ::   ztfs        ! ice melting point
-      REAL(wp), POINTER, DIMENSION(:) ::   ztsuold     ! old surface temperature (before the iterative procedure )
-      REAL(wp), POINTER, DIMENSION(:) ::   ztsuoldit   ! 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(:) ::   zf          ! surface flux function
-      REAL(wp), POINTER, DIMENSION(:) ::   dzf         ! derivative of the surface flux function
-
+      INTEGER, DIMENSION(kiut) ::   numeqmin   ! reference number of top equation
+      INTEGER, DIMENSION(kiut) ::   numeqmax   ! reference number of bottom equation
+      INTEGER, DIMENSION(kiut) ::   isnow      ! switch for presence (1) or absence (0) of snow
       REAL(wp) ::   zeps      =  1.e-10_wp    !
       REAL(wp) ::   zg1s      =  2._wp        ! for the tridiagonal system
@@ -150,21 +113,41 @@
       REAL(wp) ::   zkimin    =  0.10_wp      ! minimum ice thermal conductivity
       REAL(wp) ::   zht_smin  =  1.e-4_wp     ! minimum snow depth
-
       REAL(wp) ::   ztmelt_i    ! ice melting temperature
       REAL(wp) ::   zerritmax   ! current maximal error on temperature 
-      REAL(wp), POINTER, DIMENSION(:) ::   zerrit       ! 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, zhsu
+      REAL(wp), DIMENSION(kiut) ::   ztfs        ! ice melting point
+      REAL(wp), DIMENSION(kiut) ::   ztsuold     ! old surface temperature (before the iterative procedure )
+      REAL(wp), DIMENSION(kiut) ::   ztsuoldit   ! surface temperature at previous iteration
+      REAL(wp), DIMENSION(kiut) ::   zh_i        ! ice layer thickness
+      REAL(wp), DIMENSION(kiut) ::   zh_s        ! snow layer thickness
+      REAL(wp), DIMENSION(kiut) ::   zfsw        ! solar radiation absorbed at the surface
+      REAL(wp), DIMENSION(kiut) ::   zf          ! surface flux function
+      REAL(wp), DIMENSION(kiut) ::   dzf         ! derivative of the surface flux function
+      REAL(wp), DIMENSION(kiut) ::   zerrit      ! current error on temperature
+      REAL(wp), DIMENSION(kiut) ::   zdifcase    ! case of the equation resolution (1->4)
+      REAL(wp), DIMENSION(kiut) ::   zftrice     ! solar radiation transmitted through the ice
+      REAL(wp), DIMENSION(kiut) ::   zihic, zhsu
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztcond_i    ! Ice thermal conductivity
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zradtr_i    ! Radiation transmitted through the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zradab_i    ! Radiation absorbed in the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zkappa_i    ! Kappa factor in the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztiold      ! Old temperature in the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zeta_i      ! Eta factor in the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   ztitemp     ! Temporary temperature in the ice to check the convergence
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   zspeche_i   ! Ice specific heat
+      REAL(wp), DIMENSION(kiut,0:nlay_i) ::   z_i         ! Vertical cotes of the layers in the ice
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zradtr_s    ! Radiation transmited through the snow
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zradab_s    ! Radiation absorbed in the snow
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zkappa_s    ! Kappa factor in the snow
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   zeta_s       ! Eta factor in the snow
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   ztstemp      ! Temporary temperature in the snow to check the convergence
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   ztsold       ! Temporary temperature in the snow
+      REAL(wp), DIMENSION(kiut,0:nlay_s) ::   z_s          ! Vertical cotes of the layers in the snow
+      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zindterm   ! Independent term
+      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zindtbis   ! temporary independent term
+      REAL(wp), DIMENSION(kiut,jkmax+2) ::   zdiagbis
+      REAL(wp), DIMENSION(kiut,jkmax+2,3) ::   ztrid   ! tridiagonal system terms
       !!------------------------------------------------------------------
-      !
-      CALL wrk_alloc( kiut, numeqmin, numeqmax, isnow )   ! integer
-      CALL wrk_alloc( kiut,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztiold, zeta_i, ztitemp, zspeche_i, z_i, kjstart=0 )
-      CALL wrk_alloc( kiut,nlay_s+1, zradtr_s, zradab_s, zkappa_s, zeta_s, ztstemp, ztsold, z_s, kjstart=0 )
-      CALL wrk_alloc( kiut,jkmax+2, zindterm, zindtbis, zdiagbis )
-      CALL wrk_alloc( kiut,jkmax+2,3, ztrid )
-      CALL wrk_alloc( kiut, ztfs, ztsuold, ztsuoldit, zh_i, zh_s, zfsw, zf, dzf )
-      CALL wrk_alloc( kiut, zerrit, zdifcase, zftrice, zihic, zhsu )
-
+      
+      ! 
       !------------------------------------------------------------------------------!
       ! 1) Initialization                                                            !
@@ -772,12 +755,4 @@
       ENDIF
       !
-      CALL wrk_dealloc( kiut, numeqmin, numeqmax, isnow )   ! integer
-      CALL wrk_dealloc( kiut,nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztiold, zeta_i, ztitemp, zspeche_i, z_i, kjstart=0 )
-      CALL wrk_dealloc( kiut,nlay_s+1, zradtr_s, zradab_s, zkappa_s, zeta_s, ztstemp, ztsold, z_s, kjstart=0 )
-      CALL wrk_dealloc( kiut,jkmax+2, zindterm, zindtbis, zdiagbis )
-      CALL wrk_dealloc( kiut,jkmax+2,3, ztrid )
-      CALL wrk_dealloc( kiut, ztfs, ztsuold, ztsuoldit, zh_i, zh_s, zfsw, zf, dzf )
-      CALL wrk_dealloc( kiut, zerrit, zdifcase, zftrice, zihic, zhsu )
-
    END SUBROUTINE lim_thd_dif
 
