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.
limsbc.F90 in branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 @ 4656

Last change on this file since 4656 was 4649, checked in by clem, 10 years ago

finalizing LIM3 heat budget conservation + multiple minor bugs corrections

  • Property svn:keywords set to Id
File size: 22.4 KB
Line 
1MODULE limsbc
2   !!======================================================================
3   !!                       ***  MODULE limsbc   ***
4   !!           computation of the flux at the sea ice/ocean interface
5   !!======================================================================
6   !! History :   -   ! 2006-07 (M. Vancoppelle)  LIM3 original code
7   !!            3.0  ! 2008-03 (C. Tallandier)  surface module
8   !!             -   ! 2008-04 (C. Tallandier)  split in 2 + new ice-ocean coupling
9   !!            3.3  ! 2010-05 (G. Madec) decrease ocean & ice reference salinities in the Baltic sea
10   !!                 !                  + simplification of the ice-ocean stress calculation
11   !!            3.4  ! 2011-02 (G. Madec) dynamical allocation
12   !!             -   ! 2012    (D. Iovino) salt flux change
13   !!             -   ! 2012-05 (C. Rousset) add penetration solar flux
14   !!            3.5  ! 2012-10 (A. Coward, G. Madec) salt fluxes ; ice+snow mass
15   !!----------------------------------------------------------------------
16#if defined key_lim3
17   !!----------------------------------------------------------------------
18   !!   'key_lim3'                                    LIM 3.0 sea-ice model
19   !!----------------------------------------------------------------------
20   !!   lim_sbc_alloc : allocate the limsbc arrays
21   !!   lim_sbc_init  : initialisation
22   !!   lim_sbc_flx   : updates mass, heat and salt fluxes at the ocean surface
23   !!   lim_sbc_tau   : update i- and j-stresses, and its modulus at the ocean surface
24   !!----------------------------------------------------------------------
25   USE par_oce          ! ocean parameters
26   USE phycst           ! physical constants
27   USE par_ice          ! ice parameters
28   USE dom_oce          ! ocean domain
29   USE dom_ice,    ONLY : tms, area
30   USE ice              ! LIM sea-ice variables
31   USE sbc_ice          ! Surface boundary condition: sea-ice fields
32   USE sbc_oce          ! Surface boundary condition: ocean fields
33   USE sbccpl
34   USE cpl_oasis3, ONLY : lk_cpl
35   USE oce       , ONLY : iatte, oatte, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n
36   USE albedo           ! albedo parameters
37   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges
38   USE lib_mpp          ! MPP library
39   USE wrk_nemo         ! work arrays
40   USE in_out_manager   ! I/O manager
41   USE prtctl           ! Print control
42   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
43   USE traqsr           ! clem: add penetration of solar flux into the calculation of heat budget
44   USE iom
45
46   IMPLICIT NONE
47   PRIVATE
48
49   PUBLIC   lim_sbc_init   ! called by ice_init
50   PUBLIC   lim_sbc_flx    ! called by sbc_ice_lim
51   PUBLIC   lim_sbc_tau    ! called by sbc_ice_lim
52
53   REAL(wp)  ::   epsi10 = 1.e-10   !
54   REAL(wp)  ::   epsi20 = 1.e-20   !
55
56   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau_oce, vtau_oce   ! air-ocean surface i- & j-stress     [N/m2]
57   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmod_io              ! modulus of the ice-ocean velocity   [m/s]
58   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   soce_0  , sice_0     ! cst SSS and ice salinity (levitating sea-ice)
59
60   !! * Substitutions
61#  include "vectopt_loop_substitute.h90"
62   !!----------------------------------------------------------------------
63   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
64   !! $Id$
65   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
66   !!----------------------------------------------------------------------
67CONTAINS
68
69   INTEGER FUNCTION lim_sbc_alloc()
70      !!-------------------------------------------------------------------
71      !!             ***  ROUTINE lim_sbc_alloc ***
72      !!-------------------------------------------------------------------
73      ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) ,                       &
74         &      sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc)
75         !
76      IF( lk_mpp             )   CALL mpp_sum( lim_sbc_alloc )
77      IF( lim_sbc_alloc /= 0 )   CALL ctl_warn('lim_sbc_alloc: failed to allocate arrays')
78   END FUNCTION lim_sbc_alloc
79
80
81   SUBROUTINE lim_sbc_flx( kt )
82      !!-------------------------------------------------------------------
83      !!                ***  ROUTINE lim_sbc_flx ***
84      !! 
85      !! ** Purpose :   Update the surface ocean boundary condition for heat
86      !!              salt and mass over areas where sea-ice is non-zero
87      !!         
88      !! ** Action  : - computes the heat and freshwater/salt fluxes
89      !!              at the ice-ocean interface.
90      !!              - Update the ocean sbc
91      !!     
92      !! ** Outputs : - qsr     : sea heat flux:     solar
93      !!              - qns     : sea heat flux: non solar
94      !!              - emp     : freshwater budget: volume flux
95      !!              - sfx     : salt flux
96      !!              - fr_i    : ice fraction
97      !!              - tn_ice  : sea-ice surface temperature
98      !!              - alb_ice : sea-ice alberdo (lk_cpl=T)
99      !!
100      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
101      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
102      !!---------------------------------------------------------------------
103      INTEGER, INTENT(in) ::   kt    ! number of iteration
104      !
105      INTEGER  ::   ji, jj, jl, jk           ! dummy loop indices
106      REAL(wp) ::   zinda, zemp      ! local scalars
107      REAL(wp) ::   zf_mass         ! Heat flux associated with mass exchange ice->ocean (W.m-2)
108      REAL(wp) ::   zfcm1           ! New solar flux received by the ocean
109      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp     ! 2D/3D workspace
110      !!---------------------------------------------------------------------
111     
112      IF( lk_cpl )   CALL wrk_alloc( jpi, jpj, jpl, zalb, zalbp )
113
114      ! make calls for heat fluxes before it is modified
115      CALL iom_put( "qsr_oce" , qsr(:,:) * pfrld(:,:) )   !     solar flux at ocean surface
116      CALL iom_put( "qns_oce" , qns(:,:) * pfrld(:,:) )   ! non-solar flux at ocean surface
117      CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  !     solar flux at ice surface
118      CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  ! non-solar flux at ice surface
119      CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  !     solar flux transmitted thru ice
120      CALL iom_put( "qt_oce"  , ( qsr(:,:) + qns(:,:) ) * pfrld(:,:) ) 
121      CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) ) * old_a_i(:,:,:), dim=3 ) )
122
123      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD)
124      DO jj = 1, jpj
125         DO ji = 1, jpi
126
127            !------------------------------------------!
128            !      heat flux at the ocean surface      !
129            !------------------------------------------!
130            zinda   = 1._wp - MAX( 0._wp , SIGN( 1._wp , - ( 1._wp - pfrld(ji,jj) ) ) ) ! 1 if ice
131
132            ! Solar heat flux reaching the ocean = zfcm1 (W.m-2)
133            !---------------------------------------------------
134            IF( lk_cpl ) THEN ! be carfeful: not been tested yet
135               ! original line
136               zfcm1 = qsr_tot(ji,jj)
137               !!!zfcm1 = qsr_tot(ji,jj) + ftr_ice(ji,jj) * ( 1._wp - pfrld(ji,jj) ) / ( 1._wp - zinda + zinda * iatte(ji,jj) )
138               DO jl = 1, jpl
139                  zfcm1 = zfcm1 - ( qsr_ice(ji,jj,jl) - ftr_ice(ji,jj,jl) ) * old_a_i(ji,jj,jl)
140               END DO
141            ELSE
142               !!!zfcm1   = pfrld(ji,jj) * qsr(ji,jj)  + &
143               !!!     &    ( 1._wp - pfrld(ji,jj) ) * ftr_ice(ji,jj) / ( 1._wp - zinda + zinda * iatte(ji,jj) )
144               zfcm1   = pfrld(ji,jj) * qsr(ji,jj)
145               DO jl = 1, jpl
146                  zfcm1   = zfcm1 + old_a_i(ji,jj,jl) * ftr_ice(ji,jj,jl)
147               END DO
148            ENDIF
149
150            ! Total heat flux reaching the ocean = hfx_out (W.m-2)
151            !---------------------------------------------------
152            zf_mass        = hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_res(ji,jj) ! heat flux from snow is 0 (T=0 degC)
153            hfx_out(ji,jj) = hfx_out(ji,jj) + zf_mass + zfcm1
154
155            ! New qsr and qns used to compute the oceanic heat flux at the next time step
156            !---------------------------------------------------
157            qsr(ji,jj) = zfcm1                                     
158            qns(ji,jj) = hfx_out(ji,jj) - zfcm1             
159
160            !------------------------------------------!
161            !      mass flux at the ocean surface      !
162            !------------------------------------------!
163            !  case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED)
164            !  -------------------------------------------------------------------------------------
165            !  The idea of this approach is that the system that we consider is the ICE-OCEAN system
166            !  Thus  FW  flux  =  External ( E-P+snow melt)
167            !       Salt flux  =  Exchanges in the ice-ocean system then converted into FW
168            !                     Associated to Ice formation AND Ice melting
169            !                     Even if i see Ice melting as a FW and SALT flux
170            !       
171            !  computing freshwater exchanges at the ice/ocean interface
172            !  clem 2014/04: why not 1-pfrld instead of at_i here???
173            IF( lk_cpl ) THEN
174               zemp = - emp_tot(ji,jj) + emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !
175                  &   + wfx_snw(ji,jj)
176            ELSE
177               zemp =   emp(ji,jj)     *           pfrld(ji,jj)            &   ! evaporation over oceanic fraction
178                  &   - tprecip(ji,jj) * ( 1._wp - pfrld(ji,jj) )          &   ! all precipitation reach the ocean
179                  &   + sprecip(ji,jj) * ( 1._wp - pfrld(ji,jj)**betas )       ! except solid precip intercepted by sea-ice
180            ENDIF
181
182            ! mass flux from ice/ocean
183            wfx_ice(ji,jj) = wfx_bog(ji,jj) + wfx_bom(ji,jj) + wfx_sum(ji,jj) + wfx_sni(ji,jj) + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj)
184
185            ! mass flux at the ocean/ice interface
186            fmmflx(ji,jj) = - wfx_ice(ji,jj) * rdt_ice                   ! F/M mass flux save at least for biogeochemical model
187            emp(ji,jj)    = zemp - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_sub(ji,jj)   ! mass flux + F/M mass flux (always ice/ocean mass exchange)
188           
189         END DO
190      END DO
191
192      !------------------------------------------!
193      !      salt flux at the ocean surface      !
194      !------------------------------------------!
195      sfx(:,:) = sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + sfx_opw(:,:) + sfx_res(:,:) + sfx_dyn(:,:) + sfx_bri(:,:)
196
197      !-------------------------------------------------------------!
198      !   mass of snow and ice per unit area for embedded sea-ice   !
199      !-------------------------------------------------------------!
200      IF( nn_ice_embd /= 0 ) THEN
201         ! save mass from the previous ice time step
202         snwice_mass_b(:,:) = snwice_mass(:,:)                 
203         ! new mass per unit area
204         snwice_mass  (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  ) 
205         ! time evolution of snow+ice mass
206         snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice
207      ENDIF
208
209      !-----------------------------------------------!
210      !   Storing the transmitted variables           !
211      !-----------------------------------------------!
212      fr_i  (:,:)   = at_i(:,:)             ! Sea-ice fraction           
213      tn_ice(:,:,:) = t_su(:,:,:)           ! Ice surface temperature                     
214
215      !------------------------------------------------!
216      !    Computation of snow/ice and ocean albedo    !
217      !------------------------------------------------!
218      IF( lk_cpl ) THEN          ! coupled case
219         CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb )                  ! snow/ice albedo
220         alb_ice(:,:,:) =  0.5_wp * zalbp(:,:,:) + 0.5_wp * zalb (:,:,:)   ! Ice albedo (mean clear and overcast skys)
221      ENDIF
222
223
224      IF(ln_ctl) THEN
225         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' )
226         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=sfx , clinfo2=' sfx     : ' )
227         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' )
228         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl )
229      ENDIF
230      !
231      IF( lk_cpl )   CALL wrk_dealloc( jpi, jpj, jpl, zalb, zalbp )
232      !
233   END SUBROUTINE lim_sbc_flx
234
235
236   SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce )
237      !!-------------------------------------------------------------------
238      !!                ***  ROUTINE lim_sbc_tau ***
239      !! 
240      !! ** Purpose : Update the ocean surface stresses due to the ice
241      !!         
242      !! ** Action  : * at each ice time step (every nn_fsbc time step):
243      !!                - compute the modulus of ice-ocean relative velocity
244      !!                  (*rho*Cd) at T-point (C-grid) or I-point (B-grid)
245      !!                      tmod_io = rhoco * | U_ice-U_oce |
246      !!                - update the modulus of stress at ocean surface
247      !!                      taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce |
248      !!              * at each ocean time step (every kt):
249      !!                  compute linearized ice-ocean stresses as
250      !!                      Utau = tmod_io * | U_ice - pU_oce |
251      !!                using instantaneous current ocean velocity (usually before)
252      !!
253      !!    NB: - ice-ocean rotation angle no more allowed
254      !!        - here we make an approximation: taum is only computed every ice time step
255      !!          This avoids mutiple average to pass from T -> U,V grids and next from U,V grids
256      !!          to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton...
257      !!
258      !! ** Outputs : - utau, vtau   : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes
259      !!              - taum         : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes
260      !!---------------------------------------------------------------------
261      INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index
262      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pu_oce, pv_oce   ! surface ocean currents
263      !!
264      INTEGER  ::   ji, jj   ! dummy loop indices
265      REAL(wp) ::   zat_u, zutau_ice, zu_t, zmodt   ! local scalar
266      REAL(wp) ::   zat_v, zvtau_ice, zv_t          !   -      -
267      !!---------------------------------------------------------------------
268      !
269      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==!   (i.e. surface module time-step)
270!CDIR NOVERRCHK
271         DO jj = 2, jpjm1                             !* update the modulus of stress at ocean surface (T-point)
272!CDIR NOVERRCHK
273            DO ji = fs_2, fs_jpim1
274               !                                               ! 2*(U_ice-U_oce) at T-point
275               zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   
276               zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) 
277               !                                              ! |U_ice-U_oce|^2
278               zmodt =  0.25_wp * (  zu_t * zu_t + zv_t * zv_t  )
279               !                                               ! update the ocean stress modulus
280               taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zmodt
281               tmod_io(ji,jj) = rhoco * SQRT( zmodt )          ! rhoco * |U_ice-U_oce| at T-point
282            END DO
283         END DO
284         CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. )
285         !
286         utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step
287         vtau_oce(:,:) = vtau(:,:)
288         !
289      ENDIF
290      !
291      !                                      !==  every ocean time-step  ==!
292      !
293      DO jj = 2, jpjm1                                !* update the stress WITHOUT a ice-ocean rotation angle
294         DO ji = fs_2, fs_jpim1   ! Vect. Opt.
295            zat_u  = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp   ! ice area at u and V-points
296            zat_v  = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp
297            !                                                   ! linearized quadratic drag formulation
298            zutau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) )
299            zvtau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) )
300            !                                                   ! stresses at the ocean surface
301            utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice
302            vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice
303         END DO
304      END DO
305      CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
306      !
307      IF(ln_ctl)   CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
308         &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
309     
310   END SUBROUTINE lim_sbc_tau
311
312
313   SUBROUTINE lim_sbc_init
314      !!-------------------------------------------------------------------
315      !!                  ***  ROUTINE lim_sbc_init  ***
316      !!             
317      !! ** Purpose : Preparation of the file ice_evolu for the output of
318      !!      the temporal evolution of key variables
319      !!
320      !! ** input   : Namelist namicedia
321      !!-------------------------------------------------------------------
322      REAL(wp) :: zsum, zarea
323      !
324      INTEGER  ::   ji, jj                          ! dummy loop indices
325      REAL(wp) ::   zcoefu, zcoefv, zcoeff          ! local scalar
326      IF(lwp) WRITE(numout,*)
327      IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition'
328      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~   '
329
330      !                                      ! allocate lim_sbc array
331      IF( lim_sbc_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' )
332      !
333      soce_0(:,:) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case
334      sice_0(:,:) = sice
335      !
336      IF( cp_cfg == "orca" ) THEN            ! decrease ocean & ice reference salinities in the Baltic sea
337         WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND.   &
338            &   54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp         ) 
339            soce_0(:,:) = 4._wp
340            sice_0(:,:) = 2._wp
341         END WHERE
342      ENDIF
343      ! clem modif
344      IF( .NOT. ln_rstart ) THEN
345         iatte(:,:) = 1._wp
346         oatte(:,:) = 1._wp
347      ENDIF
348      !
349      ! clem: snwice_mass in the restart file now
350      IF( .NOT. ln_rstart ) THEN
351         !                                      ! embedded sea ice
352         IF( nn_ice_embd /= 0 ) THEN            ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass
353            snwice_mass  (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  )
354            snwice_mass_b(:,:) = snwice_mass(:,:)
355         ELSE
356            snwice_mass  (:,:) = 0.0_wp         ! no mass exchanges
357            snwice_mass_b(:,:) = 0.0_wp         ! no mass exchanges
358         ENDIF
359         IF( nn_ice_embd == 2 ) THEN            ! full embedment (case 2) deplete the initial ssh below sea-ice area
360            sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0
361            sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0
362            !
363            ! Note: Changed the initial values of sshb and sshn=>  need to recompute ssh[u,v,f]_[b,n]
364            !       which were previously set in domvvl
365            IF ( lk_vvl ) THEN            ! Is this necessary? embd 2 should be restricted to vvl only???
366               DO jj = 1, jpjm1
367                  DO ji = 1, jpim1                    ! caution: use of Vector Opt. not possible
368                     zcoefu = 0.5  * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) )
369                     zcoefv = 0.5  * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) )
370                     zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1)
371                     sshu_b(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshb(ji  ,jj)     &
372                        &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) )
373                     sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshb(ji,jj  )     &
374                        &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) )
375                     sshu_n(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshn(ji  ,jj)     &
376                        &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) )
377                     sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshn(ji,jj  )     &
378                        &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) )
379                  END DO
380               END DO
381               CALL lbc_lnk( sshu_b, 'U', 1. )   ;   CALL lbc_lnk( sshu_n, 'U', 1. )
382               CALL lbc_lnk( sshv_b, 'V', 1. )   ;   CALL lbc_lnk( sshv_n, 'V', 1. )
383               DO jj = 1, jpjm1
384                  DO ji = 1, jpim1      ! NO Vector Opt.
385                     sshf_n(ji,jj) = 0.5  * umask(ji,jj,1) * umask(ji,jj+1,1)                   &
386                          &               / ( e1f(ji,jj  ) * e2f(ji,jj  ) )                     &
387                          &               * ( e1u(ji,jj  ) * e2u(ji,jj  ) * sshu_n(ji,jj  )     &
388                          &                 + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) )
389                  END DO
390               END DO
391               CALL lbc_lnk( sshf_n, 'F', 1. )
392            ENDIF
393         ENDIF
394      ENDIF ! .NOT. ln_rstart
395      !
396
397   END SUBROUTINE lim_sbc_init
398
399#else
400   !!----------------------------------------------------------------------
401   !!   Default option :        Dummy module       NO LIM 3.0 sea-ice model
402   !!----------------------------------------------------------------------
403CONTAINS
404   SUBROUTINE lim_sbc           ! Dummy routine
405   END SUBROUTINE lim_sbc
406#endif 
407
408   !!======================================================================
409END MODULE limsbc
Note: See TracBrowser for help on using the repository browser.