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.
tranxt.F90 in branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/TRA – NEMO

source: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 @ 7879

Last change on this file since 7879 was 7573, checked in by timgraham, 7 years ago

Fix for out of bounds array introduced at r7554 (cause of seg faults).

File size: 19.8 KB
RevLine 
[3]1MODULE tranxt
2   !!======================================================================
3   !!                       ***  MODULE  tranxt  ***
4   !! Ocean active tracers:  time stepping on temperature and salinity
5   !!======================================================================
[1110]6   !! History :  OPA  !  1991-11  (G. Madec)  Original code
7   !!            7.0  !  1993-03  (M. Guyon)  symetrical conditions
8   !!            8.0  !  1996-02  (G. Madec & M. Imbard)  opa release 8.0
9   !!             -   !  1996-04  (A. Weaver)  Euler forward step
10   !!            8.2  !  1999-02  (G. Madec, N. Grima)  semi-implicit pressure grad.
11   !!  NEMO      1.0  !  2002-08  (G. Madec)  F90: Free form and module
12   !!             -   !  2002-11  (C. Talandier, A-M Treguier) Open boundaries
13   !!             -   !  2005-04  (C. Deltel) Add Asselin trend in the ML budget
14   !!            2.0  !  2006-02  (L. Debreu, C. Mazauric) Agrif implementation
15   !!            3.0  !  2008-06  (G. Madec)  time stepping always done in trazdf
[1438]16   !!            3.1  !  2009-02  (G. Madec, R. Benshila)  re-introduce the vvl option
[2528]17   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  semi-implicit hpg with asselin filter + modified LF-RA
18   !!             -   !  2010-05  (C. Ethe, G. Madec)  merge TRC-TRA
[3]19   !!----------------------------------------------------------------------
[503]20
21   !!----------------------------------------------------------------------
[2528]22   !!   tra_nxt       : time stepping on tracers
23   !!   tra_nxt_fix   : time stepping on tracers : fixed    volume case
24   !!   tra_nxt_vvl   : time stepping on tracers : variable volume case
[3]25   !!----------------------------------------------------------------------
26   USE oce             ! ocean dynamics and tracers variables
27   USE dom_oce         ! ocean space and time domain variables
[2528]28   USE sbc_oce         ! surface boundary condition: ocean
[5467]29   USE sbcrnf          ! river runoffs
[6487]30   USE sbcisf          ! ice shelf melting/freezing
[4990]31   USE zdf_oce         ! ocean vertical mixing
[1438]32   USE domvvl          ! variable volume
[1601]33   USE dynspg_oce      ! surface     pressure gradient variables
34   USE dynhpg          ! hydrostatic pressure gradient
[4990]35   USE trd_oce         ! trends: ocean variables
36   USE trdtra          ! trends manager: tracers
37   USE traqsr          ! penetrative solar radiation (needed for nksr)
38   USE phycst          ! physical constant
39   USE ldftra_oce      ! lateral physics on tracers
40   USE bdy_oce         ! BDY open boundary condition variables
[3294]41   USE bdytra          ! open boundary condition (bdy_tra routine)
[4990]42   !
[3]43   USE in_out_manager  ! I/O manager
44   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
[258]45   USE prtctl          ! Print control
[4990]46   USE wrk_nemo        ! Memory allocation
47   USE timing          ! Timing
[2528]48#if defined key_agrif
[389]49   USE agrif_opa_interp
[2528]50#endif
[3]51
52   IMPLICIT NONE
53   PRIVATE
54
[2528]55   PUBLIC   tra_nxt       ! routine called by step.F90
56   PUBLIC   tra_nxt_fix   ! to be used in trcnxt
57   PUBLIC   tra_nxt_vvl   ! to be used in trcnxt
[592]58
[2715]59   REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg
[1438]60
[592]61   !! * Substitutions
62#  include "domzgr_substitute.h90"
[3]63   !!----------------------------------------------------------------------
[2528]64   !! NEMO/OPA 3.3 , NEMO-Consortium (2010)
[2715]65   !! $Id$
66   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[3]67   !!----------------------------------------------------------------------
68CONTAINS
69
70   SUBROUTINE tra_nxt( kt )
71      !!----------------------------------------------------------------------
72      !!                   ***  ROUTINE tranxt  ***
73      !!
[1110]74      !! ** Purpose :   Apply the boundary condition on the after temperature 
75      !!             and salinity fields, achieved the time stepping by adding
76      !!             the Asselin filter on now fields and swapping the fields.
[3]77      !!
[1110]78      !! ** Method  :   At this stage of the computation, ta and sa are the
79      !!             after temperature and salinity as the time stepping has
80      !!             been performed in trazdf_imp or trazdf_exp module.
[3]81      !!
[1110]82      !!              - Apply lateral boundary conditions on (ta,sa)
83      !!             at the local domain   boundaries through lbc_lnk call,
[4328]84      !!             at the one-way open boundaries (lk_bdy=T),
[4990]85      !!             at the AGRIF zoom   boundaries (lk_agrif=T)
[1110]86      !!
[1438]87      !!              - Update lateral boundary conditions on AGRIF children
88      !!             domains (lk_agrif=T)
[1110]89      !!
90      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
91      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
[503]92      !!----------------------------------------------------------------------
93      INTEGER, INTENT(in) ::   kt    ! ocean time-step index
94      !!
[2528]95      INTEGER  ::   jk, jn    ! dummy loop indices
96      REAL(wp) ::   zfact     ! local scalars
[3294]97      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds
[3]98      !!----------------------------------------------------------------------
[3294]99      !
100      IF( nn_timing == 1 )  CALL timing_start( 'tra_nxt')
101      !
[1110]102      IF( kt == nit000 ) THEN
103         IF(lwp) WRITE(numout,*)
104         IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap'
105         IF(lwp) WRITE(numout,*) '~~~~~~~'
[2528]106         !
[4230]107         rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg
[592]108      ENDIF
109
[1110]110      ! Update after tracer on domain lateral boundaries
111      !
[6487]112#if defined key_agrif
113      CALL Agrif_tra                     ! AGRIF zoom boundaries
114#endif
115      !
[4230]116      CALL lbc_lnk( tsa(:,:,:,jp_tem), 'T', 1._wp )      ! local domain boundaries  (T-point, unchanged sign)
117      CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1._wp )
[1110]118      !
[2528]119#if defined key_bdy 
[3294]120      IF( lk_bdy )   CALL bdy_tra( kt )  ! BDY open boundaries
[1110]121#endif
[1438]122 
123      ! set time step size (Euler/Leapfrog)
[2715]124      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dtra(:) =     rdttra(:)      ! at nit000             (Euler)
[4230]125      ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dtra(:) = 2._wp* rdttra(:)      ! at nit000 or nit000+1 (Leapfrog)
[1438]126      ENDIF
[3]127
[1110]128      ! trends computation initialisation
[7554]129      IF( l_trdtra )   THEN                   
[3294]130         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds )
[7573]131         ztrdt(:,:,jpk) = 0._wp
132         ztrds(:,:,jpk) = 0._wp
[4990]133         IF( ln_traldf_iso ) THEN              ! diagnose the "pure" Kz diffusive trend
134            CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt )
135            CALL trd_tra( kt, 'TRA', jp_sal, jptra_zdfp, ztrds )
136         ENDIF
[7549]137         ! total trend for the non-time-filtered variables.
[7061]138         DO jk = 1, jpkm1
[7549]139            zfact = 1.0 / rdttra(jk)
140            ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact 
141            ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact 
[7061]142         END DO
143         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt )
144         CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds )
[7554]145         ! Store now fields before applying the Asselin filter
146         ! in order to calculate Asselin filter trend later.
147         ztrdt(:,:,:) = tsn(:,:,:,jp_tem) 
148         ztrds(:,:,:) = tsn(:,:,:,jp_sal)
[1110]149      ENDIF
150
[2528]151      IF( neuler == 0 .AND. kt == nit000 ) THEN       ! Euler time-stepping at first time-step (only swap)
152         DO jn = 1, jpts
153            DO jk = 1, jpkm1
154               tsn(:,:,jk,jn) = tsa(:,:,jk,jn)   
155            END DO
156         END DO
157      ELSE                                            ! Leap-Frog + Asselin filter time stepping
158         !
[5385]159         IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa,   &
160           &                                                              sbc_tsc, sbc_tsc_b, jpts )  ! variable volume level (vvl)
161         ELSE                 ;   CALL tra_nxt_fix( kt, nit000,         'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level
[2528]162         ENDIF
[6487]163      ENDIF     
[2715]164      !
[6487]165     ! trends computation
[2528]166      IF( l_trdtra ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt     
[1110]167         DO jk = 1, jpkm1
[4990]168            zfact = 1._wp / r2dtra(jk)             
[2528]169            ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact
170            ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact
[1110]171         END DO
[4990]172         CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt )
173         CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds )
[3294]174         CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds )
[1438]175      END IF
[2715]176      !
[1438]177      !                        ! control print
[2528]178      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' nxt  - Tn: ', mask1=tmask,   &
179         &                       tab3d_2=tsn(:,:,:,jp_sal), clinfo2=       ' Sn: ', mask2=tmask )
[1438]180      !
[4990]181      IF( nn_timing == 1 )   CALL timing_stop('tra_nxt')
[3294]182      !
[1438]183   END SUBROUTINE tra_nxt
184
185
[3294]186   SUBROUTINE tra_nxt_fix( kt, kit000, cdtype, ptb, ptn, pta, kjpt )
[1438]187      !!----------------------------------------------------------------------
188      !!                   ***  ROUTINE tra_nxt_fix  ***
189      !!
190      !! ** Purpose :   fixed volume: apply the Asselin time filter and
191      !!                swap the tracer fields.
192      !!
193      !! ** Method  : - Apply a Asselin time filter on now fields.
194      !!              - save in (ta,sa) an average over the three time levels
195      !!             which will be used to compute rdn and thus the semi-implicit
196      !!             hydrostatic pressure gradient (ln_dynhpg_imp = T)
197      !!              - swap tracer fields to prepare the next time_step.
198      !!                This can be summurized for tempearture as:
[2528]199      !!             ztm = tn + rbcp * [ta -2 tn + tb ]       ln_dynhpg_imp = T
200      !!             ztm = 0                                   otherwise
201      !!                   with rbcp=1/4 * (1-atfp^4) / (1-atfp)
[1438]202      !!             tb  = tn + atfp*[ tb - 2 tn + ta ]
[2528]203      !!             tn  = ta 
[1438]204      !!             ta  = ztm       (NB: reset to 0 after eos_bn2 call)
205      !!
206      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
207      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
208      !!----------------------------------------------------------------------
[2715]209      INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index
[3294]210      INTEGER         , INTENT(in   )                               ::   kit000   ! first time step index
[2715]211      CHARACTER(len=3), INTENT(in   )                               ::   cdtype   ! =TRA or TRC (tracer indicator)
212      INTEGER         , INTENT(in   )                               ::   kjpt     ! number of tracers
213      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   ptb      ! before tracer fields
214      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   ptn      ! now tracer fields
215      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   pta      ! tracer trend
216      !
[2528]217      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
218      LOGICAL  ::   ll_tra_hpg       ! local logical
219      REAL(wp) ::   ztn, ztd         ! local scalars
[1438]220      !!----------------------------------------------------------------------
221
[3294]222      IF( kt == kit000 )  THEN
[1438]223         IF(lwp) WRITE(numout,*)
[3294]224         IF(lwp) WRITE(numout,*) 'tra_nxt_fix : time stepping', cdtype
[1438]225         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
226      ENDIF
227      !
[2528]228      IF( cdtype == 'TRA' )  THEN   ;   ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg   
229      ELSE                          ;   ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg
230      ENDIF
231      !
232      DO jn = 1, kjpt
[1438]233         !
[2528]234         DO jk = 1, jpkm1
235            DO jj = 1, jpj
236               DO ji = 1, jpi
237                  ztn = ptn(ji,jj,jk,jn)                                   
238                  ztd = pta(ji,jj,jk,jn) - 2. * ztn + ptb(ji,jj,jk,jn)      !  time laplacian on tracers
239                  !
240                  ptb(ji,jj,jk,jn) = ztn + atfp * ztd                       ! ptb <-- filtered ptn
241                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                       ! ptn <-- pta
242                  !
243                  IF( ll_tra_hpg )   pta(ji,jj,jk,jn) = ztn + rbcp * ztd    ! pta <-- Brown & Campana average
[3]244               END DO
[2528]245           END DO
246         END DO
[1110]247         !
[2528]248      END DO
[1438]249      !
250   END SUBROUTINE tra_nxt_fix
[3]251
[1110]252
[5385]253   SUBROUTINE tra_nxt_vvl( kt, kit000, p2dt, cdtype, ptb, ptn, pta, psbc_tc, psbc_tc_b, kjpt )
[1438]254      !!----------------------------------------------------------------------
255      !!                   ***  ROUTINE tra_nxt_vvl  ***
256      !!
257      !! ** Purpose :   Time varying volume: apply the Asselin time filter 
258      !!                and swap the tracer fields.
259      !!
260      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields.
261      !!              - save in (ta,sa) a thickness weighted average over the three
262      !!             time levels which will be used to compute rdn and thus the semi-
263      !!             implicit hydrostatic pressure gradient (ln_dynhpg_imp = T)
264      !!              - swap tracer fields to prepare the next time_step.
265      !!                This can be summurized for tempearture as:
[2528]266      !!             ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )   ln_dynhpg_imp = T
267      !!                  /( e3t_n    + rbcp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )   
268      !!             ztm = 0                                                       otherwise
[1438]269      !!             tb  = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )
270      !!                  /( e3t_n    + atfp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )
271      !!             tn  = ta
272      !!             ta  = zt        (NB: reset to 0 after eos_bn2 call)
273      !!
274      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
275      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
276      !!----------------------------------------------------------------------
[5385]277      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index
278      INTEGER         , INTENT(in   )                               ::  kit000   ! first time step index
279      REAL(wp)        , INTENT(in   ), DIMENSION(jpk)               ::  p2dt     ! time-step
280      CHARACTER(len=3), INTENT(in   )                               ::  cdtype   ! =TRA or TRC (tracer indicator)
281      INTEGER         , INTENT(in   )                               ::  kjpt     ! number of tracers
282      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  ptb      ! before tracer fields
283      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  ptn      ! now tracer fields
284      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  pta      ! tracer trend
285      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,kjpt)      ::  psbc_tc   ! surface tracer content
286      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,kjpt)      ::  psbc_tc_b ! before surface tracer content
287
[1438]288      !!     
[6487]289      LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf   ! local logical
[2528]290      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices
[2715]291      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar
292      REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d   !   -      -
[1438]293      !!----------------------------------------------------------------------
[3294]294      !
295      IF( kt == kit000 )  THEN
[1438]296         IF(lwp) WRITE(numout,*)
[3294]297         IF(lwp) WRITE(numout,*) 'tra_nxt_vvl : time stepping', cdtype
[1438]298         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
299      ENDIF
[2528]300      !
301      IF( cdtype == 'TRA' )  THEN   
302         ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg
303         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration
[5467]304         ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs
[6487]305         IF (nn_isf .GE. 1) THEN
306            ll_isf = .TRUE.            ! active  tracers case  and  ice shelf melting/freezing
307         ELSE
308            ll_isf = .FALSE.
309         END IF
[2528]310      ELSE                         
311         ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg
312         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration
[5467]313         ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs
[6487]314         ll_isf     = .FALSE.          ! passive tracers or NO ice shelf melting/freezing
[2528]315      ENDIF
316      !
317      DO jn = 1, kjpt     
318         DO jk = 1, jpkm1
[5385]319            zfact1 = atfp * p2dt(jk)
[2528]320            zfact2 = zfact1 / rau0
321            DO jj = 1, jpj
322               DO ji = 1, jpi
323                  ze3t_b = fse3t_b(ji,jj,jk)
324                  ze3t_n = fse3t_n(ji,jj,jk)
325                  ze3t_a = fse3t_a(ji,jj,jk)
326                  !                                         ! tracer content at Before, now and after
327                  ztc_b  = ptb(ji,jj,jk,jn) * ze3t_b
328                  ztc_n  = ptn(ji,jj,jk,jn) * ze3t_n
329                  ztc_a  = pta(ji,jj,jk,jn) * ze3t_a
330                  !
331                  ze3t_d = ze3t_a - 2. * ze3t_n + ze3t_b
332                  ztc_d  = ztc_a  - 2. * ztc_n  + ztc_b
333                  !
334                  ze3t_f = ze3t_n + atfp * ze3t_d
335                  ztc_f  = ztc_n  + atfp * ztc_d
336                  !
[6487]337                  IF( jk == mikt(ji,jj) ) THEN           ! first level
338                     ze3t_f = ze3t_f - zfact2 * ( (emp_b(ji,jj)    - emp(ji,jj)   )  &
339                            &                   - (rnf_b(ji,jj)    - rnf(ji,jj)   )  &
340                            &                   + (fwfisf_b(ji,jj) - fwfisf(ji,jj))  )
[5385]341                     ztc_f  = ztc_f  - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) )
[2528]342                  ENDIF
[5467]343
[6487]344                  ! solar penetration (temperature only)
345                  IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr )                            & 
[2528]346                     &     ztc_f  = ztc_f  - zfact1 * ( qsr_hc(ji,jj,jk) - qsr_hc_b(ji,jj,jk) ) 
[1438]347
[6487]348                  ! river runoff
349                  IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) )                                          &
[5467]350                     &     ztc_f  = ztc_f  - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) & 
351                     &                              * fse3t_n(ji,jj,jk) / h_rnf(ji,jj)
352
[6487]353                  ! ice shelf
354                  IF( ll_isf ) THEN
355                     ! level fully include in the Losch_2008 ice shelf boundary layer
356                     IF ( jk >= misfkt(ji,jj) .AND. jk < misfkb(ji,jj) )                          &
357                        ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  &
358                               &                 * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj)
359                     ! level partially include in Losch_2008 ice shelf boundary layer
360                     IF ( jk == misfkb(ji,jj) )                                                   &
361                        ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  &
362                               &                 * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj)
363                  END IF
364
[5467]365                  ze3t_f = 1.e0 / ze3t_f
366                  ptb(ji,jj,jk,jn) = ztc_f * ze3t_f       ! ptb <-- ptn filtered
367                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta
368                  !
369                  IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only)
370                     ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d )
371                     pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average
372                  ENDIF
[1438]373               END DO
374            END DO
[2528]375         END DO
376         !
377      END DO
[503]378      !
[1438]379   END SUBROUTINE tra_nxt_vvl
[3]380
381   !!======================================================================
382END MODULE tranxt
Note: See TracBrowser for help on using the repository browser.