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_2.F90 in branches/dev_1784_EVP/NEMO/LIM_SRC_2 – NEMO

source: branches/dev_1784_EVP/NEMO/LIM_SRC_2/limsbc_2.F90 @ 2046

Last change on this file since 2046 was 2046, checked in by cbricaud, 14 years ago

commit modifications to add EVP rheology in LIM3

  • Property svn:keywords set to Id
File size: 16.6 KB
Line 
1MODULE limsbc_2
2   !!======================================================================
3   !!                       ***  MODULE limsbc_2   ***
4   !!           computation of the flux at the sea ice/ocean interface
5   !!======================================================================
6   !! History : 00-01 (H. Goosse) Original code
7   !!           02-07 (C. Ethe, G. Madec) re-writing F90
8   !!           06-07 (G. Madec) surface module
9   !!           09-05 (G.Garric) addition of the lim2_evp case
10   !!----------------------------------------------------------------------
11#if defined key_lim2
12   !!----------------------------------------------------------------------
13   !!   'key_lim2'                                    LIM 2.0 sea-ice model
14   !!----------------------------------------------------------------------
15   !!----------------------------------------------------------------------
16   !!   lim_sbc_2  : flux at the ice / ocean interface
17   !!----------------------------------------------------------------------
18   USE par_oce          ! ocean parameters
19   USE dom_oce          ! ocean domain
20   USE sbc_ice          ! surface boundary condition
21   USE sbc_oce          ! surface boundary condition
22   USE phycst           ! physical constants
23   USE ice_2            ! LIM sea-ice variables
24
25   USE lbclnk           ! ocean lateral boundary condition
26   USE in_out_manager   ! I/O manager
27   USE diaar5, ONLY :   lk_diaar5
28   USE iom              !
29   USE albedo           ! albedo parameters
30   USE prtctl           ! Print control
31   USE cpl_oasis3, ONLY : lk_cpl
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC lim_sbc_2     ! called by sbc_ice_lim_2
37
38   REAL(wp)  ::   epsi16 = 1.e-16  ! constant values
39   REAL(wp)  ::   rzero  = 0.e0   
40   REAL(wp)  ::   rone   = 1.e0
41   REAL(wp), DIMENSION(jpi,jpj)  ::   soce_r
42   REAL(wp), DIMENSION(jpi,jpj)  ::   sice_r
43
44   !! * Substitutions
45#  include "vectopt_loop_substitute.h90"
46   !!----------------------------------------------------------------------
47   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2006)
48   !! $Id$
49   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
50   !!----------------------------------------------------------------------
51
52CONTAINS
53
54   SUBROUTINE lim_sbc_2( kt )
55      !!-------------------------------------------------------------------
56      !!                ***  ROUTINE lim_sbc_2 ***
57      !! 
58      !! ** Purpose : Update surface ocean boundary condition over areas
59      !!      that are at least partially covered by sea-ice
60      !!         
61      !! ** Action  : - comput. of the momentum, heat and freshwater/salt
62      !!      fluxes at the ice-ocean interface.
63      !!              - Update
64      !!     
65      !! ** Outputs : - qsr     : sea heat flux:     solar
66      !!              - qns     : sea heat flux: non solar
67      !!              - emp     : freshwater budget: volume flux
68      !!              - emps    : freshwater budget: concentration/dillution
69      !!              - utau    : sea surface i-stress (ocean referential)
70      !!              - vtau    : sea surface j-stress (ocean referential)
71      !!              - fr_i    : ice fraction
72      !!              - tn_ice  : sea-ice surface temperature
73      !!              - alb_ice : sea-ice alberdo (lk_cpl=T)
74      !!
75      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
76      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
77      !!---------------------------------------------------------------------
78      INTEGER ::   kt    ! number of iteration
79      !!
80      INTEGER  ::   ji, jj           ! dummy loop indices
81      INTEGER  ::   ifvt, i1mfr, idfr               ! some switches
82      INTEGER  ::   iflt, ial, iadv, ifral, ifrdv
83      INTEGER  ::   ii0, ii1, ij0, ij1  ! temporary integers
84      REAL(wp) ::   zrdtir           ! 1. / rdt_ice
85      REAL(wp) ::   zqsr  , zqns     ! solar & non solar heat flux
86      REAL(wp) ::   zinda            ! switch for testing the values of ice concentration
87      REAL(wp) ::   zfons            ! salt exchanges at the ice/ocean interface
88      REAL(wp) ::   zemp             ! freshwater exchanges at the ice/ocean interface
89      REAL(wp) ::   zfrldu, zfrldv   ! lead fraction at U- & V-points
90      REAL(wp) ::   zutau , zvtau    ! lead fraction at U- & V-points
91!!!      REAL(wp) ::   zutaui , zvtaui  ! lead fraction at U- & V-points
92      REAL(wp) ::   zu_io , zv_io    ! 2 components of the ice-ocean velocity
93! interface 2D --> 3D
94      REAL(wp), DIMENSION(jpi,jpj,1) ::   zalb     ! albedo of ice under overcast sky
95      REAL(wp), DIMENSION(jpi,jpj,1) ::   zalbp    ! albedo of ice under clear sky
96      REAL(wp) ::   zsang, zmod, zztmp, zfm
97      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! component of ocean stress below sea-ice at I-point
98      REAL(wp), DIMENSION(jpi,jpj) ::   ztiomi           ! module    of ocean stress below sea-ice at I-point
99      REAL(wp), DIMENSION(jpi,jpj) ::   zqnsoce          ! save qns before its modification by ice model
100
101      !!---------------------------------------------------------------------
102     
103      zrdtir = 1. / rdt_ice
104     
105      IF( kt == nit000 ) THEN
106         IF(lwp) WRITE(numout,*)
107         IF(lwp) WRITE(numout,*) 'lim_sbc_2 : LIM 2.0 sea-ice - surface boundary condition'
108         IF(lwp) WRITE(numout,*) '~~~~~~~~~   '
109
110         soce_r(:,:) = soce
111         sice_r(:,:) = sice
112         !
113         IF( cp_cfg == "orca"  .AND. jp_cfg == 2 ) THEN
114            !                                        ! =======================
115            !                                        !  ORCA_R2 configuration
116            !                                        ! =======================
117            ii0 = 145   ;   ii1 = 180        ! Baltic Sea
118            ij0 = 113   ;   ij1 = 130   ;   soce_r(mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 4.e0
119                                            sice_r(mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 2.e0
120         ENDIF
121         !
122      ENDIF
123
124      !------------------------------------------!
125      !      heat flux at the ocean surface      !
126      !------------------------------------------!
127
128!!gm
129!!gm CAUTION   
130!!gm re-verifies the non solar expression, especially over open ocen
131!!gm
132      zqnsoce(:,:) = qns(:,:)
133      DO jj = 1, jpj
134         DO ji = 1, jpi
135            zinda   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - pfrld(ji,jj) )   ) )
136            ifvt    = zinda * MAX( rzero , SIGN( rone,  - phicif(ji,jj)           ) )
137            i1mfr   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - frld(ji,jj) )    ) )
138            idfr    = 1.0   - MAX( rzero , SIGN( rone, frld(ji,jj) - pfrld(ji,jj) ) )
139            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
140            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
141            iadv    = ( 1  - i1mfr ) * zinda
142            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
143            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
144
145!!$            zinda   = 1.0 - AINT( pfrld(ji,jj) )                   !   = 0. if pure ocean else 1. (at previous time)
146!!$
147!!$            i1mfr   = 1.0 - AINT(  frld(ji,jj) )                   !   = 0. if pure ocean else 1. (at current  time)
148!!$
149!!$            IF( phicif(ji,jj) <= 0. ) THEN   ;   ifvt = zinda      !   = 1. if (snow and no ice at previous time) else 0. ???
150!!$            ELSE                             ;   ifvt = 0.
151!!$            ENDIF
152!!$
153!!$            IF( frld(ji,jj) >= pfrld(ji,jj) ) THEN   ;   idfr = 0.  !   = 0. if lead fraction increases from previous to current
154!!$            ELSE                                     ;   idfr = 1.   
155!!$            ENDIF
156!!$
157!!$            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )    !   = 1. if ice (not only snow) at previous and pure ocean at current
158!!$
159!!$            ial     = ifvt   * i1mfr    +    ( 1 - ifvt ) * idfr
160!!$!                 snow no ice   ice         ice or nothing  lead fraction increases
161!!$!                 at previous   now           at previous
162!!$!                -> ice aera increases  ???         -> ice aera decreases ???
163!!$
164!!$            iadv    = ( 1  - i1mfr ) * zinda 
165!!$!                     pure ocean      ice at
166!!$!                     at current      previous
167!!$!                        -> = 1. if ice disapear between previous and current
168!!$
169!!$            ifral   = ( 1  - i1mfr * ( 1 - ial ) ) 
170!!$!                            ice at     ???
171!!$!                            current         
172!!$!                         -> ???
173!!$
174!!$            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv
175!!$!                                                    ice disapear                           
176!!$
177!!$
178
179            !   computation the solar flux at ocean surface
180#if defined key_coupled 
181            zqsr = qsr_tot(ji,jj) + ( fstric(ji,jj) - qsr_ice(ji,jj,1) ) * ( 1.0 - pfrld(ji,jj) )
182#else
183            zqsr = pfrld(ji,jj) * qsr(ji,jj)  + ( 1.  - pfrld(ji,jj) ) * fstric(ji,jj)
184#endif           
185            !  computation the non solar heat flux at ocean surface
186            zqns    =  - ( 1. - thcm(ji,jj) ) * zqsr   &   ! part of the solar energy used in leads
187               &       + iflt    * ( fscmbq(ji,jj) + ffltbif(ji,jj) )                            &
188               &       + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) * zrdtir    &
189               &       + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) * zrdtir
190
191            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     ! ???
192           
193            qsr  (ji,jj) = zqsr                                          ! solar heat flux
194            qns  (ji,jj) = zqns - fdtcn(ji,jj)                           ! non solar heat flux
195         END DO
196      END DO
197
198      CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) )     
199      CALL iom_put( 'qns_io_cea', qns(:,:) - zqnsoce(:,:) * pfrld(:,:) )     
200      CALL iom_put( 'qsr_io_cea', fstric(:,:) * (1. - pfrld(:,:)) )
201
202      !------------------------------------------!
203      !      mass flux at the ocean surface      !
204      !------------------------------------------!
205
206!!gm
207!!gm CAUTION   
208!!gm re-verifies the emp & emps expression, especially the absence of 1-frld on zfm
209!!gm
210      DO jj = 1, jpj
211         DO ji = 1, jpi
212           
213#if defined key_coupled
214          zemp = emp_tot(ji,jj) - emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !
215             &   + rdmsnif(ji,jj) * zrdtir                                      !  freshwaterflux due to snow melting
216#else
217!!$            !  computing freshwater exchanges at the ice/ocean interface
218!!$            zpme = - evap(ji,jj)    *   frld(ji,jj)           &   !  evaporation over oceanic fraction
219!!$               &   + tprecip(ji,jj)                           &   !  total precipitation
220!!$               &   - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )   &   !  remov. snow precip over ice
221!!$               &   - rdmsnif(ji,jj) / rdt_ice                     !  freshwaterflux due to snow melting
222            !  computing freshwater exchanges at the ice/ocean interface
223            zemp = + emp(ji,jj)     *         frld(ji,jj)      &   !  e-p budget over open ocean fraction
224               &   - tprecip(ji,jj) * ( 1. -  frld(ji,jj) )    &   !  liquid precipitation reaches directly the ocean
225               &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  taking into account change in ice cover within the time step
226               &   + rdmsnif(ji,jj) * zrdtir                       !  freshwaterflux due to snow melting
227               !                                                   !  ice-covered fraction:
228#endif           
229
230            !  computing salt exchanges at the ice/ocean interface
231            zfons =  ( soce_r(ji,jj) - sice_r(ji,jj) ) * ( rdmicif(ji,jj) * zrdtir ) 
232           
233            !  converting the salt flux from ice to a freshwater flux from ocean
234            zfm  = zfons / ( sss_m(ji,jj) + epsi16 )
235           
236            emps(ji,jj) = zemp + zfm      ! surface ocean concentration/dilution effect (use on SSS evolution)
237            emp (ji,jj) = zemp            ! surface ocean volume flux (use on sea-surface height evolution)
238
239         END DO
240      END DO
241
242      IF( lk_diaar5 ) THEN
243         CALL iom_put( 'isnwmlt_cea'  ,                 rdmsnif(:,:) * zrdtir )
244         CALL iom_put( 'fsal_virt_cea',   soce_r(:,:) * rdmicif(:,:) * zrdtir )
245         CALL iom_put( 'fsal_real_cea', - sice_r(:,:) * rdmicif(:,:) * zrdtir )
246      ENDIF
247
248      !------------------------------------------!
249      !    momentum flux at the ocean surface    !
250      !------------------------------------------!
251
252      IF ( ln_limdyn ) THEN                        ! Update the stress over ice-over area (only in ice-dynamic case)
253         !                                         ! otherwise the atmosphere-ocean stress is used everywhere
254
255         ! ... ice stress over ocean with a ice-ocean rotation angle (at I-point)
256!CDIR NOVERRCHK
257         DO jj = 1, jpj
258!CDIR NOVERRCHK
259            DO ji = 1, jpi
260               ! ... change the cosinus angle sign in the south hemisphere
261               zsang  = SIGN(1.e0, gphif(ji,jj) ) * sangvg
262               ! ... ice velocity relative to the ocean at I-point
263               zu_io  = u_ice(ji,jj) - u_oce(ji,jj)
264               zv_io  = v_ice(ji,jj) - v_oce(ji,jj)
265               zmod   = SQRT( zu_io * zu_io + zv_io * zv_io )
266               zztmp  = rhoco * zmod
267               ! ... components of ice stress over ocean with a ice-ocean rotation angle (at I-point)
268               ztio_u(ji,jj) = zztmp * ( cangvg * zu_io - zsang * zv_io )
269               ztio_v(ji,jj) = zztmp * ( cangvg * zv_io + zsang * zu_io )
270               ! ... module of ice stress over ocean (at I-point)
271               ztiomi(ji,jj) = zztmp * zmod
272               !
273            END DO
274         END DO
275
276         DO jj = 2, jpjm1
277            DO ji = 2, jpim1   ! NO vector opt.
278               ! ... components of ice-ocean stress at U and V-points  (from I-point values)
279#if defined key_lim2_vp
280               zutau  = 0.5 * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) )
281               zvtau  = 0.5 * ( ztio_v(ji,jj+1) + ztio_v(ji+1,jj+1) )
282#else
283               zutau  = ztio_u(ji,jj)
284               zvtau  = ztio_v(ji,jj)
285#endif
286               ! ... open-ocean (lead) fraction at U- & V-points (from T-point values)
287               zfrldu = 0.5 * ( frld(ji,jj) + frld(ji+1,jj  ) )
288               zfrldv = 0.5 * ( frld(ji,jj) + frld(ji  ,jj+1) )
289               ! ... update components of surface ocean stress (ice-cover wheighted)
290               utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * zutau
291               vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * zvtau
292               ! ... module of ice-ocean stress at T-points (from I-point values)
293               zztmp = 0.25 * ( ztiomi(ji,jj) + ztiomi(ji+1,jj) + ztiomi(ji,jj+1) + ztiomi(ji+1,jj+1) )
294               ! ... update module of surface ocean stress (ice-cover wheighted)
295               taum(ji,jj) = frld(ji,jj) * taum(ji,jj) + ( 1. - frld(ji,jj) ) * zztmp
296               !
297            END DO
298         END DO
299
300         ! boundary condition on the stress (utau,vtau,taum)
301         CALL lbc_lnk( utau, 'U', -1. )
302         CALL lbc_lnk( vtau, 'V', -1. )
303         CALL lbc_lnk( taum, 'T',  1. )
304
305      ENDIF
306
307      !-----------------------------------------------!
308      !   Coupling variables                          !
309      !-----------------------------------------------!
310
311      IF ( lk_cpl ) THEN           
312         ! Ice surface temperature
313         tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature       
314         ! Computation of snow/ice and ocean albedo
315         CALL albedo_ice( tn_ice, reshape( hicif, (/jpi,jpj,1/) ), reshape( hsnif, (/jpi,jpj,1/) ), zalbp, zalb )
316         alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys)
317         CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo
318      ENDIF
319
320      IF(ln_ctl) THEN
321         CALL prt_ctl(tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns   , clinfo2=' qns     : ')
322         CALL prt_ctl(tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps  , clinfo2=' emps    : ')
323         CALL prt_ctl(tab2d_1=utau  , clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
324            &         tab2d_2=vtau  , clinfo2=' vtau    : '        , mask2=vmask )
325         CALL prt_ctl(tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ', tab2d_2=tn_ice(:,:,1), clinfo2=' tn_ice  : ')
326      ENDIF
327   
328    END SUBROUTINE lim_sbc_2
329
330#else
331   !!----------------------------------------------------------------------
332   !!   Default option :        Dummy module       NO LIM 2.0 sea-ice model
333   !!----------------------------------------------------------------------
334CONTAINS
335   SUBROUTINE lim_sbc_2         ! Dummy routine
336   END SUBROUTINE lim_sbc_2
337#endif 
338
339   !!======================================================================
340END MODULE limsbc_2
Note: See TracBrowser for help on using the repository browser.