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

source: trunk/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 @ 6416

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

phase trunk with new additions on LIM3 from 3.6 stable (r6398 r6399 and r6400)

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