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

    r12624 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 
     
    149144      ENDIF 
    150145 
    151       IF( neuler == 0 .AND. kt == nit000 ) THEN       ! Euler time-stepping 
     146      IF( l_1st_euler ) THEN       ! Euler time-stepping 
    152147         ! 
    153148         IF (l_trdtra .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl 
     
    161156      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
    162157         ! 
    163          IF ( ln_linssh ) THEN   ;   CALL tra_atf_fix_lf( kt, Kbb, Kmm, Kaa, nit000,      'TRA', pts, jpts )  ! linear free surface 
    164          ELSE                    ;   CALL tra_atf_qco_lf( kt, Kbb, Kmm, Kaa, nit000, rdt, 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
     158         IF ( ln_linssh ) THEN   ;   CALL tra_atf_fix_lf( kt, Kbb, Kmm, Kaa, nit000,        'TRA', pts, jpts )  ! linear free surface 
     159         ELSE                    ;   CALL tra_atf_qco_lf( kt, Kbb, Kmm, Kaa, nit000, rn_Dt, 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
    165160         ENDIF 
    166161         ! 
     
    172167      ! 
    173168      IF( l_trdtra .AND. ln_linssh ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt 
    174          zfact = 1._wp / r2dt 
    175169         DO jk = 1, jpkm1 
    176             ztrdt(:,:,jk) = ( pts(:,:,jk,jp_tem,Kmm) - ztrdt(:,:,jk) ) * zfact 
    177             ztrds(:,:,jk) = ( pts(:,:,jk,jp_sal,Kmm) - ztrds(:,:,jk) ) * zfact 
     170            ztrdt(:,:,jk) = ( pts(:,:,jk,jp_tem,Kmm) - ztrdt(:,:,jk) ) * r1_Dt 
     171            ztrds(:,:,jk) = ( pts(:,:,jk,jp_sal,Kmm) - ztrds(:,:,jk) ) * r1_Dt 
    178172         END DO 
    179173         CALL trd_tra( kt, Kmm, Kaa, 'TRA', jp_tem, jptra_atf, ztrdt ) 
     
    224218            ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb)  ! time laplacian on tracers 
    225219            ! 
    226             pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd                      ! pt <-- filtered pt 
     220            pt(ji,jj,jk,jn,Kmm) = ztn + rn_atfp * ztd                      ! pt <-- filtered pt 
    227221         END_3D 
    228222         ! 
     
    239233      !! 
    240234      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields. 
    241       !!             pt(Kmm)  = ( e3t_m*pt(Kmm) + atfp*[ e3t_b*pt(Kbb) - 2 e3t_m*pt(Kmm) + e3t_a*pt(Kaa) ] ) 
    242       !!                       /( e3t_m         + atfp*[ e3t_b         - 2 e3t_m         + e3t_a    ] ) 
     235      !!             pt(Kmm)  = ( e3t_m*pt(Kmm) + rn_atfp*[ e3t_b*pt(Kbb) - 2 e3t_m*pt(Kmm) + e3t_a*pt(Kaa) ] ) 
     236      !!                       /( e3t_m         + rn_atfp*[ e3t_b         - 2 e3t_m         + e3t_a    ] ) 
    243237      !! 
    244238      !! ** Action  : - pt(Kmm) ready for the next time step 
     
    282276      ENDIF 
    283277      zfact = 1._wp / p2dt 
    284       zfact1 = atfp * p2dt 
    285       zfact2 = zfact1 * r1_rau0 
     278      zfact1 = rn_atfp * p2dt 
     279      zfact2 = zfact1 * r1_rho0 
    286280      DO jn = 1, kjpt 
    287281         DO_3D_00_00( 1, jpkm1 ) 
     
    297291            ztc_d  = ztc_a  - 2. * ztc_n  + ztc_b 
    298292            ! 
    299             ztc_f  = ztc_n  + atfp * ztc_d 
     293            ztc_f  = ztc_n  + rn_atfp * ztc_d 
    300294            ! 
    301295            ! Asselin correction on scale factors is done via ssh in r3t_f 
Note: See TracChangeset for help on using the changeset viewer.