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/TOP/TRP/trcadv.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/TOP/TRP/trcadv.F90

    r11536 r12377  
    5959   INTEGER, PARAMETER ::   np_QCK     = 5   ! QUICK scheme 
    6060    
    61    !! * Substitutions 
    62 #  include "vectopt_loop_substitute.h90" 
    6361   !!---------------------------------------------------------------------- 
    6462   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    6866CONTAINS 
    6967 
    70    SUBROUTINE trc_adv( kt ) 
     68   SUBROUTINE trc_adv( kt, Kbb, Kmm, ptr, Krhs ) 
    7169      !!---------------------------------------------------------------------- 
    7270      !!                  ***  ROUTINE trc_adv  *** 
     
    7472      !! ** Purpose :   compute the ocean tracer advection trend. 
    7573      !! 
    76       !! ** Method  : - Update after tracers (tra) with the advection term following nadv 
    77       !!---------------------------------------------------------------------- 
    78       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     74      !! ** Method  : - Update after tracers (tr(Krhs)) with the advection term following nadv 
     75      !!---------------------------------------------------------------------- 
     76      INTEGER                                   , INTENT(in)    :: kt   ! ocean time-step index 
     77      INTEGER                                   , INTENT(in)    :: Kbb, Kmm, Krhs ! time level indices 
     78      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr            ! passive tracers and RHS of tracer equation 
    7979      ! 
    8080      INTEGER ::   jk   ! dummy loop index 
    8181      CHARACTER (len=22) ::   charout 
    82       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zun, zvn, zwn  ! effective velocity 
     82      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zuu, zvv, zww  ! effective velocity 
    8383      !!---------------------------------------------------------------------- 
    8484      ! 
     
    8787      !                                         !==  effective transport  ==! 
    8888      IF( l_offline ) THEN 
    89          zun(:,:,:) = un(:,:,:)                    ! already in (un,vn,wn) 
    90          zvn(:,:,:) = vn(:,:,:) 
    91          zwn(:,:,:) = wn(:,:,:) 
     89         zuu(:,:,:) = uu(:,:,:,Kmm)                ! already in (uu(Kmm),vv(Kmm),ww) 
     90         zvv(:,:,:) = vv(:,:,:,Kmm) 
     91         zww(:,:,:) = ww(:,:,:) 
    9292      ELSE                                         ! build the effective transport 
    93          zun(:,:,jpk) = 0._wp 
    94          zvn(:,:,jpk) = 0._wp 
    95          zwn(:,:,jpk) = 0._wp 
     93         zuu(:,:,jpk) = 0._wp 
     94         zvv(:,:,jpk) = 0._wp 
     95         zww(:,:,jpk) = 0._wp 
    9696         IF( ln_wave .AND. ln_sdw )  THEN 
    9797            DO jk = 1, jpkm1                                                       ! eulerian transport + Stokes Drift 
    98                zun(:,:,jk) = e2u  (:,:) * e3u_n(:,:,jk) * ( un(:,:,jk) + usd(:,:,jk) ) 
    99                zvn(:,:,jk) = e1v  (:,:) * e3v_n(:,:,jk) * ( vn(:,:,jk) + vsd(:,:,jk) ) 
    100                zwn(:,:,jk) = e1e2t(:,:)                 * ( wn(:,:,jk) + wsd(:,:,jk) ) 
     98               zuu(:,:,jk) = e2u  (:,:) * e3u(:,:,jk,Kmm) * ( uu(:,:,jk,Kmm) + usd(:,:,jk) ) 
     99               zvv(:,:,jk) = e1v  (:,:) * e3v(:,:,jk,Kmm) * ( vv(:,:,jk,Kmm) + vsd(:,:,jk) ) 
     100               zww(:,:,jk) = e1e2t(:,:)                   * ( ww(:,:,jk) + wsd(:,:,jk) ) 
    101101            END DO 
    102102         ELSE 
    103103            DO jk = 1, jpkm1 
    104                zun(:,:,jk) = e2u  (:,:) * e3u_n(:,:,jk) * un(:,:,jk)                   ! eulerian transport 
    105                zvn(:,:,jk) = e1v  (:,:) * e3v_n(:,:,jk) * vn(:,:,jk) 
    106                zwn(:,:,jk) = e1e2t(:,:)                 * wn(:,:,jk) 
     104               zuu(:,:,jk) = e2u  (:,:) * e3u(:,:,jk,Kmm) * uu(:,:,jk,Kmm)                   ! eulerian transport 
     105               zvv(:,:,jk) = e1v  (:,:) * e3v(:,:,jk,Kmm) * vv(:,:,jk,Kmm) 
     106               zww(:,:,jk) = e1e2t(:,:)                   * ww(:,:,jk) 
    107107            END DO 
    108108         ENDIF 
    109109         ! 
    110110         IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN                                 ! add z-tilde and/or vvl corrections 
    111             zun(:,:,:) = zun(:,:,:) + un_td(:,:,:) 
    112             zvn(:,:,:) = zvn(:,:,:) + vn_td(:,:,:) 
     111            zuu(:,:,:) = zuu(:,:,:) + un_td(:,:,:) 
     112            zvv(:,:,:) = zvv(:,:,:) + vn_td(:,:,:) 
    113113         ENDIF 
    114114         ! 
    115115         IF( ln_ldfeiv .AND. .NOT. ln_traldf_triad )   &  
    116             &              CALL ldf_eiv_trp( kt, nittrc000, zun, zvn, zwn, 'TRC' )  ! add the eiv transport 
    117          ! 
    118          IF( ln_mle    )   CALL tra_mle_trp( kt, nittrc000, zun, zvn, zwn, 'TRC' )  ! add the mle transport 
     116            &              CALL ldf_eiv_trp( kt, nittrc000, zuu, zvv, zww, 'TRC', Kmm, Krhs )  ! add the eiv transport 
     117         ! 
     118         IF( ln_mle    )   CALL tra_mle_trp( kt, nittrc000, zuu, zvv, zww, 'TRC', Kmm      )  ! add the mle transport 
    119119         ! 
    120120      ENDIF 
     
    123123      ! 
    124124      CASE ( np_CEN )                                 ! Centered : 2nd / 4th order 
    125          CALL tra_adv_cen( kt, nittrc000,'TRC',          zun, zvn, zwn     , trn, tra, jptra, nn_cen_h, nn_cen_v ) 
     125         CALL tra_adv_cen( kt, nittrc000,'TRC',          zuu, zvv, zww,      Kmm, ptr, jptra, Krhs, nn_cen_h, nn_cen_v ) 
    126126      CASE ( np_FCT )                                 ! FCT      : 2nd / 4th order 
    127          CALL tra_adv_fct( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra, nn_fct_h, nn_fct_v ) 
     127         CALL tra_adv_fct( kt, nittrc000,'TRC', r2dttrc, zuu, zvv, zww, Kbb, Kmm, ptr, jptra, Krhs, nn_fct_h, nn_fct_v ) 
    128128      CASE ( np_MUS )                                 ! MUSCL 
    129          CALL tra_adv_mus( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb,      tra, jptra        , ln_mus_ups )  
     129         CALL tra_adv_mus( kt, nittrc000,'TRC', r2dttrc, zuu, zvv, zww, Kbb, Kmm, ptr, jptra, Krhs, ln_mus_ups        )  
    130130      CASE ( np_UBS )                                 ! UBS 
    131          CALL tra_adv_ubs( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra          , nn_ubs_v ) 
     131         CALL tra_adv_ubs( kt, nittrc000,'TRC', r2dttrc, zuu, zvv, zww, Kbb, Kmm, ptr, jptra, Krhs, nn_ubs_v          ) 
    132132      CASE ( np_QCK )                                 ! QUICKEST 
    133          CALL tra_adv_qck( kt, nittrc000,'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra                     ) 
     133         CALL tra_adv_qck( kt, nittrc000,'TRC', r2dttrc, zuu, zvv, zww, Kbb, Kmm, ptr, jptra, Krhs                     ) 
    134134      ! 
    135135      END SELECT 
    136136      !                   
    137       IF( ln_ctl ) THEN                         !== print mean trends (used for debugging) 
     137      IF( sn_cfctl%l_prttrc ) THEN        !== print mean trends (used for debugging) 
    138138         WRITE(charout, FMT="('adv ')") 
    139139         CALL prt_ctl_trc_info(charout) 
    140          CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
     140         CALL prt_ctl_trc( tab4d=tr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    141141      END IF 
    142142      ! 
     
    164164      ! 
    165165      !                                !==  Namelist  ==! 
    166       REWIND( numnat_ref )                   !  namtrc_adv in reference namelist  
    167166      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
    168167901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_adv in reference namelist' ) 
    169       REWIND( numnat_cfg )                   ! namtrc_adv in configuration namelist 
    170168      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
    171169902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist' ) 
Note: See TracChangeset for help on using the changeset viewer.