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/trdmxl_trc.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/trdmxl_trc.F90

    r11536 r12377  
    1616   !!   trd_mxl_trc_init : initialization step 
    1717   !!---------------------------------------------------------------------- 
    18    USE trc               ! tracer definitions (trn, trb, tra, etc.) 
    19    USE trc_oce, ONLY :   nn_dttrc  ! frequency of step on passive tracers 
     18   USE trc               ! tracer definitions (tr etc.) 
    2019   USE dom_oce           ! domain definition 
    2120   USE zdfmxl  , ONLY : nmln ! number of level in the mixed layer 
     
    5049   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::  ztmltrd2   ! 
    5150 
     51   !! * Substitutions 
     52#  include "do_loop_substitute.h90" 
    5253   !!---------------------------------------------------------------------- 
    5354   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    7071 
    7172 
    72    SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn ) 
     73   SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn, Kmm ) 
    7374      !!---------------------------------------------------------------------- 
    7475      !!                  ***  ROUTINE trd_mxl_trc_zint  *** 
     
    9293      !! 
    9394      INTEGER, INTENT( in ) ::   ktrd, kjn                        ! ocean trend index and passive tracer rank 
     95      INTEGER, INTENT( in ) ::   Kmm                              ! time level index 
    9496      CHARACTER(len=2), INTENT( in ) ::  ctype                    ! surface/bottom (2D) or interior (3D) physics 
    9597      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) ::  ptrc_trdmxl ! passive tracer trend 
     
    122124 
    123125            IF( jpktrd_trc < jpk ) THEN                           ! description ??? 
    124                DO jj = 1, jpj 
    125                   DO ji = 1, jpi 
    126                      IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN 
    127                         zvlmsk(ji,jj) = tmask(ji,jj,1) 
    128                      ELSE 
    129                         isum = isum + 1 
    130                         zvlmsk(ji,jj) = 0.e0 
    131                      ENDIF 
    132                   END DO 
    133                END DO 
     126               DO_2D_11_11 
     127                  IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN 
     128                     zvlmsk(ji,jj) = tmask(ji,jj,1) 
     129                  ELSE 
     130                     isum = isum + 1 
     131                     zvlmsk(ji,jj) = 0.e0 
     132                  ENDIF 
     133               END_2D 
    134134            ENDIF 
    135135 
     
    147147         ! ... Weights for vertical averaging 
    148148         wkx_trc(:,:,:) = 0.e0 
    149          DO jk = 1, jpktrd_trc                                    ! initialize wkx_trc with vertical scale factor in mixed-layer 
    150             DO jj = 1, jpj 
    151                DO ji = 1, jpi 
    152                   IF( jk - nmld_trc(ji,jj) < 0 )   wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) 
    153                END DO 
    154             END DO 
    155          END DO 
     149         DO_3D_11_11( 1, jpktrd_trc ) 
     150            IF( jk - nmld_trc(ji,jj) < 0 )   wkx_trc(ji,jj,jk) = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) 
     151         END_3D 
    156152          
    157153         rmld_trc(:,:) = 0.e0 
     
    183179 
    184180 
    185    SUBROUTINE trd_mxl_trc( kt ) 
     181   SUBROUTINE trd_mxl_trc( kt, Kmm ) 
    186182      !!---------------------------------------------------------------------- 
    187183      !!                  ***  ROUTINE trd_mxl_trc  *** 
     
    232228      ! 
    233229      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     230      INTEGER, INTENT(in) ::   Kmm                              ! time level index 
    234231      ! 
    235232      INTEGER ::   ji, jj, jk, jl, ik, it, itmod, jn 
     
    251248 
    252249 
    253       IF( nn_dttrc  /= 1  )   CALL ctl_stop( " Be careful, trends diags never validated " ) 
    254  
    255250      ! ====================================================================== 
    256251      ! I. Diagnose the purely vertical (K_z) diffusion trend 
     
    263258         ! 
    264259         DO jn = 1, jptra 
    265             DO jj = 1, jpj 
    266                DO ji = 1, jpi 
    267                   ik = nmld_trc(ji,jj) 
    268                   IF( ln_trdtrc(jn) )    & 
    269                   tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - avs(ji,jj,ik) / e3w_n(ji,jj,ik) * tmask(ji,jj,ik)  & 
    270                        &                    * ( trn(ji,jj,ik-1,jn) - trn(ji,jj,ik,jn) )            & 
    271                        &                    / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1) 
    272                END DO 
    273             END DO 
     260            DO_2D_11_11 
     261               ik = nmld_trc(ji,jj) 
     262               IF( ln_trdtrc(jn) )    & 
     263               tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - avs(ji,jj,ik) / e3w(ji,jj,ik,Kmm) * tmask(ji,jj,ik)  & 
     264                    &                    * ( tr(ji,jj,ik-1,jn,Kmm) - tr(ji,jj,ik,jn,Kmm) )            & 
     265                    &                    / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1) 
     266            END_2D 
    274267         END DO 
    275268 
     
    322315         DO jn = 1, jptra 
    323316            IF( ln_trdtrc(jn) ) & 
    324                tml_trc(:,:,jn) = tml_trc(:,:,jn) + wkx_trc(:,:,jk) * trn(:,:,jk,jn) 
     317               tml_trc(:,:,jn) = tml_trc(:,:,jn) + wkx_trc(:,:,jk) * tr(:,:,jk,jn,Kmm) 
    325318         END DO 
    326319      END DO 
     
    328321      ! II.3 Initialize mixed-layer "before" arrays for the 1rst analysis window     
    329322      ! ------------------------------------------------------------------------ 
    330       IF( kt == nittrc000 + nn_dttrc ) THEN  !  i.e. ( .NOT. ln_rstart ).AND.( kt == nit000 + 1)    ??? 
     323      IF( kt == nittrc000 + 1 ) THEN  !  i.e. ( .NOT. ln_rstart ).AND.( kt == nit000 + 1)    ??? 
    331324         ! 
    332325         DO jn = 1, jptra 
     
    870863#  endif 
    871864      zout = nn_trd_trc * rdt 
    872       iiter = ( nittrc000 - 1 ) / nn_dttrc 
     865      iiter = nittrc000 - 1 
    873866 
    874867      IF(lwp) WRITE (numout,*) '                netCDF initialization' 
     
    970963   !!---------------------------------------------------------------------- 
    971964CONTAINS 
    972    SUBROUTINE trd_mxl_trc( kt )                                   ! Empty routine 
     965   SUBROUTINE trd_mxl_trc( kt, Kmm )                                   ! Empty routine 
    973966      INTEGER, INTENT( in) ::   kt 
     967      INTEGER, INTENT( in) ::   Kmm            ! time level index 
    974968      WRITE(*,*) 'trd_mxl_trc: You should not have seen this print! error?', kt 
    975969   END SUBROUTINE trd_mxl_trc 
    976    SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn ) 
     970   SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn, Kmm ) 
    977971      INTEGER               , INTENT( in ) ::  ktrd, kjn              ! ocean trend index and passive tracer rank 
     972      INTEGER               , INTENT( in ) ::  Kmm                    ! time level index 
    978973      CHARACTER(len=2)      , INTENT( in ) ::  ctype                  ! surface/bottom (2D) or interior (3D) physics 
    979974      REAL, DIMENSION(:,:,:), INTENT( in ) ::  ptrc_trdmxl            ! passive trc trend 
Note: See TracChangeset for help on using the changeset viewer.