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

    r11536 r12377  
    3939!$AGRIF_END_DO_NOT_TREAT 
    4040 
     41   !! Substitutions 
     42#include "do_loop_substitute.h90" 
    4143   !!---------------------------------------------------------------------- 
    4244   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    98100      ENDIF 
    99101      ! 
    100       REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data 
    101102      READ  ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901) 
    102103901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist' ) 
    103       REWIND( numnat_cfg )              ! Namelist namtrc_dta in configuration namelist : Passive tracer input data 
    104104      READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 ) 
    105105902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist' ) 
     
    154154 
    155155 
    156    SUBROUTINE trc_dta( kt, sf_trcdta, ptrcfac, ptrcdta) 
     156   SUBROUTINE trc_dta( kt, Kmm, sf_trcdta, ptrcfac, ptrcdta) 
    157157      !!---------------------------------------------------------------------- 
    158158      !!                   ***  ROUTINE trc_dta  *** 
     
    167167      !!---------------------------------------------------------------------- 
    168168      INTEGER                          , INTENT(in   )   ::   kt         ! ocean time-step 
     169      INTEGER                          , INTENT(in   )   ::   Kmm        ! time level index 
    169170      TYPE(FLD), DIMENSION(1)          , INTENT(inout)   ::   sf_trcdta  ! array of information on the field to read 
    170171      REAL(wp)                         , INTENT(in   )   ::   ptrcfac    ! multiplication factor 
     
    178179      ! 
    179180      IF( ln_timing )   CALL timing_start('trc_dta') 
     181      ! 
     182      IF( kt == nit000 .AND. lwp) THEN 
     183         WRITE(numout,*) 
     184         WRITE(numout,*) 'trc_dta : passive tracers data for IC' 
     185         WRITE(numout,*) '~~~~~~~ ' 
     186      ENDIF 
    180187      ! 
    181188      IF( nb_trcdta > 0 ) THEN 
     
    191198               WRITE(numout,*) 'trc_dta: interpolates passive tracer data onto the s- or mixed s-z-coordinate mesh' 
    192199            ENDIF 
    193             DO jj = 1, jpj                         ! vertical interpolation of T & S 
    194                DO ji = 1, jpi 
    195                   DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points 
    196                      zl = gdept_n(ji,jj,jk) 
    197                      IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data 
    198                         ztp(jk) = ptrcdta(ji,jj,1) 
    199                      ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data 
    200                         ztp(jk) = ptrcdta(ji,jj,jpkm1) 
    201                      ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1 
    202                         DO jkk = 1, jpkm1                                  ! when  gdept(jkk) < zl < gdept(jkk+1) 
    203                            IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 
    204                               zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 
    205                               ztp(jk) = ptrcdta(ji,jj,jkk) + ( ptrcdta(ji,jj,jkk+1) - ptrcdta(ji,jj,jkk) ) * zi 
    206                            ENDIF 
    207                         END DO 
    208                      ENDIF 
    209                   END DO 
    210                   DO jk = 1, jpkm1 
    211                      ptrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord 
    212                   END DO 
    213                   ptrcdta(ji,jj,jpk) = 0._wp 
    214                 END DO 
    215             END DO 
     200            DO_2D_11_11 
     201               DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points 
     202                  zl = gdept(ji,jj,jk,Kmm) 
     203                  IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data 
     204                     ztp(jk) = ptrcdta(ji,jj,1) 
     205                  ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data 
     206                     ztp(jk) = ptrcdta(ji,jj,jpkm1) 
     207                  ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1 
     208                     DO jkk = 1, jpkm1                                  ! when  gdept(jkk) < zl < gdept(jkk+1) 
     209                        IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 
     210                           zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 
     211                           ztp(jk) = ptrcdta(ji,jj,jkk) + ( ptrcdta(ji,jj,jkk+1) - ptrcdta(ji,jj,jkk) ) * zi 
     212                        ENDIF 
     213                     END DO 
     214                  ENDIF 
     215               END DO 
     216               DO jk = 1, jpkm1 
     217                  ptrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord 
     218               END DO 
     219               ptrcdta(ji,jj,jpk) = 0._wp 
     220            END_2D 
    216221            !  
    217222         ELSE                                !==   z- or zps- coordinate   ==! 
Note: See TracChangeset for help on using the changeset viewer.