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/OCE/C1D/dtauvd.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/OCE/C1D/dtauvd.F90

    r11536 r12377  
    3131   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_uvd   ! structure for input U & V current (file information and data) 
    3232 
     33   !! * Substitutions 
     34#  include "do_loop_substitute.h90" 
    3335   !!---------------------------------------------------------------------- 
    3436   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    6062      ierr0 = 0   ;   ierr1 = 0   ;   ierr2 = 0  ;   ierr3 = 0 
    6163 
    62       REWIND( numnam_ref )              ! Namelist namc1d_uvd in reference namelist :  
    6364      READ  ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 
    6465901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist' ) 
    6566      ! 
    66       REWIND( numnam_cfg )              ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 
    6767      READ  ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 
    6868902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist' ) 
     
    117117 
    118118 
    119    SUBROUTINE dta_uvd( kt, puvd ) 
     119   SUBROUTINE dta_uvd( kt, Kmm, puvd ) 
    120120      !!---------------------------------------------------------------------- 
    121121      !!                   ***  ROUTINE dta_uvd  *** 
     
    133133      !!---------------------------------------------------------------------- 
    134134      INTEGER                           , INTENT(in   ) ::   kt     ! ocean time-step 
     135      INTEGER                           , INTENT(in   ) ::   Kmm    ! time level index 
    135136      REAL(wp), DIMENSION(jpi,jpj,jpk,2), INTENT(  out) ::   puvd   ! U & V current data 
    136137      ! 
     
    157158         ENDIF 
    158159         ! 
    159          DO jj = 1, jpj                   ! vertical interpolation of U & V current: 
    160             DO ji = 1, jpi                ! determines the interpolated U & V current profiles at each (i,j) point 
    161                DO jk = 1, jpk 
    162                   zl = gdept_n(ji,jj,jk) 
    163                   IF    ( zl < gdept_1d(1  ) ) THEN          ! extrapolate above the first level of data 
    164                      zup(jk) =  puvd(ji,jj,1    ,1) 
    165                      zvp(jk) =  puvd(ji,jj,1    ,2) 
    166                   ELSEIF( zl > gdept_1d(jpk) ) THEN          ! extrapolate below the last level of data 
    167                      zup(jk) =  puvd(ji,jj,jpkm1,1) 
    168                      zvp(jk) =  puvd(ji,jj,jpkm1,2) 
    169                   ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1 
    170                      DO jkk = 1, jpkm1                      ! when  gdept(jkk) < zl < gdept(jkk+1) 
    171                         IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 
    172                            zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 
    173                            zup(jk) = puvd(ji,jj,jkk,1) + ( puvd(ji,jj,jkk+1,1 ) - puvd(ji,jj,jkk,1) ) * zi  
    174                            zvp(jk) = puvd(ji,jj,jkk,2) + ( puvd(ji,jj,jkk+1,2 ) - puvd(ji,jj,jkk,2) ) * zi 
    175                         ENDIF 
    176                      END DO 
    177                   ENDIF 
    178                END DO 
    179                DO jk = 1, jpkm1           ! apply mask 
    180                   puvd(ji,jj,jk,1) = zup(jk) * umask(ji,jj,jk) 
    181                   puvd(ji,jj,jk,2) = zvp(jk) * vmask(ji,jj,jk) 
    182                END DO 
    183                puvd(ji,jj,jpk,1) = 0._wp 
    184                puvd(ji,jj,jpk,2) = 0._wp 
     160         DO_2D_11_11 
     161            DO jk = 1, jpk 
     162               zl = gdept(ji,jj,jk,Kmm) 
     163               IF    ( zl < gdept_1d(1  ) ) THEN          ! extrapolate above the first level of data 
     164                  zup(jk) =  puvd(ji,jj,1    ,1) 
     165                  zvp(jk) =  puvd(ji,jj,1    ,2) 
     166               ELSEIF( zl > gdept_1d(jpk) ) THEN          ! extrapolate below the last level of data 
     167                  zup(jk) =  puvd(ji,jj,jpkm1,1) 
     168                  zvp(jk) =  puvd(ji,jj,jpkm1,2) 
     169               ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1 
     170                  DO jkk = 1, jpkm1                      ! when  gdept(jkk) < zl < gdept(jkk+1) 
     171                     IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN 
     172                        zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk)) 
     173                        zup(jk) = puvd(ji,jj,jkk,1) + ( puvd(ji,jj,jkk+1,1 ) - puvd(ji,jj,jkk,1) ) * zi  
     174                        zvp(jk) = puvd(ji,jj,jkk,2) + ( puvd(ji,jj,jkk+1,2 ) - puvd(ji,jj,jkk,2) ) * zi 
     175                     ENDIF 
     176                  END DO 
     177               ENDIF 
    185178            END DO 
    186          END DO 
     179            DO jk = 1, jpkm1           ! apply mask 
     180               puvd(ji,jj,jk,1) = zup(jk) * umask(ji,jj,jk) 
     181               puvd(ji,jj,jk,2) = zvp(jk) * vmask(ji,jj,jk) 
     182            END DO 
     183            puvd(ji,jj,jpk,1) = 0._wp 
     184            puvd(ji,jj,jpk,2) = 0._wp 
     185         END_2D 
    187186         !  
    188187         DEALLOCATE( zup, zvp ) 
     
    194193         ! 
    195194         IF( ln_zps ) THEN                ! zps-coordinate (partial steps) interpolation at the last ocean level 
    196             DO jj = 1, jpj 
    197                DO ji = 1, jpi 
    198                   ik = mbkt(ji,jj)  
    199                   IF( ik > 1 ) THEN 
    200                      zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 
    201                      puvd(ji,jj,ik,1) = (1.-zl) * puvd(ji,jj,ik,1) + zl * puvd(ji,jj,ik-1,1) 
    202                      puvd(ji,jj,ik,2) = (1.-zl) * puvd(ji,jj,ik,2) + zl * puvd(ji,jj,ik-1,2) 
    203                   ENDIF 
    204                END DO 
    205             END DO 
     195            DO_2D_11_11 
     196               ik = mbkt(ji,jj)  
     197               IF( ik > 1 ) THEN 
     198                  zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) 
     199                  puvd(ji,jj,ik,1) = (1.-zl) * puvd(ji,jj,ik,1) + zl * puvd(ji,jj,ik-1,1) 
     200                  puvd(ji,jj,ik,2) = (1.-zl) * puvd(ji,jj,ik,2) + zl * puvd(ji,jj,ik-1,2) 
     201               ENDIF 
     202            END_2D 
    206203         ENDIF 
    207204         ! 
Note: See TracChangeset for help on using the changeset viewer.