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.
sshwzv.F90 in NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN – NEMO

source: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90 @ 14219

Last change on this file since 14219 was 14219, checked in by mcastril, 4 years ago

Add Mixed Precision support by Oriol Tintó

  • Property svn:keywords set to Id
File size: 21.8 KB
Line 
1MODULE sshwzv   
2   !!==============================================================================
3   !!                       ***  MODULE  sshwzv  ***
4   !! Ocean dynamics : sea surface height and vertical velocity
5   !!==============================================================================
6   !! History :  3.1  !  2009-02  (G. Madec, M. Leclair)  Original code
7   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  modified LF-RA
8   !!             -   !  2010-05  (K. Mogensen, A. Weaver, M. Martin, D. Lea)  Assimilation interface
9   !!             -   !  2010-09  (D.Storkey and E.O'Dea)  bug fixes for BDY module
10   !!            3.3  !  2011-10  (M. Leclair)  split former ssh_wzv routine and remove all vvl related work
11   !!            4.0  !  2018-12  (A. Coward)  add mixed implicit/explicit advection
12   !!            4.1  !  2019-08  (A. Coward, D. Storkey)  Rename ssh_nxt -> ssh_atf. Now only does time filtering.
13   !!             -   !  2020-08  (S. Techene, G. Madec)  add here ssh initiatlisation
14   !!----------------------------------------------------------------------
15
16   !!----------------------------------------------------------------------
17   !!   ssh_nxt       : after ssh
18   !!   ssh_atf       : time filter the ssh arrays
19   !!   wzv           : compute now vertical velocity
20   !!----------------------------------------------------------------------
21   USE oce            ! ocean dynamics and tracers variables
22   USE isf_oce        ! ice shelf
23   USE dom_oce        ! ocean space and time domain variables
24   USE sbc_oce        ! surface boundary condition: ocean
25   USE domvvl         ! Variable volume
26   USE divhor         ! horizontal divergence
27   USE phycst         ! physical constants
28   USE bdy_oce , ONLY : ln_bdy, bdytmask   ! Open BounDarY
29   USE bdydyn2d       ! bdy_ssh routine
30   USE wet_dry        ! Wetting/Drying flux limiting
31#if defined key_agrif
32   USE agrif_oce
33   USE agrif_oce_interp
34#endif
35   !
36   USE iom 
37   USE in_out_manager ! I/O manager
38   USE restart        ! only for lrst_oce
39   USE prtctl         ! Print control
40   USE lbclnk         ! ocean lateral boundary condition (or mpp link)
41   USE lib_mpp        ! MPP library
42   USE timing         ! Timing
43   
44   IMPLICIT NONE
45   PRIVATE
46
47   PUBLIC   ssh_nxt        ! called by step.F90
48   PUBLIC   wzv            ! called by step.F90
49   PUBLIC   wAimp          ! called by step.F90
50   PUBLIC   ssh_atf        ! called by step.F90
51
52   !! * Substitutions
53#  include "do_loop_substitute.h90"
54#  include "domzgr_substitute.h90"
55#  include "single_precision_substitute.h90"
56
57   !!----------------------------------------------------------------------
58   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
59   !! $Id$
60   !! Software governed by the CeCILL license (see ./LICENSE)
61   !!----------------------------------------------------------------------
62CONTAINS
63
64   SUBROUTINE ssh_nxt( kt, Kbb, Kmm, pssh, Kaa )
65      !!----------------------------------------------------------------------
66      !!                ***  ROUTINE ssh_nxt  ***
67      !!                   
68      !! ** Purpose :   compute the after ssh (ssh(Kaa))
69      !!
70      !! ** Method  : - Using the incompressibility hypothesis, the ssh increment
71      !!      is computed by integrating the horizontal divergence and multiply by
72      !!      by the time step.
73      !!
74      !! ** action  :   ssh(:,:,Kaa), after sea surface height
75      !!
76      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling.
77      !!----------------------------------------------------------------------
78      INTEGER                         , INTENT(in   ) ::   kt             ! time step
79      INTEGER                         , INTENT(in   ) ::   Kbb, Kmm, Kaa  ! time level index
80      REAL(dp), DIMENSION(jpi,jpj,jpt), INTENT(inout) ::   pssh           ! sea-surface height
81      !
82      INTEGER  ::   jk      ! dummy loop index
83      REAL(wp) ::   zcoef   ! local scalar
84      REAL(wp), DIMENSION(jpi,jpj) ::   zhdiv   ! 2D workspace
85      !!----------------------------------------------------------------------
86      !
87      IF( ln_timing )   CALL timing_start('ssh_nxt')
88      !
89      IF( kt == nit000 ) THEN
90         IF(lwp) WRITE(numout,*)
91         IF(lwp) WRITE(numout,*) 'ssh_nxt : after sea surface height'
92         IF(lwp) WRITE(numout,*) '~~~~~~~ '
93      ENDIF
94      !
95      zcoef = 0.5_wp * r1_rho0
96
97      !                                           !------------------------------!
98      !                                           !   After Sea Surface Height   !
99      !                                           !------------------------------!
100      IF(ln_wd_il) THEN
101         CALL wad_lmt(pssh(:,:,Kbb), zcoef * (emp_b(:,:) + emp(:,:)), rDt, Kmm, uu, vv )
102      ENDIF
103
104      CALL div_hor( kt, Kbb, Kmm )                     ! Horizontal divergence
105      !
106      zhdiv(:,:) = 0._wp
107      DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports
108        zhdiv(:,:) = zhdiv(:,:) + e3t(:,:,jk,Kmm) * hdiv(:,:,jk)
109      END DO
110      !                                                ! Sea surface elevation time stepping
111      ! In time-split case we need a first guess of the ssh after (using the baroclinic timestep) in order to
112      ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations.
113      !
114      pssh(:,:,Kaa) = (  pssh(:,:,Kbb) - rDt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:)
115      !
116#if defined key_agrif
117      Kbb_a = Kbb   ;   Kmm_a = Kmm   ;   Krhs_a = Kaa
118      CALL agrif_ssh( kt )
119#endif
120      !
121      IF ( .NOT.ln_dynspg_ts ) THEN
122         IF( ln_bdy ) THEN
123            CALL lbc_lnk( 'sshwzv', pssh(:,:,Kaa), 'T', 1.0_wp )    ! Not sure that's necessary
124            CALL bdy_ssh( pssh(:,:,Kaa) )             ! Duplicate sea level across open boundaries
125         ENDIF
126      ENDIF
127      !                                           !------------------------------!
128      !                                           !           outputs            !
129      !                                           !------------------------------!
130      !
131IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab2d_1=CASTWP(pssh(:,:,Kaa)), clinfo1=' pssh(:,:,Kaa)  - : ', mask1=tmask )
132      !
133      IF( ln_timing )   CALL timing_stop('ssh_nxt')
134      !
135   END SUBROUTINE ssh_nxt
136
137   
138   SUBROUTINE wzv( kt, Kbb, Kmm, Kaa, pww )
139      !!----------------------------------------------------------------------
140      !!                ***  ROUTINE wzv  ***
141      !!                   
142      !! ** Purpose :   compute the now vertical velocity
143      !!
144      !! ** Method  : - Using the incompressibility hypothesis, the vertical
145      !!      velocity is computed by integrating the horizontal divergence 
146      !!      from the bottom to the surface minus the scale factor evolution.
147      !!        The boundary conditions are w=0 at the bottom (no flux) and.
148      !!
149      !! ** action  :   pww      : now vertical velocity
150      !!
151      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling.
152      !!----------------------------------------------------------------------
153      INTEGER                         , INTENT(in)    ::   kt             ! time step
154      INTEGER                         , INTENT(in)    ::   Kbb, Kmm, Kaa  ! time level indices
155      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   pww            ! vertical velocity at Kmm
156      !
157      INTEGER  ::   ji, jj, jk   ! dummy loop indices
158      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zhdiv
159      !!----------------------------------------------------------------------
160      !
161      IF( ln_timing )   CALL timing_start('wzv')
162      !
163      IF( kt == nit000 ) THEN
164         IF(lwp) WRITE(numout,*)
165         IF(lwp) WRITE(numout,*) 'wzv : now vertical velocity '
166         IF(lwp) WRITE(numout,*) '~~~~~ '
167         !
168         pww(:,:,jpk) = 0._wp                  ! bottom boundary condition: w=0 (set once for all)
169      ENDIF
170      !                                           !------------------------------!
171      !                                           !     Now Vertical Velocity    !
172      !                                           !------------------------------!
173      !
174      !                                               !===============================!
175      IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN      !==  z_tilde and layer cases  ==!
176         !                                            !===============================!
177         ALLOCATE( zhdiv(jpi,jpj,jpk) ) 
178         !
179         DO jk = 1, jpkm1
180            ! horizontal divergence of thickness diffusion transport ( velocity multiplied by e3t)
181            ! - ML - note: computation already done in dom_vvl_sf_nxt. Could be optimized (not critical and clearer this way)
182            DO_2D( 0, 0, 0, 0 )
183               zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) )
184            END_2D
185         END DO
186         CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions"
187         !                             ! Is it problematic to have a wrong vertical velocity in boundary cells?
188         !                             ! Same question holds for hdiv. Perhaps just for security
189         DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence
190            ! computation of w
191            pww(:,:,jk) = pww(:,:,jk+1) - (   e3t(:,:,jk,Kmm) * hdiv(:,:,jk)   &
192               &                            +                  zhdiv(:,:,jk)   &
193               &                            + r1_Dt * (  e3t(:,:,jk,Kaa)       &
194               &                                       - e3t(:,:,jk,Kbb) )   ) * tmask(:,:,jk)
195         END DO
196         !          IF( ln_vvl_layer ) pww(:,:,:) = 0.e0
197         DEALLOCATE( zhdiv ) 
198         !                                            !=================================!
199      ELSEIF( ln_linssh )   THEN                      !==  linear free surface cases  ==!
200         !                                            !=================================!
201         DO jk = jpkm1, 1, -1                               ! integrate from the bottom the hor. divergence
202            pww(:,:,jk) = pww(:,:,jk+1) - (  e3t(:,:,jk,Kmm) * hdiv(:,:,jk)  ) * tmask(:,:,jk)
203         END DO
204         !                                            !==========================================!
205      ELSE                                            !==  Quasi-Eulerian vertical coordinate  ==!   ('key_qco')
206         !                                            !==========================================!
207         DO jk = jpkm1, 1, -1                               ! integrate from the bottom the hor. divergence
208            pww(:,:,jk) = pww(:,:,jk+1) - (  e3t(:,:,jk,Kmm) * hdiv(:,:,jk)                 &
209               &                            + r1_Dt * (  e3t(:,:,jk,Kaa)        &
210               &                                       - e3t(:,:,jk,Kbb)  )   ) * tmask(:,:,jk)
211         END DO
212      ENDIF
213
214      IF( ln_bdy ) THEN
215         DO jk = 1, jpkm1
216            pww(:,:,jk) = pww(:,:,jk) * bdytmask(:,:)
217         END DO
218      ENDIF
219      !
220#if defined key_agrif
221      IF( .NOT. AGRIF_Root() ) THEN
222         !
223         ! Mask vertical velocity at first/last columns/row
224         ! inside computational domain (cosmetic)
225         DO jk = 1, jpkm1
226            IF( lk_west ) THEN                             ! --- West --- !
227               DO ji = mi0(2+nn_hls), mi1(2+nn_hls)
228                  DO jj = 1, jpj
229                     pww(ji,jj,jk) = 0._wp 
230                  END DO
231               END DO
232            ENDIF
233            IF( lk_east ) THEN                             ! --- East --- !
234               DO ji = mi0(jpiglo-1-nn_hls), mi1(jpiglo-1-nn_hls)
235                  DO jj = 1, jpj
236                     pww(ji,jj,jk) = 0._wp
237                  END DO
238               END DO
239            ENDIF
240            IF( lk_south ) THEN                            ! --- South --- !
241               DO jj = mj0(2+nn_hls), mj1(2+nn_hls)
242                  DO ji = 1, jpi
243                     pww(ji,jj,jk) = 0._wp
244                  END DO
245               END DO
246            ENDIF
247            IF( lk_north ) THEN                            ! --- North --- !
248               DO jj = mj0(jpjglo-1-nn_hls), mj1(jpjglo-1-nn_hls)
249                  DO ji = 1, jpi
250                     pww(ji,jj,jk) = 0._wp
251                  END DO
252               END DO
253            ENDIF
254            !
255         END DO
256         !
257      ENDIF 
258#endif
259      !
260      IF( ln_timing )   CALL timing_stop('wzv')
261      !
262   END SUBROUTINE wzv
263
264
265   SUBROUTINE ssh_atf( kt, Kbb, Kmm, Kaa, pssh, pssh_f )
266      !!----------------------------------------------------------------------
267      !!                    ***  ROUTINE ssh_atf  ***
268      !!
269      !! ** Purpose :   Apply Asselin time filter to now SSH.
270      !!
271      !! ** Method  : - apply Asselin time fiter to now ssh (excluding the forcing
272      !!              from the filter, see Leclair and Madec 2010) and swap :
273      !!                pssh(:,:,Kmm) = pssh(:,:,Kaa) + rn_atfp * ( pssh(:,:,Kbb) -2 pssh(:,:,Kmm) + pssh(:,:,Kaa) )
274      !!                            - rn_atfp * rn_Dt * ( emp_b - emp ) / rho0
275      !!
276      !! ** action  : - pssh(:,:,Kmm) time filtered
277      !!
278      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling.
279      !!----------------------------------------------------------------------
280      INTEGER                         , INTENT(in   ) ::   kt             ! ocean time-step index
281      INTEGER                         , INTENT(in   ) ::   Kbb, Kmm, Kaa  ! ocean time level indices
282      REAL(dp), DIMENSION(jpi,jpj,jpt)          , TARGET, INTENT(inout) ::   pssh           ! SSH field
283      REAL(dp), DIMENSION(jpi,jpj    ), OPTIONAL, TARGET, INTENT(  out) ::   pssh_f         ! filtered SSH field
284      !
285      REAL(dp) ::   zcoef   ! local scalar
286      REAL(dp), POINTER, DIMENSION(:,:) ::   zssh   ! pointer for filtered SSH
287      !!----------------------------------------------------------------------
288      !
289      IF( ln_timing )   CALL timing_start('ssh_atf')
290      !
291      IF( kt == nit000 ) THEN
292         IF(lwp) WRITE(numout,*)
293         IF(lwp) WRITE(numout,*) 'ssh_atf : Asselin time filter of sea surface height'
294         IF(lwp) WRITE(numout,*) '~~~~~~~ '
295      ENDIF
296      !              !==  Euler time-stepping: no filter, just swap  ==!
297      IF ( .NOT.( l_1st_euler ) ) THEN   ! Only do time filtering for leapfrog timesteps
298         IF( PRESENT( pssh_f ) ) THEN   ;   zssh => pssh_f
299         ELSE                           ;   zssh => pssh(:,:,Kmm)
300         ENDIF
301         !                                                  ! filtered "now" field
302         pssh(:,:,Kmm) = pssh(:,:,Kmm) + rn_atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) )
303         !
304         IF( .NOT.ln_linssh ) THEN                          ! "now" <-- with forcing removed
305            zcoef = rn_atfp * rn_Dt * r1_rho0
306            pssh(:,:,Kmm) = pssh(:,:,Kmm) - zcoef * (     emp_b(:,:) - emp   (:,:)   &
307               &                             - rnf_b(:,:)        + rnf   (:,:)       &
308               &                             + fwfisf_cav_b(:,:) - fwfisf_cav(:,:)   &
309               &                             + fwfisf_par_b(:,:) - fwfisf_par(:,:)   ) * ssmask(:,:)
310
311            ! ice sheet coupling
312            IF( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1 )   &
313               &   pssh(:,:,Kbb) = pssh(:,:,Kbb) - rn_atfp * rn_Dt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:)
314
315         ENDIF
316      ENDIF
317      !
318      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab2d_1=CASTWP(pssh(:,:,Kmm)), clinfo1=' pssh(:,:,Kmm)  - : ', mask1=tmask )
319      !
320      IF( ln_timing )   CALL timing_stop('ssh_atf')
321      !
322   END SUBROUTINE ssh_atf
323
324   
325   SUBROUTINE wAimp( kt, Kmm )
326      !!----------------------------------------------------------------------
327      !!                ***  ROUTINE wAimp  ***
328      !!                   
329      !! ** Purpose :   compute the Courant number and partition vertical velocity
330      !!                if a proportion needs to be treated implicitly
331      !!
332      !! ** Method  : -
333      !!
334      !! ** action  :   ww      : now vertical velocity (to be handled explicitly)
335      !!            :   wi      : now vertical velocity (for implicit treatment)
336      !!
337      !! Reference  : Shchepetkin, A. F. (2015): An adaptive, Courant-number-dependent
338      !!              implicit scheme for vertical advection in oceanic modeling.
339      !!              Ocean Modelling, 91, 38-69.
340      !!----------------------------------------------------------------------
341      INTEGER, INTENT(in) ::   kt   ! time step
342      INTEGER, INTENT(in) ::   Kmm  ! time level index
343      !
344      INTEGER  ::   ji, jj, jk   ! dummy loop indices
345      REAL(wp)             ::   zCu, zcff, z1_e3t, zdt                ! local scalars
346      REAL(wp) , PARAMETER ::   Cu_min = 0.15_wp                      ! local parameters
347      REAL(wp) , PARAMETER ::   Cu_max = 0.30_wp                      ! local parameters
348      REAL(wp) , PARAMETER ::   Cu_cut = 2._wp*Cu_max - Cu_min        ! local parameters
349      REAL(wp) , PARAMETER ::   Fcu    = 4._wp*Cu_max*(Cu_max-Cu_min) ! local parameters
350      !!----------------------------------------------------------------------
351      !
352      IF( ln_timing )   CALL timing_start('wAimp')
353      !
354      IF( kt == nit000 ) THEN
355         IF(lwp) WRITE(numout,*)
356         IF(lwp) WRITE(numout,*) 'wAimp : Courant number-based partitioning of now vertical velocity '
357         IF(lwp) WRITE(numout,*) '~~~~~ '
358         wi(:,:,:) = 0._wp
359      ENDIF
360      !
361      ! Calculate Courant numbers
362      zdt = 2._wp * rn_Dt                            ! 2*rn_Dt and not rDt (for restartability)
363      IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
364         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
365            z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm)
366            Cu_adv(ji,jj,jk) =   zdt *                                                         &
367               &  ( ( MAX( ww(ji,jj,jk) , 0._wp ) - MIN( ww(ji,jj,jk+1) , 0._wp ) )            &
368               &  + ( MAX( e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm)                                  &
369               &                        * uu (ji  ,jj,jk,Kmm) + un_td(ji  ,jj,jk), 0._wp ) -   &
370               &      MIN( e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm)                                  &
371               &                        * uu (ji-1,jj,jk,Kmm) + un_td(ji-1,jj,jk), 0._wp ) )   &
372               &                               * r1_e1e2t(ji,jj)                                                                     &
373               &  + ( MAX( e1v(ji,jj  ) * e3v(ji,jj  ,jk,Kmm)                                  &
374               &                        * vv (ji,jj  ,jk,Kmm) + vn_td(ji,jj  ,jk), 0._wp ) -   &
375               &      MIN( e1v(ji,jj-1) * e3v(ji,jj-1,jk,Kmm)                                  &
376               &                        * vv (ji,jj-1,jk,Kmm) + vn_td(ji,jj-1,jk), 0._wp ) )   &
377               &                               * r1_e1e2t(ji,jj)                                                                     &
378               &                             ) * z1_e3t
379         END_3D
380      ELSE
381         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
382            z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm)
383            Cu_adv(ji,jj,jk) =   zdt *                                                      &
384               &  ( ( MAX( ww(ji,jj,jk) , 0._wp ) - MIN( ww(ji,jj,jk+1) , 0._wp ) )         &
385               &                             + ( MAX( e2u(ji  ,jj)*e3u(ji  ,jj,jk,Kmm)*uu(ji  ,jj,jk,Kmm), 0._wp ) -   &
386               &                                 MIN( e2u(ji-1,jj)*e3u(ji-1,jj,jk,Kmm)*uu(ji-1,jj,jk,Kmm), 0._wp ) )   &
387               &                               * r1_e1e2t(ji,jj)                                                 &
388               &                             + ( MAX( e1v(ji,jj  )*e3v(ji,jj  ,jk,Kmm)*vv(ji,jj  ,jk,Kmm), 0._wp ) -   &
389               &                                 MIN( e1v(ji,jj-1)*e3v(ji,jj-1,jk,Kmm)*vv(ji,jj-1,jk,Kmm), 0._wp ) )   &
390               &                               * r1_e1e2t(ji,jj)                                                 &
391               &                             ) * z1_e3t
392         END_3D
393      ENDIF
394      CALL lbc_lnk( 'sshwzv', Cu_adv, 'T', 1.0_wp )
395      !
396      CALL iom_put("Courant",Cu_adv)
397      !
398      IF( MAXVAL( Cu_adv(:,:,:) ) > Cu_min ) THEN       ! Quick check if any breaches anywhere
399         DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 )             ! or scan Courant criterion and partition ! w where necessary
400            !
401            zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) )
402! alt:
403!                  IF ( ww(ji,jj,jk) > 0._wp ) THEN
404!                     zCu =  Cu_adv(ji,jj,jk)
405!                  ELSE
406!                     zCu =  Cu_adv(ji,jj,jk-1)
407!                  ENDIF
408            !
409            IF( zCu <= Cu_min ) THEN              !<-- Fully explicit
410               zcff = 0._wp
411            ELSEIF( zCu < Cu_cut ) THEN           !<-- Mixed explicit
412               zcff = ( zCu - Cu_min )**2
413               zcff = zcff / ( Fcu + zcff )
414            ELSE                                  !<-- Mostly implicit
415               zcff = ( zCu - Cu_max )/ zCu
416            ENDIF
417            zcff = MIN(1._wp, zcff)
418            !
419            wi(ji,jj,jk) =           zcff   * ww(ji,jj,jk)
420            ww(ji,jj,jk) = ( 1._wp - zcff ) * ww(ji,jj,jk)
421            !
422            Cu_adv(ji,jj,jk) = zcff               ! Reuse array to output coefficient below and in stp_ctl
423         END_3D
424         Cu_adv(:,:,1) = 0._wp 
425      ELSE
426         ! Fully explicit everywhere
427         Cu_adv(:,:,:) = 0._wp                          ! Reuse array to output coefficient below and in stp_ctl
428         wi    (:,:,:) = 0._wp
429      ENDIF
430      CALL iom_put("wimp",wi) 
431      CALL iom_put("wi_cff",Cu_adv)
432      CALL iom_put("wexp",ww)
433      !
434      IF( ln_timing )   CALL timing_stop('wAimp')
435      !
436   END SUBROUTINE wAimp
437     
438   !!======================================================================
439END MODULE sshwzv
Note: See TracBrowser for help on using the repository browser.