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 12724 for NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/TRA/traatf.F90 – NEMO

Ignore:
Timestamp:
2020-04-08T21:37:59+02:00 (4 years ago)
Author:
techene
Message:

branch KERNEL-06 : merge with trunk@12698 #2385 - in duplcated files : changes to comply to the new trunk variables and some loop bug fixes

Location:
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8 
         9# SETTE 
         10^/utils/CI/sette@HEAD         sette 
  • NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/TRA/traatf.F90

    r12680 r12724  
    114114      IF( ln_bdy )   CALL bdy_tra( kt, Kbb, pts, Kaa )  ! BDY open boundaries 
    115115 
    116       ! set time step size (Euler/Leapfrog) 
    117       IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =        rdt   ! at nit000             (Euler) 
    118       ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt = 2._wp* rdt   ! at nit000 or nit000+1 (Leapfrog) 
    119       ENDIF 
    120  
    121116      ! trends computation initialisation 
    122117      IF( l_trdtra )   THEN 
     
    129124         ENDIF 
    130125         ! total trend for the non-time-filtered variables. 
    131          zfact = 1.0 / rdt 
     126         zfact = 1.0 / rn_Dt 
    132127         ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn; e3tn cancel from pts(Kmm) terms 
    133128         DO jk = 1, jpkm1 
     
    145140      ENDIF 
    146141 
    147       IF( neuler == 0 .AND. kt == nit000 ) THEN       ! Euler time-stepping 
     142      IF( l_1st_euler ) THEN       ! Euler time-stepping  
    148143         ! 
    149144         IF (l_trdtra .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl 
     
    157152      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
    158153         ! 
    159          IF( ln_linssh ) THEN   ;   CALL tra_atf_fix( kt, Kbb, Kmm, Kaa, nit000,      'TRA', pts, jpts )  ! linear free surface 
    160          ELSE                   ;   CALL tra_atf_vvl( kt, Kbb, Kmm, Kaa, nit000, rdt, 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
     154         IF( ln_linssh ) THEN   ;   CALL tra_atf_fix( kt, Kbb, Kmm, Kaa, nit000,        'TRA', pts, jpts )  ! linear free surface  
     155         ELSE                   ;   CALL tra_atf_vvl( kt, Kbb, Kmm, Kaa, nit000, rn_Dt, 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
    161156         ENDIF 
    162157         ! 
     
    167162      ENDIF 
    168163      ! 
    169       IF( l_trdtra .AND. ln_linssh ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt 
    170          zfact = 1._wp / r2dt 
     164      IF( l_trdtra .AND. ln_linssh ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt      
    171165         DO jk = 1, jpkm1 
    172             ztrdt(:,:,jk) = ( pts(:,:,jk,jp_tem,Kmm) - ztrdt(:,:,jk) ) * zfact 
    173             ztrds(:,:,jk) = ( pts(:,:,jk,jp_sal,Kmm) - ztrds(:,:,jk) ) * zfact 
     166            ztrdt(:,:,jk) = ( pts(:,:,jk,jp_tem,Kmm) - ztrdt(:,:,jk) ) * r1_Dt 
     167            ztrds(:,:,jk) = ( pts(:,:,jk,jp_sal,Kmm) - ztrds(:,:,jk) ) * r1_Dt 
    174168         END DO 
    175169         CALL trd_tra( kt, Kmm, Kaa, 'TRA', jp_tem, jptra_atf, ztrdt ) 
     
    220214            ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb)  ! time laplacian on tracers 
    221215            ! 
    222             pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd                      ! pt <-- filtered pt 
     216            pt(ji,jj,jk,jn,Kmm) = ztn + rn_atfp * ztd                      ! pt <-- filtered pt 
    223217         END_3D 
    224218         ! 
     
    235229      !! 
    236230      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields. 
    237       !!             pt(Kmm)  = ( e3t_Kmm*pt(Kmm) + atfp*[ e3t_Kbb*pt(Kbb) - 2 e3t_Kmm*pt(Kmm) + e3t_Kaa*pt(Kaa) ] ) 
    238       !!                       /( e3t_Kmm         + atfp*[ e3t_Kbb         - 2 e3t_Kmm         + e3t_Kaa    ] ) 
     231      !!             pt(Kmm)  = ( e3t_Kmm*pt(Kmm) + rn_atfp*[ e3t_Kbb*pt(Kbb) - 2 e3t_Kmm*pt(Kmm) + e3t_Kaa*pt(Kaa) ] ) 
     232      !!                       /( e3t_Kmm         + rn_atfp*[ e3t_Kbb         - 2 e3t_Kmm         + e3t_Kaa    ] ) 
    239233      !! 
    240234      !! ** Action  : - pt(Kmm) ready for the next time step 
     
    278272      ENDIF 
    279273      zfact = 1._wp / p2dt 
    280       zfact1 = atfp * p2dt 
    281       zfact2 = zfact1 * r1_rau0 
     274      zfact1 = rn_atfp * p2dt 
     275      zfact2 = zfact1 * r1_rho0 
    282276      DO jn = 1, kjpt 
    283277         DO_3D_00_00( 1, jpkm1 ) 
     
    293287            ztc_d  = ztc_a  - 2. * ztc_n  + ztc_b 
    294288            ! 
    295             ze3t_f = ze3t_n + atfp * ze3t_d 
    296             ztc_f  = ztc_n  + atfp * ztc_d 
     289            ze3t_f = ze3t_n + rn_atfp * ze3t_d 
     290            ztc_f  = ztc_n  + rn_atfp * ztc_d 
    297291            ! 
    298292            ! Add asselin correction on scale factors: 
Note: See TracChangeset for help on using the changeset viewer.