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

source: trunk/NEMO/LIM_SRC_3/limsbc.F90 @ 1264

Last change on this file since 1264 was 1146, checked in by rblod, 16 years ago

Add svn Id (first try), see ticket #210

  • Property svn:keywords set to Id
File size: 24.5 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   !!----------------------------------------------------------------------
10#if defined key_lim3
11   !!----------------------------------------------------------------------
12   !!   'key_lim3'                                    LIM 3.0 sea-ice model
13   !!----------------------------------------------------------------------
14   !!   lim_sbc  : flux at the ice / ocean interface
15   !!----------------------------------------------------------------------
16   USE oce
17   USE par_oce          ! ocean parameters
18   USE par_ice          ! ice parameters
19   USE dom_oce          ! ocean domain
20   USE sbc_ice          ! Surface boundary condition: sea-ice fields
21   USE sbc_oce          ! Surface boundary condition: ocean fields
22   USE phycst           ! physical constants
23   USE ice_oce          ! sea-ice variable
24   USE ice              ! LIM sea-ice variables
25   USE iceini           ! ???
26   USE dynspg_oce       ! choice of the surface pressure gradient scheme
27
28   USE lbclnk           ! ocean lateral boundary condition
29   USE in_out_manager   ! I/O manager
30   USE albedo           ! albedo parameters
31   USE prtctl           ! Print control
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC   lim_sbc_flx   ! called by sbc_ice_lim
37   PUBLIC   lim_sbc_tau   ! called by sbc_ice_lim
38
39   REAL(wp)  ::   epsi16 = 1.e-16  ! constant values
40   REAL(wp)  ::   rzero  = 0.e0   
41   REAL(wp)  ::   rone   = 1.e0
42
43   REAL(wp), DIMENSION(jpi,jpj) ::   utau_oce   !: atm.-ocean surface i-stress (ocean referential)     [N/m2]
44   REAL(wp), DIMENSION(jpi,jpj) ::   vtau_oce   !: atm.-ocean surface j-stress (ocean referential)     [N/m2]
45   !! * Substitutions
46#  include "vectopt_loop_substitute.h90"
47   !!----------------------------------------------------------------------
48   !! NEMO/LIM  3.0 ,  UCL-LOCEAN-IPSL (2008)
49   !! $Id$
50   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
51   !!----------------------------------------------------------------------
52
53CONTAINS
54
55   SUBROUTINE lim_sbc_tau( kt, kcpl )
56      !!-------------------------------------------------------------------
57      !!                ***  ROUTINE lim_sbc_tau ***
58      !! 
59      !! ** Purpose : Update the ocean surface stresses due to the ice
60      !!         
61      !! ** Action  : - compute the ice-ocean stress depending on kcpl:
62      !!              fluxes at the ice-ocean interface.
63      !!     Case 0  :  old LIM-3 way, computed at ice time-step only
64      !!     Case 1  :  at each ocean time step the stresses are computed
65      !!                using the current ocean velocity (now)
66      !!     Case 2  :  combination of half case 0 + half case 1
67      !!     
68      !! ** Outputs : - utau   : sea surface i-stress (ocean referential)
69      !!              - vtau   : sea surface j-stress (ocean referential)
70      !!
71      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
72      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
73      !!---------------------------------------------------------------------
74      INTEGER ::   kt     ! number of ocean iteration
75      INTEGER ::   kcpl   ! ice-ocean coupling indicator: =0  LIM-3 old case
76      !                   !                               =1  stresses computed using now ocean velocity
77      !                   !                               =2  combination of 0 and 1 cases
78      !!
79      INTEGER  ::   ji, jj           ! dummy loop indices
80      REAL(wp) ::   zfrldu, zfrldv   ! lead fraction at U- & V-points
81      REAL(wp) ::   ztglx , ztgly
82      REAL(wp) ::   zat_u, zu_ico, zutaui, zu_u, zv_u, zmodu, zmod
83      REAL(wp) ::   zat_v, zv_ico, zvtaui, zu_v, zv_v, zmodv, zsang
84
85#if defined key_coupled   
86      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb     ! albedo of ice under overcast sky
87      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalbp    ! albedo of ice under clear sky
88#endif
89      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! ocean stress below sea-ice
90      !!---------------------------------------------------------------------
91
92      IF( kt == nit000 ) THEN
93         IF(lwp) WRITE(numout,*)
94         IF(lwp) WRITE(numout,*) 'lim_sbc_tau : LIM 3.0 sea-ice - surface ocean momentum fluxes'
95         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
96      ENDIF
97
98      SELECT CASE( kcpl )
99         !                                           !--------------------------------!
100      CASE( 0 )                                   !  LIM 3 old stress computation  !  (at ice timestep only)
101         !                                        !--------------------------------!
102         ! ... ice stress over ocean with a ice-ocean rotation angle
103         DO jj = 1, jpj
104            ! ... change the sinus angle sign in the south hemisphere
105            zsang  = SIGN(1.e0, gphif(1,jj) ) * sangvg
106            DO ji = 1, jpi
107               ! ... ice velocity relative to the ocean
108               zu_ico = u_ice(ji,jj) - u_oce(ji,jj)
109               zv_ico = v_ice(ji,jj) - v_oce(ji,jj)
110               zmod  = SQRT( zu_ico * zu_ico + zv_ico * zv_ico ) 
111               ! quadratic drag formulation
112               ztglx = rhoco * zmod * ( cangvg * zu_ico - zsang * zv_ico )
113               ztgly = rhoco * zmod * ( cangvg * zv_ico + zsang * zu_ico )
114               ! IMPORTANT
115               ! these lines are bound to prevent numerical oscillations
116               ! in the ice-ocean stress
117               ! They are physically ill-based. There is a cleaner solution
118               ! to try (remember discussion in Paris Gurvan)
119               ztio_u(ji,jj) = ztglx * exp( - zmod / 0.5 ) 
120               ztio_v(ji,jj) = ztgly * exp( - zmod / 0.5 ) 
121               !
122            END DO
123         END DO
124
125         DO jj = 2, jpjm1
126            DO ji = fs_2, fs_jpim1   ! vertor opt.
127               ! ... open-ocean (lead) fraction at U- & V-points (from T-point values)
128               zfrldu = 0.5 * ( ato_i(ji,jj) + ato_i(ji+1,jj  ) )
129               zfrldv = 0.5 * ( ato_i(ji,jj) + ato_i(ji  ,jj+1) )
130               ! update surface ocean stress
131               utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * ztio_u(ji,jj)
132               vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * ztio_v(ji,jj)
133               !
134            END DO
135         END DO
136
137         ! boundary condition on the stress (utau,vtau)
138         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )
139         !
140         !                                        !--------------------------------!
141      CASE( 1 )                                   !  Use the now velocity          !  (at each ocean timestep)
142         !                                        !--------------------------------!
143         ! ... save the air-ocean stresses at ice time-step
144         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
145            utau_oce(:,:) = utau(:,:)
146            vtau_oce(:,:) = vtau(:,:)
147         ENDIF
148         ! ... ice stress over ocean with a ice-ocean rotation angle
149         DO jj = 2, jpjm1
150            zsang  = SIGN(1.e0, gphif(1,jj-1) ) * sangvg
151            DO ji = fs_2, fs_jpim1
152               ! computation of wind stress over ocean in X and Y direction
153               zat_u  = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5      ! ice area at u and V-points
154               zat_v  = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5
155
156               zu_u   = u_ice(ji,jj) - un(ji,jj,1)                  ! u ice-ocean velocity at U-point
157               zv_v   = v_ice(ji,jj) - vn(ji,jj,1)                  ! v ice-ocean velocity at V-point
158               !                                                    ! u ice-ocean velocity at V-point
159               zu_v   = 0.25 * (  u_ice(ji,jj  ) - un(ji,jj  ,1)  +  u_ice(ji+1,jj  ) - un(ji+1,jj  ,1)    &
160                  &             + u_ice(ji,jj-1) - un(ji,jj-1,1)  +  u_ice(ji+1,jj-1) - un(ji+1,jj-1,1)  ) 
161               !                                                    ! v ice-ocean velocity at U-point
162               zv_u   = 0.25 * (  v_ice(ji-1,jj+1) - vn(ji-1,jj+1,1)  +  v_ice(ji,jj+1) - vn(ji,jj+1,1)    &
163                  &             + v_ice(ji-1,jj  ) - vn(ji-1,jj  ,1)  +  v_ice(ji,jj  ) - vn(ji,jj  ,1)  )
164               zmodu    = SQRT( zu_u * zu_u + zv_u * zv_u )         ! module of the ice-ocean velocity at U-point
165               zmodv    = SQRT( zu_v * zu_v + zv_v * zv_v )         ! module of the ice-ocean velocity at V-point
166               zutaui   = rhoco * zmodu * ( cangvg * zu_u - zsang * zv_u ) 
167               zvtaui   = rhoco * zmodv * ( cangvg * zv_v + zsang * zu_v ) 
168
169               utau(ji,jj) = ( 1.-zat_u ) * utau_oce(ji,jj) + zat_u * zutaui    ! stress at the ocean surface
170               vtau(ji,jj) = ( 1.-zat_v ) * vtau_oce(ji,jj) + zat_v * zvtaui
171            END DO
172         END DO
173         ! boundary condition on the stress (utau,vtau)
174         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )
175         !
176         !                                        !--------------------------------!
177      CASE( 2 )                                   !  mixed 0 and 2 cases           !  (at each ocean timestep)
178         !                                        !--------------------------------!
179         ! ... save the air-ocean stresses at ice time-step
180         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
181            utau_oce(:,:) = utau(:,:)
182            vtau_oce(:,:) = vtau(:,:)
183         ENDIF
184         ! ... ice stress over ocean with a ice-ocean rotation angle
185         DO jj = 2, jpjm1
186            zsang  = SIGN(1.e0, gphif(1,jj-1) ) * sangvg
187            DO ji = fs_2, fs_jpim1
188               ! computation of wind stress over ocean in X and Y direction
189               zat_u = at_i(ji,jj) + at_i(ji+1,jj) * 0.5     ! ice area at u and V-points
190               zat_v = at_i(ji,jj) + at_i(ji,jj+1) * 0.5 
191
192               !!gm bug mixing U and V points value below     ====>>> to be corrected
193               zu_ico   = u_ice(ji,jj) - 0.5 * ( un(ji,jj,1) - ssu_m(ji,jj) )   ! ice-oce velocity using un and ssu_m
194               zv_ico   = v_ice(ji,jj) - 0.5 * ( vn(ji,jj,1) - ssu_m(ji,jj) )
195               !                                        ! module of the ice-ocean velocity
196               zmod     = SQRT( zu_ico * zu_ico + zv_ico * zv_ico )
197               !                                        ! quadratic drag formulation with rotation
198               zutaui   = rhoco * zmod * ( cangvg * zu_ico - zsang * zv_ico )
199               zvtaui   = rhoco * zmod * ( cangvg * zv_ico + zsang * zu_ico )
200               !
201               utau(ji,jj) = ( 1.-zat_u ) * utau_oce(ji,jj) + zat_u * zutaui    ! stress at the ocean surface
202               vtau(ji,jj) = ( 1.-zat_v ) * vtau_oce(ji,jj) + zat_v * zvtaui
203            END DO
204         END DO
205         ! boundary condition on the stress (utau,vtau)
206         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )
207         !
208      END SELECT
209      IF(ln_ctl)   CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
210         &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
211     
212   END SUBROUTINE lim_sbc_tau
213
214
215   SUBROUTINE lim_sbc_flx( kt )
216      !!-------------------------------------------------------------------
217      !!                ***  ROUTINE lim_sbc_flx ***
218      !! 
219      !! ** Purpose :   Update the surface ocean boundary condition for heat
220      !!              salt and mass over areas where sea-ice is non-zero
221      !!         
222      !! ** Action  : - computes the heat and freshwater/salt fluxes
223      !!              at the ice-ocean interface.
224      !!              - Update the ocean sbc
225      !!     
226      !! ** Outputs : - qsr     : sea heat flux:     solar
227      !!              - qns     : sea heat flux: non solar
228      !!              - emp     : freshwater budget: volume flux
229      !!              - emps    : freshwater budget: concentration/dillution
230      !!              - fr_i    : ice fraction
231      !!              - tn_ice  : sea-ice surface temperature
232      !!              - alb_ice : sea-ice alberdo (lk_cpl=T)
233      !!
234      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
235      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
236      !!---------------------------------------------------------------------
237      INTEGER ::   kt    ! number of iteration
238      !!
239      INTEGER  ::   ji, jj           ! dummy loop indices
240      INTEGER  ::   ifvt, i1mfr, idfr               ! some switches
241      INTEGER  ::   iflt, ial, iadv, ifral, ifrdv
242      REAL(wp) ::   zinda            ! switch for testing the values of ice concentration
243      REAL(wp) ::   zfons            ! salt exchanges at the ice/ocean interface
244      REAL(wp) ::   zpme             ! freshwater exchanges at the ice/ocean interface
245      REAL(wp), DIMENSION(jpi,jpj) ::   zfcm1 , zfcm2    ! solar/non solar heat fluxes
246#if defined key_coupled   
247      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb     ! albedo of ice under overcast sky
248      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalbp    ! albedo of ice under clear sky
249#endif
250      !!---------------------------------------------------------------------
251
252      IF( kt == nit000 ) THEN
253         IF(lwp) WRITE(numout,*)
254         IF(lwp) WRITE(numout,*) 'lim_sbc_flx : LIM 3.0 sea-ice - heat salt and mass ocean surface fluxes'
255         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
256      ENDIF
257
258      !------------------------------------------!
259      !      heat flux at the ocean surface      !
260      !------------------------------------------!
261      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD)
262      ! changed to old_frld and old ht_i
263
264      DO jj = 1, jpj
265         DO ji = 1, jpi
266            zinda   = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) )
267            ifvt    = zinda  *  MAX( rzero , SIGN( rone, -phicif  (ji,jj) ) )  !subscripts are bad here
268            i1mfr   = 1.0 - MAX( rzero , SIGN( rone ,  - ( at_i(ji,jj)       ) ) )
269            idfr    = 1.0 - MAX( rzero , SIGN( rone , ( 1.0 - at_i(ji,jj) ) - pfrld(ji,jj) ) )
270            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
271            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
272            iadv    = ( 1  - i1mfr ) * zinda
273            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
274            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
275
276            ! switch --- 1.0 ---------------- 0.0 --------------------
277            ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
278            ! zinda   | if pfrld = 1       | if pfrld < 1            |
279            !  -> ifvt| if pfrld old_ht_i
280            ! i1mfr   | if frld = 1        | if frld  < 1            |
281            ! idfr    | if frld <= pfrld    | if frld > pfrld        |
282            ! iflt    |
283            ! ial     |
284            ! iadv    |
285            ! ifral
286            ! ifrdv
287
288            !   computation the solar flux at ocean surface
289            zfcm1(ji,jj)   = pfrld(ji,jj) * qsr(ji,jj)  + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj)
290            ! fstric     Solar flux transmitted trough the ice
291            ! qsr        Net short wave heat flux on free ocean
292            ! new line
293            fscmbq(ji,jj) = ( 1.0 - pfrld(ji,jj) ) * fstric(ji,jj)
294
295            !  computation the non solar heat flux at ocean surface
296            zfcm2(ji,jj) = - zfcm1(ji,jj)                  &
297               &           + iflt    * ( fscmbq(ji,jj) )   & ! total abl -> fscmbq is given to the ocean
298               ! fscmbq and ffltbif are obsolete
299               !              &           + iflt * ffltbif(ji,jj) !!! only if one category is used
300               &           + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) / rdt_ice   &
301               &           + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) / rdt_ice                     &
302               &           + fhmec(ji,jj)     & ! new contribution due to snow melt in ridging!!
303               &           + fheat_rpo(ji,jj) & ! contribution from ridge formation
304               &           + fheat_res(ji,jj)
305            ! fscmbq  Part of the solar radiation transmitted through the ice and going to the ocean
306            !         computed in limthd_zdf.F90
307            ! ffltbif Total heat content of the ice (brine pockets+ice) / delta_t
308            ! qcmif   Energy needed to bring the ocean surface layer until its freezing (ok)
309            ! qldif   heat balance of the lead (or of the open ocean)
310            ! qfvbq   i think this is wrong!
311            ! ---> Array used to store energy in case of total lateral ablation
312            ! qfvbq latent heat uptake/release after accretion/ablation
313            ! qdtcn Energy from the turbulent oceanic heat flux heat flux coming in the lead
314
315            IF ( num_sal .EQ. 2 ) zfcm2(ji,jj) = zfcm2(ji,jj) + &
316               fhbri(ji,jj) ! new contribution due to brine drainage
317
318            ! bottom radiative component is sent to the computation of the
319            ! oceanic heat flux
320            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     
321
322            ! used to compute the oceanic heat flux at the next time step
323            qsr(ji,jj) = zfcm1(ji,jj)                                       ! solar heat flux
324            qns(ji,jj) = zfcm2(ji,jj) - fdtcn(ji,jj)                        ! non solar heat flux
325            !                           ! fdtcn : turbulent oceanic heat flux
326
327            !!gm   this IF prevents the vertorisation of the whole loop
328            IF ( ( ji .EQ. jiindx ) .AND. ( jj .EQ. jjindx) ) THEN
329               WRITE(numout,*) ' lim_sbc : heat fluxes '
330               WRITE(numout,*) ' qsr       : ', qsr(jiindx,jjindx)
331               WRITE(numout,*) ' zfcm1     : ', zfcm1(jiindx,jjindx)
332               WRITE(numout,*) ' pfrld     : ', pfrld(jiindx,jjindx)
333               WRITE(numout,*) ' fstric    : ', fstric (jiindx,jjindx)
334               WRITE(numout,*)
335               WRITE(numout,*) ' qns       : ', qns(jiindx,jjindx)
336               WRITE(numout,*) ' zfcm2     : ', zfcm2(jiindx,jjindx)
337               WRITE(numout,*) ' zfcm1     : ', zfcm1(jiindx,jjindx)
338               WRITE(numout,*) ' ifral     : ', ifral
339               WRITE(numout,*) ' ial       : ', ial 
340               WRITE(numout,*) ' qcmif     : ', qcmif(jiindx,jjindx)
341               WRITE(numout,*) ' qldif     : ', qldif(jiindx,jjindx)
342               WRITE(numout,*) ' qcmif / dt: ', qcmif(jiindx,jjindx) / rdt_ice
343               WRITE(numout,*) ' qldif / dt: ', qldif(jiindx,jjindx) / rdt_ice
344               WRITE(numout,*) ' ifrdv     : ', ifrdv
345               WRITE(numout,*) ' qfvbq     : ', qfvbq(jiindx,jjindx)
346               WRITE(numout,*) ' qdtcn     : ', qdtcn(jiindx,jjindx)
347               WRITE(numout,*) ' qfvbq / dt: ', qfvbq(jiindx,jjindx) / rdt_ice
348               WRITE(numout,*) ' qdtcn / dt: ', qdtcn(jiindx,jjindx) / rdt_ice
349               WRITE(numout,*) ' '
350               WRITE(numout,*) ' fdtcn     : ', fdtcn(jiindx,jjindx)
351               WRITE(numout,*) ' fhmec     : ', fhmec(jiindx,jjindx)
352               WRITE(numout,*) ' fheat_rpo : ', fheat_rpo(jiindx,jjindx)
353               WRITE(numout,*) ' fhbri     : ', fhbri(jiindx,jjindx)
354               WRITE(numout,*) ' fheat_res : ', fheat_res(jiindx,jjindx)
355            ENDIF
356            !!gm   end
357         END DO
358      END DO
359
360      !------------------------------------------!
361      !      mass flux at the ocean surface      !
362      !------------------------------------------!
363
364      !!gm   optimisation: this loop have to be merged with the previous one
365      DO jj = 1, jpj
366         DO ji = 1, jpi
367            !  case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED)
368            !  -------------------------------------------------------------------------------------
369            !  The idea of this approach is that the system that we consider is the ICE-OCEAN system
370            !  Thus  FW  flux  =  External ( E-P+snow melt)
371            !       Salt flux  =  Exchanges in the ice-ocean system then converted into FW
372            !                     Associated to Ice formation AND Ice melting
373            !                     Even if i see Ice melting as a FW and SALT flux
374            !       
375
376            !  computing freshwater exchanges at the ice/ocean interface
377            zpme = - emp(ji,jj)     * ( 1.0 - at_i(ji,jj) )  &   !  evaporation over oceanic fraction
378               &   + tprecip(ji,jj) *         at_i(ji,jj)    &   !  total precipitation
379               ! old fashioned way               
380               !              &   - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )  &   !  remov. snow precip over ice
381               &   - sprecip(ji,jj) * ( 1. - (pfrld(ji,jj)**betas) )  &   !  remov. snow precip over ice
382               &   - rdmsnif(ji,jj) / rdt_ice                &   !  freshwaterflux due to snow melting
383               ! new contribution from snow falling when ridging
384               &   + fmmec(ji,jj)
385
386            !  computing salt exchanges at the ice/ocean interface
387            !  sice should be the same as computed with the ice model
388            zfons =  ( soce - sice ) * ( rdmicif(ji,jj) / rdt_ice ) 
389            ! SOCE
390            zfons =  ( sss_m(ji,jj) - sice ) * ( rdmicif(ji,jj) / rdt_ice ) 
391
392            !CT useless            !  salt flux for constant salinity
393            !CT useless            fsalt(ji,jj)      =  zfons / ( sss_m(ji,jj) + epsi16 ) + fsalt_res(ji,jj)
394            !  salt flux for variable salinity
395            zinda             = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) )
396            !  correcting brine and salt fluxes
397            fsbri(ji,jj)      =  zinda*fsbri(ji,jj)
398            !  converting the salt fluxes from ice to a freshwater flux from ocean
399            fsalt_res(ji,jj)  =  fsalt_res(ji,jj) / ( sss_m(ji,jj) + epsi16 )
400            fseqv(ji,jj)      =  fseqv(ji,jj)     / ( sss_m(ji,jj) + epsi16 )
401            fsbri(ji,jj)      =  fsbri(ji,jj)     / ( sss_m(ji,jj) + epsi16 )
402            fsalt_rpo(ji,jj)  =  fsalt_rpo(ji,jj) / ( sss_m(ji,jj) + epsi16 )
403
404            !  freshwater mass exchange (positive to the ice, negative for the ocean ?)
405            !  actually it's a salt flux (so it's minus freshwater flux)
406            !  if sea ice grows, zfons is positive, fsalt also
407            !  POSITIVE SALT FLUX FROM THE ICE TO THE OCEAN
408            !  POSITIVE FRESHWATER FLUX FROM THE OCEAN TO THE ICE [kg.m-2.s-1]
409
410            emp(ji,jj) = - zpme 
411         END DO
412      END DO
413
414      IF( num_sal == 2 ) THEN      ! variable ice salinity: brine drainage included in the salt flux
415         emps(:,:) = fsbri(:,:) + fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:)
416      ELSE                         ! constant ice salinity:
417         emps(:,:) =              fseqv(:,:) + fsalt_res(:,:) + fsalt_rpo(:,:) + emp(:,:)
418      ENDIF
419
420      IF( lk_dynspg_rl )    emp (:,:) = emps(:,:)      ! rigid-lid formulation : emp = emps
421
422      !-----------------------------------------------!
423      !   Storing the transmitted variables           !
424      !-----------------------------------------------!
425
426      fr_i  (:,:)   = at_i(:,:)             ! Sea-ice fraction           
427      tn_ice(:,:,:) = t_su(:,:,:)           ! Ice surface temperature                     
428
429#if defined key_coupled           
430      !------------------------------------------------!
431      !    Computation of snow/ice and ocean albedo    !
432      !------------------------------------------------!
433      zalb  (:,:,:) = 0.e0
434      zalbp (:,:,:) = 0.e0
435
436      CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb )
437
438      alb_ice(:,:,:) =  0.5 * zalbp(:,:,:) + 0.5 * zalb (:,:,:)   ! Ice albedo (mean clear and overcast skys)
439#endif
440
441      IF(ln_ctl) THEN
442         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' )
443         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps, clinfo2=' emps    : ' )
444         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' )
445         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl )
446      ENDIF
447      !
448   END SUBROUTINE lim_sbc_flx
449
450
451#else
452   !!----------------------------------------------------------------------
453   !!   Default option :        Dummy module       NO LIM 3.0 sea-ice model
454   !!----------------------------------------------------------------------
455CONTAINS
456   SUBROUTINE lim_sbc           ! Dummy routine
457   END SUBROUTINE lim_sbc
458#endif 
459
460   !!======================================================================
461END MODULE limsbc
Note: See TracBrowser for help on using the repository browser.