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

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

correction of fresh water budget for LIM3, see ticket 1116

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