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 12377 for NEMO/trunk/src/OCE/DYN/dynzad.F90 – NEMO

Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (4 years ago)
Author:
acc
Message:

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

Location:
NEMO/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/src/OCE/DYN/dynzad.F90

    r10068 r12377  
    2828 
    2929   !! * Substitutions 
    30 #  include "vectopt_loop_substitute.h90" 
     30#  include "do_loop_substitute.h90" 
    3131   !!---------------------------------------------------------------------- 
    3232   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    3636CONTAINS 
    3737 
    38    SUBROUTINE dyn_zad ( kt ) 
     38   SUBROUTINE dyn_zad ( kt, Kmm, puu, pvv, Krhs ) 
    3939      !!---------------------------------------------------------------------- 
    4040      !!                  ***  ROUTINE dynzad  *** 
     
    4444      !! 
    4545      !! ** Method  :   The now vertical advection of momentum is given by: 
    46       !!         w dz(u) = ua + 1/(e1e2u*e3u) mk+1[ mi(e1e2t*wn) dk(un) ] 
    47       !!         w dz(v) = va + 1/(e1e2v*e3v) mk+1[ mj(e1e2t*wn) dk(vn) ] 
    48       !!      Add this trend to the general trend (ua,va): 
    49       !!         (ua,va) = (ua,va) + w dz(u,v) 
     46      !!         w dz(u) = u(rhs) + 1/(e1e2u*e3u) mk+1[ mi(e1e2t*ww) dk(u) ] 
     47      !!         w dz(v) = v(rhs) + 1/(e1e2v*e3v) mk+1[ mj(e1e2t*ww) dk(v) ] 
     48      !!      Add this trend to the general trend (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)): 
     49      !!         (u(rhs),v(rhs)) = (u(rhs),v(rhs)) + w dz(u,v) 
    5050      !! 
    51       !! ** Action  : - Update (ua,va) with the vert. momentum adv. trends 
     51      !! ** Action  : - Update (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) with the vert. momentum adv. trends 
    5252      !!              - Send the trends to trddyn for diagnostics (l_trddyn=T) 
    5353      !!---------------------------------------------------------------------- 
    54       INTEGER, INTENT(in) ::   kt   ! ocean time-step inedx 
     54      INTEGER                             , INTENT( in )  ::  kt               ! ocean time-step inedx 
     55      INTEGER                             , INTENT( in )  ::  Kmm, Krhs        ! ocean time level indices 
     56      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
    5557      ! 
    5658      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     
    6870      ENDIF 
    6971 
    70       IF( l_trddyn )   THEN         ! Save ua and va trends 
     72      IF( l_trddyn )   THEN         ! Save puu(:,:,:,Krhs) and pvv(:,:,:,Krhs) trends 
    7173         ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) )  
    72          ztrdu(:,:,:) = ua(:,:,:)  
    73          ztrdv(:,:,:) = va(:,:,:)  
     74         ztrdu(:,:,:) = puu(:,:,:,Krhs)  
     75         ztrdv(:,:,:) = pvv(:,:,:,Krhs)  
    7476      ENDIF 
    7577       
    7678      DO jk = 2, jpkm1              ! Vertical momentum advection at level w and u- and v- vertical 
    77          DO jj = 2, jpj                   ! vertical fluxes  
    78             DO ji = fs_2, jpi             ! vector opt. 
    79                zww(ji,jj) = 0.25_wp * e1e2t(ji,jj) * wn(ji,jj,jk) 
    80             END DO 
    81          END DO 
    82          DO jj = 2, jpjm1                 ! vertical momentum advection at w-point 
    83             DO ji = fs_2, fs_jpim1        ! vector opt. 
    84                zwuw(ji,jj,jk) = ( zww(ji+1,jj  ) + zww(ji,jj) ) * ( un(ji,jj,jk-1) - un(ji,jj,jk) ) 
    85                zwvw(ji,jj,jk) = ( zww(ji  ,jj+1) + zww(ji,jj) ) * ( vn(ji,jj,jk-1) - vn(ji,jj,jk) ) 
    86             END DO   
    87          END DO    
     79         DO_2D_01_01 
     80            zww(ji,jj) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk) 
     81         END_2D 
     82         DO_2D_00_00 
     83            zwuw(ji,jj,jk) = ( zww(ji+1,jj  ) + zww(ji,jj) ) * ( puu(ji,jj,jk-1,Kmm) - puu(ji,jj,jk,Kmm) ) 
     84            zwvw(ji,jj,jk) = ( zww(ji  ,jj+1) + zww(ji,jj) ) * ( pvv(ji,jj,jk-1,Kmm) - pvv(ji,jj,jk,Kmm) ) 
     85         END_2D 
    8886      END DO 
    8987      ! 
    9088      ! Surface and bottom advective fluxes set to zero 
    91       DO jj = 2, jpjm1         
    92          DO ji = fs_2, fs_jpim1           ! vector opt. 
    93             zwuw(ji,jj, 1 ) = 0._wp 
    94             zwvw(ji,jj, 1 ) = 0._wp 
    95             zwuw(ji,jj,jpk) = 0._wp 
    96             zwvw(ji,jj,jpk) = 0._wp 
    97          END DO   
    98       END DO 
     89      DO_2D_00_00 
     90         zwuw(ji,jj, 1 ) = 0._wp 
     91         zwvw(ji,jj, 1 ) = 0._wp 
     92         zwuw(ji,jj,jpk) = 0._wp 
     93         zwvw(ji,jj,jpk) = 0._wp 
     94      END_2D 
    9995      ! 
    100       DO jk = 1, jpkm1              ! Vertical momentum advection at u- and v-points 
    101          DO jj = 2, jpjm1 
    102             DO ji = fs_2, fs_jpim1       ! vector opt. 
    103                ua(ji,jj,jk) = ua(ji,jj,jk) - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj) / e3u_n(ji,jj,jk) 
    104                va(ji,jj,jk) = va(ji,jj,jk) - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) * r1_e1e2v(ji,jj) / e3v_n(ji,jj,jk) 
    105             END DO   
    106          END DO   
    107       END DO 
     96      DO_3D_00_00( 1, jpkm1 ) 
     97         puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm) 
     98         pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) * r1_e1e2v(ji,jj) / e3v(ji,jj,jk,Kmm) 
     99      END_3D 
    108100 
    109101      IF( l_trddyn ) THEN           ! save the vertical advection trends for diagnostic 
    110          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 
    111          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 
    112          CALL trd_dyn( ztrdu, ztrdv, jpdyn_zad, kt ) 
     102         ztrdu(:,:,:) = puu(:,:,:,Krhs) - ztrdu(:,:,:) 
     103         ztrdv(:,:,:) = pvv(:,:,:,Krhs) - ztrdv(:,:,:) 
     104         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zad, kt, Kmm ) 
    113105         DEALLOCATE( ztrdu, ztrdv )  
    114106      ENDIF 
    115107      !                             ! Control print 
    116       IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' zad  - Ua: ', mask1=umask,   & 
    117          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     108      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' zad  - Ua: ', mask1=umask,   & 
     109         &                                  tab3d_2=pvv(:,:,:,Krhs), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    118110      ! 
    119111      IF( ln_timing )   CALL timing_stop('dyn_zad') 
Note: See TracChangeset for help on using the changeset viewer.