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 branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2 – NEMO

source: branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90 @ 2633

Last change on this file since 2633 was 2633, checked in by trackstand2, 13 years ago

Renamed wrk_use => wrk_in_use and wrk_release => wrk_not_released

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