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_2.F90 in trunk/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

source: trunk/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90 @ 3294

Last change on this file since 3294 was 3294, checked in by rblod, 12 years ago

Merge of 3.4beta into the trunk

  • Property svn:keywords set to Id
File size: 24.1 KB
Line 
1MODULE limsbc_2
2   !!======================================================================
3   !!                       ***  MODULE limsbc_2   ***
4   !! LIM-2 :   updates the fluxes at the ocean surface with ice-ocean fluxes
5   !!======================================================================
6   !! History :  LIM  ! 2000-01 (H. Goosse) Original code
7   !!            1.0  ! 2002-07 (C. Ethe, G. Madec) re-writing F90
8   !!            3.0  ! 2006-07 (G. Madec) surface module
9   !!            3.3  ! 2009-05 (G. Garric, C. Bricaud) addition of the lim2_evp case
10   !!             -   ! 2010-11 (G. Madec) ice-ocean stress computed at each ocean time-step
11   !!            4.0  ! 2011-01  (A. R. Porter, STFC Daresbury) dynamical allocation
12   !!----------------------------------------------------------------------
13#if defined key_lim2
14   !!----------------------------------------------------------------------
15   !!   'key_lim2'                                    LIM 2.0 sea-ice model
16   !!----------------------------------------------------------------------
17   !!   lim_sbc_alloc_2 : allocate the limsbc arrays
18   !!   lim_sbc_init    : initialisation
19   !!   lim_sbc_flx_2   : update mass, heat and salt fluxes at the ocean surface
20   !!   lim_sbc_tau_2   : update i- and j-stresses, and its modulus at the ocean surface
21   !!----------------------------------------------------------------------
22   USE par_oce          ! ocean parameters
23   USE phycst           ! physical constants
24   USE dom_oce          ! ocean domain
25   USE dom_ice_2        ! LIM-2: ice domain
26   USE ice_2            ! LIM-2: ice variables
27   USE sbc_ice          ! surface boundary condition: ice
28   USE sbc_oce          ! surface boundary condition: ocean
29   USE sbccpl
30
31   USE albedo           ! albedo parameters
32   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges
33   USE lib_mpp          ! MPP library
34   USE wrk_nemo         ! work arrays
35   USE in_out_manager   ! I/O manager
36   USE diaar5, ONLY :   lk_diaar5
37   USE iom              ! I/O library
38   USE prtctl           ! Print control
39   USE cpl_oasis3, ONLY : lk_cpl
40
41   IMPLICIT NONE
42   PRIVATE
43
44   PUBLIC   lim_sbc_init_2     ! called by ice_init_2
45   PUBLIC   lim_sbc_flx_2      ! called by sbc_ice_lim_2
46   PUBLIC   lim_sbc_tau_2      ! called by sbc_ice_lim_2
47
48   REAL(wp)  ::   r1_rdtice            ! = 1. / rdt_ice
49   REAL(wp)  ::   epsi16 = 1.e-16_wp   ! constant values
50   REAL(wp)  ::   rzero  = 0._wp       !     -      -
51   REAL(wp)  ::   rone   = 1._wp       !     -      -
52   !
53   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   soce_0, sice_0   ! constant SSS and ice salinity used in levitating sea-ice case
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 relative velocity   [m/s]
56
57   !! * Substitutions
58#  include "vectopt_loop_substitute.h90"
59   !!----------------------------------------------------------------------
60   !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011)
61   !! $Id$
62   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
63   !!----------------------------------------------------------------------
64CONTAINS
65
66   INTEGER FUNCTION lim_sbc_alloc_2()
67      !!-------------------------------------------------------------------
68      !!             ***  ROUTINE lim_sbc_alloc_2 ***
69      !!-------------------------------------------------------------------
70      ALLOCATE( soce_0(jpi,jpj) , utau_oce(jpi,jpj) ,                       &
71         &      sice_0(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc_2)
72         !
73      IF( lk_mpp               )   CALL mpp_sum( lim_sbc_alloc_2 )
74      IF( lim_sbc_alloc_2 /= 0 )   CALL ctl_warn('lim_sbc_alloc_2: failed to allocate arrays.')
75      !
76   END FUNCTION lim_sbc_alloc_2
77
78
79   SUBROUTINE lim_sbc_flx_2( kt )
80      !!-------------------------------------------------------------------
81      !!                ***  ROUTINE lim_sbc_2 ***
82      !! 
83      !! ** Purpose :   Update surface ocean boundary condition over areas
84      !!              that are at least partially covered by sea-ice
85      !!         
86      !! ** Action  : - comput. of the momentum, heat and freshwater/salt
87      !!                fluxes at the ice-ocean interface.
88      !!              - Update the fluxes provided to the ocean
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      !!              - utau    : sea surface i-stress (ocean referential)
95      !!              - vtau    : sea surface j-stress (ocean referential)
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   ! dummy loop indices
106      INTEGER  ::   ii0, ii1, ij0, ij1         ! local integers
107      INTEGER  ::   ifvt, i1mfr, idfr, iflt    !   -       -
108      INTEGER  ::   ial, iadv, ifral, ifrdv    !   -       -
109      REAL(wp) ::   zqsr, zqns, zfm            ! local scalars
110      REAL(wp) ::   zinda, zfons, zemp         !   -      -
111      REAL(wp), POINTER, DIMENSION(:,:)   ::   zqnsoce       ! 2D workspace
112      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp   ! 2D/3D workspace
113      !!---------------------------------------------------------------------
114     
115      CALL wrk_alloc( jpi, jpj, zqnsoce )
116      CALL wrk_alloc( jpi, jpj, 1, zalb, zalbp )
117
118      !------------------------------------------!
119      !      heat flux at the ocean surface      !
120      !------------------------------------------!
121
122      zqnsoce(:,:) = qns(:,:)
123      DO jj = 1, jpj
124         DO ji = 1, jpi
125            zinda   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - pfrld(ji,jj) )   ) )
126            ifvt    = zinda * MAX( rzero , SIGN( rone,  - phicif(ji,jj)           ) )
127            i1mfr   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - frld(ji,jj) )    ) )
128            idfr    = 1.0   - MAX( rzero , SIGN( rone, frld(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!!$            zinda   = 1.0 - AINT( pfrld(ji,jj) )                   !   = 0. if pure ocean else 1. (at previous time)
136!!$
137!!$            i1mfr   = 1.0 - AINT(  frld(ji,jj) )                   !   = 0. if pure ocean else 1. (at current  time)
138!!$
139!!$            IF( phicif(ji,jj) <= 0. ) THEN   ;   ifvt = zinda      !   = 1. if (snow and no ice at previous time) else 0. ???
140!!$            ELSE                             ;   ifvt = 0.
141!!$            ENDIF
142!!$
143!!$            IF( frld(ji,jj) >= pfrld(ji,jj) ) THEN   ;   idfr = 0.  !   = 0. if lead fraction increases from previous to current
144!!$            ELSE                                     ;   idfr = 1.   
145!!$            ENDIF
146!!$
147!!$            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )    !   = 1. if ice (not only snow) at previous and pure ocean at current
148!!$
149!!$            ial     = ifvt   * i1mfr    +    ( 1 - ifvt ) * idfr
150!!$!                 snow no ice   ice         ice or nothing  lead fraction increases
151!!$!                 at previous   now           at previous
152!!$!                -> ice aera increases  ???         -> ice aera decreases ???
153!!$
154!!$            iadv    = ( 1  - i1mfr ) * zinda
155!!$!                     pure ocean      ice at
156!!$!                     at current      previous
157!!$!                        -> = 1. if ice disapear between previous and current
158!!$
159!!$            ifral   = ( 1  - i1mfr * ( 1 - ial ) ) 
160!!$!                            ice at     ???
161!!$!                            current         
162!!$!                         -> ???
163!!$
164!!$            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv
165!!$!                                                    ice disapear
166!!$
167!!$
168
169            !   computation the solar flux at ocean surface
170#if defined key_coupled 
171            zqsr = qsr_tot(ji,jj) + ( fstric(ji,jj) - qsr_ice(ji,jj,1) ) * ( 1.0 - pfrld(ji,jj) )
172#else
173            zqsr = pfrld(ji,jj) * qsr(ji,jj)  + ( 1.  - pfrld(ji,jj) ) * fstric(ji,jj)
174#endif           
175            !  computation the non solar heat flux at ocean surface
176            zqns    =  - ( 1. - thcm(ji,jj) ) * zqsr   &   ! part of the solar energy used in leads
177               &       + iflt    * ( fscmbq(ji,jj) + ffltbif(ji,jj) )                            &
178               &       + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) * r1_rdtice    &
179               &       + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) )                   * r1_rdtice 
180
181            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     ! ???
182            !
183            qsr  (ji,jj) = zqsr                                          ! solar heat flux
184            qns  (ji,jj) = zqns - fdtcn(ji,jj)                           ! non solar heat flux
185         END DO
186      END DO
187
188      CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) )     
189      CALL iom_put( 'qns_io_cea', qns(:,:) - zqnsoce(:,:) * pfrld(:,:) )     
190      CALL iom_put( 'qsr_io_cea', fstric(:,:) * (1.e0 - pfrld(:,:)) )
191
192      !------------------------------------------!
193      !      mass flux at the ocean surface      !
194      !------------------------------------------!
195      DO jj = 1, jpj
196         DO ji = 1, jpi
197            !
198#if defined key_coupled
199            ! freshwater exchanges at the ice-atmosphere / ocean interface (coupled mode)
200            zemp = emp_tot(ji,jj) - emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !
201               &   + rdmsnif(ji,jj) * r1_rdtice                                   !  freshwaterflux due to snow melting
202#else
203            !  computing freshwater exchanges at the ice/ocean interface
204            zemp = + emp(ji,jj)     *         frld(ji,jj)      &   !  e-p budget over open ocean fraction
205               &   - tprecip(ji,jj) * ( 1. -  frld(ji,jj) )    &   !  liquid precipitation reaches directly the ocean
206               &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  change in ice cover within the time step
207               &   + rdmsnif(ji,jj) * r1_rdtice                    !  freshwater flux due to snow melting
208#endif           
209            !
210            !  computing salt exchanges at the ice/ocean interface
211            zfons = ( soce_0(ji,jj) - sice_0(ji,jj) ) * ( rdmicif(ji,jj) * r1_rdtice ) 
212            !
213            !  converting the salt flux from ice to a freshwater flux from ocean
214            zfm  = zfons / ( sss_m(ji,jj) + epsi16 )
215            !
216            emps(ji,jj) = zemp + zfm      ! surface ocean concentration/dilution effect (use on SSS evolution)
217            emp (ji,jj) = zemp            ! surface ocean volume flux (use on sea-surface height evolution)
218            !
219         END DO
220      END DO
221
222      IF( lk_diaar5 ) THEN       ! AR5 diagnostics
223         CALL iom_put( 'isnwmlt_cea'  ,                 rdmsnif(:,:) * r1_rdtice )
224         CALL iom_put( 'fsal_virt_cea',   soce_0(:,:) * rdmicif(:,:) * r1_rdtice )
225         CALL iom_put( 'fsal_real_cea', - sice_0(:,:) * rdmicif(:,:) * r1_rdtice )
226      ENDIF
227
228      !-----------------------------------------------!
229      !   Coupling variables                          !
230      !-----------------------------------------------!
231
232#if defined key_coupled
233      tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature       
234      ht_i(:,:,1) = hicif(:,:)
235      ht_s(:,:,1) = hsnif(:,:)
236      a_i(:,:,1) = fr_i(:,:)
237      !                                  ! Computation of snow/ice and ocean albedo
238      CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb )
239      alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys)
240      CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo
241#endif
242
243      IF(ln_ctl) THEN            ! control print
244         CALL prt_ctl(tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns   , clinfo2=' qns     : ')
245         CALL prt_ctl(tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps  , clinfo2=' emps    : ')
246         CALL prt_ctl(tab2d_1=utau  , clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
247            &         tab2d_2=vtau  , clinfo2=' vtau    : '        , mask2=vmask )
248         CALL prt_ctl(tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ', tab2d_2=tn_ice(:,:,1), clinfo2=' tn_ice  : ')
249      ENDIF 
250      !
251      CALL wrk_dealloc( jpi, jpj, zqnsoce )
252      CALL wrk_dealloc( jpi, jpj, 1, zalb, zalbp )
253      !
254   END SUBROUTINE lim_sbc_flx_2
255
256
257   SUBROUTINE lim_sbc_tau_2( kt , pu_oce, pv_oce )
258      !!-------------------------------------------------------------------
259      !!                ***  ROUTINE lim_sbc_tau_2 ***
260      !! 
261      !! ** Purpose : Update the ocean surface stresses due to the ice
262      !!         
263      !! ** Action  : * at each ice time step (every nn_fsbc time step):
264      !!                - compute the modulus of ice-ocean relative velocity
265      !!                  at T-point (C-grid) or I-point (B-grid)
266      !!                      tmod_io = rhoco * | U_ice-U_oce |
267      !!                - update the modulus of stress at ocean surface
268      !!                      taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce |
269      !!              * at each ocean time step (each kt):
270      !!                  compute linearized ice-ocean stresses as
271      !!                      Utau = tmod_io * | U_ice - pU_oce |
272      !!                using instantaneous current ocean velocity (usually before)
273      !!
274      !!    NB: - the averaging operator used depends on the ice dynamics grid (cp_ice_msh='I' or 'C')
275      !!        - ice-ocean rotation angle only allowed in cp_ice_msh='I' case
276      !!        - here we make an approximation: taum is only computed every ice time step
277      !!          This avoids mutiple average to pass from T -> U,V grids and next from U,V grids
278      !!          to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximation...
279      !!
280      !! ** Outputs : - utau, vtau : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes
281      !!              - taum       : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes
282      !!---------------------------------------------------------------------
283      INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index
284      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pu_oce, pv_oce   ! surface ocean currents
285      !!
286      INTEGER  ::   ji, jj   ! dummy loop indices
287      REAL(wp) ::   zfrldu, zat_u, zu_i, zutau_ice, zu_t, zmodt   ! local scalar
288      REAL(wp) ::   zfrldv, zat_v, zv_i, zvtau_ice, zv_t, zmodi   !   -      -
289      REAL(wp) ::   zsang, zumt                                   !    -         -
290      REAL(wp), POINTER, DIMENSION(:,:) ::   ztio_u, ztio_v   ! ocean stress below sea-ice
291      !!---------------------------------------------------------------------
292      !
293      CALL wrk_alloc( jpi, jpj, ztio_u, ztio_v )
294      !
295      SELECT CASE( cp_ice_msh )     
296      !                             !-----------------------!
297      CASE( 'I' )                   !  B-grid ice dynamics  !   I-point (i.e. F-point with sea-ice indexation)
298         !                          !--=--------------------!
299         !
300         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step)
301!CDIR NOVERRCHK
302            DO jj = 1, jpj                               !* modulus of ice-ocean relative velocity at I-point
303!CDIR NOVERRCHK
304               DO ji = 1, jpi
305                  zu_i  = u_ice(ji,jj) - u_oce(ji,jj)                   ! ice-ocean relative velocity at I-point
306                  zv_i  = v_ice(ji,jj) - v_oce(ji,jj)
307                  tmod_io(ji,jj) = SQRT( zu_i * zu_i + zv_i * zv_i )    ! modulus of this velocity (at I-point)
308               END DO
309            END DO
310!CDIR NOVERRCHK
311            DO jj = 1, jpjm1                             !* update the modulus of stress at ocean surface (T-point)
312!CDIR NOVERRCHK
313               DO ji = 1, jpim1   ! NO vector opt.
314                  !                                               ! modulus of U_ice-U_oce at T-point
315                  zumt  = 0.25_wp * (  tmod_io(ji+1,jj) + tmod_io(ji  ,jj  )    &   
316                     &               + tmod_io(ji,jj+1) + tmod_io(ji+1,jj+1)  )
317                  !                                               ! update the modulus of stress at ocean surface
318                  taum(ji,jj) = frld(ji,jj) * taum(ji,jj) + ( 1._wp - frld(ji,jj) ) * rhoco * zumt * zumt
319               END DO
320            END DO
321            CALL lbc_lnk( taum, 'T', 1. )
322            !
323            utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step
324            vtau_oce(:,:) = vtau(:,:)
325            !
326         ENDIF
327         !
328         !                                        !==  at each ocean time-step  ==!
329         !
330         !                                               !* ice/ocean stress WITH a ice-ocean rotation angle at I-point
331         DO jj = 2, jpj
332            zsang  = SIGN( 1._wp, gphif(1,jj) ) * sangvg          ! change the cosine angle sign in the SH
333            DO ji = 2, jpi    ! NO vect. opt. possible
334               ! ... ice-ocean relative velocity at I-point using instantaneous surface ocean current at u- & v-pts
335               zu_i = u_ice(ji,jj) - 0.5_wp * ( pu_oce(ji-1,jj  ) + pu_oce(ji-1,jj-1) ) * tmu(ji,jj)
336               zv_i = v_ice(ji,jj) - 0.5_wp * ( pv_oce(ji  ,jj-1) + pv_oce(ji-1,jj-1) ) * tmu(ji,jj)
337               ! ... components of stress with a ice-ocean rotation angle
338               zmodi = rhoco * tmod_io(ji,jj)                     
339               ztio_u(ji,jj) = zmodi * ( cangvg * zu_i - zsang * zv_i )
340               ztio_v(ji,jj) = zmodi * ( cangvg * zv_i + zsang * zu_i )
341            END DO
342         END DO
343         !                                               !* surface ocean stresses at u- and v-points
344         DO jj = 2, jpjm1
345            DO ji = 2, jpim1   ! NO vector opt.
346               !                                   ! ice-ocean stress at U and V-points  (from I-point values)
347               zutau_ice  = 0.5_wp * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) )
348               zvtau_ice  = 0.5_wp * ( ztio_v(ji,jj+1) + ztio_v(ji+1,jj+1) )
349               !                                   ! open-ocean (lead) fraction at U- & V-points (from T-point values)
350               zfrldu = 0.5_wp * ( frld(ji,jj) + frld(ji+1,jj) )
351               zfrldv = 0.5_wp * ( frld(ji,jj) + frld(ji,jj+1) )
352               !                                   ! update the surface ocean stress (ice-cover wheighted)
353               utau(ji,jj) = zfrldu * utau_oce(ji,jj) + ( 1._wp - zfrldu ) * zutau_ice
354               vtau(ji,jj) = zfrldv * vtau_oce(ji,jj) + ( 1._wp - zfrldv ) * zvtau_ice
355            END DO
356         END DO
357         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )     ! lateral boundary condition
358         !
359         !
360         !                          !-----------------------!
361      CASE( 'C' )                   !  C-grid ice dynamics  !   U & V-points (same as in the ocean)
362         !                          !--=--------------------!
363         !
364         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step)
365!CDIR NOVERRCHK
366            DO jj = 2, jpjm1                          !* modulus of the ice-ocean velocity at T-point
367!CDIR NOVERRCHK
368               DO ji = fs_2, fs_jpim1
369                  zu_t  = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   ! 2*(U_ice-U_oce) at T-point
370                  zv_t  = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1)     
371                  zmodt =  0.25_wp * (  zu_t * zu_t + zv_t * zv_t  )                      ! |U_ice-U_oce|^2
372                  !                                               ! update the modulus of stress at ocean surface
373                  taum   (ji,jj) = frld(ji,jj) * taum(ji,jj) + ( 1._wp - frld(ji,jj) ) * rhoco * zmodt
374                  tmod_io(ji,jj) = SQRT( zmodt ) * rhoco          ! rhoco*|Uice-Uoce|
375               END DO
376            END DO
377            CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. )
378            !
379            utau_oce(:,:) = utau(:,:)                 !* save the air-ocean stresses at ice time-step
380            vtau_oce(:,:) = vtau(:,:)
381            !
382         ENDIF
383         !
384         !                                        !==  at each ocean time-step  ==!
385         !
386         DO jj = 2, jpjm1                             !* ice stress over ocean WITHOUT a ice-ocean rotation angle
387            DO ji = fs_2, fs_jpim1
388               !                                            ! ocean area at u- & v-points
389               zfrldu  = 0.5_wp * ( frld(ji,jj) + frld(ji+1,jj) )
390               zfrldv  = 0.5_wp * ( frld(ji,jj) + frld(ji,jj+1) )
391               !                                            ! quadratic drag formulation without rotation
392               !                                            ! using instantaneous surface ocean current
393               zutau_ice = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) )
394               zvtau_ice = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) )
395               !                                            ! update the surface ocean stress (ice-cover wheighted)
396               utau(ji,jj) = zfrldu * utau_oce(ji,jj) + ( 1._wp - zfrldu ) * zutau_ice
397               vtau(ji,jj) = zfrldv * vtau_oce(ji,jj) + ( 1._wp - zfrldv ) * zvtau_ice
398            END DO
399         END DO
400         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
401         !
402      END SELECT
403
404      IF(ln_ctl)   CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
405         &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
406     
407      CALL wrk_dealloc( jpi, jpj, ztio_u, ztio_v )
408      !
409   END SUBROUTINE lim_sbc_tau_2
410
411
412   SUBROUTINE lim_sbc_init_2
413      !!-------------------------------------------------------------------
414      !!                  ***  ROUTINE lim_sbc_init  ***
415      !!             
416      !! ** Purpose : Preparation of the file ice_evolu for the output of
417      !!      the temporal evolution of key variables
418      !!
419      !! ** input   : Namelist namicedia
420      !!-------------------------------------------------------------------
421      !
422      IF(lwp) WRITE(numout,*)
423      IF(lwp) WRITE(numout,*) 'lim_sbc_init_2 : LIM-2 sea-ice - surface boundary condition'
424      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~   '
425
426      !                                      ! allocate lim_sbc arrays
427      IF( lim_sbc_alloc_2() /= 0 )   CALL ctl_stop( 'STOP', 'lim_sbc_flx_2 : unable to allocate arrays' )
428      !
429      r1_rdtice = 1._wp / rdt_ice
430      !
431      soce_0(:,:) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case
432      sice_0(:,:) = sice
433      !
434      IF( cp_cfg == "orca" ) THEN            ! decrease ocean & ice reference salinities in the Baltic sea
435         WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND.   &
436            &   54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp         ) 
437            soce_0(:,:) = 4._wp
438            sice_0(:,:) = 2._wp
439         END WHERE
440      ENDIF
441      !
442   END SUBROUTINE lim_sbc_init_2
443
444#else
445   !!----------------------------------------------------------------------
446   !!   Default option         Empty module        NO LIM 2.0 sea-ice model
447   !!----------------------------------------------------------------------
448#endif 
449
450   !!======================================================================
451END MODULE limsbc_2
Note: See TracBrowser for help on using the repository browser.