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 13540 for NEMO/branches/2020/r12377_ticket2386/src/OCE/TRA/tramle.F90 – NEMO

Ignore:
Timestamp:
2020-09-29T12:41:06+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2386: update to latest trunk

Location:
NEMO/branches/2020/r12377_ticket2386
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r12377_ticket2386

    • 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_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
        88 
        99# SETTE 
        10 ^/utils/CI/sette@HEAD         sette 
         10^/utils/CI/sette@13507        sette 
  • NEMO/branches/2020/r12377_ticket2386/src/OCE/TRA/tramle.F90

    r12511 r13540  
    4949   !! * Substitutions 
    5050#  include "do_loop_substitute.h90" 
     51#  include "domzgr_substitute.h90" 
    5152   !!---------------------------------------------------------------------- 
    5253   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    99100      inml_mle(:,:) = mbkt(:,:) + 1                    ! init. to number of ocean w-level (T-level + 1) 
    100101      IF ( nla10 > 0 ) THEN                            ! avoid case where first level is thicker than 10m 
    101          DO_3DS_11_11( jpkm1, nlb10, -1 ) 
     102         DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 )        ! from the bottom to nlb10 (10m) 
    102103            IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rn_rho_c_mle )   inml_mle(ji,jj) = jk      ! Mixed layer 
    103104         END_3D 
     
    109110      zbm (:,:) = 0._wp 
    110111      zn2 (:,:) = 0._wp 
    111       DO_3D_11_11( 1, ikmax ) 
     112      DO_3D( 1, 1, 1, 1, 1, ikmax )                    ! MLD and mean buoyancy and N2 over the mixed layer 
    112113         zc = e3t(ji,jj,jk,Kmm) * REAL( MIN( MAX( 0, inml_mle(ji,jj)-jk ) , 1  )  )    ! zc being 0 outside the ML t-points 
    113114         zmld(ji,jj) = zmld(ji,jj) + zc 
     
    118119      SELECT CASE( nn_mld_uv )                         ! MLD at u- & v-pts 
    119120      CASE ( 0 )                                               != min of the 2 neighbour MLDs 
    120          DO_2D_10_10 
     121         DO_2D( 1, 0, 1, 0 ) 
    121122            zhu(ji,jj) = MIN( zmld(ji+1,jj), zmld(ji,jj) ) 
    122123            zhv(ji,jj) = MIN( zmld(ji,jj+1), zmld(ji,jj) ) 
    123124         END_2D 
    124125      CASE ( 1 )                                               != average of the 2 neighbour MLDs 
    125          DO_2D_10_10 
     126         DO_2D( 1, 0, 1, 0 ) 
    126127            zhu(ji,jj) = ( zmld(ji+1,jj) + zmld(ji,jj) ) * 0.5_wp 
    127128            zhv(ji,jj) = ( zmld(ji,jj+1) + zmld(ji,jj) ) * 0.5_wp 
    128129         END_2D 
    129130      CASE ( 2 )                                               != max of the 2 neighbour MLDs 
    130          DO_2D_10_10 
     131         DO_2D( 1, 0, 1, 0 ) 
    131132            zhu(ji,jj) = MAX( zmld(ji+1,jj), zmld(ji,jj) ) 
    132133            zhv(ji,jj) = MAX( zmld(ji,jj+1), zmld(ji,jj) ) 
     
    145146      ! 
    146147      IF( nn_mle == 0 ) THEN           ! Fox-Kemper et al. 2010 formulation 
    147          DO_2D_10_10 
     148         DO_2D( 1, 0, 1, 0 ) 
    148149            zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj)  * e2_e1u(ji,jj)                                            & 
    149150               &           * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) )   & 
     
    156157         ! 
    157158      ELSEIF( nn_mle == 1 ) THEN       ! New formulation (Lf = 5km fo/ff with fo=Coriolis parameter at latitude rn_lat) 
    158          DO_2D_10_10 
     159         DO_2D( 1, 0, 1, 0 ) 
    159160            zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2_e1u(ji,jj)               & 
    160161               &                  * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) ) 
     
    166167      ! 
    167168      IF( nn_conv == 1 ) THEN              ! No MLE in case of convection 
    168          DO_2D_10_10 
     169         DO_2D( 1, 0, 1, 0 ) 
    169170            IF( MIN( zn2(ji,jj) , zn2(ji+1,jj) ) < 0._wp )   zpsim_u(ji,jj) = 0._wp 
    170171            IF( MIN( zn2(ji,jj) , zn2(ji,jj+1) ) < 0._wp )   zpsim_v(ji,jj) = 0._wp 
     
    173174      ! 
    174175      !                                      !==  structure function value at uw- and vw-points  ==! 
    175       DO_2D_10_10 
     176      DO_2D( 1, 0, 1, 0 ) 
    176177         zhu(ji,jj) = 1._wp / zhu(ji,jj)                   ! hu --> 1/hu 
    177178         zhv(ji,jj) = 1._wp / zhv(ji,jj) 
     
    181182      zpsi_vw(:,:,:) = 0._wp 
    182183      ! 
    183       DO_3D_10_10( 2, ikmax ) 
     184      DO_3D( 1, 0, 1, 0, 2, ikmax )                ! start from 2 : surface value = 0 
    184185         zcuw = 1._wp - ( gdepw(ji+1,jj,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhu(ji,jj) 
    185186         zcvw = 1._wp - ( gdepw(ji,jj+1,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhv(ji,jj) 
     
    195196      !                                      !==  transport increased by the MLE induced transport ==! 
    196197      DO jk = 1, ikmax 
    197          DO_2D_10_10 
     198         DO_2D( 1, 0, 1, 0 )                      ! CAUTION pu,pv must be defined at row/column i=1 / j=1 
    198199            pu(ji,jj,jk) = pu(ji,jj,jk) + ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji,jj,jk+1) ) 
    199200            pv(ji,jj,jk) = pv(ji,jj,jk) + ( zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj,jk+1) ) 
    200201         END_2D 
    201          DO_2D_00_00 
     202         DO_2D( 0, 0, 0, 0 ) 
    202203            pw(ji,jj,jk) = pw(ji,jj,jk) - ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji-1,jj,jk)   & 
    203204               &                          + zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj-1,jk) ) 
     
    282283            IF( ierr /= 0 )   CALL ctl_stop( 'tra_adv_mle_init: failed to allocate arrays' ) 
    283284            z1_t2 = 1._wp / ( rn_time * rn_time ) 
    284             DO_2D_01_01 
     285            DO_2D( 0, 1, 0, 1 )                      ! "coriolis+ time^-1" at u- & v-points 
    285286               zfu = ( ff_f(ji,jj) + ff_f(ji,jj-1) ) * 0.5_wp 
    286287               zfv = ( ff_f(ji,jj) + ff_f(ji-1,jj) ) * 0.5_wp 
     
    288289               rfv(ji,jj) = SQRT(  zfv * zfv + z1_t2 ) 
    289290            END_2D 
    290             CALL lbc_lnk_multi( 'tramle', rfu, 'U', 1. , rfv, 'V', 1. ) 
     291            CALL lbc_lnk_multi( 'tramle', rfu, 'U', 1.0_wp , rfv, 'V', 1.0_wp ) 
    291292            ! 
    292293         ELSEIF( nn_mle == 1 ) THEN           ! MLE array allocation & initialisation 
Note: See TracChangeset for help on using the changeset viewer.