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 6079 for branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2015-12-17T11:08:49+01:00 (8 years ago)
Author:
jamesharle
Message:

merge to trunk@5936

Location:
branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC

    • Property svn:mergeinfo deleted
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r5901 r6079  
    3131   USE zdf_oce         ! ocean vertical mixing 
    3232   USE domvvl          ! variable volume 
    33    USE dynspg_oce      ! surface     pressure gradient variables 
    34    USE dynhpg          ! hydrostatic pressure gradient  
    3533   USE trd_oce         ! trends: ocean variables 
    3634   USE trdtra          ! trends manager: tracers  
     
    5856   PUBLIC   tra_nxt_vvl   ! to be used in trcnxt 
    5957 
    60    REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg 
    6158 
    6259   !! * Substitutions 
     
    9087      !! 
    9188      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    92       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     89      !! 
    9390      !!---------------------------------------------------------------------- 
    9491      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
     
    105102         IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' 
    106103         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    107          ! 
    108          rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg 
    109104      ENDIF 
    110105 
    111106      ! Update after tracer on domain lateral boundaries 
    112107      !  
     108      ! 
    113109#if defined key_agrif 
    114110      CALL Agrif_tra                     ! AGRIF zoom boundaries 
     
    181177      !!  
    182178      !! ** Method  : - Apply a Asselin time filter on now fields. 
    183       !!              - save in (ta,sa) an average over the three time levels  
    184       !!             which will be used to compute rdn and thus the semi-implicit 
    185       !!             hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    186179      !!              - swap tracer fields to prepare the next time_step. 
    187       !!                This can be summurized for tempearture as: 
    188       !!             ztm = tn + rbcp * [ta -2 tn + tb ]       ln_dynhpg_imp = T 
    189       !!             ztm = 0                                   otherwise 
    190       !!                   with rbcp=1/4 * (1-atfp^4) / (1-atfp) 
    191       !!             tb  = tn + atfp*[ tb - 2 tn + ta ] 
    192       !!             tn  = ta   
    193       !!             ta  = ztm       (NB: reset to 0 after eos_bn2 call) 
    194180      !! 
    195181      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    196       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     182      !!               
    197183      !!---------------------------------------------------------------------- 
    198184      INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index 
     
    205191      ! 
    206192      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
    207       LOGICAL  ::   ll_tra_hpg       ! local logical 
    208193      REAL(wp) ::   ztn, ztd         ! local scalars 
    209194      !!---------------------------------------------------------------------- 
     
    215200      ENDIF 
    216201      ! 
    217       IF( cdtype == 'TRA' )  THEN   ;   ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg     
    218       ELSE                          ;   ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    219       ENDIF 
    220202      ! 
    221203      DO jn = 1, kjpt 
     
    230212                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                       ! ptn <-- pta 
    231213                  ! 
    232                   IF( ll_tra_hpg )   pta(ji,jj,jk,jn) = ztn + rbcp * ztd    ! pta <-- Brown & Campana average 
    233214               END DO 
    234215           END DO 
     
    248229      !!  
    249230      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields. 
    250       !!              - save in (ta,sa) a thickness weighted average over the three  
    251       !!             time levels which will be used to compute rdn and thus the semi- 
    252       !!             implicit hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    253231      !!              - swap tracer fields to prepare the next time_step. 
    254232      !!                This can be summurized for tempearture as: 
    255       !!             ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )   ln_dynhpg_imp = T 
    256       !!                  /( e3t_n    + rbcp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )    
    257       !!             ztm = 0                                                       otherwise 
    258       !!             tb  = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) 
    259       !!                  /( e3t_n    + atfp*[ e3t_b    - 2 e3t_n    + e3t_a    ] ) 
    260       !!             tn  = ta  
    261       !!             ta  = zt        (NB: reset to 0 after eos_bn2 call) 
    262233      !! 
    263234      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    264       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     235      !! 
    265236      !!---------------------------------------------------------------------- 
    266237      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index 
     
    276247 
    277248      !!      
    278       LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf   ! local logical 
     249      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical 
    279250      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    280251      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     
    289260      ! 
    290261      IF( cdtype == 'TRA' )  THEN    
    291          ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg 
    292262         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration 
    293263         ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs 
     
    298268         END IF 
    299269      ELSE                           
    300          ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    301270         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration 
    302271         ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs 
     
    356325                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
    357326                  ! 
    358                   IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only) 
    359                      ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d ) 
    360                      pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
    361                   ENDIF 
    362327               END DO 
    363328            END DO 
Note: See TracChangeset for help on using the changeset viewer.