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_r3406_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2013/dev_r3406_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 @ 3938

Last change on this file since 3938 was 3938, checked in by flavoni, 11 years ago

dev_r3406_CNRS_LIM3: update LIM3, see ticket #1116

  • Property svn:keywords set to Id
File size: 23.6 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   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
12   !!             -   ! 2012    (D. Iovino) salt flux change
13   !!             -   ! 2012-05 (C. Rousset) add penetration solar flux
14   !!----------------------------------------------------------------------
15#if defined key_lim3
16   !!----------------------------------------------------------------------
17   !!   'key_lim3'                                    LIM 3.0 sea-ice model
18   !!----------------------------------------------------------------------
19   !!   lim_sbc_alloc : allocate the limsbc arrays
20   !!   lim_sbc_init  : initialisation
21   !!   lim_sbc_flx   : updates mass, heat and salt fluxes at the ocean surface
22   !!   lim_sbc_tau   : update i- and j-stresses, and its modulus at the ocean surface
23   !!----------------------------------------------------------------------
24   USE par_oce          ! ocean parameters
25   USE par_ice          ! ice parameters
26   USE dom_oce          ! ocean domain
27   USE sbc_ice          ! Surface boundary condition: sea-ice fields
28   USE sbc_oce          ! Surface boundary condition: ocean fields
29   USE phycst           ! physical constants
30   USE albedo           ! albedo parameters
31   USE ice              ! LIM sea-ice variables
32   USE lbclnk           ! ocean lateral boundary condition
33   USE in_out_manager   ! I/O manager
34   USE lib_mpp          ! MPP library
35   USE wrk_nemo         ! work arrays
36   USE prtctl           ! Print control
37   USE cpl_oasis3, ONLY : lk_cpl
38   USE traqsr           ! clem: add penetration of solar flux into the calculation of heat budget
39   USE lib_fortran      ! to use key_nosignedzero
40
41   IMPLICIT NONE
42   PRIVATE
43
44   PUBLIC   lim_sbc_init   ! called by ice_init
45   PUBLIC   lim_sbc_flx    ! called by sbc_ice_lim
46   PUBLIC   lim_sbc_tau    ! called by sbc_ice_lim
47
48   REAL(wp)  ::   r1_rdtice            ! = 1. / rdt_ice
49   REAL(wp)  ::   epsi16 = 1.e-16_wp   ! constant values
50   REAL(wp)  ::   epsi20 = 1.e-20_wp   ! constant values
51   REAL(wp)  ::   rzero  = 0._wp   
52   REAL(wp)  ::   rone   = 1._wp
53
54   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau_oce, vtau_oce   ! air-ocean surface i- & j-stress     [N/m2]
55   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmod_io              ! modulus of the ice-ocean velocity   [m/s]
56   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   soce_0  , sice_0     ! cst SSS and ice salinity (levitating sea-ice)
57
58   !! * Substitutions
59#  include "vectopt_loop_substitute.h90"
60   !!----------------------------------------------------------------------
61   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
62   !! $Id$
63   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
64   !!----------------------------------------------------------------------
65CONTAINS
66
67   INTEGER FUNCTION lim_sbc_alloc()
68      !!-------------------------------------------------------------------
69      !!             ***  ROUTINE lim_sbc_alloc ***
70      !!-------------------------------------------------------------------
71      ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) ,                       &
72         &      sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc)
73         !
74      IF( lk_mpp             )   CALL mpp_sum( lim_sbc_alloc )
75      IF( lim_sbc_alloc /= 0 )   CALL ctl_warn('lim_sbc_alloc: failed to allocate arrays')
76   END FUNCTION lim_sbc_alloc
77
78
79   SUBROUTINE lim_sbc_flx( kt )
80      !!-------------------------------------------------------------------
81      !!                ***  ROUTINE lim_sbc_flx ***
82      !! 
83      !! ** Purpose :   Update the surface ocean boundary condition for heat
84      !!              salt and mass over areas where sea-ice is non-zero
85      !!         
86      !! ** Action  : - computes the heat and freshwater/salt fluxes
87      !!              at the ice-ocean interface.
88      !!              - Update the ocean sbc
89      !!     
90      !! ** Outputs : - qsr     : sea heat flux:     solar
91      !!              - qns     : sea heat flux: non solar
92      !!              - emp     : freshwater budget: volume flux
93      !!              - emps    : freshwater budget: concentration/dillution
94      !!              - fr_i    : ice fraction
95      !!              - tn_ice  : sea-ice surface temperature
96      !!              - alb_ice : sea-ice alberdo (lk_cpl=T)
97      !!
98      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
99      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
100      !!---------------------------------------------------------------------
101      INTEGER, INTENT(in) ::   kt    ! number of iteration
102      !
103      INTEGER  ::   ji, jj           ! dummy loop indices
104      INTEGER  ::   ierr             ! local integer
105      INTEGER  ::   ifvt, i1mfr, idfr               ! some switches
106      INTEGER  ::   iflt, ial, iadv, ifral, ifrdv
107      REAL(wp) ::   zinda, zindb, zfons, zpme              ! local scalars
108      REAL(wp) ::   zfmm             ! IOVINO freezing minus melting (F-M)
109      REAL(wp), POINTER, DIMENSION(:,:) ::   zfcm1 , zfcm2    ! solar/non solar heat fluxes
110      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp   ! 2D/3D workspace
111      !!---------------------------------------------------------------------
112     
113      CALL wrk_alloc( jpi, jpj, zfcm1 , zfcm2 )
114      IF( lk_cpl )   CALL wrk_alloc( jpi, jpj, jpl, zalb, zalbp )
115
116      !------------------------------------------!
117      !      heat flux at the ocean surface      !
118      !------------------------------------------!
119      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD)
120      ! changed to old_frld and old ht_i
121
122      DO jj = 1, jpj
123         DO ji = 1, jpi
124            zinda   = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) )
125            zindb   = 1.0 - MAX( rzero , SIGN( rone , - iatte(ji,jj) ) )
126            ifvt    = zinda  *  MAX( rzero , SIGN( rone, - phicif(ji,jj) ) )  !subscripts are bad here
127            i1mfr   = 1.0 - MAX( rzero , SIGN( rone ,  - at_i(ji,jj) ) )
128            idfr    = 1.0 - MAX( rzero , SIGN( rone , ( 1.0 - at_i(ji,jj) ) - pfrld(ji,jj) ) )
129            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
130            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
131            iadv    = ( 1  - i1mfr ) * zinda
132            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
133            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
134
135            ! switch --- 1.0 ---------------- 0.0 --------------------
136            ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137            ! zinda   | if pfrld = 1       | if pfrld < 1            |
138            !  -> ifvt| if pfrld old_ht_i
139            ! i1mfr   | if frld = 1        | if frld  < 1            |
140            ! idfr    | if frld <= pfrld    | if frld > pfrld        |
141            ! iflt    |
142            ! ial     |
143            ! iadv    |
144            ! ifral
145            ! ifrdv
146
147            !   computation the solar flux at ocean surface
148            zfcm1(ji,jj)   = pfrld(ji,jj) * qsr(ji,jj)  + &
149                 &           zindb * ( 1. - pfrld(ji,jj) ) * fstric(ji,jj) / MAX( iatte(ji,jj), epsi20 )
150            ! fstric     Solar flux transmitted trough the ice
151            ! qsr        Net short wave heat flux on free ocean
152            ! new line
153            fscmbq(ji,jj) = zindb * ( 1.0 - pfrld(ji,jj) ) * fstric(ji,jj) / MAX( iatte(ji,jj), epsi20 )
154
155            !  computation the non solar heat flux at ocean surface
156            zfcm2(ji,jj) = - zfcm1(ji,jj)                  &
157               &           + iflt    * ( fscmbq(ji,jj) )   & ! total abl -> fscmbq is given to the ocean
158               ! fscmbq and ffltbif are obsolete
159               !              &           + iflt * ffltbif(ji,jj) !!! only if one category is used
160               &           + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) * r1_rdtice   &
161               &           + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) )                   * r1_rdtice   &
162               &           + fhmec(ji,jj)     & ! new contribution due to snow melt in ridging!!
163               &           + fheat_rpo(ji,jj) & ! contribution from ridge formation
164               &           + fheat_res(ji,jj)
165            ! fscmbq  Part of the solar radiation transmitted through the ice and going to the ocean
166            !         computed in limthd_zdf.F90
167            ! ffltbif Total heat content of the ice (brine pockets+ice) / delta_t
168            ! qcmif   Energy needed to bring the ocean surface layer until its freezing (ok)
169            ! qldif   heat balance of the lead (or of the open ocean)
170            ! qfvbq   i think this is wrong!
171            ! ---> Array used to store energy in case of total lateral ablation
172            ! qfvbq latent heat uptake/release after accretion/ablation
173            ! qdtcn Energy from the turbulent oceanic heat flux heat flux coming in the lead
174
175            IF ( num_sal == 2 ) zfcm2(ji,jj) = zfcm2(ji,jj) + &
176               fhbri(ji,jj) ! new contribution due to brine drainage
177
178            ! bottom radiative component is sent to the computation of the
179            ! oceanic heat flux
180            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     
181
182            ! used to compute the oceanic heat flux at the next time step
183            qsr(ji,jj) = zfcm1(ji,jj)                                       ! solar heat flux
184            qns(ji,jj) = zfcm2(ji,jj) - fdtcn(ji,jj)                        ! non solar heat flux
185            !                           ! fdtcn : turbulent oceanic heat flux
186
187            !!gm   this IF prevents the vertorisation of the whole loop
188          !  IF ( ( ji == jiindx ) .AND. ( jj == jjindx) ) THEN
189          !     WRITE(numout,*) 'lim_sbc : heat fluxes '
190          !     WRITE(numout,*) ' at_i      : ', at_i(jiindx,jjindx)
191          !     WRITE(numout,*) ' ht_i      : ', SUM( ht_i(jiindx,jjindx,1:jpl) )
192          !     WRITE(numout,*) ' ht_s      : ', SUM( ht_s(jiindx,jjindx,1:jpl) )
193          !     WRITE(numout,*)
194          !     WRITE(numout,*) ' qsr       : ', qsr(jiindx,jjindx)
195          !     WRITE(numout,*) ' zfcm1     : ', zfcm1(jiindx,jjindx)
196          !     WRITE(numout,*) ' pfrld     : ', pfrld(jiindx,jjindx)
197          !     WRITE(numout,*) ' fstric    : ', fstric (jiindx,jjindx)
198          !     WRITE(numout,*)
199          !     WRITE(numout,*) ' qns       : ', qns(jiindx,jjindx)
200          !     WRITE(numout,*) ' zfcm2     : ', zfcm2(jiindx,jjindx)
201          !     WRITE(numout,*) ' zfcm1     : ', zfcm1(jiindx,jjindx)
202          !     WRITE(numout,*) ' ifral     : ', ifral
203          !     WRITE(numout,*) ' ial       : ', ial 
204          !     WRITE(numout,*) ' qcmif     : ', qcmif(jiindx,jjindx)
205          !     WRITE(numout,*) ' qldif     : ', qldif(jiindx,jjindx)
206          !     !WRITE(numout,*) ' qcmif / dt: ', qcmif(jiindx,jjindx) * r1_rdtice
207          !     !WRITE(numout,*) ' qldif / dt: ', qldif(jiindx,jjindx) * r1_rdtice
208          !     WRITE(numout,*) ' ifrdv     : ', ifrdv
209          !     WRITE(numout,*) ' qfvbq     : ', qfvbq(jiindx,jjindx)
210          !     WRITE(numout,*) ' qdtcn     : ', qdtcn(jiindx,jjindx)
211          !     !WRITE(numout,*) ' qfvbq / dt: ', qfvbq(jiindx,jjindx) * r1_rdtice
212          !     !WRITE(numout,*) ' qdtcn / dt: ', qdtcn(jiindx,jjindx) * r1_rdtice
213          !     WRITE(numout,*) ' '
214          !     WRITE(numout,*) ' fdtcn     : ', fdtcn(jiindx,jjindx)
215          !     WRITE(numout,*) ' fhmec     : ', fhmec(jiindx,jjindx)
216          !     WRITE(numout,*) ' fheat_rpo : ', fheat_rpo(jiindx,jjindx)
217          !     WRITE(numout,*) ' fhbri     : ', fhbri(jiindx,jjindx)
218          !     WRITE(numout,*) ' fheat_res : ', fheat_res(jiindx,jjindx)
219          !  ENDIF
220            !!gm   end
221         END DO
222      END DO
223
224      !------------------------------------------!
225      !      mass flux at the ocean surface      !
226      !------------------------------------------!
227
228!!gm   optimisation: this loop have to be merged with the previous one
229      DO jj = 1, jpj
230         DO ji = 1, jpi
231            !  case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED)
232            !  -------------------------------------------------------------------------------------
233            !  The idea of this approach is that the system that we consider is the ICE-OCEAN system
234            !  Thus  FW  flux  =  External ( E-P+snow melt)
235            !       Salt flux  =  Exchanges in the ice-ocean system then converted into FW
236            !                     Associated to Ice formation AND Ice melting
237            !                     Even if i see Ice melting as a FW and SALT flux
238            !       
239
240            !  computing freshwater exchanges at the ice/ocean interface
241            zpme = - emp(ji,jj)     * ( 1.0 - at_i(ji,jj)          )  &   ! evaporation over oceanic fraction
242               &   + tprecip(ji,jj) *         at_i(ji,jj)             &   ! all precipitation reach the ocean
243               &   - sprecip(ji,jj) * ( 1. - (pfrld(ji,jj)**betas) )  &   ! except solid precip intercepted by sea-ice
244               &   - rdmsnif(ji,jj) * r1_rdtice                       &   ! freshwaterflux due to snow melting
245               &   + fmmec(ji,jj)                                         ! snow falling when ridging
246
247
248            !  computing salt exchanges at the ice/ocean interface
249            !  sice should be the same as computed with the ice model
250            !zfons =  ( soce_0(ji,jj) - sice_0(ji,jj) ) * rdmicif(ji,jj) * r1_rdtice
251            ! SOCE
252            !zfons =  ( sss_m (ji,jj) - sice_0(ji,jj) ) * rdmicif(ji,jj) * r1_rdtice
253            zfmm = rdmicif(ji,jj) * r1_rdtice  ! IOVINO 
254            !CT useless            !  salt flux for constant salinity
255            !CT useless            fsalt(ji,jj)      =  zfons / ( sss_m(ji,jj) + epsi16 ) + fsalt_res(ji,jj)
256            !  salt flux for variable salinity
257            zinda             = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) )
258            !  correcting brine and salt fluxes
259            fsbri(ji,jj)      =  zinda*fsbri(ji,jj)
260            !  converting the salt fluxes from ice to a freshwater flux from ocean
261            ! fsalt_res(ji,jj)  =  fsalt_res(ji,jj) / ( sss_m(ji,jj) + epsi16 )
262            ! fseqv(ji,jj)      =  fseqv(ji,jj)     / ( sss_m(ji,jj) + epsi16 )
263            ! fsbri(ji,jj)      =  fsbri(ji,jj)     / ( sss_m(ji,jj) + epsi16 )
264            ! fsalt_rpo(ji,jj)  =  fsalt_rpo(ji,jj) / ( sss_m(ji,jj) + epsi16 )
265
266            !  freshwater mass exchange (positive to the ice, negative for the ocean ?)
267            !  actually it's a salt flux (so it's minus freshwater flux)
268            !  if sea ice grows, zfons is positive, fsalt also
269            !  POSITIVE SALT FLUX FROM THE ICE TO THE OCEAN
270            !  POSITIVE FRESHWATER FLUX FROM THE OCEAN TO THE ICE [kg.m-2.s-1]
271
272            emp(ji,jj) =  - zpme + zfmm ! volume flux IOVINO 
273            ! emp(ji,jj) = - zpme
274         END DO
275      END DO
276
277      IF( num_sal == 2 ) THEN      ! variable ice salinity: brine drainage included in the salt flux
278         emps(:,:) =   fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) ! + emp(:,:) ! IOVINO
279      ELSE                         ! constant ice salinity:
280         emps(:,:) =   fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) ! + emp(:,:)              ! IOVINO
281      ENDIF
282
283
284      !-----------------------------------------------!
285      !   Storing the transmitted variables           !
286      !-----------------------------------------------!
287      fr_i  (:,:)   = at_i(:,:)             ! Sea-ice fraction           
288      tn_ice(:,:,:) = t_su(:,:,:)           ! Ice surface temperature                     
289
290      !------------------------------------------------!
291      !    Computation of snow/ice and ocean albedo    !
292      !------------------------------------------------!
293      IF( lk_cpl ) THEN          ! coupled case
294         CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb )                  ! snow/ice albedo
295         !
296         alb_ice(:,:,:) =  0.5_wp * zalbp(:,:,:) + 0.5_wp * zalb (:,:,:)   ! Ice albedo (mean clear and overcast skys)
297      ENDIF
298
299      IF(ln_ctl) THEN
300         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' )
301         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps, clinfo2=' emps    : ' )
302         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' )
303         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl )
304      ENDIF
305      !
306      CALL wrk_dealloc( jpi, jpj, zfcm1 , zfcm2 )
307      IF( lk_cpl )   CALL wrk_dealloc( jpi, jpj, jpl, zalb, zalbp )
308      !
309   END SUBROUTINE lim_sbc_flx
310
311
312   SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce )
313      !!-------------------------------------------------------------------
314      !!                ***  ROUTINE lim_sbc_tau ***
315      !! 
316      !! ** Purpose : Update the ocean surface stresses due to the ice
317      !!         
318      !! ** Action  : * at each ice time step (every nn_fsbc time step):
319      !!                - compute the modulus of ice-ocean relative velocity
320      !!                  (*rho*Cd) at T-point (C-grid) or I-point (B-grid)
321      !!                      tmod_io = rhoco * | U_ice-U_oce |
322      !!                - update the modulus of stress at ocean surface
323      !!                      taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce |
324      !!              * at each ocean time step (every kt):
325      !!                  compute linearized ice-ocean stresses as
326      !!                      Utau = tmod_io * | U_ice - pU_oce |
327      !!                using instantaneous current ocean velocity (usually before)
328      !!
329      !!    NB: - ice-ocean rotation angle no more allowed
330      !!        - here we make an approximation: taum is only computed every ice time step
331      !!          This avoids mutiple average to pass from T -> U,V grids and next from U,V grids
332      !!          to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton...
333      !!
334      !! ** Outputs : - utau, vtau   : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes
335      !!              - taum         : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes
336      !!---------------------------------------------------------------------
337      INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index
338      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pu_oce, pv_oce   ! surface ocean currents
339      !!
340      INTEGER  ::   ji, jj   ! dummy loop indices
341      REAL(wp) ::   zat_u, zutau_ice, zu_t, zmodt   ! local scalar
342      REAL(wp) ::   zat_v, zvtau_ice, zv_t          !   -      -
343      !!---------------------------------------------------------------------
344      !
345      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==!   (i.e. surface module time-step)
346!CDIR NOVERRCHK
347         DO jj = 2, jpjm1                             !* update the modulus of stress at ocean surface (T-point)
348!CDIR NOVERRCHK
349            DO ji = fs_2, fs_jpim1
350               !                                               ! 2*(U_ice-U_oce) at T-point
351               zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   
352               zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) 
353               !                                              ! |U_ice-U_oce|^2
354               zmodt =  0.25_wp * (  zu_t * zu_t + zv_t * zv_t  )
355               !                                               ! update the ocean stress modulus
356               taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zmodt
357               tmod_io(ji,jj) = rhoco * SQRT( zmodt )          ! rhoco * |U_ice-U_oce| at T-point
358            END DO
359         END DO
360         CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. )
361         !
362         utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step
363         vtau_oce(:,:) = vtau(:,:)
364         !
365      ENDIF
366      !
367      !                                      !==  every ocean time-step  ==!
368      !
369      DO jj = 2, jpjm1                                !* update the stress WITHOUT a ice-ocean rotation angle
370         DO ji = fs_2, fs_jpim1   ! Vect. Opt.
371            zat_u  = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp   ! ice area at u and V-points
372            zat_v  = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp
373            !                                                   ! linearized quadratic drag formulation
374            zutau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) )
375            zvtau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) )
376            !                                                   ! stresses at the ocean surface
377            utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice
378            vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice
379         END DO
380      END DO
381      CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
382      !
383      IF(ln_ctl)   CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
384         &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
385     
386   END SUBROUTINE lim_sbc_tau
387
388
389   SUBROUTINE lim_sbc_init
390      !!-------------------------------------------------------------------
391      !!                  ***  ROUTINE lim_sbc_init  ***
392      !!             
393      !! ** Purpose : Preparation of the file ice_evolu for the output of
394      !!      the temporal evolution of key variables
395      !!
396      !! ** input   : Namelist namicedia
397      !!-------------------------------------------------------------------
398      !
399      IF(lwp) WRITE(numout,*)
400      IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition'
401      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~   '
402
403      !                                      ! allocate lim_sbc array
404      IF( lim_sbc_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' )
405      !
406      r1_rdtice = 1. / rdt_ice
407      !
408      soce_0(:,:) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case
409      sice_0(:,:) = sice
410      !
411      IF( cp_cfg == "orca" ) THEN            ! decrease ocean & ice reference salinities in the Baltic sea
412         WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND.   &
413            &   54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp         ) 
414            soce_0(:,:) = 4._wp
415            sice_0(:,:) = 2._wp
416         END WHERE
417      ENDIF
418      ! clem modif
419      iatte(:,:) = 1._wp
420      oatte(:,:) = 1._wp
421      !
422   END SUBROUTINE lim_sbc_init
423
424#else
425   !!----------------------------------------------------------------------
426   !!   Default option :        Dummy module       NO LIM 3.0 sea-ice model
427   !!----------------------------------------------------------------------
428CONTAINS
429   SUBROUTINE lim_sbc           ! Dummy routine
430   END SUBROUTINE lim_sbc
431#endif 
432
433   !!======================================================================
434END MODULE limsbc
Note: See TracBrowser for help on using the repository browser.