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 @ 4634

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

major changes in heat budget

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