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

Last change on this file since 1695 was 1695, checked in by smasson, 14 years ago

wind stress module directly at T-point, see ticket:577

  • Property svn:keywords set to Id
File size: 25.6 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              ! LIM sea-ice variables
24   USE iceini           ! ???
25
26   USE lbclnk           ! ocean lateral boundary condition
27   USE in_out_manager   ! I/O manager
28   USE albedo           ! albedo parameters
29   USE prtctl           ! Print control
30
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC   lim_sbc_flx   ! called by sbc_ice_lim
35   PUBLIC   lim_sbc_tau   ! called by sbc_ice_lim
36
37   REAL(wp)  ::   epsi16 = 1.e-16  ! constant values
38   REAL(wp)  ::   rzero  = 0.e0   
39   REAL(wp)  ::   rone   = 1.e0
40
41   REAL(wp), DIMENSION(jpi,jpj) ::   utau_oce, vtau_oce   !: air-ocean surface i- & j-stress              [N/m2]
42   REAL(wp), DIMENSION(jpi,jpj) ::   tmod_io              !: modulus of the ice-ocean relative velocity   [m/s]
43   REAL(wp), DIMENSION(jpi,jpj) ::   ssu_mb  , ssv_mb     !: before mean ocean surface currents           [m/s]
44
45   !! * Substitutions
46#  include "vectopt_loop_substitute.h90"
47   !!----------------------------------------------------------------------
48   !! NEMO/LIM  3.2 ,  UCL-LOCEAN-IPSL (2009)
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, zat_u, zu_ico, zutaui, zu_u, zu_ij, zu_im1j   ! temporary scalar
81      REAL(wp) ::   zfrldv, zat_v, zv_ico, zvtaui, zv_v, zv_ij, zv_ijm1   !    -         -
82      REAL(wp) ::   zsang, zztmp                                          !    -         -
83      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! ocean stress below sea-ice
84#if defined key_coupled   
85      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb     ! albedo of ice under overcast sky
86      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalbp    ! albedo of ice under clear sky
87#endif
88     !!---------------------------------------------------------------------
89
90      IF( kt == nit000 ) THEN
91         IF(lwp) WRITE(numout,*)
92         IF(lwp) WRITE(numout,*) 'lim_sbc_tau : LIM 3.0 sea-ice - surface ocean momentum fluxes'
93         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ '
94      ENDIF
95
96      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
97!CDIR NOVERRCHK
98         DO jj = 2, jpjm1                         !* modulus of the ice-ocean velocity
99!CDIR NOVERRCHK
100            DO ji = fs_2, fs_jpim1
101               zu_ij   = u_ice(ji  ,jj) - ssu_m(ji  ,jj)               ! (i  ,j)
102               zu_im1j = u_ice(ji-1,jj) - ssu_m(ji-1,jj)               ! (i-1,j)
103               zv_ij   = v_ice(ji,jj  ) - ssv_m(ji,jj  )               ! (i,j  )
104               zv_ijm1 = v_ice(ji,jj-1) - ssv_m(ji,jj-1)               ! (i,j-1)
105               zztmp =  0.5 * ( zu_ij * zu_ij + zu_im1j * zu_im1j   &  ! mean of the square values instead
106                  &           + zv_ij * zv_ij + zv_ijm1 * zv_ijm1 )    ! of the square of the mean values...
107               ! WARNING, here we make an approximation for case 1 and 2: taum is not computed at each time
108               ! step but only every nn_fsbc time step. This avoid mutiple avarage to pass from T -> U,V grids
109               ! and next from U,V grids to T grid. Taum is used in tke, which should not be too sensitive to
110               ! this approximaton...
111               taum(ji,jj) = ( 1. - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zztmp
112               tmod_io(ji,jj) = SQRT( zztmp ) 
113            END DO
114         END DO
115         CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. )
116      ENDIF
117
118      SELECT CASE( kcpl )
119         !                                        !--------------------------------!
120      CASE( 0 )                                   !  LIM 3 old stress computation  !  (at ice timestep only)
121         !                                        !--------------------------------!
122         !                                             !* ice stress over ocean with a ice-ocean rotation angle
123         DO jj = 1, jpjm1
124            zsang  = SIGN( 1.e0, gphif(1,jj) ) * sangvg         ! change the sinus angle sign in the south hemisphere
125            DO ji = 1, fs_jpim1
126               zu_u = u_ice(ji,jj) - u_oce(ji,jj)               ! ice velocity relative to the ocean
127               zv_v = v_ice(ji,jj) - v_oce(ji,jj)
128               !                                                ! quadratic drag formulation with rotation
129!!gm still an error in the rotation, but usually the angle is zero (zsang=0, cangvg=1)
130               zutaui   = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * rhoco * ( cangvg * zu_u - zsang * zv_v ) 
131               zvtaui   = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * rhoco * ( cangvg * zv_v + zsang * zu_u ) 
132               !                                                ! bound for too large stress values
133               ! IMPORTANT: the exponential below prevents numerical oscillations in the ice-ocean stress
134               ! This is not physically based. A cleaner solution is offer in CASE kcpl=2
135               ztio_u(ji,jj) = zutaui * EXP( - ( tmod_io(ji,jj) + tmod_io(ji+1,jj) )  )
136               ztio_v(ji,jj) = zvtaui * EXP( - ( tmod_io(ji,jj) + tmod_io(ji,jj+1) )  ) 
137            END DO
138         END DO
139         DO jj = 2, jpjm1                                       ! stress at the surface of the ocean
140            DO ji = fs_2, fs_jpim1   ! vertor opt.
141               zfrldu = 0.5 * ( ato_i(ji,jj) + ato_i(ji+1,jj  ) )   ! open-ocean fraction at U- & V-points (from T-point values)
142               zfrldv = 0.5 * ( ato_i(ji,jj) + ato_i(ji  ,jj+1) )
143               !                                                    ! update surface ocean stress
144               utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * ztio_u(ji,jj)
145               vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * ztio_v(ji,jj)
146            END DO
147         END DO
148         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
149
150         !
151         !                                        !--------------------------------!
152      CASE( 1 )                                   !  Use the now velocity          !  (at each ocean timestep)
153         !                                        !--------------------------------!
154         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
155            utau_oce(:,:) = utau(:,:)                 !* save the air-ocean stresses at ice time-step
156            vtau_oce(:,:) = vtau(:,:)
157         ENDIF
158         !
159        DO jj = 2, jpjm1                              !* ice stress over ocean with a ice-ocean rotation angle
160            zsang  = SIGN(1.e0, gphif(1,jj-1) ) * sangvg        ! change the sinus angle sign in the south hemisphere
161            DO ji = fs_2, fs_jpim1
162               zat_u  = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5   ! ice area at u and V-points
163               zat_v  = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5
164               !                                                ! (u,v) ice-ocean velocity at (U,V)-point, resp.
165               zu_u   = u_ice(ji,jj) - ub(ji,jj,1)
166               zv_v   = v_ice(ji,jj) - vb(ji,jj,1)
167               !                                                ! quadratic drag formulation with rotation
168!!gm still an error in the rotation, but usually the angle is zero (zsang=0, cangvg=1)
169               zutaui   = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * rhoco * ( cangvg * zu_u - zsang * zv_v ) 
170               zvtaui   = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * rhoco * ( cangvg * zv_v + zsang * zu_u ) 
171               !                                                   ! stress at the ocean surface
172               utau(ji,jj) = ( 1.- zat_u ) * utau_oce(ji,jj) + zat_u * zutaui
173               vtau(ji,jj) = ( 1.- zat_v ) * vtau_oce(ji,jj) + zat_v * zvtaui
174            END DO
175         END DO
176         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
177
178         !
179         !                                        !--------------------------------!
180      CASE( 2 )                                   !  mixed 0 and 2 cases           !  (at each ocean timestep)
181         !                                        !--------------------------------!
182         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
183            utau_oce(:,:) = utau (:,:)               !* save the air-ocean stresses at ice time-step
184            vtau_oce(:,:) = vtau (:,:)
185            ssu_mb  (:,:) = ssu_m(:,:)               !* save the ice-ocean velocity at ice time-step
186            ssv_mb  (:,:) = ssv_m(:,:)
187         ENDIF
188         DO jj = 2, jpjm1                            !* ice stress over ocean with a ice-ocean rotation angle
189            zsang  = SIGN(1.e0, gphif(1,jj-1) ) * sangvg
190            DO ji = fs_2, fs_jpim1
191               zat_u = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5     ! ice area at u and V-points
192               zat_v = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5 
193               !
194               zu_ico = u_ice(ji,jj) - 0.5 * ( ub(ji,jj,1) + ssu_mb(ji,jj) )   ! ice-oce velocity using ub and ssu_mb
195               zv_ico = v_ice(ji,jj) - 0.5 * ( vb(ji,jj,1) + ssv_mb(ji,jj) )
196               !                                        ! quadratic drag formulation with rotation
197!!gm still an error in the rotation, but usually the angle is zero (zsang=0, cangvg=1)
198               zutaui = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * rhoco * ( cangvg * zu_ico - zsang * zv_ico )
199               zvtaui = 0.5 * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * rhoco * ( 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         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )   ! lateral boundary condition
206         !
207      END SELECT
208
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      !-----------------------------------------------!
421      !   Storing the transmitted variables           !
422      !-----------------------------------------------!
423
424      fr_i  (:,:)   = at_i(:,:)             ! Sea-ice fraction           
425      tn_ice(:,:,:) = t_su(:,:,:)           ! Ice surface temperature                     
426
427#if defined key_coupled           
428      !------------------------------------------------!
429      !    Computation of snow/ice and ocean albedo    !
430      !------------------------------------------------!
431      zalb  (:,:,:) = 0.e0
432      zalbp (:,:,:) = 0.e0
433
434      CALL albedo_ice( t_su, ht_i, ht_s, zalbp, zalb )
435
436      alb_ice(:,:,:) =  0.5 * zalbp(:,:,:) + 0.5 * zalb (:,:,:)   ! Ice albedo (mean clear and overcast skys)
437#endif
438
439      IF(ln_ctl) THEN
440         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' )
441         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps, clinfo2=' emps    : ' )
442         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' )
443         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl )
444      ENDIF
445      !
446   END SUBROUTINE lim_sbc_flx
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.