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

source: branches/dev_003_CPL/NEMO/LIM_SRC_2/limsbc_2.F90 @ 991

Last change on this file since 991 was 991, checked in by smasson, 16 years ago

dev_003_CPL: preliminary draft (not working), see ticket #155

File size: 11.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   !!----------------------------------------------------------------------
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 ocfzpt           ! surface ocean freezing point
23   USE ice_oce          ! sea-ice variable
24   USE ice_2            ! LIM sea-ice variables
25   USE iceini_2         ! ???
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_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
42   !! * Substitutions
43#  include "vectopt_loop_substitute.h90"
44   !!----------------------------------------------------------------------
45   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2006)
46   !! $ Id: $
47   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
48   !!----------------------------------------------------------------------
49
50CONTAINS
51
52   SUBROUTINE lim_sbc_2( kt )
53      !!-------------------------------------------------------------------
54      !!                ***  ROUTINE lim_sbc_2 ***
55      !! 
56      !! ** Purpose : Update surface ocean boundary condition over areas
57      !!      that are at least partially covered by sea-ice
58      !!         
59      !! ** Action  : - comput. of the momentum, heat and freshwater/salt
60      !!      fluxes at the ice-ocean interface.
61      !!              - Update
62      !!     
63      !! ** Outputs : - qsr    : sea heat flux:     solar
64      !!              - qns    : sea heat flux: non solar
65      !!              - emp    : freshwater budget: volume flux
66      !!              - emps   : freshwater budget: concentration/dillution
67      !!              - utau   : sea surface i-stress (ocean referential)
68      !!              - vtau   : sea surface j-stress (ocean referential)
69      !!
70      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
71      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
72      !!---------------------------------------------------------------------
73      INTEGER ::   kt    ! number of iteration
74      !!
75      INTEGER  ::   ji, jj           ! dummy loop indices
76      INTEGER  ::   ifvt, i1mfr, idfr               ! some switches
77      INTEGER  ::   iflt, ial, iadv, ifral, ifrdv
78      REAL(wp) ::   zqsr  , zqns     ! solar & non solar heat flux
79      REAL(wp) ::   zinda            ! switch for testing the values of ice concentration
80      REAL(wp) ::   zfons            ! salt exchanges at the ice/ocean interface
81      REAL(wp) ::   zemp             ! freshwater exchanges at the ice/ocean interface
82      REAL(wp) ::   zfrldu, zfrldv   ! lead fraction at U- & V-points
83      REAL(wp) ::   zutau , zvtau    ! lead fraction at U- & V-points
84      REAL(wp) ::   zu_io , zv_io    ! 2 components of the ice-ocean velocity
85      REAL(wp), DIMENSION(jpi,jpj) ::   zalb     ! albedo of ice under overcast sky
86      REAL(wp), DIMENSION(jpi,jpj) ::   zalbp    ! albedo of ice under clear sky
87      REAL(wp) ::   zsang, zmod, zfm
88      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! ocean stress below sea-ice
89
90      !!---------------------------------------------------------------------
91     
92      IF( kt == nit000 ) THEN
93         IF(lwp) WRITE(numout,*)
94         IF(lwp) WRITE(numout,*) 'lim_sbc_2 : LIM 2.0 sea-ice - surface boundary condition'
95         IF(lwp) WRITE(numout,*) '~~~~~~~~~   '
96      ENDIF
97
98      !------------------------------------------!
99      !      heat flux at the ocean surface      !
100      !------------------------------------------!
101
102!!gm
103!!gm CAUTION   
104!!gm re-verifies the non solar expression, especially over open ocen
105!!gm
106      DO jj = 1, jpj
107         DO ji = 1, jpi
108            zinda   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - pfrld(ji,jj) )   ) )
109            ifvt    = zinda * MAX( rzero , SIGN( rone,  - phicif(ji,jj)           ) )
110            i1mfr   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - frld(ji,jj) )    ) )
111            idfr    = 1.0   - MAX( rzero , SIGN( rone, frld(ji,jj) - pfrld(ji,jj) ) )
112            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
113            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
114            iadv    = ( 1  - i1mfr ) * zinda
115            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
116            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
117            !   computation the solar flux at ocean surface
118            zqsr    = pfrld(ji,jj) * qsr(ji,jj)  + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj)
119            !  computation the non solar heat flux at ocean surface
120            zqns    =  - ( 1. - thcm(ji,jj) ) * zqsr   &   ! part of the solar energy used in leads
121               &       + iflt    * ( fscmbq(ji,jj) + ffltbif(ji,jj) )                            &
122               &       + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) / rdt_ice   &
123               &       + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) / rdt_ice
124
125            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     ! ???
126           
127            qsr  (ji,jj) = zqsr                                          ! solar heat flux
128            qns  (ji,jj) = zqns - fdtcn(ji,jj)                           ! non solar heat flux
129         END DO
130      END DO
131 
132      !------------------------------------------!
133      !      mass flux at the ocean surface      !
134      !------------------------------------------!
135
136!!gm
137!!gm CAUTION   
138!!gm re-verifies the emp & emps expression, especially the absence of 1-frld on zfm
139!!gm
140      DO jj = 1, jpj
141         DO ji = 1, jpi
142           
143            !  computing freshwater exchanges at the ice/ocean interface
144            zemp = + emp(ji,jj)     *         frld(ji,jj)      &   !  e-p budget over open ocean fraction
145               &   - tprecip(ji,jj) * ( 1. -  frld(ji,jj) )    &   !  liquid precipitation reaches directly the ocean
146               &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  taking into account change in ice cover within the time step
147               &   + rdmsnif(ji,jj) / rdt_ice                      !  freshwaterflux due to snow melting
148               !                                                   !  ice-covered fraction:
149
150            !  computing salt exchanges at the ice/ocean interface
151            zfons =  ( soce - sice ) * ( rdmicif(ji,jj) / rdt_ice ) 
152           
153            !  converting the salt flux from ice to a freshwater flux from ocean
154            zfm  = zfons / ( sss_m(ji,jj) + epsi16 )
155           
156            emps(ji,jj) = zemp + zfm      ! surface ocean concentration/dilution effect (use on SSS evolution)
157            emp (ji,jj) = zemp            ! surface ocean volume flux (use on sea-surface height evolution)
158
159         END DO
160      END DO
161
162      IF( lk_dynspg_rl )    emp (:,:) = emps(:,:)      ! rigid-lid formulation : emp = emps
163
164      !------------------------------------------!
165      !    momentum flux at the ocean surface    !
166      !------------------------------------------!
167
168      IF ( ln_limdyn ) THEN                        ! Update the stress over ice-over area (only in ice-dynamic case)
169         !                                         ! otherwise the atmosphere-ocean stress is used everywhere
170
171         ! ... ice stress over ocean with a ice-ocean rotation angle (at I-point)
172!CDIR NOVERRCHK
173         DO jj = 1, jpj
174!CDIR NOVERRCHK
175            DO ji = 1, jpi
176               ! ... change the cosinus angle sign in the south hemisphere
177               zsang  = SIGN(1.e0, gphif(ji,jj) ) * sangvg
178               ! ... ice velocity relative to the ocean
179               zu_io  = ui_ice(ji,jj) - ui_oce(ji,jj)
180               zv_io  = vi_ice(ji,jj) - vi_oce(ji,jj)
181               zmod   = rhoco * SQRT( zu_io * zu_io + zv_io * zv_io )
182               ! ... ice stress over ocean with a ice-ocean rotation angle (at I-point)
183               ztio_u(ji,jj) = zmod * ( cangvg * zu_io - zsang * zv_io )
184               ztio_v(ji,jj) = zmod * ( cangvg * zv_io + zsang * zu_io )
185               !
186            END DO
187         END DO
188
189         DO jj = 2, jpjm1
190            DO ji = fs_2, fs_jpim1   ! vertor opt.
191               ! ... ice-cover wheighted ice-ocean stress at U and V-points  (from I-point values)
192               zutau  = 0.5 * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) )
193               zvtau  = 0.5 * ( ztio_v(ji,jj+1) + ztio_v(ji+1,jj+1) )
194               ! ... open-ocean (lead) fraction at U- & V-points (from T-point values)
195               zfrldu = 0.5 * ( frld (ji,jj) + frld (ji+1,jj  ) )
196               zfrldv = 0.5 * ( frld (ji,jj) + frld (ji  ,jj+1) )
197               ! update surface ocean stress
198               utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * zutau
199               vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * zvtau
200               !
201            END DO
202         END DO
203
204         ! boundary condition on the stress (utau,vtau)
205         CALL lbc_lnk( utau, 'U', -1. )
206         CALL lbc_lnk( vtau, 'V', -1. )
207
208      ENDIF
209
210      !-----------------------------------------------!
211      !   Storing the transmitted variables           !
212      !-----------------------------------------------!
213
214      freeze(:,:) = 1.0 - frld(:,:)       ! Sea ice cover           
215             
216      IF ( lk_cpl ) THEN           
217         ! Ice surface temperature
218         tn_ice(:,:) = sist(:,:)             
219         ! Computation of snow/ice and ocean albedo
220         +++ INTERFACE 3D versus 2D
221         CALL albedo_ice( sist, hicif, hsnif, zalbp, zalb )
222         alb_ice(:,:) =  0.5 * ( zalbp(:,:) + zalb (:,:) )   ! Ice albedo (mean clear and overcast skys)
223      ENDIF
224
225      IF(ln_ctl) THEN
226         CALL prt_ctl(tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns   , clinfo2=' qns     : ')
227         CALL prt_ctl(tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=emps  , clinfo2=' emps    : ')
228         CALL prt_ctl(tab2d_1=utau  , clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
229            &         tab2d_2=vtau  , clinfo2=' vtau    : '        , mask2=vmask )
230         CALL prt_ctl(tab2d_1=freeze, clinfo1=' lim_sbc: freeze : ', tab2d_2=tn_ice, clinfo2=' tn_ice  : ')
231      ENDIF
232   
233    END SUBROUTINE lim_sbc_2
234
235#else
236   !!----------------------------------------------------------------------
237   !!   Default option :        Dummy module       NO LIM 2.0 sea-ice model
238   !!----------------------------------------------------------------------
239CONTAINS
240   SUBROUTINE lim_sbc_2         ! Dummy routine
241   END SUBROUTINE lim_sbc_2
242#endif 
243
244   !!======================================================================
245END MODULE limsbc_2
Note: See TracBrowser for help on using the repository browser.