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

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