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 – NEMO

source: trunk/NEMO/LIM_SRC/limsbc.F90 @ 717

Last change on this file since 717 was 717, checked in by smasson, 17 years ago

finalize the first set of modifications related to ticket:3

  • Property svn:executable set to *
File size: 12.1 KB
Line 
1MODULE limsbc
2   !!======================================================================
3   !!                       ***  MODULE limsbc   ***
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_ice_lim
11   !!----------------------------------------------------------------------
12   !!   'key_ice_lim'                                     LIM sea-ice model
13   !!----------------------------------------------------------------------
14   !!----------------------------------------------------------------------
15   !!   lim_sbc  : 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              ! 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       ! called by lim_step
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   !! $Header: $
47   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
48   !!----------------------------------------------------------------------
49
50CONTAINS
51
52   SUBROUTINE lim_sbc( kt )
53      !!-------------------------------------------------------------------
54      !!                ***  ROUTINE lim_sbc ***
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#if defined key_coupled   
86      REAL(wp), DIMENSION(jpi,jpj) ::   zalb     ! albedo of ice under overcast sky
87      REAL(wp), DIMENSION(jpi,jpj) ::   zalcn    ! albedo of ocean under overcast sky
88      REAL(wp), DIMENSION(jpi,jpj) ::   zalbp    ! albedo of ice under clear sky
89      REAL(wp), DIMENSION(jpi,jpj) ::   zaldum   ! albedo of ocean under clear sky
90#endif
91      REAL(wp) ::   zsang, zmod, zfm
92      REAL(wp), DIMENSION(jpi,jpj) ::   ztio_u, ztio_v   ! ocean stress below sea-ice
93
94      !!---------------------------------------------------------------------
95     
96      IF( kt == nit000 ) THEN
97         IF(lwp) WRITE(numout,*)
98         IF(lwp) WRITE(numout,*) 'lim_sbc : LIM sea-ice - surface boundary condition'
99         IF(lwp) WRITE(numout,*) '~~~~~~~   '
100      ENDIF
101
102      !------------------------------------------!
103      !      heat flux at the ocean surface      !
104      !------------------------------------------!
105
106!!gm
107!!gm CAUTION   
108!!gm re-verifies the non solar expression, especially over open ocen
109!!gm
110      DO jj = 1, jpj
111         DO ji = 1, jpi
112            zinda   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - pfrld(ji,jj) )   ) )
113            ifvt    = zinda * MAX( rzero , SIGN( rone,  - phicif(ji,jj)           ) )
114            i1mfr   = 1.0   - MAX( rzero , SIGN( rone, - ( 1.0 - frld(ji,jj) )    ) )
115            idfr    = 1.0   - MAX( rzero , SIGN( rone, frld(ji,jj) - pfrld(ji,jj) ) )
116            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
117            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
118            iadv    = ( 1  - i1mfr ) * zinda
119            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
120            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
121            !   computation the solar flux at ocean surface
122            zqsr    = pfrld(ji,jj) * qsr(ji,jj)  + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj)
123            !  computation the non solar heat flux at ocean surface
124            zqns    =  - ( 1. - thcm(ji,jj) ) * zqsr   &   ! part of the solar energy used in leads
125               &       + iflt    * ( fscmbq(ji,jj) + ffltbif(ji,jj) )                            &
126               &       + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) / rdt_ice   &
127               &       + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) / rdt_ice
128
129            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     ! ???
130           
131            qsr  (ji,jj) = zqsr                                          ! solar heat flux
132            qns  (ji,jj) = zqns - fdtcn(ji,jj)                           ! non solar heat flux
133         END DO
134      END DO
135 
136      !------------------------------------------!
137      !      mass flux at the ocean surface      !
138      !------------------------------------------!
139
140!!gm
141!!gm CAUTION   
142!!gm re-verifies the emp & emps expression, especially the absence of 1-frld on zfm
143!!gm
144      DO jj = 1, jpj
145         DO ji = 1, jpi
146           
147            !  computing freshwater exchanges at the ice/ocean interface
148            zemp = + emp(ji,jj)     *         frld(ji,jj)      &   !  e-p budget over open ocean fraction
149               !                                                   !  ice-covered fraction:
150               &   - tprecip(ji,jj) * ( 1. -  frld(ji,jj) )    &   !  liquid precipitation reaches directly the ocean
151               &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  taking into account change in ice cover within the time step
152               &   + rdmsnif(ji,jj) / rdt_ice                      !  freshwaterflux due to snow melting
153
154!!gm old    zemp = + evap(ji,jj) * frld(ji,jj)                 &   !  evaporation over oceanic fraction
155!!gm old       &   - tprecip(ji,jj)                            &   !  total precipitation
156!!gm old       &   + sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )    &   !  remov. snow precip over ice (store over sea-ice)
157!!gm old       &   + rdmsnif(ji,jj) / rdt_ice                      !  freshwaterflux due to snow melting
158           
159            !  computing salt exchanges at the ice/ocean interface
160            zfons =  ( soce - sice ) * ( rdmicif(ji,jj) / rdt_ice ) 
161           
162            !  converting the salt flux from ice to a freshwater flux from ocean
163!!gm old    zfm  = zfons / ( sss_io(ji,jj) + epsi16 )
164            zfm  = zfons / ( sss_m(ji,jj) + epsi16 )
165           
166            emps(ji,jj) = zemp + zfm      ! surface ocean concentration/dilution effect (use on SSS evolution)
167            emp (ji,jj) = zemp            ! surface ocean volume flux (use on sea-surface height evolution)
168
169         END DO
170      END DO
171
172      IF( lk_dynspg_rl )    emp (:,:) = emps(:,:)      ! rigid-lid formulation : emp = emps
173
174      !------------------------------------------!
175      !    momentum flux at the ocean surface    !
176      !------------------------------------------!
177
178      IF ( ln_limdyn ) THEN                        ! Update the stress over ice-over area (only in ice-dynamic case)
179         !                                         ! otherwise the atmosphere-ocean stress is used everywhere
180
181         ! ... ice stress over ocean with a ice-ocean rotation angle (at I-point)
182!CDIR NOVERRCHK
183         DO jj = 1, jpj
184!CDIR NOVERRCHK
185            DO ji = 1, jpi
186               ! ... change the cosinus angle sign in the south hemisphere
187!!              zsang  = SIGN(1.e0, gphif(ji-1,jj-1) ) * sangvg    ! do the full loop and avoid lbc_lnk
188               zsang  = SIGN(1.e0, gphif(ji,jj) ) * sangvg
189               ! ... ice velocity relative to the ocean
190               zu_io  = ui_ice(ji,jj) - ui_oce(ji,jj)
191               zv_io  = vi_ice(ji,jj) - vi_oce(ji,jj)
192               zmod   = rhoco * SQRT( zu_io * zu_io + zv_io * zv_io )
193               ! ... ice stress over ocean with a ice-ocean rotation angle (at I-point)
194               ztio_u(ji,jj) = zmod * ( cangvg * zu_io - zsang * zv_io )
195               ztio_v(ji,jj) = zmod * ( cangvg * zv_io + zsang * zu_io )
196               !
197            END DO
198         END DO
199
200         DO jj = 2, jpjm1
201            DO ji = fs_2, fs_jpim1   ! vertor opt.
202               ! ... ice-cover wheighted ice-ocean stress at U and V-points  (from I-point values)
203               zutau  = 0.5 * ( ztio_u(ji+1,jj) + ztio_u(ji+1,jj+1) )
204               zvtau  = 0.5 * ( ztio_v(ji,jj+1) + ztio_u(ji+1,jj+1) )
205               ! ... open-ocean (lead) fraction at U- & V-points (from T-point values)
206               zfrldu = 0.5 * ( frld (ji,jj) + frld (ji+1,jj  ) )
207               zfrldv = 0.5 * ( frld (ji,jj) + frld (ji  ,jj+1) )
208               ! update surface ocean stress
209               utau(ji,jj) = zfrldu * utau(ji,jj) + ( 1. - zfrldu ) * zutau
210               vtau(ji,jj) = zfrldv * vtau(ji,jj) + ( 1. - zfrldv ) * zvtau
211               !
212            END DO
213         END DO
214
215         ! boundary condition on the stress (utau,vtau)
216         CALL lbc_lnk( utau, 'U', -1. )
217         CALL lbc_lnk( vtau, 'V', -1. )
218
219      ENDIF
220
221#if defined key_coupled           
222      !------------------------------------------------!
223      !    Computation of snow/ice and ocean albedo    !
224      !------------------------------------------------!
225      zalb  (:,:) = 0.e0
226      zalcn (:,:) = 0.e0
227      zalbp (:,:) = 0.e0
228      zaldum(:,:) = 0.e0
229
230      CALL flx_blk_albedo( zalb, zalcn, zalbp, zaldum )
231
232      alb_ice(:,:) =  0.5 * zalbp(:,:) + 0.5 * zalb (:,:)   ! Ice albedo (mean clear and overcast skys)
233#endif
234
235      IF(ln_ctl) THEN
236         CALL prt_ctl(tab2d_1=qsr , clinfo1=' lim_sbc: qsr  : ', tab2d_2=qns , clinfo2=' qns  : ')
237         CALL prt_ctl(tab2d_1=emp , clinfo1=' lim_sbc: emp  : ', tab2d_2=emps, clinfo2=' emps : ')
238         CALL prt_ctl(tab2d_1=utau, clinfo1=' lim_sbc: utau : ', tab2d_2=vtau, clinfo2=' vtau : ')
239!!gm tn_ice ???  what is it now?
240!!gm     CALL prt_ctl(tab2d_1=freeze, clinfo1=' lim_sbc: freeze : ', tab2d_2=tn_ice , clinfo2=' tn_ice  : ')
241      ENDIF
242   
243    END SUBROUTINE lim_sbc
244
245#else
246   !!----------------------------------------------------------------------
247   !!   Default option :        Dummy module           NO LIM sea-ice model
248   !!----------------------------------------------------------------------
249CONTAINS
250   SUBROUTINE lim_sbc         ! Dummy routine
251   END SUBROUTINE lim_sbc
252#endif 
253
254   !!======================================================================
255END MODULE limsbc
Note: See TracBrowser for help on using the repository browser.