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 branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 @ 6763

Last change on this file since 6763 was 6763, checked in by clem, 8 years ago

new parameterization from Lupkes et al. (2012) of ice-atm and ocean-atm drags (dependent on ice morphology) => ln_Cd_L12 in namelist_ref

  • Property svn:keywords set to Id
File size: 22.7 KB
Line 
1MODULE limsbc
2   !!======================================================================
3   !!                       ***  MODULE limsbc   ***
4   !!           computation of the flux at the sea ice/ocean interface
5   !!======================================================================
6   !! History :   -   ! 2006-07 (M. Vancoppelle)  LIM3 original code
7   !!            3.0  ! 2008-03 (C. Tallandier)  surface module
8   !!             -   ! 2008-04 (C. Tallandier)  split in 2 + new ice-ocean coupling
9   !!            3.3  ! 2010-05 (G. Madec) decrease ocean & ice reference salinities in the Baltic sea
10   !!                 !                  + simplification of the ice-ocean stress calculation
11   !!            3.4  ! 2011-02 (G. Madec) dynamical allocation
12   !!             -   ! 2012    (D. Iovino) salt flux change
13   !!             -   ! 2012-05 (C. Rousset) add penetration solar flux
14   !!            3.5  ! 2012-10 (A. Coward, G. Madec) salt fluxes ; ice+snow mass
15   !!----------------------------------------------------------------------
16#if defined key_lim3
17   !!----------------------------------------------------------------------
18   !!   'key_lim3'                                    LIM 3.0 sea-ice model
19   !!----------------------------------------------------------------------
20   !!   lim_sbc_alloc : allocate the limsbc arrays
21   !!   lim_sbc_init  : initialisation
22   !!   lim_sbc_flx   : updates mass, heat and salt fluxes at the ocean surface
23   !!   lim_sbc_tau   : update i- and j-stresses, and its modulus at the ocean surface
24   !!----------------------------------------------------------------------
25   USE par_oce          ! ocean parameters
26   USE phycst           ! physical constants
27   USE dom_oce          ! ocean domain
28   USE ice              ! LIM sea-ice variables
29   USE sbc_ice          ! Surface boundary condition: sea-ice fields
30   USE sbc_oce          ! Surface boundary condition: ocean fields
31   USE sbccpl
32   USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass
33   USE albedo           ! albedo parameters
34   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges
35   USE lib_mpp          ! MPP library
36   USE wrk_nemo         ! work arrays
37   USE in_out_manager   ! I/O manager
38   USE prtctl           ! Print control
39   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
40   USE traqsr           ! add penetration of solar flux in the calculation of heat budget
41   USE iom
42   USE domvvl           ! Variable volume
43   USE limctl
44   USE limcons
45
46   IMPLICIT NONE
47   PRIVATE
48
49   PUBLIC   lim_sbc_init   ! called by sbc_lim_init
50   PUBLIC   lim_sbc_flx    ! called by sbc_ice_lim
51   PUBLIC   lim_sbc_tau    ! called by sbc_ice_lim
52
53   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau_oce, vtau_oce   ! air-ocean surface i- & j-stress     [N/m2]
54   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmod_io              ! modulus of the ice-ocean velocity   [m/s]
55
56   !! * Substitutions
57#  include "vectopt_loop_substitute.h90"
58#  include "domzgr_substitute.h90"
59   !!----------------------------------------------------------------------
60   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
61   !! $Id$
62   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
63   !!----------------------------------------------------------------------
64CONTAINS
65
66   INTEGER FUNCTION lim_sbc_alloc()
67      !!-------------------------------------------------------------------
68      !!             ***  ROUTINE lim_sbc_alloc ***
69      !!-------------------------------------------------------------------
70      ALLOCATE( utau_oce(jpi,jpj) , vtau_oce(jpi,jpj) , tmod_io(jpi,jpj), STAT=lim_sbc_alloc )
71         !
72      IF( lk_mpp             )   CALL mpp_sum( lim_sbc_alloc )
73      IF( lim_sbc_alloc /= 0 )   CALL ctl_warn('lim_sbc_alloc: failed to allocate arrays')
74   END FUNCTION lim_sbc_alloc
75
76
77   SUBROUTINE lim_sbc_flx( kt )
78      !!-------------------------------------------------------------------
79      !!                ***  ROUTINE lim_sbc_flx ***
80      !! 
81      !! ** Purpose :   Update the surface ocean boundary condition for heat
82      !!              salt and mass over areas where sea-ice is non-zero
83      !!         
84      !! ** Action  : - computes the heat and freshwater/salt fluxes
85      !!              at the ice-ocean interface.
86      !!              - Update the ocean sbc
87      !!     
88      !! ** Outputs : - qsr     : sea heat flux:     solar
89      !!              - qns     : sea heat flux: non solar
90      !!              - emp     : freshwater budget: volume flux
91      !!              - sfx     : salt flux
92      !!              - fr_i    : ice fraction
93      !!              - tn_ice  : sea-ice surface temperature
94      !!              - alb_ice : sea-ice albedo (recomputed only for coupled mode)
95      !!
96      !! References : Goosse, H. et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90.
97      !!              Tartinville et al. 2001 Ocean Modelling, 3, 95-108.
98      !!              These refs are now obsolete since everything has been revised
99      !!              The ref should be Rousset et al., 2015
100      !!---------------------------------------------------------------------
101      INTEGER, INTENT(in) ::   kt                                  ! number of iteration
102      INTEGER  ::   ji, jj, jl, jk                                 ! dummy loop indices
103      REAL(wp) ::   zqmass                                         ! Heat flux associated with mass exchange ice->ocean (W.m-2)
104      REAL(wp) ::   zqsr                                           ! New solar flux received by the ocean
105      !
106      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb_cs, zalb_os     ! 3D workspace
107      REAL(wp), POINTER, DIMENSION(:,:)   ::   zalb                 ! 2D workspace
108      !!---------------------------------------------------------------------
109
110      ! --- case we bypass ice thermodynamics --- !
111      IF( .NOT. ln_limthd ) THEN   ! we suppose ice is impermeable => ocean is isolated from atmosphere
112         hfx_in   (:,:)   = pfrld(:,:) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:)
113         hfx_out  (:,:)   = pfrld(:,:) *   qns_oce(:,:)                  + qemp_oce(:,:)
114         ftr_ice  (:,:,:) = 0._wp
115         emp_ice  (:,:)   = 0._wp
116         qemp_ice (:,:)   = 0._wp
117         qevap_ice(:,:,:) = 0._wp
118      ENDIF
119     
120      ! make calls for heat fluxes before it is modified
121      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD)
122      IF( iom_use('qsr_oce') )   CALL iom_put( "qsr_oce" , qsr_oce(:,:) * pfrld(:,:) )                                   !     solar flux at ocean surface
123      IF( iom_use('qns_oce') )   CALL iom_put( "qns_oce" , qns_oce(:,:) * pfrld(:,:) + qemp_oce(:,:) )                   ! non-solar flux at ocean surface
124      IF( iom_use('qsr_ice') )   CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux at ice surface
125      IF( iom_use('qns_ice') )   CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) ! non-solar flux at ice surface
126      IF( iom_use('qtr_ice') )   CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux transmitted thru ice
127      IF( iom_use('qt_oce' ) )   CALL iom_put( "qt_oce"  , ( qsr_oce(:,:) + qns_oce(:,:) ) * pfrld(:,:) + qemp_oce(:,:) ) 
128      IF( iom_use('qt_ice' ) )   CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) )   &
129         &                                                      * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) )
130      IF( iom_use('qemp_oce') )  CALL iom_put( "qemp_oce" , qemp_oce(:,:) ) 
131      IF( iom_use('qemp_ice') )  CALL iom_put( "qemp_ice" , qemp_ice(:,:) ) 
132      IF( iom_use('emp_oce' ) )  CALL iom_put( "emp_oce"  , emp_oce(:,:) )   ! emp over ocean (taking into account the snow blown away from the ice)
133      IF( iom_use('emp_ice' ) )  CALL iom_put( "emp_ice"  , emp_ice(:,:) )   ! emp over ice   (taking into account the snow blown away from the ice)
134
135      ! albedo output
136      CALL wrk_alloc( jpi,jpj, zalb )   
137
138      zalb(:,:) = 0._wp
139      WHERE     ( at_i_b <= epsi06 )  ;  zalb(:,:) = 0.066_wp
140      ELSEWHERE                       ;  zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) / at_i_b
141      END WHERE
142      IF( iom_use('alb_ice' ) )  CALL iom_put( "alb_ice"  , zalb(:,:) )           ! ice albedo output
143
144      zalb(:,:) = SUM( alb_ice * a_i_b, dim=3 ) + 0.066_wp * ( 1._wp - at_i_b )     
145      IF( iom_use('albedo'  ) )  CALL iom_put( "albedo"  , zalb(:,:) )           ! ice albedo output
146
147      CALL wrk_dealloc( jpi,jpj, zalb )   
148      !
149     
150      DO jj = 1, jpj
151         DO ji = 1, jpi
152
153            !------------------------------------------!
154            !      heat flux at the ocean surface      !
155            !------------------------------------------!
156            ! Solar heat flux reaching the ocean = zqsr (W.m-2)
157            !---------------------------------------------------
158            zqsr = qsr_tot(ji,jj)
159            DO jl = 1, jpl
160               zqsr = zqsr - a_i_b(ji,jj,jl) * (  qsr_ice(ji,jj,jl) - ftr_ice(ji,jj,jl) ) 
161            END DO
162
163            ! Total heat flux reaching the ocean = hfx_out (W.m-2)
164            !---------------------------------------------------
165            zqmass         = hfx_thd(ji,jj) + hfx_dyn(ji,jj) + hfx_res(ji,jj) ! heat flux from snow is 0 (T=0 degC)
166            hfx_out(ji,jj) = hfx_out(ji,jj) + zqmass + zqsr
167
168            ! Add the residual from heat diffusion equation and sublimation (W.m-2)
169            !----------------------------------------------------------------------
170            hfx_out(ji,jj) = hfx_out(ji,jj) + hfx_err_dif(ji,jj) +   &
171               &           ( hfx_sub(ji,jj) - SUM( qevap_ice(ji,jj,:) * a_i_b(ji,jj,:) ) )
172
173            ! New qsr and qns used to compute the oceanic heat flux at the next time step
174            !----------------------------------------------------------------------------
175            qsr(ji,jj) = zqsr                                     
176            qns(ji,jj) = hfx_out(ji,jj) - zqsr             
177
178            !------------------------------------------!
179            !      mass flux at the ocean surface      !
180            !------------------------------------------!
181            !  case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED)
182            !  -------------------------------------------------------------------------------------
183            !  The idea of this approach is that the system that we consider is the ICE-OCEAN system
184            !  Thus  FW  flux  =  External ( E-P+snow melt)
185            !       Salt flux  =  Exchanges in the ice-ocean system then converted into FW
186            !                     Associated to Ice formation AND Ice melting
187            !                     Even if i see Ice melting as a FW and SALT flux
188            !       
189            ! mass flux from ice/ocean
190            wfx_ice(ji,jj) = wfx_bog(ji,jj) + wfx_bom(ji,jj) + wfx_sum(ji,jj) + wfx_sni(ji,jj)   &
191                           + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj) + wfx_lam(ji,jj) 
192
193            ! mass flux at the ocean/ice interface
194            fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) + wfx_err_sub(ji,jj) )              ! F/M mass flux save at least for biogeochemical model
195            emp(ji,jj)    = emp_oce(ji,jj) - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_err_sub(ji,jj)   ! mass flux + F/M mass flux (always ice/ocean mass exchange)
196         END DO
197      END DO
198
199      !------------------------------------------!
200      !      salt flux at the ocean surface      !
201      !------------------------------------------!
202      sfx(:,:) = sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + sfx_opw(:,:)   &
203         &     + sfx_res(:,:) + sfx_dyn(:,:) + sfx_bri(:,:) + sfx_sub(:,:) + sfx_lam(:,:)
204
205      !-------------------------------------------------------------!
206      !   mass of snow and ice per unit area for embedded sea-ice   !
207      !-------------------------------------------------------------!
208      IF( nn_ice_embd /= 0 ) THEN
209         ! save mass from the previous ice time step
210         snwice_mass_b(:,:) = snwice_mass(:,:)                 
211         ! new mass per unit area
212         snwice_mass  (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  ) 
213         ! time evolution of snow+ice mass
214         snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice
215      ENDIF
216
217      !-----------------------------------------------!
218      !   Storing the transmitted variables           !
219      !-----------------------------------------------!
220      fr_i  (:,:)   = at_i(:,:)             ! Sea-ice fraction           
221      tn_ice(:,:,:) = t_su(:,:,:)           ! Ice surface temperature                     
222
223      !------------------------------------------------------------------------!
224      !    Snow/ice albedo (only if sent to coupler, useless in forced mode)   !
225      !------------------------------------------------------------------------!
226      CALL wrk_alloc( jpi, jpj, jpl, zalb_cs, zalb_os )   
227      CALL albedo_ice( t_su, ht_i, ht_s, zalb_cs, zalb_os )  ! cloud-sky and overcast-sky ice albedos
228      alb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:)
229      CALL wrk_dealloc( jpi, jpj, jpl, zalb_cs, zalb_os )
230
231      ! conservation test
232      IF( ln_limdiahsb ) CALL lim_cons_final( 'limsbc' )
233
234      ! control prints
235      IF( ln_icectl )   CALL lim_prt( kt, iiceprt, jiceprt, 3, ' - Final state lim_sbc - ' )
236
237      IF(ln_ctl) THEN
238         CALL prt_ctl( tab2d_1=qsr   , clinfo1=' lim_sbc: qsr    : ', tab2d_2=qns , clinfo2=' qns     : ' )
239         CALL prt_ctl( tab2d_1=emp   , clinfo1=' lim_sbc: emp    : ', tab2d_2=sfx , clinfo2=' sfx     : ' )
240         CALL prt_ctl( tab2d_1=fr_i  , clinfo1=' lim_sbc: fr_i   : ' )
241         CALL prt_ctl( tab3d_1=tn_ice, clinfo1=' lim_sbc: tn_ice : ', kdim=jpl )
242      ENDIF
243
244   END SUBROUTINE lim_sbc_flx
245
246
247   SUBROUTINE lim_sbc_tau( kt , pu_oce, pv_oce )
248      !!-------------------------------------------------------------------
249      !!                ***  ROUTINE lim_sbc_tau ***
250      !! 
251      !! ** Purpose : Update the ocean surface stresses due to the ice
252      !!         
253      !! ** Action  : * at each ice time step (every nn_fsbc time step):
254      !!                - compute the modulus of ice-ocean relative velocity
255      !!                  (*rho*Cd) at T-point (C-grid) or I-point (B-grid)
256      !!                      tmod_io = rhoco * | U_ice-U_oce |
257      !!                - update the modulus of stress at ocean surface
258      !!                      taum = frld * taum + (1-frld) * tmod_io * | U_ice-U_oce |
259      !!              * at each ocean time step (every kt):
260      !!                  compute linearized ice-ocean stresses as
261      !!                      Utau = tmod_io * | U_ice - pU_oce |
262      !!                using instantaneous current ocean velocity (usually before)
263      !!
264      !!    NB: - ice-ocean rotation angle no more allowed
265      !!        - here we make an approximation: taum is only computed every ice time step
266      !!          This avoids mutiple average to pass from T -> U,V grids and next from U,V grids
267      !!          to T grid. taum is used in TKE and GLS, which should not be too sensitive to this approximaton...
268      !!
269      !! ** Outputs : - utau, vtau   : surface ocean i- and j-stress (u- & v-pts) updated with ice-ocean fluxes
270      !!              - taum         : modulus of the surface ocean stress (T-point) updated with ice-ocean fluxes
271      !!---------------------------------------------------------------------
272      INTEGER ,                     INTENT(in) ::   kt               ! ocean time-step index
273      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pu_oce, pv_oce   ! surface ocean currents
274      !!
275      INTEGER  ::   ji, jj   ! dummy loop indices
276      REAL(wp) ::   zat_u, zutau_ice, zu_t, zmodt   ! local scalar
277      REAL(wp) ::   zat_v, zvtau_ice, zv_t          !   -      -
278      !!---------------------------------------------------------------------
279      !
280      IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==!   (i.e. surface module time-step)
281         DO jj = 2, jpjm1                             !* update the modulus of stress at ocean surface (T-point)
282            DO ji = fs_2, fs_jpim1
283               !                                               ! 2*(U_ice-U_oce) at T-point
284               zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   
285               zv_t = v_ice(ji,jj) + v_ice(ji,jj-1) - v_oce(ji,jj) - v_oce(ji,jj-1) 
286               !                                              ! |U_ice-U_oce|^2
287               zmodt =  0.25_wp * (  zu_t * zu_t + zv_t * zv_t  )
288               !                                               ! update the ocean stress modulus
289               taum(ji,jj) = ( 1._wp - at_i(ji,jj) ) * taum(ji,jj) + at_i(ji,jj) * rhoco * zmodt
290               tmod_io(ji,jj) = rhoco * SQRT( zmodt )          ! rhoco * |U_ice-U_oce| at T-point
291            END DO
292         END DO
293         CALL lbc_lnk_multi( taum, 'T', 1., tmod_io, 'T', 1. )
294         !
295         utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step
296         vtau_oce(:,:) = vtau(:,:)
297         !
298      ENDIF
299      !
300      !                                      !==  every ocean time-step  ==!
301      !
302      DO jj = 2, jpjm1                                !* update the stress WITHOUT a ice-ocean rotation angle
303         DO ji = fs_2, fs_jpim1   ! Vect. Opt.
304            zat_u  = ( at_i(ji,jj) + at_i(ji+1,jj) ) * 0.5_wp   ! ice area at u and V-points
305            zat_v  = ( at_i(ji,jj) + at_i(ji,jj+1) ) * 0.5_wp
306            !                                                   ! linearized quadratic drag formulation
307            zutau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji+1,jj) ) * ( u_ice(ji,jj) - pu_oce(ji,jj) )
308            zvtau_ice   = 0.5_wp * ( tmod_io(ji,jj) + tmod_io(ji,jj+1) ) * ( v_ice(ji,jj) - pv_oce(ji,jj) )
309            !                                                   ! stresses at the ocean surface
310            utau(ji,jj) = ( 1._wp - zat_u ) * utau_oce(ji,jj) + zat_u * zutau_ice
311            vtau(ji,jj) = ( 1._wp - zat_v ) * vtau_oce(ji,jj) + zat_v * zvtau_ice
312         END DO
313      END DO
314      CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. )   ! lateral boundary condition
315      !
316      IF(ln_ctl)   CALL prt_ctl( tab2d_1=utau, clinfo1=' lim_sbc: utau   : ', mask1=umask,   &
317         &                       tab2d_2=vtau, clinfo2=' vtau    : '        , mask2=vmask )
318     
319   END SUBROUTINE lim_sbc_tau
320
321
322   SUBROUTINE lim_sbc_init
323      !!-------------------------------------------------------------------
324      !!                  ***  ROUTINE lim_sbc_init  ***
325      !!             
326      !! ** Purpose : Preparation of the file ice_evolu for the output of
327      !!      the temporal evolution of key variables
328      !!
329      !! ** input   : Namelist namicedia
330      !!-------------------------------------------------------------------
331      INTEGER  ::   ji, jj, jk                       ! dummy loop indices
332      REAL(wp) ::   zcoefu, zcoefv, zcoeff          ! local scalar
333      IF(lwp) WRITE(numout,*)
334      IF(lwp) WRITE(numout,*) 'lim_sbc_init : LIM-3 sea-ice - surface boundary condition'
335      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~   '
336
337      !                                      ! allocate lim_sbc array
338      IF( lim_sbc_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'lim_sbc_init : unable to allocate standard arrays' )
339      !
340      IF( .NOT. ln_rstart ) THEN
341         !                                      ! embedded sea ice
342         IF( nn_ice_embd /= 0 ) THEN            ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass
343            snwice_mass  (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  )
344            snwice_mass_b(:,:) = snwice_mass(:,:)
345         ELSE
346            snwice_mass  (:,:) = 0.0_wp         ! no mass exchanges
347            snwice_mass_b(:,:) = 0.0_wp         ! no mass exchanges
348         ENDIF
349         IF( nn_ice_embd == 2 ) THEN            ! full embedment (case 2) deplete the initial ssh below sea-ice area
350            sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0
351            sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0
352#if defined key_vvl           
353           ! key_vvl necessary? clem: yes for compilation purpose
354            DO jk = 1,jpkm1                     ! adjust initial vertical scale factors
355               fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
356               fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
357            ENDDO
358            fse3t_a(:,:,:) = fse3t_b(:,:,:)
359            ! Reconstruction of all vertical scale factors at now and before time
360            ! steps
361            ! =============================================================================
362            ! Horizontal scale factor interpolations
363            ! --------------------------------------
364            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
365            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
366            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
367            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
368            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
369            ! Vertical scale factor interpolations
370            ! ------------------------------------
371            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
372            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
373            CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
374            CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
375            CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
376            ! t- and w- points depth
377            ! ----------------------
378            fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
379            fsdepw_n(:,:,1) = 0.0_wp
380            fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
381            DO jk = 2, jpk
382               fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk)
383               fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1)
384               fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:)
385            END DO
386#endif
387         ENDIF
388      ENDIF ! .NOT. ln_rstart
389      !
390
391   END SUBROUTINE lim_sbc_init
392
393#else
394   !!----------------------------------------------------------------------
395   !!   Default option :        Dummy module       NO LIM 3.0 sea-ice model
396   !!----------------------------------------------------------------------
397CONTAINS
398   SUBROUTINE lim_sbc           ! Dummy routine
399   END SUBROUTINE lim_sbc
400#endif 
401
402   !!======================================================================
403END MODULE limsbc
Note: See TracBrowser for help on using the repository browser.