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 1870 for branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2010-05-12T17:36:00+02:00 (14 years ago)
Author:
gm
Message:

ticket: #663 step-1 : introduce the modified forcing term

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/tranxt.F90

    r1847 r1870  
    1515   !!            3.0  !  2008-06  (G. Madec)  time stepping always done in trazdf 
    1616   !!            3.1  !  2009-02  (G. Madec, R. Benshila)  re-introduce the vvl option 
    17    !!            3.3  !  2010-04  (M. Leclair, G. Madec)  semi-implicit hpg with asselin filter 
     17   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  semi-implicit hpg with asselin filter + modified LF-RA 
    1818   !!---------------------------------------------------------------------- 
    1919 
     
    8181      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    8282      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     83      !! 
     84      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    8385      !!---------------------------------------------------------------------- 
    8486      USE oce, ONLY :    ztrdt => ua   ! use ua as 3D workspace    
     
    9193      !!---------------------------------------------------------------------- 
    9294 
    93       IF( kt == nit000 ) THEN 
     95      IF( kt == nit000 ) THEN          !==  initialisation  ==! 
    9496         IF(lwp) WRITE(numout,*) 
    9597         IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' 
     
    99101         r1_2bcp = 1.e0 - 2.e0 * rbcp 
    100102      ENDIF 
    101  
    102       ! Update after tracer on domain lateral boundaries 
     103      !                                      ! set time step size (Euler/Leapfrog) 
     104      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt_t(:) =     rdttra(:)      ! at nit000             (Euler) 
     105      ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt_t(:) = 2.* rdttra(:)      ! at nit000 or nit000+1 (Leapfrog) 
     106      ENDIF 
     107 
     108      !                                !==  Update after tracer on domain lateral boundaries  ==! 
    103109      !  
    104       CALL lbc_lnk( ta, 'T', 1. )      ! local domain boundaries  (T-point, unchanged sign) 
     110      CALL lbc_lnk( ta, 'T', 1. )            ! local domain boundaries  (T-point, unchanged sign) 
    105111      CALL lbc_lnk( sa, 'T', 1. ) 
    106112      ! 
    107113#if defined key_obc 
    108       CALL obc_tra( kt )               ! OBC open boundaries 
     114      CALL obc_tra( kt )                     ! OBC open boundaries 
    109115#endif 
    110116#if defined key_bdy 
    111       CALL bdy_tra( kt )               ! BDY open boundaries 
     117      CALL bdy_tra( kt )                     ! BDY open boundaries 
    112118#endif 
    113119#if defined key_agrif 
    114       CALL Agrif_tra                   ! AGRIF zoom boundaries 
     120      CALL Agrif_tra                         ! AGRIF zoom boundaries 
    115121#endif 
    116122  
    117       ! set time step size (Euler/Leapfrog) 
    118       IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt_t(:) =     rdttra(:)      ! at nit000             (Euler) 
    119       ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt_t(:) = 2.* rdttra(:)      ! at nit000 or nit000+1 (Leapfrog) 
    120       ENDIF 
    121  
    122       ! trends computation initialisation 
    123       IF( l_trdtra ) THEN              ! store now fields before applying the Asselin filter 
     123      IF( l_trdtra ) THEN              ! trends computation: store now fields before applying the Asselin filter 
    124124         ztrdt(:,:,:) = tn(:,:,:)       
    125125         ztrds(:,:,:) = sn(:,:,:) 
    126126      ENDIF 
    127127 
    128       ! Leap-Frog + Asselin filter time stepping 
     128      !                                !==  modifed Leap-Frog + Asselin filter (modified LF-RA) scheme  ==! 
    129129      IF( lk_vvl )   THEN   ;   CALL tra_nxt_vvl( kt )      ! variable volume level (vvl) 
    130130      ELSE                  ;   CALL tra_nxt_fix( kt )      ! fixed    volume level 
     
    132132 
    133133#if defined key_agrif 
    134       ! Update tracer at AGRIF zoom boundaries 
    135       IF( .NOT.Agrif_Root() )    CALL Agrif_Update_Tra( kt )      ! children only 
     134      IF( .NOT.Agrif_Root() )    CALL Agrif_Update_Tra( kt )   ! Update tracer at AGRIF zoom boundaries (children only) 
    136135#endif       
    137136 
    138       ! trends computation 
    139       IF( l_trdtra ) THEN              ! trend of the Asselin filter (tb filtered - tb)/dt      
     137      IF( l_trdtra ) THEN              ! trends computation: trend of the Asselin filter (tb filtered - tb)/dt      
    140138         DO jk = 1, jpkm1 
    141139            zfact = 1.e0 / r2dt_t(jk)              
     
    176174      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
    177175      !!---------------------------------------------------------------------- 
    178       INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    179       !! 
    180       INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    181       REAL(wp) ::   ztm, ztf     ! temporary scalars 
    182       REAL(wp) ::   zsm, zsf     !    -         - 
     176      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     177      !! 
     178      INTEGER  ::   ji, jj, jk      ! dummy loop indices 
     179      REAL(wp) ::   ztm, ztf, zac   ! temporary scalars 
     180      REAL(wp) ::   zsm, zsf        !    -         - 
    183181      !!---------------------------------------------------------------------- 
    184182 
     
    225223               sn(:,:,jk) = sa(:,:,jk) 
    226224            END DO 
    227          ELSE                                             ! general case (Leapfrog + Asselin filter 
     225         ELSE                                             ! general case (Leapfrog + Asselin filter) 
    228226            DO jk = 1, jpkm1 
    229227               DO jj = 1, jpj 
     
    239237            END DO 
    240238         ENDIF 
     239      ENDIF 
     240      ! 
     241!!gm from Matthieu : unchecked 
     242      IF( neuler /= 0 .OR. kt /= nit000 ) THEN           ! remove the forcing from the Asselin filter 
     243         zac = atfp * rdttra(1) 
     244         tb(:,:,1) = tb(:,:,1) - zac * ( qns (:,:) - qns_b (:,:) )         ! non solar surface flux 
     245         sb(:,:,1) = sn(:,:,1) - zac * ( emps(:,:) - emps_b(:,:) )         ! surface salt flux 
     246         ! 
     247         IF( ln_traqsr )                                                   ! solar penetrating flux 
     248            DO jk = 1, nksr 
     249                  DO jj = 1, jpj 
     250                     DO ji = 1, jpi 
     251                        IF( ln_sco ) THEN 
     252                           z_cor_qsr = etot3(ji,jj,jk) * ( qsr(ji,jj) - qsrb(ji,jj) ) 
     253                        ELSEIF( ln_zps .OR. ln_zco ) THEN 
     254                           z_cor_qsr = ( qsr(ji,jj) - qsrb(ji,jj) ) *   & 
     255                                &   ( gdsr(jk) * tmask(ji,jj,jk) - gdsr(jk+1) * tmask(ji,jj,jk+1) ) 
     256                        ENDIF 
     257                        zt = zt - zfact1 * z_cor_qsr 
     258                     END DO 
     259                  END DO 
    241260      ENDIF 
    242261      ! 
     
    372391         ENDIF 
    373392      ENDIF 
     393!!gm from Matthieu : unchecked 
     394      ! 
     395      IF( neuler /= 0 .OR. kt /= nit000 ) THEN           ! remove the forcing from the Asselin filter 
     396               IF( lk_vvl ) THEN                                        ! Varying levels 
     397                  DO jj = 1, jpj 
     398                     DO ji = 1, jpi 
     399                        ! - ML - modification for varaiance diagnostics 
     400                        zssh1 = tmask(ji,jj,jk) / ( fse3t(ji,jj,jk) + atfp * ( zfse3ta(ji,jj,jk) - 2*fse3t(ji,jj,jk) & 
     401                           &                                                 + fse3tb(ji,jj,jk) ) ) 
     402                        zt = zssh1 * ( tn(ji,jj,jk) +  atfp * ( ta(ji,jj,jk) - 2 * tn(ji,jj,jk) + tb(ji,jj,jk) ) ) 
     403                        zs = zssh1 * ( sn(ji,jj,jk) +  atfp * ( sa(ji,jj,jk) - 2 * sn(ji,jj,jk) + sb(ji,jj,jk) ) ) 
     404                        ! filter correction for global conservation 
     405                        !------------------------------------------ 
     406                        zfact1 = atfp * rdttra(1) * zssh1 
     407                        IF (jk == 1) THEN                        ! remove sbc trend from time filter 
     408                           zt = zt - zfact1 * ( qn(ji,jj) - qb(ji,jj) ) 
     409!!???                           zs = zs - zfact1 * ( - emp( ji,jj) + empb(ji,jj) ) * zsrau * 35.5e0 
     410                        ENDIF 
     411                        ! remove qsr trend from time filter 
     412                        IF (jk <= nksr) THEN 
     413                           IF( ln_sco ) THEN 
     414                              z_cor_qsr = etot3(ji,jj,jk) * ( qsr(ji,jj) - qsrb(ji,jj) ) 
     415                           ELSEIF( ln_zps .OR. ln_zco ) THEN 
     416                              z_cor_qsr = ( qsr(ji,jj) - qsrb(ji,jj) ) *   & 
     417                                   &   ( gdsr(jk) * tmask(ji,jj,jk) - gdsr(jk+1) * tmask(ji,jj,jk+1) ) 
     418                           ENDIF 
     419                           zt = zt - zfact1 * z_cor_qsr 
     420                           IF (jk == nksr) qsrb(ji,jj) = qsr(ji,jj) 
     421                        ENDIF 
     422                        ! - ML - end of modification 
     423                        zssh1 = tmask(ji,jj,1) / zfse3ta(ji,jj,jk) 
     424                        tn(ji,jj,jk) = ta(ji,jj,jk) * zssh1 
     425                        sn(ji,jj,jk) = sa(ji,jj,jk) * zssh1 
     426                     END DO 
     427                  END DO 
     428      ENDIF 
     429!!gm end 
    374430      ! 
    375431   END SUBROUTINE tra_nxt_vvl 
Note: See TracChangeset for help on using the changeset viewer.