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

source: trunk/NEMO/LIM_SRC_2/limsbc_2.F90 @ 941

Last change on this file since 941 was 888, checked in by ctlod, 16 years ago

merge dev_001_SBC branche with the trunk to include the New Surface Module package, see ticket: #113

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