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/dynatf.F90 – NEMO

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

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

File:
1 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 ) 
Note: See TracChangeset for help on using the changeset viewer.