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_004_VVL/NEMO/LIM_SRC_2 – NEMO

source: branches/dev_004_VVL/NEMO/LIM_SRC_2/limsbc_2.F90 @ 1434

Last change on this file since 1434 was 1372, checked in by rblod, 15 years ago

dev_004_VVL:sync: synchronisation with the trunk, see ticket #388

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