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.
Changeset 14072 for NEMO/trunk/src/OCE/DYN – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (4 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

Location:
NEMO/trunk/src/OCE/DYN
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DYN/dynatf.F90

    r13472 r14072  
    1313   !!             -   !  2002-10  (C. Talandier, A-M. Treguier) Open boundary cond. 
    1414   !!            2.0  !  2005-11  (V. Garnier) Surface pressure gradient organization 
    15    !!            2.3  !  2007-07  (D. Storkey) Calls to BDY routines.  
     15   !!            2.3  !  2007-07  (D. Storkey) Calls to BDY routines. 
    1616   !!            3.2  !  2009-06  (G. Madec, R.Benshila)  re-introduce the vvl option 
    1717   !!            3.3  !  2010-09  (D. Storkey, E.O'Dea) Bug fix for BDY module 
     
    2222   !!            4.1  !  2019-08  (A. Coward, D. Storkey) Rename dynnxt.F90 -> dynatf.F90. Now just does time filtering. 
    2323   !!------------------------------------------------------------------------- 
    24    
     24 
    2525   !!---------------------------------------------------------------------------------------------- 
    2626   !!   dyn_atf       : apply Asselin time filtering to "now" velocities and vertical scale factors 
     
    4242   USE trdken         ! trend manager: kinetic energy 
    4343   USE isf_oce   , ONLY: ln_isf     ! ice shelf 
    44    USE isfdynatf , ONLY: isf_dynatf ! ice shelf volume filter correction subroutine  
     44   USE isfdynatf , ONLY: isf_dynatf ! ice shelf volume filter correction subroutine 
    4545   ! 
    4646   USE in_out_manager ! I/O manager 
     
    8181   !!---------------------------------------------------------------------- 
    8282   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    83    !! $Id$  
     83   !! $Id$ 
    8484   !! Software governed by the CeCILL license (see ./LICENSE) 
    8585   !!---------------------------------------------------------------------- 
     
    8989      !!---------------------------------------------------------------------- 
    9090      !!                  ***  ROUTINE dyn_atf  *** 
    91       !!                    
    92       !! ** Purpose :   Finalize after horizontal velocity. Apply the boundary  
     91      !! 
     92      !! ** Purpose :   Finalize after horizontal velocity. Apply the boundary 
    9393      !!             condition on the after velocity and apply the Asselin time 
    9494      !!             filter to the now fields. 
     
    9797      !!             estimate (ln_dynspg_ts=T) 
    9898      !! 
    99       !!              * Apply lateral boundary conditions on after velocity  
     99      !!              * Apply lateral boundary conditions on after velocity 
    100100      !!             at the local domain boundaries through lbc_lnk call, 
    101101      !!             at the one-way open boundaries (ln_bdy=T), 
     
    104104      !!              * Apply the Asselin time filter to the now fields 
    105105      !!             arrays to start the next time step: 
    106       !!                (puu(Kmm),pvv(Kmm)) = (puu(Kmm),pvv(Kmm))  
     106      !!                (puu(Kmm),pvv(Kmm)) = (puu(Kmm),pvv(Kmm)) 
    107107      !!                                    + rn_atfp [ (puu(Kbb),pvv(Kbb)) + (puu(Kaa),pvv(Kaa)) - 2 (puu(Kmm),pvv(Kmm)) ] 
    108108      !!             Note that with flux form advection and non linear free surface, 
     
    110110      !!             As a result, dyn_atf MUST be called after tra_atf. 
    111111      !! 
    112       !! ** Action :   puu(Kmm),pvv(Kmm)   filtered now horizontal velocity  
     112      !! ** Action :   puu(Kmm),pvv(Kmm)   filtered now horizontal velocity 
    113113      !!---------------------------------------------------------------------- 
    114114      INTEGER                             , INTENT(in   ) :: kt               ! ocean time-step index 
     
    122122      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zue, zve, zwfld 
    123123      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zutau, zvtau 
    124       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ze3t_f, ze3u_f, ze3v_f, zua, zva  
     124      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ze3t_f, ze3u_f, ze3v_f, zua, zva 
    125125      !!---------------------------------------------------------------------- 
    126126      ! 
     
    150150         ! 
    151151         IF( .NOT.ln_bt_fw ) THEN 
    152             ! Remove advective velocity from "now velocities"  
    153             ! prior to asselin filtering      
    154             ! In the forward case, this is done below after asselin filtering    
    155             ! so that asselin contribution is removed at the same time  
     152            ! Remove advective velocity from "now velocities" 
     153            ! prior to asselin filtering 
     154            ! In the forward case, this is done below after asselin filtering 
     155            ! so that asselin contribution is removed at the same time 
    156156            DO jk = 1, jpkm1 
    157157               puu(:,:,jk,Kmm) = ( puu(:,:,jk,Kmm) - un_adv(:,:)*r1_hu(:,:,Kmm) + uu_b(:,:,Kmm) )*umask(:,:,jk) 
    158158               pvv(:,:,jk,Kmm) = ( pvv(:,:,jk,Kmm) - vn_adv(:,:)*r1_hv(:,:,Kmm) + vv_b(:,:,Kmm) )*vmask(:,:,jk) 
    159             END DO   
     159            END DO 
    160160         ENDIF 
    161161      ENDIF 
    162162 
    163163      ! Update after velocity on domain lateral boundaries 
    164       ! --------------------------------------------------       
     164      ! -------------------------------------------------- 
    165165# if defined key_agrif 
    166166      CALL Agrif_dyn( kt )             !* AGRIF zoom boundaries 
     
    194194      ! Time filter and swap of dynamics arrays 
    195195      ! ------------------------------------------ 
    196           
    197       IF( .NOT. l_1st_euler ) THEN    !* Leap-Frog : Asselin time filter  
     196 
     197      IF( .NOT. l_1st_euler ) THEN    !* Leap-Frog : Asselin time filter 
    198198         !                                ! =============! 
    199199         IF( ln_linssh ) THEN             ! Fixed volume ! 
     
    220220            DO jk = 1, jpkm1 
    221221               ze3t_f(:,:,jk) = ze3t_f(:,:,jk) - zcoef * zwfld(:,:) * tmask(:,:,jk) & 
    222                               &                        * pe3t(:,:,jk,Kmm) / ( ht(:,:) + 1._wp - ssmask(:,:) )  
     222                              &                        * pe3t(:,:,jk,Kmm) / ( ht(:,:) + 1._wp - ssmask(:,:) ) 
    223223            END DO 
    224224            ! 
     
    257257                  pvv(ji,jj,jk,Kmm) = ( zve3n + rn_atfp * ( zve3b - 2._wp * zve3n  + zve3a ) ) / ze3v_f(ji,jj,jk) 
    258258               END_3D 
    259                pe3u(:,:,1:jpkm1,Kmm) = ze3u_f(:,:,1:jpkm1)   
     259               pe3u(:,:,1:jpkm1,Kmm) = ze3u_f(:,:,1:jpkm1) 
    260260               pe3v(:,:,1:jpkm1,Kmm) = ze3v_f(:,:,1:jpkm1) 
    261261               ! 
     
    268268         IF( ln_dynspg_ts .AND. ln_bt_fw ) THEN 
    269269            ! Revert filtered "now" velocities to time split estimate 
    270             ! Doing it here also means that asselin filter contribution is removed   
     270            ! Doing it here also means that asselin filter contribution is removed 
    271271            zue(:,:) = pe3u(:,:,1,Kmm) * puu(:,:,1,Kmm) * umask(:,:,1) 
    272             zve(:,:) = pe3v(:,:,1,Kmm) * pvv(:,:,1,Kmm) * vmask(:,:,1)     
     272            zve(:,:) = pe3v(:,:,1,Kmm) * pvv(:,:,1,Kmm) * vmask(:,:,1) 
    273273            DO jk = 2, jpkm1 
    274274               zue(:,:) = zue(:,:) + pe3u(:,:,jk,Kmm) * puu(:,:,jk,Kmm) * umask(:,:,jk) 
    275                zve(:,:) = zve(:,:) + pe3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm) * vmask(:,:,jk)     
     275               zve(:,:) = zve(:,:) + pe3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm) * vmask(:,:,jk) 
    276276            END DO 
    277277            DO jk = 1, jpkm1 
     
    325325      IF ( iom_use("utau") ) THEN 
    326326         IF ( ln_drgice_imp.OR.ln_isfcav ) THEN 
    327             ALLOCATE(zutau(jpi,jpj))  
     327            ALLOCATE(zutau(jpi,jpj)) 
    328328            DO_2D( 0, 0, 0, 0 ) 
    329                jk = miku(ji,jj)  
     329               jk = miku(ji,jj) 
    330330               zutau(ji,jj) = utau(ji,jj) + 0.5_wp * rho0 * ( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) * puu(ji,jj,jk,Kaa) 
    331331            END_2D 
     
    353353      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Kaa), clinfo1=' nxt  - puu(:,:,:,Kaa): ', mask1=umask,   & 
    354354         &                                  tab3d_2=pvv(:,:,:,Kaa), clinfo2=' pvv(:,:,:,Kaa): '       , mask2=vmask ) 
    355       !  
     355      ! 
    356356      IF( ln_dynspg_ts )   DEALLOCATE( zue, zve ) 
    357357      IF( l_trddyn     )   DEALLOCATE( zua, zva ) 
  • NEMO/trunk/src/OCE/DYN/dynspg.F90

    r14064 r14072  
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   dyn_spg     : update the dynamics trend with surface pressure gradient  
     13   !!   dyn_spg     : update the dynamics trend with surface pressure gradient 
    1414   !!   dyn_spg_init: initialization, namelist read, and parameters control 
    1515   !!---------------------------------------------------------------------- 
     
    3939   PUBLIC   dyn_spg_init   ! routine called by opa module 
    4040 
    41    INTEGER ::   nspg = 0   ! type of surface pressure gradient scheme defined from lk_dynspg_...  
     41   INTEGER ::   nspg = 0   ! type of surface pressure gradient scheme defined from lk_dynspg_... 
    4242 
    4343   !                       ! Parameter to control the surface pressure gradient scheme 
     
    5252   !!---------------------------------------------------------------------- 
    5353   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    54    !! $Id$  
     54   !! $Id$ 
    5555   !! Software governed by the CeCILL license (see ./LICENSE) 
    5656   !!---------------------------------------------------------------------- 
     
    6161      !!                  ***  ROUTINE dyn_spg  *** 
    6262      !! 
    63       !! ** Purpose :   compute surface pressure gradient including the  
     63      !! ** Purpose :   compute surface pressure gradient including the 
    6464      !!              atmospheric pressure forcing (ln_apr_dyn=T). 
    6565      !! 
     
    6868      !!              - split-explicit : a time splitting technique is used 
    6969      !! 
    70       !!              ln_apr_dyn=T : the atmospheric pressure forcing is applied  
     70      !!              ln_apr_dyn=T : the atmospheric pressure forcing is applied 
    7171      !!             as the gradient of the inverse barometer ssh: 
    7272      !!                apgu = - 1/rho0 di[apr] = 0.5*grav di[ssh_ib+ssh_ibb] 
     
    9090      ! 
    9191      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends 
    92          ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) )  
     92         ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 
    9393         ztrdu(:,:,:) = puu(:,:,:,Krhs) 
    9494         ztrdv(:,:,:) = pvv(:,:,:,Krhs) 
     
    144144               zpgv(ji,jj) = zpgv(ji,jj) + ( zpice(ji,jj+1) - zpice(ji,jj) ) * r1_e2v(ji,jj) 
    145145            END_2D 
    146             DEALLOCATE( zpice )          
     146            DEALLOCATE( zpice ) 
    147147         ENDIF 
    148148         ! 
     
    160160         ! 
    161161!!gm add here a call to dyn_trd for ice pressure gradient, the surf pressure trends ???? 
    162          !     
     162         ! 
    163163      ENDIF 
    164164      ! 
     
    167167      CASE ( np_TS  )   ;   CALL dyn_spg_ts ( kt, Kbb, Kmm, Krhs, puu, pvv, pssh, puu_b, pvv_b, Kaa ) ! time-splitting 
    168168      END SELECT 
    169       !                     
     169      ! 
    170170      IF( l_trddyn )   THEN                  ! save the surface pressure gradient trends for further diagnostics 
    171171         ztrdu(:,:,:) = puu(:,:,:,Krhs) - ztrdu(:,:,:) 
    172172         ztrdv(:,:,:) = pvv(:,:,:,Krhs) - ztrdv(:,:,:) 
    173173         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt, Kmm ) 
    174          DEALLOCATE( ztrdu , ztrdv )  
     174         DEALLOCATE( ztrdu , ztrdv ) 
    175175      ENDIF 
    176176      !                                      ! print mean trends (used for debugging) 
     
    186186      !!--------------------------------------------------------------------- 
    187187      !!                  ***  ROUTINE dyn_spg_init  *** 
    188       !!                 
    189       !! ** Purpose :   Control the consistency between namelist options for  
     188      !! 
     189      !! ** Purpose :   Control the consistency between namelist options for 
    190190      !!              surface pressure gradient schemes 
    191191      !!---------------------------------------------------------------------- 
  • NEMO/trunk/src/OCE/DYN/dynvor.F90

    r14053 r14072  
    1515   !!            3.2  ! 2009-04  (R. Benshila)  vvl: correction of een scheme 
    1616   !!            3.3  ! 2010-10  (C. Ethe, G. Madec)  reorganisation of initialisation phase 
    17    !!            3.7  ! 2014-04  (G. Madec)  trend simplification: suppress jpdyn_trd_dat vorticity  
     17   !!            3.7  ! 2014-04  (G. Madec)  trend simplification: suppress jpdyn_trd_dat vorticity 
    1818   !!             -   ! 2014-06  (G. Madec)  suppression of velocity curl from in-core memory 
    1919   !!             -   ! 2016-12  (G. Madec, E. Clementi) add Stokes-Coriolis trends (ln_stcor=T) 
     
    7474   INTEGER, PUBLIC, PARAMETER ::   np_MIX = 5   ! MIX scheme 
    7575 
    76    INTEGER ::   ncor, nrvm, ntot   ! choice of calculated vorticity  
     76   INTEGER ::   ncor, nrvm, ntot   ! choice of calculated vorticity 
    7777   !                               ! associated indices: 
    7878   INTEGER, PUBLIC, PARAMETER ::   np_COR = 1         ! Coriolis (planetary) 
     
    8383 
    8484   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   di_e2u_2        ! = di(e2u)/2          used in T-point metric term calculation 
    85    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   dj_e1v_2        ! = dj(e1v)/2           -        -      -       -  
     85   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   dj_e1v_2        ! = dj(e1v)/2           -        -      -       - 
    8686   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   di_e2v_2e1e2f   ! = di(e2u)/(2*e1e2f)  used in F-point metric term calculation 
    8787   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   dj_e1u_2e1e2f   ! = dj(e1v)/(2*e1e2f)   -        -      -       - 
    8888   ! 
    8989   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   e3f_0vor   ! e3f used in EEN, ENE and ENS cases (key_qco only) 
    90     
     90 
    9191   REAL(wp) ::   r1_4  = 0.250_wp         ! =1/4 
    9292   REAL(wp) ::   r1_8  = 0.125_wp         ! =1/8 
    9393   REAL(wp) ::   r1_12 = 1._wp / 12._wp   ! 1/12 
    94     
     94 
    9595   !! * Substitutions 
    9696#  include "do_loop_substitute.h90" 
     
    111111      !! ** Action : - Update (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) with the now vorticity term trend 
    112112      !!             - save the trends in (ztrdu,ztrdv) in 2 parts (relative 
    113       !!               and planetary vorticity trends) and send them to trd_dyn  
     113      !!               and planetary vorticity trends) and send them to trd_dyn 
    114114      !!               for futher diagnostics (l_trddyn=T) 
    115115      !!---------------------------------------------------------------------- 
     
    163163                             CALL vor_enT( kt, Kmm, ntot, puu(:,:,:,Kmm) , pvv(:,:,:,Kmm) , puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )   ! total vorticity trend 
    164164            IF( ln_stcor .AND. .NOT. ln_vortex_force )  THEN 
    165                              CALL vor_enT( kt, Kmm, ncor, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )   ! add the Stokes-Coriolis trend  
     165                             CALL vor_enT( kt, Kmm, ncor, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )   ! add the Stokes-Coriolis trend 
    166166            ELSE IF( ln_stcor .AND. ln_vortex_force )   THEN 
    167167                             CALL vor_enT( kt, Kmm, ntot, usd, vsd, puu(:,:,:,Krhs), pvv(:,:,:,Krhs) )   ! add the Stokes-Coriolis trend and vortex force 
     
    218218      !!                  ***  ROUTINE vor_enT  *** 
    219219      !! 
    220       !! ** Purpose :   Compute the now total vorticity trend and add it to  
     220      !! ** Purpose :   Compute the now total vorticity trend and add it to 
    221221      !!      the general trend of the momentum equation. 
    222222      !! 
    223       !! ** Method  :   Trend evaluated using now fields (centered in time)  
     223      !! ** Method  :   Trend evaluated using now fields (centered in time) 
    224224      !!       and t-point evaluation of vorticity (planetary and relative). 
    225225      !!       conserves the horizontal kinetic energy. 
    226       !!         The general trend of momentum is increased due to the vorticity  
     226      !!         The general trend of momentum is increased due to the vorticity 
    227227      !!       term which is given by: 
    228228      !!          voru = 1/bu  mj[ ( mi(mj(bf*rvor))+bt*f_t)/e3t  mj[vn] ] 
     
    260260                  &             - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj) 
    261261            END_2D 
    262             IF( ln_dynvor_msk ) THEN                     ! mask relative vorticity  
     262            IF( ln_dynvor_msk ) THEN                     ! mask relative vorticity 
    263263               DO_2D( 1, 0, 1, 0 ) 
    264264                  zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk) 
     
    314314               ! 
    315315            pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e1e2v(ji,jj) / e3v(ji,jj,jk,Kmm)                    & 
    316                &                                * (  zwt(ji,jj+1) * ( pu(ji,jj+1,jk) + pu(ji-1,jj+1,jk) )   &  
    317                &                                   + zwt(ji,jj  ) * ( pu(ji,jj  ,jk) + pu(ji-1,jj  ,jk) )   )  
     316               &                                * (  zwt(ji,jj+1) * ( pu(ji,jj+1,jk) + pu(ji-1,jj+1,jk) )   & 
     317               &                                   + zwt(ji,jj  ) * ( pu(ji,jj  ,jk) + pu(ji-1,jj  ,jk) )   ) 
    318318         END_2D 
    319319         !                                             ! =============== 
     
    332332      !!                  ***  ROUTINE vor_ene  *** 
    333333      !! 
    334       !! ** Purpose :   Compute the now total vorticity trend and add it to  
     334      !! ** Purpose :   Compute the now total vorticity trend and add it to 
    335335      !!      the general trend of the momentum equation. 
    336336      !! 
    337       !! ** Method  :   Trend evaluated using now fields (centered in time)  
     337      !! ** Method  :   Trend evaluated using now fields (centered in time) 
    338338      !!       and the Sadourny (1975) flux form formulation : conserves the 
    339339      !!       horizontal kinetic energy. 
    340       !!         The general trend of momentum is increased due to the vorticity  
     340      !!         The general trend of momentum is increased due to the vorticity 
    341341      !!       term which is given by: 
    342342      !!          voru = 1/e1u  mj-1[ (rvor+f)/e3f  mi(e1v*e3v pvv(:,:,:,Kmm)) ] 
     
    371371         SELECT CASE( kvor )                 !==  vorticity considered  ==! 
    372372         CASE ( np_COR )                           !* Coriolis (planetary vorticity) 
    373             zwz(:,:) = ff_f(:,:)  
     373            zwz(:,:) = ff_f(:,:) 
    374374         CASE ( np_RVO )                           !* relative vorticity 
    375375            DO_2D( 1, 0, 1, 0 ) 
     
    447447            zx2 = zwx(ji  ,jj) + zwx(ji  ,jj+1) 
    448448            pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + r1_4 * r1_e1u(ji,jj) * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 ) 
    449             pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 )  
     449            pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) - r1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 ) 
    450450         END_2D 
    451451         !                                             ! =============== 
     
    497497         SELECT CASE( kvor )                 !==  vorticity considered  ==! 
    498498         CASE ( np_COR )                           !* Coriolis (planetary vorticity) 
    499             zwz(:,:) = ff_f(:,:)  
     499            zwz(:,:) = ff_f(:,:) 
    500500         CASE ( np_RVO )                           !* relative vorticity 
    501501            DO_2D( 1, 0, 1, 0 ) 
     
    586586      !!                ***  ROUTINE vor_een  *** 
    587587      !! 
    588       !! ** Purpose :   Compute the now total vorticity trend and add it to  
     588      !! ** Purpose :   Compute the now total vorticity trend and add it to 
    589589      !!      the general trend of the momentum equation. 
    590590      !! 
    591       !! ** Method  :   Trend evaluated using now fields (centered in time)  
    592       !!      and the Arakawa and Lamb (1980) flux form formulation : conserves  
     591      !! ** Method  :   Trend evaluated using now fields (centered in time) 
     592      !!      and the Arakawa and Lamb (1980) flux form formulation : conserves 
    593593      !!      both the horizontal kinetic energy and the potential enstrophy 
    594594      !!      when horizontal divergence is zero (see the NEMO documentation) 
     
    684684            IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity 
    685685               DO_2D( 1, 0, 1, 0 ) 
    686                   zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj)  
     686                  zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 
    687687               END_2D 
    688688            ENDIF 
     
    735735      !!                ***  ROUTINE vor_eeT  *** 
    736736      !! 
    737       !! ** Purpose :   Compute the now total vorticity trend and add it to  
     737      !! ** Purpose :   Compute the now total vorticity trend and add it to 
    738738      !!      the general trend of the momentum equation. 
    739739      !! 
    740       !! ** Method  :   Trend evaluated using now fields (centered in time)  
    741       !!      and the Arakawa and Lamb (1980) vector form formulation using  
     740      !! ** Method  :   Trend evaluated using now fields (centered in time) 
     741      !!      and the Arakawa and Lamb (1980) vector form formulation using 
    742742      !!      a modified version of Arakawa and Lamb (1980) scheme (see vor_een). 
    743       !!      The change consists in  
     743      !!      The change consists in 
    744744      !!      Add this trend to the general momentum trend (pu_rhs,pv_rhs). 
    745745      !! 
     
    758758      REAL(wp) ::   zua, zva       ! local scalars 
    759759      REAL(wp) ::   zmsk, z1_e3t   ! local scalars 
    760       REAL(wp), DIMENSION(jpi,jpj)       ::   zwx , zwy  
     760      REAL(wp), DIMENSION(jpi,jpj)       ::   zwx , zwy 
    761761      REAL(wp), DIMENSION(jpi,jpj)       ::   ztnw, ztne, ztsw, ztse 
    762762      REAL(wp), DIMENSION(jpi,jpj,jpkm1) ::   zwz   ! 3D workspace, avoid lbc_lnk on jpk that is not defined 
     
    803803            IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity 
    804804               DO_2D( 1, 0, 1, 0 ) 
    805                   zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj)  
     805                  zwz(ji,jj,jk) = ( zwz(ji,jj,jk) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj) 
    806806               END_2D 
    807807            ENDIF 
     
    916916      ! 
    917917      IF( ioptio /= 1 ) CALL ctl_stop( ' use ONE and ONLY one vorticity scheme' ) 
    918       !                       
     918      ! 
    919919      IF(lwp) WRITE(numout,*)        ! type of calculated vorticity (set ncor, nrvm, ntot) 
    920920      ncor = np_COR                       ! planetary vorticity 
     
    925925         ntot = np_COR        !     -         - 
    926926      CASE( np_VEC_c2  ) 
    927          IF(lwp) WRITE(numout,*) '   ==>>>   vector form dynamics : total vorticity = Coriolis + relative vorticity'  
     927         IF(lwp) WRITE(numout,*) '   ==>>>   vector form dynamics : total vorticity = Coriolis + relative vorticity' 
    928928         nrvm = np_RVO        ! relative vorticity 
    929          ntot = np_CRV        ! relative + planetary vorticity          
     929         ntot = np_CRV        ! relative + planetary vorticity 
    930930      CASE( np_FLX_c2 , np_FLX_ubs  ) 
    931931         IF(lwp) WRITE(numout,*) '   ==>>>   flux form dynamics : total vorticity = Coriolis + metric term' 
     
    971971                  &  + tmask(ji,jj  ,jk) +tmask(ji+1,jj  ,jk)  ) 
    972972               ! 
    973                IF( zmsk /= 0._wp ) THEN  
     973               IF( zmsk /= 0._wp ) THEN 
    974974                  e3f_0vor(ji,jj,jk) = (   e3t_0(ji  ,jj+1,jk)*tmask(ji  ,jj+1,jk)   & 
    975975                     &                   + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk)   & 
     
    997997         CASE( np_EEN )   ;   WRITE(numout,*) '   ==>>>   energy and enstrophy conserving scheme (EEN)' 
    998998         CASE( np_MIX )   ;   WRITE(numout,*) '   ==>>>   mixed enstrophy/energy conserving scheme (MIX)' 
    999          END SELECT          
     999         END SELECT 
    10001000      ENDIF 
    10011001      ! 
  • NEMO/trunk/src/OCE/DYN/dynzad.F90

    r14007 r14072  
    77   !!   NEMO     0.5  ! 2002-07  (G. Madec) Free form, F90 
    88   !!---------------------------------------------------------------------- 
    9     
     9 
    1010   !!---------------------------------------------------------------------- 
    1111   !!   dyn_zad       : vertical advection momentum trend 
     
    2525   IMPLICIT NONE 
    2626   PRIVATE 
    27     
     27 
    2828   PUBLIC   dyn_zad       ! routine called by dynadv.F90 
    2929 
     
    4141      !!---------------------------------------------------------------------- 
    4242      !!                  ***  ROUTINE dynzad  *** 
    43       !!  
    44       !! ** Purpose :   Compute the now vertical momentum advection trend and  
     43      !! 
     44      !! ** Purpose :   Compute the now vertical momentum advection trend and 
    4545      !!      add it to the general trend of momentum equation. 
    4646      !! 
     
    7373 
    7474      IF( l_trddyn )   THEN           ! Save puu(:,:,:,Krhs) and pvv(:,:,:,Krhs) trends 
    75          ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) )  
    76          ztrdu(:,:,:) = puu(:,:,:,Krhs)  
    77          ztrdv(:,:,:) = pvv(:,:,:,Krhs)  
     75         ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 
     76         ztrdu(:,:,:) = puu(:,:,:,Krhs) 
     77         ztrdv(:,:,:) = pvv(:,:,:,Krhs) 
    7878      ENDIF 
    79        
     79 
    8080      DO jk = 2, jpkm1                ! Vertical momentum advection at level w and u- and v- vertical 
    8181         DO_2D( 0, 1, 0, 1 )              ! vertical fluxes 
     
    111111         ztrdv(:,:,:) = pvv(:,:,:,Krhs) - ztrdv(:,:,:) 
    112112         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zad, kt, Kmm ) 
    113          DEALLOCATE( ztrdu, ztrdv )  
     113         DEALLOCATE( ztrdu, ztrdv ) 
    114114      ENDIF 
    115115      !                               ! Control print 
Note: See TracChangeset for help on using the changeset viewer.