New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
limrhg.F90 in branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 @ 3791

Last change on this file since 3791 was 3791, checked in by gm, 11 years ago

dev_MERGE_2012: #1041 : corrected diagnostic for the ice shear rate

  • Property svn:keywords set to Id
File size: 40.1 KB
Line 
1MODULE limrhg
2   !!======================================================================
3   !!                     ***  MODULE  limrhg  ***
4   !!   Ice rheology : sea ice rheology
5   !!======================================================================
6   !! History :   -   !  2007-03  (M.A. Morales Maqueda, S. Bouillon) Original code
7   !!            3.0  !  2008-03  (M. Vancoppenolle) LIM3
8   !!             -   !  2008-11  (M. Vancoppenolle, S. Bouillon, Y. Aksenov) add surface tilt in ice rheolohy
9   !!            3.3  !  2009-05  (G.Garric) addition of the lim2_evp cas
10   !!            3.4  !  2011-01  (A. Porter)  dynamical allocation
11   !!            3.5  !  2012-08  (R. Benshila)  AGRIF
12   !!----------------------------------------------------------------------
13#if defined key_lim3 || (  defined key_lim2 && ! defined key_lim2_vp )
14   !!----------------------------------------------------------------------
15   !!   'key_lim3'               OR                     LIM-3 sea-ice model
16   !!   'key_lim2' AND NOT 'key_lim2_vp'            EVP LIM-2 sea-ice model
17   !!----------------------------------------------------------------------
18   !!   lim_rhg       : computes ice velocities
19   !!----------------------------------------------------------------------
20   USE phycst         ! Physical constant
21   USE oce     , ONLY :  snwice_mass, snwice_mass_b
22   USE par_oce        ! Ocean parameters
23   USE dom_oce        ! Ocean domain
24   USE sbc_oce        ! Surface boundary condition: ocean fields
25   USE sbc_ice        ! Surface boundary condition: ice fields
26#if defined key_lim3
27   USE ice            ! LIM-3: ice variables
28   USE dom_ice        ! LIM-3: ice domain
29   USE limitd_me      ! LIM-3:
30#else
31   USE ice_2          ! LIM-2: ice variables
32   USE dom_ice_2      ! LIM-2: ice domain
33#endif
34   USE lbclnk         ! Lateral Boundary Condition / MPP link
35   USE lib_mpp        ! MPP library
36   USE wrk_nemo       ! work arrays
37   USE in_out_manager ! I/O manager
38   USE prtctl         ! Print control
39   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
40#if defined key_agrif && defined key_lim2
41   USE agrif_lim2_interp
42#endif
43
44   IMPLICIT NONE
45   PRIVATE
46
47   PUBLIC   lim_rhg        ! routine called by lim_dyn (or lim_dyn_2)
48
49   REAL(wp) ::   rzero   = 0._wp   ! constant values
50   REAL(wp) ::   rone    = 1._wp   ! constant values
51     
52   !! * Substitutions
53#  include "vectopt_loop_substitute.h90"
54   !!----------------------------------------------------------------------
55   !! NEMO/LIM3 3.4 , UCL - NEMO Consortium (2011)
56   !! $Id$
57   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
58   !!----------------------------------------------------------------------
59CONTAINS
60
61   SUBROUTINE lim_rhg( k_j1, k_jpj )
62      !!-------------------------------------------------------------------
63      !!                 ***  SUBROUTINE lim_rhg  ***
64      !!                          EVP-C-grid
65      !!
66      !! ** purpose : determines sea ice drift from wind stress, ice-ocean
67      !!  stress and sea-surface slope. Ice-ice interaction is described by
68      !!  a non-linear elasto-viscous-plastic (EVP) law including shear
69      !!  strength and a bulk rheology (Hunke and Dukowicz, 2002).   
70      !!
71      !!  The points in the C-grid look like this, dear reader
72      !!
73      !!                              (ji,jj)
74      !!                                 |
75      !!                                 |
76      !!                      (ji-1,jj)  |  (ji,jj)
77      !!                             ---------   
78      !!                            |         |
79      !!                            | (ji,jj) |------(ji,jj)
80      !!                            |         |
81      !!                             ---------   
82      !!                     (ji-1,jj-1)     (ji,jj-1)
83      !!
84      !! ** Inputs  : - wind forcing (stress), oceanic currents
85      !!                ice total volume (vt_i) per unit area
86      !!                snow total volume (vt_s) per unit area
87      !!
88      !! ** Action  : - compute u_ice, v_ice : the components of the
89      !!                sea-ice velocity vector
90      !!              - compute delta_i, shear_i, divu_i, which are inputs
91      !!                of the ice thickness distribution
92      !!
93      !! ** Steps   : 1) Compute ice snow mass, ice strength
94      !!              2) Compute wind, oceanic stresses, mass terms and
95      !!                 coriolis terms of the momentum equation
96      !!              3) Solve the momentum equation (iterative procedure)
97      !!              4) Prevent high velocities if the ice is thin
98      !!              5) Recompute invariants of the strain rate tensor
99      !!                 which are inputs of the ITD, store stress
100      !!                 for the next time step
101      !!              6) Control prints of residual (convergence)
102      !!                 and charge ellipse.
103      !!                 The user should make sure that the parameters
104      !!                 nevp, telast and creepl maintain stress state
105      !!                 on the charge ellipse for plastic flow
106      !!                 e.g. in the Canadian Archipelago
107      !!
108      !! References : Hunke and Dukowicz, JPO97
109      !!              Bouillon et al., Ocean Modelling 2009
110      !!              Vancoppenolle et al., Ocean Modelling 2008
111      !!-------------------------------------------------------------------
112      INTEGER, INTENT(in) ::   k_j1    ! southern j-index for ice computation
113      INTEGER, INTENT(in) ::   k_jpj   ! northern j-index for ice computation
114      !!
115      INTEGER ::   ji, jj   ! dummy loop indices
116      INTEGER ::   jter     ! local integers
117      CHARACTER (len=50) ::   charout
118      REAL(wp) ::   zt11, zt12, zt21, zt22, ztagnx, ztagny, delta                         !
119      REAL(wp) ::   za, zstms, zsang, zmask   ! local scalars
120
121      REAL(wp) ::   dtevp              ! time step for subcycling
122      REAL(wp) ::   dtotel, ecc2       ! square of yield ellipse eccenticity
123      REAL(wp) ::   z0, zr, zcca, zccb ! temporary scalars
124      REAL(wp) ::   zu_ice2, zv_ice1   !
125      REAL(wp) ::   zddc, zdtc, zzdst   ! delta on corners and on centre
126      REAL(wp) ::   zdsshx, zdsshy     ! term for the gradient of ocean surface
127      REAL(wp) ::   sigma1, sigma2     ! internal ice stress
128
129      REAL(wp) ::   zresm         ! Maximal error on ice velocity
130      REAL(wp) ::   zindb         ! ice (1) or not (0)     
131      REAL(wp) ::   zdummy        ! dummy argument
132      REAL(wp) ::   zintb, zintn  ! dummy argument
133
134      REAL(wp), POINTER, DIMENSION(:,:) ::   zpresh           ! temporary array for ice strength
135      REAL(wp), POINTER, DIMENSION(:,:) ::   zpreshc          ! Ice strength on grid cell corners (zpreshc)
136      REAL(wp), POINTER, DIMENSION(:,:) ::   zfrld1, zfrld2   ! lead fraction on U/V points
137      REAL(wp), POINTER, DIMENSION(:,:) ::   zmass1, zmass2   ! ice/snow mass on U/V points
138      REAL(wp), POINTER, DIMENSION(:,:) ::   zcorl1, zcorl2   ! coriolis parameter on U/V points
139      REAL(wp), POINTER, DIMENSION(:,:) ::   za1ct , za2ct    ! temporary arrays
140      REAL(wp), POINTER, DIMENSION(:,:) ::   zc1              ! ice mass
141      REAL(wp), POINTER, DIMENSION(:,:) ::   zusw             ! temporary weight for ice strength computation
142      REAL(wp), POINTER, DIMENSION(:,:) ::   u_oce1, v_oce1   ! ocean u/v component on U points                           
143      REAL(wp), POINTER, DIMENSION(:,:) ::   u_oce2, v_oce2   ! ocean u/v component on V points
144      REAL(wp), POINTER, DIMENSION(:,:) ::   u_ice2, v_ice1   ! ice u/v component on V/U point
145      REAL(wp), POINTER, DIMENSION(:,:) ::   zf1   , zf2      ! arrays for internal stresses
146     
147      REAL(wp), POINTER, DIMENSION(:,:) ::   zdd   , zdt      ! Divergence and tension at centre of grid cells
148      REAL(wp), POINTER, DIMENSION(:,:) ::   zds              ! Shear on northeast corner of grid cells
149      REAL(wp), POINTER, DIMENSION(:,:) ::   zdst             ! Shear on centre of grid cells
150      REAL(wp), POINTER, DIMENSION(:,:) ::   deltat, deltac   ! Delta at centre and corners of grid cells
151      REAL(wp), POINTER, DIMENSION(:,:) ::   zs1   , zs2      ! Diagonal stress tensor components zs1 and zs2
152      REAL(wp), POINTER, DIMENSION(:,:) ::   zs12             ! Non-diagonal stress tensor component zs12
153      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr   ! Local error on velocity
154      REAL(wp), POINTER, DIMENSION(:,:) ::   zpice            ! array used for the calculation of ice surface slope:
155                                                              !   ocean surface (ssh_m) if ice is not embedded
156                                                              !   ice top surface if ice is embedded   
157      !!-------------------------------------------------------------------
158
159      CALL wrk_alloc( jpi,jpj, zpresh, zfrld1, zmass1, zcorl1, za1ct , zpreshc, zfrld2, zmass2, zcorl2, za2ct )
160      CALL wrk_alloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                )
161      CALL wrk_alloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  )
162      CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 )
163
164#if  defined key_lim2 && ! defined key_lim2_vp
165# if defined key_agrif
166     USE ice_2, vt_s => hsnm
167     USE ice_2, vt_i => hicm
168# else
169     vt_s => hsnm
170     vt_i => hicm
171# endif
172     at_i(:,:) = 1. - frld(:,:)
173#endif
174#if defined key_agrif && defined key_lim2 
175    CALL agrif_rhg_lim2_load      ! First interpolation of coarse values
176#endif
177      !
178      !------------------------------------------------------------------------------!
179      ! 1) Ice-Snow mass (zc1), ice strength (zpresh)                                !
180      !------------------------------------------------------------------------------!
181      !
182      ! Put every vector to 0
183      zpresh (:,:) = 0._wp   ;   zc1   (:,:) = 0._wp
184      zpreshc(:,:) = 0._wp
185      u_ice2 (:,:) = 0._wp   ;   v_ice1(:,:) = 0._wp
186      zdd    (:,:) = 0._wp   ;   zdt   (:,:) = 0._wp   ;   zds(:,:) = 0._wp
187
188#if defined key_lim3
189      CALL lim_itd_me_icestrength( ridge_scheme_swi )      ! LIM-3: Ice strength on T-points
190#endif
191
192!CDIR NOVERRCHK
193      DO jj = k_j1 , k_jpj       ! Ice mass and temp variables
194!CDIR NOVERRCHK
195         DO ji = 1 , jpi
196            zc1(ji,jj)    = tms(ji,jj) * ( rhosn * vt_s(ji,jj) + rhoic * vt_i(ji,jj) )
197#if defined key_lim3
198            zpresh(ji,jj) = tms(ji,jj) *  strength(ji,jj) * 0.5_wp
199#endif
200#if defined key_lim2
201            zpresh(ji,jj) = tms(ji,jj) *  pstar * vt_i(ji,jj) * EXP( -c_rhg * (1. - at_i(ji,jj) ) )
202#endif
203            ! tmi = 1 where there is ice or on land
204            tmi(ji,jj)    = 1._wp - ( 1._wp - MAX( 0._wp , SIGN ( 1._wp , vt_i(ji,jj) - epsd ) ) ) * tms(ji,jj)
205         END DO
206      END DO
207
208      ! Ice strength on grid cell corners (zpreshc)
209      ! needed for calculation of shear stress
210!CDIR NOVERRCHK
211      DO jj = k_j1+1, k_jpj-1
212!CDIR NOVERRCHK
213         DO ji = 2, jpim1 !RB caution no fs_ (ji+1,jj+1)
214            zstms          =  tms(ji+1,jj+1) * wght(ji+1,jj+1,2,2) + &
215               &              tms(ji,jj+1)   * wght(ji+1,jj+1,1,2) + &
216               &              tms(ji+1,jj)   * wght(ji+1,jj+1,2,1) + &
217               &              tms(ji,jj)     * wght(ji+1,jj+1,1,1)
218            zusw(ji,jj)    = 1.0 / MAX( zstms, epsd )
219            zpreshc(ji,jj) = (  zpresh(ji+1,jj+1) * wght(ji+1,jj+1,2,2) + &
220               &                zpresh(ji,jj+1)   * wght(ji+1,jj+1,1,2) + &
221               &                zpresh(ji+1,jj)   * wght(ji+1,jj+1,2,1) + & 
222               &                zpresh(ji,jj)     * wght(ji+1,jj+1,1,1)   &
223               &             ) * zusw(ji,jj)
224         END DO
225      END DO
226
227      CALL lbc_lnk( zpreshc(:,:), 'F', 1. )
228      !
229      !------------------------------------------------------------------------------!
230      ! 2) Wind / ocean stress, mass terms, coriolis terms
231      !------------------------------------------------------------------------------!
232      !
233      !  Wind stress, coriolis and mass terms on the sides of the squares       
234      !  zfrld1: lead fraction on U-points                                     
235      !  zfrld2: lead fraction on V-points                                     
236      !  zmass1: ice/snow mass on U-points                                   
237      !  zmass2: ice/snow mass on V-points                                   
238      !  zcorl1: Coriolis parameter on U-points                             
239      !  zcorl2: Coriolis parameter on V-points                           
240      !  (ztagnx,ztagny): wind stress on U/V points                       
241      !  u_oce1: ocean u component on u points                           
242      !  v_oce1: ocean v component on u points                         
243      !  u_oce2: ocean u component on v points                         
244      !  v_oce2: ocean v component on v points                       
245
246      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: compute representative ice top surface ==!
247          !                                           
248          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1}
249          !                                               = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1}
250         zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp     
251          !
252          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1}
253          !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1})
254         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp
255          !
256         zpice(:,:) = ssh_m(:,:) + (  zintn * snwice_mass(:,:) +  zintb * snwice_mass_b(:,:)  ) * r1_rau0
257          !
258      ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==!
259         zpice(:,:) = ssh_m(:,:)
260      ENDIF
261
262      DO jj = k_j1+1, k_jpj-1
263         DO ji = fs_2, fs_jpim1
264
265            zt11 = tms(ji  ,jj) * e1t(ji  ,jj)
266            zt12 = tms(ji+1,jj) * e1t(ji+1,jj)
267            zt21 = tms(ji,jj  ) * e2t(ji,jj  )
268            zt22 = tms(ji,jj+1) * e2t(ji,jj+1)
269
270            ! Leads area.
271            zfrld1(ji,jj) = ( zt12 * ( 1.0 - at_i(ji,jj) ) + zt11 * ( 1.0 - at_i(ji+1,jj) ) ) / ( zt11 + zt12 + epsd )
272            zfrld2(ji,jj) = ( zt22 * ( 1.0 - at_i(ji,jj) ) + zt21 * ( 1.0 - at_i(ji,jj+1) ) ) / ( zt21 + zt22 + epsd )
273
274            ! Mass, coriolis coeff. and currents
275            zmass1(ji,jj) = ( zt12*zc1(ji,jj) + zt11*zc1(ji+1,jj) ) / (zt11+zt12+epsd)
276            zmass2(ji,jj) = ( zt22*zc1(ji,jj) + zt21*zc1(ji,jj+1) ) / (zt21+zt22+epsd)
277            zcorl1(ji,jj) = zmass1(ji,jj) * ( e1t(ji+1,jj)*fcor(ji,jj) + e1t(ji,jj)*fcor(ji+1,jj) )   &
278               &                          / ( e1t(ji,jj) + e1t(ji+1,jj) + epsd )
279            zcorl2(ji,jj) = zmass2(ji,jj) * ( e2t(ji,jj+1)*fcor(ji,jj) + e2t(ji,jj)*fcor(ji,jj+1) )   &
280               &                          / ( e2t(ji,jj+1) + e2t(ji,jj) + epsd )
281            !
282            u_oce1(ji,jj)  = u_oce(ji,jj)
283            v_oce2(ji,jj)  = v_oce(ji,jj)
284
285            ! Ocean has no slip boundary condition
286            v_oce1(ji,jj)  = 0.5*( (v_oce(ji,jj)+v_oce(ji,jj-1))*e1t(ji,jj)    &
287               &                 +(v_oce(ji+1,jj)+v_oce(ji+1,jj-1))*e1t(ji+1,jj)) &
288               &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj) 
289
290            u_oce2(ji,jj)  = 0.5*((u_oce(ji,jj)+u_oce(ji-1,jj))*e2t(ji,jj)     &
291               &                 +(u_oce(ji,jj+1)+u_oce(ji-1,jj+1))*e2t(ji,jj+1)) &
292               &                / (e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj)
293
294            ! Wind stress at U,V-point
295            ztagnx = ( 1. - zfrld1(ji,jj) ) * utau_ice(ji,jj)
296            ztagny = ( 1. - zfrld2(ji,jj) ) * vtau_ice(ji,jj)
297
298            ! Computation of the velocity field taking into account the ice internal interaction.
299            ! Terms that are independent of the velocity field.
300
301            ! SB On utilise maintenant le gradient de la pente de l'ocean
302            ! include it later
303
304            zdsshx =  ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj)
305            zdsshy =  ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj)
306
307            za1ct(ji,jj) = ztagnx - zmass1(ji,jj) * grav * zdsshx
308            za2ct(ji,jj) = ztagny - zmass2(ji,jj) * grav * zdsshy
309
310         END DO
311      END DO
312
313      !
314      !------------------------------------------------------------------------------!
315      ! 3) Solution of the momentum equation, iterative procedure
316      !------------------------------------------------------------------------------!
317      !
318      ! Time step for subcycling
319      dtevp  = rdt_ice / nevp
320      dtotel = dtevp / ( 2._wp * telast )
321
322      !-ecc2: square of yield ellipse eccenticrity (reminder: must become a namelist parameter)
323      ecc2 = ecc * ecc
324
325      !-Initialise stress tensor
326      zs1 (:,:) = stress1_i (:,:) 
327      zs2 (:,:) = stress2_i (:,:)
328      zs12(:,:) = stress12_i(:,:)
329
330      !                                               !----------------------!
331      DO jter = 1 , nevp                              !    loop over jter    !
332         !                                            !----------------------!       
333         DO jj = k_j1, k_jpj-1
334            zu_ice(:,jj) = u_ice(:,jj)    ! velocity at previous time step
335            zv_ice(:,jj) = v_ice(:,jj)
336         END DO
337
338         DO jj = k_j1+1, k_jpj-1
339            DO ji = fs_2, jpim1   !RB bug no vect opt due to tmi
340
341               
342               !- Divergence, tension and shear (Section a. Appendix B of Hunke & Dukowicz, 2002)
343               !- zdd(:,:), zdt(:,:): divergence and tension at centre of grid cells
344               !- zds(:,:): shear on northeast corner of grid cells
345               !
346               !- IMPORTANT REMINDER: Dear Gurvan, note that, the way these terms are coded,
347               !                      there are many repeated calculations.
348               !                      Speed could be improved by regrouping terms. For
349               !                      the moment, however, the stress is on clarity of coding to avoid
350               !                      bugs (Martin, for Miguel).
351               !
352               !- ALSO: arrays zdd, zdt, zds and delta could
353               !  be removed in the future to minimise memory demand.
354               !
355               !- MORE NOTES: Note that we are calculating deformation rates and stresses on the corners of
356               !              grid cells, exactly as in the B grid case. For simplicity, the indexation on
357               !              the corners is the same as in the B grid.
358               !
359               !
360               zdd(ji,jj) = ( e2u(ji,jj)*u_ice(ji,jj)                      &
361                  &          -e2u(ji-1,jj)*u_ice(ji-1,jj)                  &
362                  &          +e1v(ji,jj)*v_ice(ji,jj)                      &
363                  &          -e1v(ji,jj-1)*v_ice(ji,jj-1)                  &
364                  &          )                                             &
365                  &         / area(ji,jj)
366
367               zdt(ji,jj) = ( ( u_ice(ji,jj)/e2u(ji,jj)                    &
368                  &            -u_ice(ji-1,jj)/e2u(ji-1,jj)                &
369                  &           )*e2t(ji,jj)*e2t(ji,jj)                      &
370                  &          -( v_ice(ji,jj)/e1v(ji,jj)                    &
371                  &            -v_ice(ji,jj-1)/e1v(ji,jj-1)                &
372                  &           )*e1t(ji,jj)*e1t(ji,jj)                      &
373                  &         )                                              &
374                  &        / area(ji,jj)
375
376               !
377               zds(ji,jj) = ( ( u_ice(ji,jj+1)/e1u(ji,jj+1)                &
378                  &            -u_ice(ji,jj)/e1u(ji,jj)                    &
379                  &           )*e1f(ji,jj)*e1f(ji,jj)                      &
380                  &          +( v_ice(ji+1,jj)/e2v(ji+1,jj)                &
381                  &            -v_ice(ji,jj)/e2v(ji,jj)                    &
382                  &           )*e2f(ji,jj)*e2f(ji,jj)                      &
383                  &         )                                              &
384                  &        / ( e1f(ji,jj) * e2f(ji,jj) ) * ( 2.0 - tmf(ji,jj) ) &
385                  &        * tmi(ji,jj) * tmi(ji,jj+1)                     &
386                  &        * tmi(ji+1,jj) * tmi(ji+1,jj+1)
387
388
389               v_ice1(ji,jj)  = 0.5*( (v_ice(ji,jj)+v_ice(ji,jj-1))*e1t(ji+1,jj)   &
390                  &                 +(v_ice(ji+1,jj)+v_ice(ji+1,jj-1))*e1t(ji,jj)) &
391                  &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj) 
392
393               u_ice2(ji,jj)  = 0.5*( (u_ice(ji,jj)+u_ice(ji-1,jj))*e2t(ji,jj+1)   &
394                  &                 +(u_ice(ji,jj+1)+u_ice(ji-1,jj+1))*e2t(ji,jj)) &
395                  &               /(e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj)
396
397            END DO
398         END DO
399         CALL lbc_lnk( v_ice1, 'U', -1. )   ;   CALL lbc_lnk( u_ice2, 'V', -1. )      ! lateral boundary cond.
400
401!CDIR NOVERRCHK
402         DO jj = k_j1+1, k_jpj-1
403!CDIR NOVERRCHK
404            DO ji = fs_2, fs_jpim1
405
406               !- Calculate Delta at centre of grid cells
407               zzdst      = (  e2u(ji  , jj) * v_ice1(ji  ,jj)          &
408                  &          - e2u(ji-1, jj) * v_ice1(ji-1,jj)          &
409                  &          + e1v(ji, jj  ) * u_ice2(ji,jj  )          &
410                  &          - e1v(ji, jj-1) * u_ice2(ji,jj-1)          &
411                  &          )                                          &
412                  &         / area(ji,jj)
413
414               delta = SQRT( zdd(ji,jj)*zdd(ji,jj) + ( zdt(ji,jj)*zdt(ji,jj) + zzdst*zzdst ) * usecc2 ) 
415               deltat(ji,jj) = MAX( SQRT(zdd(ji,jj)**2 + (zdt(ji,jj)**2 + zzdst**2)*usecc2), creepl )
416!!gm faster to replace the line above with simply:
417!!                deltat(ji,jj) = MAX( delta, creepl )
418!!gm end
419
420               !-Calculate stress tensor components zs1 and zs2
421               !-at centre of grid cells (see section 3.5 of CICE user's guide).
422               zs1(ji,jj) = ( zs1(ji,jj) &
423                  &          - dtotel*( ( 1.0 - alphaevp) * zs1(ji,jj) +    &
424                  &            ( delta / deltat(ji,jj) - zdd(ji,jj) / deltat(ji,jj) ) &
425                  * zpresh(ji,jj) ) )                          &       
426                  &        / ( 1.0 + alphaevp * dtotel )
427
428               zs2(ji,jj) = ( zs2(ji,jj)   &
429                  &          - dtotel*((1.0-alphaevp)*ecc2*zs2(ji,jj) -  &
430                  zdt(ji,jj)/deltat(ji,jj)*zpresh(ji,jj)) ) &
431                  &        / ( 1.0 + alphaevp*ecc2*dtotel )
432
433            END DO
434         END DO
435
436         CALL lbc_lnk( zs1(:,:), 'T', 1. )
437         CALL lbc_lnk( zs2(:,:), 'T', 1. )
438
439!CDIR NOVERRCHK
440         DO jj = k_j1+1, k_jpj-1
441!CDIR NOVERRCHK
442            DO ji = fs_2, fs_jpim1
443               !- Calculate Delta on corners
444               zddc  =      ( ( v_ice1(ji,jj+1)/e1u(ji,jj+1)                &
445                  &            -v_ice1(ji,jj)/e1u(ji,jj)                    &
446                  &           )*e1f(ji,jj)*e1f(ji,jj)                       &
447                  &          +( u_ice2(ji+1,jj)/e2v(ji+1,jj)                &
448                  &            -u_ice2(ji,jj)/e2v(ji,jj)                    &
449                  &           )*e2f(ji,jj)*e2f(ji,jj)                       &
450                  &         )                                               &
451                  &        / ( e1f(ji,jj) * e2f(ji,jj) )
452
453               zdtc  =      (-( v_ice1(ji,jj+1)/e1u(ji,jj+1)                &
454                  &            -v_ice1(ji,jj)/e1u(ji,jj)                    &
455                  &           )*e1f(ji,jj)*e1f(ji,jj)                       &
456                  &          +( u_ice2(ji+1,jj)/e2v(ji+1,jj)                &
457                  &            -u_ice2(ji,jj)/e2v(ji,jj)                    &
458                  &           )*e2f(ji,jj)*e2f(ji,jj)                       &
459                  &         )                                               &
460                  &        / ( e1f(ji,jj) * e2f(ji,jj) )
461
462               deltac(ji,jj) = SQRT(zddc**2+(zdtc**2+zds(ji,jj)**2)*usecc2) + creepl
463
464               !-Calculate stress tensor component zs12 at corners (see section 3.5 of CICE user's guide).
465               zs12(ji,jj) = ( zs12(ji,jj)      &
466                  &        - dtotel*( (1.0-alphaevp)*ecc2*zs12(ji,jj) - zds(ji,jj) / &
467                  &          ( 2.0*deltac(ji,jj) ) * zpreshc(ji,jj))) &
468                  &         / ( 1.0 + alphaevp*ecc2*dtotel ) 
469
470            END DO ! ji
471         END DO ! jj
472
473         CALL lbc_lnk( zs12(:,:), 'F', 1. )
474
475         ! Ice internal stresses (Appendix C of Hunke and Dukowicz, 2002)
476         DO jj = k_j1+1, k_jpj-1
477            DO ji = fs_2, fs_jpim1
478               !- contribution of zs1, zs2 and zs12 to zf1
479               zf1(ji,jj) = 0.5*( (zs1(ji+1,jj)-zs1(ji,jj))*e2u(ji,jj) &
480                  &              +(zs2(ji+1,jj)*e2t(ji+1,jj)**2-zs2(ji,jj)*e2t(ji,jj)**2)/e2u(ji,jj) &
481                  &              +2.0*(zs12(ji,jj)*e1f(ji,jj)**2-zs12(ji,jj-1)*e1f(ji,jj-1)**2)/e1u(ji,jj) &
482                  &             ) / ( e1u(ji,jj)*e2u(ji,jj) )
483               ! contribution of zs1, zs2 and zs12 to zf2
484               zf2(ji,jj) = 0.5*( (zs1(ji,jj+1)-zs1(ji,jj))*e1v(ji,jj) &
485                  &              -(zs2(ji,jj+1)*e1t(ji,jj+1)**2 - zs2(ji,jj)*e1t(ji,jj)**2)/e1v(ji,jj) &
486                  &              + 2.0*(zs12(ji,jj)*e2f(ji,jj)**2 -    &
487                  zs12(ji-1,jj)*e2f(ji-1,jj)**2)/e2v(ji,jj) &
488                  &             ) / ( e1v(ji,jj)*e2v(ji,jj) )
489            END DO
490         END DO
491         !
492         ! Computation of ice velocity
493         !
494         ! Both the Coriolis term and the ice-ocean drag are solved semi-implicitly.
495         !
496         IF (MOD(jter,2).eq.0) THEN 
497
498!CDIR NOVERRCHK
499            DO jj = k_j1+1, k_jpj-1
500!CDIR NOVERRCHK
501               DO ji = fs_2, fs_jpim1
502                  zmask        = (1.0-MAX(rzero,SIGN(rone,-zmass1(ji,jj))))*tmu(ji,jj)
503                  zsang        = SIGN ( 1.0 , fcor(ji,jj) ) * sangvg
504                  z0           = zmass1(ji,jj)/dtevp
505
506                  ! SB modif because ocean has no slip boundary condition
507                  zv_ice1       = 0.5*( (v_ice(ji,jj)+v_ice(ji,jj-1))*e1t(ji,jj)         &
508                     &                 +(v_ice(ji+1,jj)+v_ice(ji+1,jj-1))*e1t(ji+1,jj))   &
509                     &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj)
510                  za           = rhoco*SQRT((u_ice(ji,jj)-u_oce1(ji,jj))**2 + &
511                     (zv_ice1-v_oce1(ji,jj))**2) * (1.0-zfrld1(ji,jj))
512                  zr           = z0*u_ice(ji,jj) + zf1(ji,jj) + za1ct(ji,jj) + &
513                     za*(cangvg*u_oce1(ji,jj)-zsang*v_oce1(ji,jj))
514                  zcca         = z0+za*cangvg
515                  zccb         = zcorl1(ji,jj)+za*zsang
516                  u_ice(ji,jj) = (zr+zccb*zv_ice1)/(zcca+epsd)*zmask 
517
518               END DO
519            END DO
520
521            CALL lbc_lnk( u_ice(:,:), 'U', -1. )
522#if defined key_agrif
523            CALL agrif_rhg_lim2( jter, nevp, 'U' )
524#endif
525
526!CDIR NOVERRCHK
527            DO jj = k_j1+1, k_jpj-1
528!CDIR NOVERRCHK
529               DO ji = fs_2, fs_jpim1
530
531                  zmask        = (1.0-MAX(rzero,SIGN(rone,-zmass2(ji,jj))))*tmv(ji,jj)
532                  zsang        = SIGN(1.0,fcor(ji,jj))*sangvg
533                  z0           = zmass2(ji,jj)/dtevp
534                  ! SB modif because ocean has no slip boundary condition
535                  zu_ice2       = 0.5*( (u_ice(ji,jj)+u_ice(ji-1,jj))*e2t(ji,jj)     &
536                     &                 + (u_ice(ji,jj+1)+u_ice(ji-1,jj+1))*e2t(ji,jj+1))   &
537                     &               /(e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj)
538                  za           = rhoco*SQRT((zu_ice2-u_oce2(ji,jj))**2 + & 
539                     (v_ice(ji,jj)-v_oce2(ji,jj))**2)*(1.0-zfrld2(ji,jj))
540                  zr           = z0*v_ice(ji,jj) + zf2(ji,jj) + &
541                     za2ct(ji,jj) + za*(cangvg*v_oce2(ji,jj)+zsang*u_oce2(ji,jj))
542                  zcca         = z0+za*cangvg
543                  zccb         = zcorl2(ji,jj)+za*zsang
544                  v_ice(ji,jj) = (zr-zccb*zu_ice2)/(zcca+epsd)*zmask
545
546               END DO
547            END DO
548
549            CALL lbc_lnk( v_ice(:,:), 'V', -1. )
550#if defined key_agrif
551            CALL agrif_rhg_lim2( jter, nevp, 'V' )
552#endif
553
554         ELSE 
555!CDIR NOVERRCHK
556            DO jj = k_j1+1, k_jpj-1
557!CDIR NOVERRCHK
558               DO ji = fs_2, fs_jpim1
559                  zmask        = (1.0-MAX(rzero,SIGN(rone,-zmass2(ji,jj))))*tmv(ji,jj)
560                  zsang        = SIGN(1.0,fcor(ji,jj))*sangvg
561                  z0           = zmass2(ji,jj)/dtevp
562                  ! SB modif because ocean has no slip boundary condition
563                  zu_ice2       = 0.5*( (u_ice(ji,jj)+u_ice(ji-1,jj))*e2t(ji,jj)      &
564                     &                 +(u_ice(ji,jj+1)+u_ice(ji-1,jj+1))*e2t(ji,jj+1))   &
565                     &               /(e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj)   
566
567                  za           = rhoco*SQRT((zu_ice2-u_oce2(ji,jj))**2 + &
568                     (v_ice(ji,jj)-v_oce2(ji,jj))**2)*(1.0-zfrld2(ji,jj))
569                  zr           = z0*v_ice(ji,jj) + zf2(ji,jj) + &
570                     za2ct(ji,jj) + za*(cangvg*v_oce2(ji,jj)+zsang*u_oce2(ji,jj))
571                  zcca         = z0+za*cangvg
572                  zccb         = zcorl2(ji,jj)+za*zsang
573                  v_ice(ji,jj) = (zr-zccb*zu_ice2)/(zcca+epsd)*zmask
574
575               END DO
576            END DO
577
578            CALL lbc_lnk( v_ice(:,:), 'V', -1. )
579#if defined key_agrif
580            CALL agrif_rhg_lim2( jter, nevp , 'V' )
581#endif
582
583!CDIR NOVERRCHK
584            DO jj = k_j1+1, k_jpj-1
585!CDIR NOVERRCHK
586               DO ji = fs_2, fs_jpim1
587                  zmask        = (1.0-MAX(rzero,SIGN(rone,-zmass1(ji,jj))))*tmu(ji,jj)
588                  zsang        = SIGN(1.0,fcor(ji,jj))*sangvg
589                  z0           = zmass1(ji,jj)/dtevp
590                  ! SB modif because ocean has no slip boundary condition
591                  ! GG Bug
592                  !                   zv_ice1       = 0.5*( (v_ice(ji,jj)+v_ice(ji,jj-1))*e1t(ji+1,jj)      &
593                  !                      &                 +(v_ice(ji+1,jj)+v_ice(ji+1,jj-1))*e1t(ji,jj))   &
594                  !                      &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj)
595                  zv_ice1       = 0.5*( (v_ice(ji,jj)+v_ice(ji,jj-1))*e1t(ji,jj)      &
596                     &                 +(v_ice(ji+1,jj)+v_ice(ji+1,jj-1))*e1t(ji+1,jj))   &
597                     &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj)
598
599                  za           = rhoco*SQRT((u_ice(ji,jj)-u_oce1(ji,jj))**2 + &
600                     (zv_ice1-v_oce1(ji,jj))**2)*(1.0-zfrld1(ji,jj))
601                  zr           = z0*u_ice(ji,jj) + zf1(ji,jj) + za1ct(ji,jj) + &
602                     za*(cangvg*u_oce1(ji,jj)-zsang*v_oce1(ji,jj))
603                  zcca         = z0+za*cangvg
604                  zccb         = zcorl1(ji,jj)+za*zsang
605                  u_ice(ji,jj) = (zr+zccb*zv_ice1)/(zcca+epsd)*zmask 
606               END DO ! ji
607            END DO ! jj
608
609            CALL lbc_lnk( u_ice(:,:), 'U', -1. )
610#if defined key_agrif
611            CALL agrif_rhg_lim2( jter, nevp, 'U' )
612#endif
613
614         ENDIF
615
616         IF(ln_ctl) THEN
617            !---  Convergence test.
618            DO jj = k_j1+1 , k_jpj-1
619               zresr(:,jj) = MAX( ABS( u_ice(:,jj) - zu_ice(:,jj) ) ,           &
620                  ABS( v_ice(:,jj) - zv_ice(:,jj) ) )
621            END DO
622            zresm = MAXVAL( zresr( 1:jpi , k_j1+1:k_jpj-1 ) )
623            IF( lk_mpp )   CALL mpp_max( zresm )   ! max over the global domain
624         ENDIF
625
626         !                                                   ! ==================== !
627      END DO                                              !  end loop over jter  !
628      !                                                   ! ==================== !
629
630      !
631      !------------------------------------------------------------------------------!
632      ! 4) Prevent ice velocities when the ice is thin
633      !------------------------------------------------------------------------------!
634      !
635      ! If the ice thickness is below 1cm then ice velocity should equal the
636      ! ocean velocity,
637      ! This prevents high velocity when ice is thin
638!CDIR NOVERRCHK
639      DO jj = k_j1+1, k_jpj-1
640!CDIR NOVERRCHK
641         DO ji = fs_2, fs_jpim1
642            zindb  = MAX( 0.0, SIGN( 1.0, at_i(ji,jj) - 1.0e-6 ) ) 
643            zdummy = zindb * vt_i(ji,jj) / MAX(at_i(ji,jj) , 1.0e-06 )
644            IF ( zdummy .LE. 5.0e-2 ) THEN
645               u_ice(ji,jj) = u_oce(ji,jj)
646               v_ice(ji,jj) = v_oce(ji,jj)
647            ENDIF ! zdummy
648         END DO
649      END DO
650
651      CALL lbc_lnk( u_ice(:,:), 'U', -1. ) 
652      CALL lbc_lnk( v_ice(:,:), 'V', -1. ) 
653#if defined key_agrif
654      CALL agrif_rhg_lim2( nevp , nevp, 'U' )
655      CALL agrif_rhg_lim2( nevp , nevp, 'V' )
656#endif
657
658      DO jj = k_j1+1, k_jpj-1 
659         DO ji = fs_2, fs_jpim1
660            zindb  = MAX( 0.0, SIGN( 1.0, at_i(ji,jj) - 1.0e-6 ) ) 
661            zdummy = zindb * vt_i(ji,jj) / MAX(at_i(ji,jj) , 1.0e-06 )
662            IF ( zdummy .LE. 5.0e-2 ) THEN
663               v_ice1(ji,jj)  = 0.5*( (v_ice(ji,jj)+v_ice(ji,jj-1))*e1t(ji+1,jj)   &
664                  &                 +(v_ice(ji+1,jj)+v_ice(ji+1,jj-1))*e1t(ji,jj)) &
665                  &               /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj)
666
667               u_ice2(ji,jj)  = 0.5*( (u_ice(ji,jj)+u_ice(ji-1,jj))*e2t(ji,jj+1)   &
668                  &                 +(u_ice(ji,jj+1)+u_ice(ji-1,jj+1))*e2t(ji,jj)) &
669                  &               /(e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj)
670            ENDIF ! zdummy
671         END DO
672      END DO
673
674      CALL lbc_lnk( u_ice2(:,:), 'V', -1. ) 
675      CALL lbc_lnk( v_ice1(:,:), 'U', -1. )
676
677      ! Recompute delta, shear and div, inputs for mechanical redistribution
678!CDIR NOVERRCHK
679      DO jj = k_j1+1, k_jpj-1
680!CDIR NOVERRCHK
681         DO ji = fs_2, jpim1   !RB bug no vect opt due to tmi
682            !- zdd(:,:), zdt(:,:): divergence and tension at centre
683            !- zds(:,:): shear on northeast corner of grid cells
684            zindb  = MAX( 0.0, SIGN( 1.0, at_i(ji,jj) - 1.0e-6 ) ) 
685            zdummy = zindb * vt_i(ji,jj) / MAX(at_i(ji,jj) , 1.0e-06 )
686
687            IF ( zdummy .LE. 5.0e-2 ) THEN
688
689               zdd(ji,jj) = ( e2u(ji,jj)*u_ice(ji,jj)                      &
690                  &          -e2u(ji-1,jj)*u_ice(ji-1,jj)                  &
691                  &          +e1v(ji,jj)*v_ice(ji,jj)                      &
692                  &          -e1v(ji,jj-1)*v_ice(ji,jj-1)                  &
693                  &         )                                              &
694                  &         / area(ji,jj)
695
696               zdt(ji,jj) = ( ( u_ice(ji,jj)/e2u(ji,jj)                    &
697                  &            -u_ice(ji-1,jj)/e2u(ji-1,jj)                &
698                  &           )*e2t(ji,jj)*e2t(ji,jj)                      &
699                  &          -( v_ice(ji,jj)/e1v(ji,jj)                    &
700                  &            -v_ice(ji,jj-1)/e1v(ji,jj-1)                &
701                  &           )*e1t(ji,jj)*e1t(ji,jj)                      &
702                  &         )                                              &
703                  &        / area(ji,jj)
704               !
705               ! SB modif because ocean has no slip boundary condition
706               zds(ji,jj) = ( ( u_ice(ji,jj+1) / e1u(ji,jj+1)              &
707                  &           - u_ice(ji,jj)   / e1u(ji,jj) )              &
708                  &           * e1f(ji,jj) * e1f(ji,jj)                    &
709                  &          + ( v_ice(ji+1,jj) / e2v(ji+1,jj)             &
710                  &            - v_ice(ji,jj)  / e2v(ji,jj) )              &
711                  &           * e2f(ji,jj) * e2f(ji,jj) )                  &
712                  &        / ( e1f(ji,jj) * e2f(ji,jj) ) * ( 2.0 - tmf(ji,jj) ) &
713                  &        * tmi(ji,jj) * tmi(ji,jj+1)                     &
714                  &        * tmi(ji+1,jj) * tmi(ji+1,jj+1)
715
716               zdst(ji,jj) = (  e2u( ji  , jj   ) * v_ice1(ji  ,jj  )    &
717                  &           - e2u( ji-1, jj   ) * v_ice1(ji-1,jj  )    &
718                  &           + e1v( ji  , jj   ) * u_ice2(ji  ,jj  )    &
719                  &           - e1v( ji  , jj-1 ) * u_ice2(ji  ,jj-1)  ) / area(ji,jj)
720
721               deltat(ji,jj) = SQRT(    zdd(ji,jj)*zdd(ji,jj)   & 
722                  &                 + ( zdt(ji,jj)*zdt(ji,jj) + zdst(ji,jj)*zdst(ji,jj) ) * usecc2 & 
723                  &                          ) + creepl
724
725            ENDIF ! zdummy
726
727         END DO !jj
728      END DO !ji
729      !
730      !------------------------------------------------------------------------------!
731      ! 5) Store stress tensor and its invariants
732      !------------------------------------------------------------------------------!
733      !
734      ! * Invariants of the stress tensor are required for limitd_me
735      !   (accelerates convergence and improves stability)
736      DO jj = k_j1+1, k_jpj-1
737         DO ji = fs_2, fs_jpim1
738            divu_i (ji,jj) = zdd   (ji,jj)
739            delta_i(ji,jj) = deltat(ji,jj)
740            shear_i(ji,jj) = SQRT( zdt(ji,jj) * zdt(ji,jj) + zdst(ji,jj) * zdst(ji,jj) )
741         END DO
742      END DO
743      CALL lbc_lnk( divu_i (:,:), 'T', 1. )      ! Lateral boundary condition
744      CALL lbc_lnk( delta_i(:,:), 'T', 1. )
745      CALL lbc_lnk( shear_i(:,:), 'T', 1. )
746
747      ! * Store the stress tensor for the next time step
748      stress1_i (:,:) = zs1 (:,:)
749      stress2_i (:,:) = zs2 (:,:)
750      stress12_i(:,:) = zs12(:,:)
751
752      !
753      !------------------------------------------------------------------------------!
754      ! 6) Control prints of residual and charge ellipse
755      !------------------------------------------------------------------------------!
756      !
757      ! print the residual for convergence
758      IF(ln_ctl) THEN
759         WRITE(charout,FMT="('lim_rhg  : res =',D23.16, ' iter =',I4)") zresm, jter
760         CALL prt_ctl_info(charout)
761         CALL prt_ctl(tab2d_1=u_ice, clinfo1=' lim_rhg  : u_ice :', tab2d_2=v_ice, clinfo2=' v_ice :')
762      ENDIF
763
764      ! print charge ellipse
765      ! This can be desactivated once the user is sure that the stress state
766      ! lie on the charge ellipse. See Bouillon et al. 08 for more details
767      IF(ln_ctl) THEN
768         CALL prt_ctl_info('lim_rhg  : numit  :',ivar1=numit)
769         CALL prt_ctl_info('lim_rhg  : nwrite :',ivar1=nwrite)
770         CALL prt_ctl_info('lim_rhg  : MOD    :',ivar1=MOD(numit,nwrite))
771         IF( MOD(numit,nwrite) .EQ. 0 ) THEN
772            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 1000, numit, 0, 0, ' ch. ell. '
773            CALL prt_ctl_info(charout)
774            DO jj = k_j1+1, k_jpj-1
775               DO ji = 2, jpim1
776                  IF (zpresh(ji,jj) .GT. 1.0) THEN
777                     sigma1 = ( zs1(ji,jj) + (zs2(ji,jj)**2 + 4*zs12(ji,jj)**2 )**0.5 ) / ( 2*zpresh(ji,jj) ) 
778                     sigma2 = ( zs1(ji,jj) - (zs2(ji,jj)**2 + 4*zs12(ji,jj)**2 )**0.5 ) / ( 2*zpresh(ji,jj) )
779                     WRITE(charout,FMT="('lim_rhg  :', I4, I4, D23.16, D23.16, D23.16, D23.16, A10)")
780                     CALL prt_ctl_info(charout)
781                  ENDIF
782               END DO
783            END DO
784            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 2000, numit, 0, 0, ' ch. ell. '
785            CALL prt_ctl_info(charout)
786         ENDIF
787      ENDIF
788      !
789      CALL wrk_dealloc( jpi,jpj, zpresh, zfrld1, zmass1, zcorl1, za1ct , zpreshc, zfrld2, zmass2, zcorl2, za2ct )
790      CALL wrk_dealloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                )
791      CALL wrk_dealloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  )
792      CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 )
793
794   END SUBROUTINE lim_rhg
795
796#else
797   !!----------------------------------------------------------------------
798   !!   Default option          Dummy module           NO LIM sea-ice model
799   !!----------------------------------------------------------------------
800CONTAINS
801   SUBROUTINE lim_rhg( k1 , k2 )         ! Dummy routine
802      WRITE(*,*) 'lim_rhg: You should not have seen this print! error?', k1, k2
803   END SUBROUTINE lim_rhg
804#endif
805
806   !!==============================================================================
807END MODULE limrhg
Note: See TracBrowser for help on using the repository browser.