Ignore:
Timestamp:
2020-02-12T15:39:06+01:00 (10 months 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/dynadv_cen2.F90

    r10068 r12377  
    2727 
    2828   !! * Substitutions 
    29 #  include "vectopt_loop_substitute.h90" 
     29#  include "do_loop_substitute.h90" 
    3030   !!---------------------------------------------------------------------- 
    3131   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    3535CONTAINS 
    3636 
    37    SUBROUTINE dyn_adv_cen2( kt ) 
     37   SUBROUTINE dyn_adv_cen2( kt, Kmm, puu, pvv, Krhs ) 
    3838      !!---------------------------------------------------------------------- 
    3939      !!                  ***  ROUTINE dyn_adv_cen2  *** 
     
    4444      !! ** Method  :   Trend evaluated using now fields (centered in time)  
    4545      !! 
    46       !! ** Action  :   (ua,va) updated with the now vorticity term trend 
     46      !! ** Action  :   (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) updated with the now vorticity term trend 
    4747      !!---------------------------------------------------------------------- 
    48       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     48      INTEGER                             , INTENT( in )  ::  kt           ! ocean time-step index 
     49      INTEGER                             , INTENT( in )  ::  Kmm, Krhs    ! ocean time level indices 
     50      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv     ! ocean velocities and RHS of momentum equation 
    4951      ! 
    5052      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     
    6062      ! 
    6163      IF( l_trddyn ) THEN           ! trends: store the input trends 
    62          zfu_uw(:,:,:) = ua(:,:,:) 
    63          zfv_vw(:,:,:) = va(:,:,:) 
     64         zfu_uw(:,:,:) = puu(:,:,:,Krhs) 
     65         zfv_vw(:,:,:) = pvv(:,:,:,Krhs) 
    6466      ENDIF 
    6567      ! 
     
    6769      ! 
    6870      DO jk = 1, jpkm1                    ! horizontal transport 
    69          zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk) 
    70          zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk) 
    71          DO jj = 1, jpjm1                 ! horizontal momentum fluxes (at T- and F-point) 
    72             DO ji = 1, fs_jpim1   ! vector opt. 
    73                zfu_t(ji+1,jj  ,jk) = ( zfu(ji,jj,jk) + zfu(ji+1,jj,jk) ) * ( un(ji,jj,jk) + un(ji+1,jj  ,jk) ) 
    74                zfv_f(ji  ,jj  ,jk) = ( zfv(ji,jj,jk) + zfv(ji+1,jj,jk) ) * ( un(ji,jj,jk) + un(ji  ,jj+1,jk) ) 
    75                zfu_f(ji  ,jj  ,jk) = ( zfu(ji,jj,jk) + zfu(ji,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji+1,jj  ,jk) ) 
    76                zfv_t(ji  ,jj+1,jk) = ( zfv(ji,jj,jk) + zfv(ji,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji  ,jj+1,jk) ) 
    77             END DO 
    78          END DO 
    79          DO jj = 2, jpjm1                 ! divergence of horizontal momentum fluxes 
    80             DO ji = fs_2, fs_jpim1   ! vector opt. 
    81                ua(ji,jj,jk) = ua(ji,jj,jk) - (  zfu_t(ji+1,jj,jk) - zfu_t(ji,jj  ,jk)    & 
    82                   &                           + zfv_f(ji  ,jj,jk) - zfv_f(ji,jj-1,jk)  ) * r1_e1e2u(ji,jj) / e3u_n(ji,jj,jk) 
    83                va(ji,jj,jk) = va(ji,jj,jk) - (  zfu_f(ji,jj  ,jk) - zfu_f(ji-1,jj,jk)    & 
    84                   &                           + zfv_t(ji,jj+1,jk) - zfv_t(ji  ,jj,jk)  ) * r1_e1e2v(ji,jj) / e3v_n(ji,jj,jk) 
    85             END DO 
    86          END DO 
     71         zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u(:,:,jk,Kmm) * puu(:,:,jk,Kmm) 
     72         zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm) 
     73         DO_2D_10_10 
     74            zfu_t(ji+1,jj  ,jk) = ( zfu(ji,jj,jk) + zfu(ji+1,jj,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji+1,jj  ,jk,Kmm) ) 
     75            zfv_f(ji  ,jj  ,jk) = ( zfv(ji,jj,jk) + zfv(ji+1,jj,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji  ,jj+1,jk,Kmm) ) 
     76            zfu_f(ji  ,jj  ,jk) = ( zfu(ji,jj,jk) + zfu(ji,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji+1,jj  ,jk,Kmm) ) 
     77            zfv_t(ji  ,jj+1,jk) = ( zfv(ji,jj,jk) + zfv(ji,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji  ,jj+1,jk,Kmm) ) 
     78         END_2D 
     79         DO_2D_00_00 
     80            puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - (  zfu_t(ji+1,jj,jk) - zfu_t(ji,jj  ,jk)    & 
     81               &                           + zfv_f(ji  ,jj,jk) - zfv_f(ji,jj-1,jk)  ) * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm) 
     82            pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - (  zfu_f(ji,jj  ,jk) - zfu_f(ji-1,jj,jk)    & 
     83               &                           + zfv_t(ji,jj+1,jk) - zfv_t(ji  ,jj,jk)  ) * r1_e1e2v(ji,jj) / e3v(ji,jj,jk,Kmm) 
     84         END_2D 
    8785      END DO 
    8886      ! 
    8987      IF( l_trddyn ) THEN           ! trends: send trend to trddyn for diagnostic 
    90          zfu_uw(:,:,:) = ua(:,:,:) - zfu_uw(:,:,:) 
    91          zfv_vw(:,:,:) = va(:,:,:) - zfv_vw(:,:,:) 
    92          CALL trd_dyn( zfu_uw, zfv_vw, jpdyn_keg, kt ) 
    93          zfu_t(:,:,:) = ua(:,:,:) 
    94          zfv_t(:,:,:) = va(:,:,:) 
     88         zfu_uw(:,:,:) = puu(:,:,:,Krhs) - zfu_uw(:,:,:) 
     89         zfv_vw(:,:,:) = pvv(:,:,:,Krhs) - zfv_vw(:,:,:) 
     90         CALL trd_dyn( zfu_uw, zfv_vw, jpdyn_keg, kt, Kmm ) 
     91         zfu_t(:,:,:) = puu(:,:,:,Krhs) 
     92         zfv_t(:,:,:) = pvv(:,:,:,Krhs) 
    9593      ENDIF 
    9694      ! 
    9795      !                             !==  Vertical advection  ==! 
    9896      ! 
    99       DO jj = 2, jpjm1                    ! surface/bottom advective fluxes set to zero 
    100          DO ji = fs_2, fs_jpim1 
    101             zfu_uw(ji,jj,jpk) = 0._wp   ;   zfv_vw(ji,jj,jpk) = 0._wp 
    102             zfu_uw(ji,jj, 1 ) = 0._wp   ;   zfv_vw(ji,jj, 1 ) = 0._wp 
    103          END DO 
    104       END DO 
     97      DO_2D_00_00 
     98         zfu_uw(ji,jj,jpk) = 0._wp   ;   zfv_vw(ji,jj,jpk) = 0._wp 
     99         zfu_uw(ji,jj, 1 ) = 0._wp   ;   zfv_vw(ji,jj, 1 ) = 0._wp 
     100      END_2D 
    105101      IF( ln_linssh ) THEN                ! linear free surface: advection through the surface 
    106          DO jj = 2, jpjm1 
    107             DO ji = fs_2, fs_jpim1 
    108                zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji+1,jj) * wn(ji+1,jj,1) ) * un(ji,jj,1) 
    109                zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * wn(ji,jj,1) + e1e2t(ji,jj+1) * wn(ji,jj+1,1) ) * vn(ji,jj,1) 
    110             END DO 
    111          END DO 
     102         DO_2D_00_00 
     103            zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji+1,jj) * ww(ji+1,jj,1) ) * puu(ji,jj,1,Kmm) 
     104            zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji,jj+1) * ww(ji,jj+1,1) ) * pvv(ji,jj,1,Kmm) 
     105         END_2D 
    112106      ENDIF 
    113107      DO jk = 2, jpkm1                    ! interior advective fluxes 
    114          DO jj = 2, jpj                       ! 1/4 * Vertical transport 
    115             DO ji = 2, jpi 
    116                zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * wn(ji,jj,jk) 
    117             END DO 
    118          END DO 
    119          DO jj = 2, jpjm1 
    120             DO ji = fs_2, fs_jpim1   ! vector opt. 
    121                zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji+1,jj  ,jk) ) * ( un(ji,jj,jk) + un(ji,jj,jk-1) ) 
    122                zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji  ,jj+1,jk) ) * ( vn(ji,jj,jk) + vn(ji,jj,jk-1) ) 
    123             END DO 
    124          END DO 
     108         DO_2D_01_01 
     109            zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk) 
     110         END_2D 
     111         DO_2D_00_00 
     112            zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji+1,jj  ,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji,jj,jk-1,Kmm) ) 
     113            zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji  ,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk-1,Kmm) ) 
     114         END_2D 
    125115      END DO 
    126       DO jk = 1, jpkm1                    ! divergence of vertical momentum flux divergence 
    127          DO jj = 2, jpjm1  
    128             DO ji = fs_2, fs_jpim1   ! vector opt. 
    129                ua(ji,jj,jk) = ua(ji,jj,jk) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj) / e3u_n(ji,jj,jk) 
    130                va(ji,jj,jk) = va(ji,jj,jk) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) ) * r1_e1e2v(ji,jj) / e3v_n(ji,jj,jk) 
    131             END DO 
    132          END DO 
    133       END DO 
     116      DO_3D_00_00( 1, jpkm1 ) 
     117         puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm) 
     118         pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) ) * r1_e1e2v(ji,jj) / e3v(ji,jj,jk,Kmm) 
     119      END_3D 
    134120      ! 
    135121      IF( l_trddyn ) THEN                 ! trends: send trend to trddyn for diagnostic 
    136          zfu_t(:,:,:) = ua(:,:,:) - zfu_t(:,:,:) 
    137          zfv_t(:,:,:) = va(:,:,:) - zfv_t(:,:,:) 
    138          CALL trd_dyn( zfu_t, zfv_t, jpdyn_zad, kt ) 
     122         zfu_t(:,:,:) = puu(:,:,:,Krhs) - zfu_t(:,:,:) 
     123         zfv_t(:,:,:) = pvv(:,:,:,Krhs) - zfv_t(:,:,:) 
     124         CALL trd_dyn( zfu_t, zfv_t, jpdyn_zad, kt, Kmm ) 
    139125      ENDIF 
    140126      !                                   ! Control print 
    141       IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' cen2 adv - Ua: ', mask1=umask,   & 
    142          &                       tab3d_2=va, clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     127      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' cen2 adv - Ua: ', mask1=umask,   & 
     128         &                                  tab3d_2=pvv(:,:,:,Krhs), clinfo2=           ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    143129      ! 
    144130   END SUBROUTINE dyn_adv_cen2 
Note: See TracChangeset for help on using the changeset viewer.