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

Last change on this file since 3982 was 3982, checked in by clem, 11 years ago

bug correction for penetrative solar flux

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