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 14072 for NEMO/trunk/src/OCE/TRA/traldf_iso.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (4 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/traldf_iso.F90

    r13982 r14072  
    1515   !!---------------------------------------------------------------------- 
    1616   !!   tra_ldf_iso   : update the tracer trend with the horizontal component of a iso-neutral laplacian operator 
    17    !!                   and with the vertical part of the isopycnal or geopotential s-coord. operator  
     17   !!                   and with the vertical part of the isopycnal or geopotential s-coord. operator 
    1818   !!---------------------------------------------------------------------- 
    1919   USE oce            ! ocean dynamics and active tracers 
     
    7979      !!                  ***  ROUTINE tra_ldf_iso  *** 
    8080      !! 
    81       !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive  
    82       !!      trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and  
     81      !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive 
     82      !!      trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and 
    8383      !!      add it to the general trend of tracer equation. 
    8484      !! 
    85       !! ** Method  :   The horizontal component of the lateral diffusive trends  
     85      !! ** Method  :   The horizontal component of the lateral diffusive trends 
    8686      !!      is provided by a 2nd order operator rotated along neural or geopo- 
    8787      !!      tential surfaces to which an eddy induced advection can be added 
     
    9494      !! 
    9595      !!      2nd part :  horizontal fluxes of the lateral mixing operator 
    96       !!      ========     
     96      !!      ======== 
    9797      !!         zftu =  pahu e2u*e3u/e1u di[ tb ] 
    9898      !!               - pahu e2u*uslp    dk[ mi(mk(tb)) ] 
     
    165165      ELSE                    ;   zsign = -1._wp 
    166166      ENDIF 
    167           
     167 
    168168      !!---------------------------------------------------------------------- 
    169169      !!   0 - calculate  ah_wslp2 and akz 
     
    223223      DO jn = 1, kjpt                                            ! tracer loop 
    224224         !                                                       ! =========== 
    225          !                                                
    226          !!---------------------------------------------------------------------- 
    227          !!   I - masked horizontal derivative  
     225         ! 
     226         !!---------------------------------------------------------------------- 
     227         !!   I - masked horizontal derivative 
    228228         !!---------------------------------------------------------------------- 
    229229!!gm : bug.... why (x,:,:)?   (1,jpj,:) and (jpi,1,:) should be sufficient.... 
     
    232232         !!end 
    233233 
    234          ! Horizontal tracer gradient  
     234         ! Horizontal tracer gradient 
    235235         DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
    236236            zdit(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj,jk,jn) ) * umask(ji,jj,jk) 
     
    239239         IF( ln_zps ) THEN      ! botton and surface ocean correction of the horizontal gradient 
    240240            DO_2D( 1, 0, 1, 0 )           ! bottom correction (partial bottom cell) 
    241                zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)           
     241               zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn) 
    242242               zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn) 
    243243            END_2D 
    244244            IF( ln_isfcav ) THEN      ! first wet level beneath a cavity 
    245245               DO_2D( 1, 0, 1, 0 ) 
    246                   IF( miku(ji,jj) > 1 )   zdit(ji,jj,miku(ji,jj)) = pgui(ji,jj,jn)           
    247                   IF( mikv(ji,jj) > 1 )   zdjt(ji,jj,mikv(ji,jj)) = pgvi(ji,jj,jn)      
     246                  IF( miku(ji,jj) > 1 )   zdit(ji,jj,miku(ji,jj)) = pgui(ji,jj,jn) 
     247                  IF( mikv(ji,jj) > 1 )   zdjt(ji,jj,mikv(ji,jj)) = pgvi(ji,jj,jn) 
    248248               END_2D 
    249249            ENDIF 
     
    283283               zftv(ji,jj,jk) = (  zabe2 * zdjt(ji,jj,jk)   & 
    284284                  &               + zcof2 * (  zdkt (ji,jj+1) + zdk1t(ji,jj)      & 
    285                   &                          + zdk1t(ji,jj+1) + zdkt (ji,jj)  )  ) * vmask(ji,jj,jk)                   
     285                  &                          + zdk1t(ji,jj+1) + zdkt (ji,jj)  )  ) * vmask(ji,jj,jk) 
    286286            END_2D 
    287287            ! 
     
    291291                  &                                              * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) 
    292292            END_2D 
    293          END DO                                        !   End of slab   
     293         END DO                                        !   End of slab 
    294294 
    295295         !!---------------------------------------------------------------------- 
     
    301301         !                          ! Surface and bottom vertical fluxes set to zero 
    302302         ztfw(:,:, 1 ) = 0._wp      ;      ztfw(:,:,jpk) = 0._wp 
    303           
     303 
    304304         DO_3D( 0, 0, 0, 0, 2, jpkm1 )    ! interior (2=<jk=<jpk-1) 
    305305            ! 
     
    330330            END_3D 
    331331            ! 
    332          ELSE                                   ! bilaplacian  
     332         ELSE                                   ! bilaplacian 
    333333            SELECT CASE( kpass ) 
    334334            CASE(  1  )                            ! 1st pass : eddy coef = ah_wslp2 
     
    346346            END SELECT 
    347347         ENDIF 
    348          !          
     348         ! 
    349349         DO_3D( 0, 0, 0, 0, 1, jpkm1 )    !==  Divergence of vertical fluxes added to pta  ==! 
    350350            pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + zsign * (  ztfw (ji,jj,jk) - ztfw(ji,jj,jk+1)  ) * r1_e1e2t(ji,jj)   & 
Note: See TracChangeset for help on using the changeset viewer.