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 6041 for branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2015-12-14T10:06:06+01:00 (8 years ago)
Author:
timgraham
Message:

Merged head of trunk into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r5656 r6041  
    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  
    3735   USE traqsr          ! penetrative solar radiation (needed for nksr) 
    3836   USE phycst          ! physical constant 
    39    USE ldftra_oce      ! lateral physics on tracers 
     37   USE ldftra          ! lateral physics on tracers 
     38   USE ldfslp 
    4039   USE bdy_oce         ! BDY open boundary condition variables 
    4140   USE bdytra          ! open boundary condition (bdy_tra routine) 
     
    5756   PUBLIC   tra_nxt_vvl   ! to be used in trcnxt 
    5857 
    59    REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg 
    6058 
    6159   !! * Substitutions 
     
    8987      !! 
    9088      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    91       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     89      !! 
    9290      !!---------------------------------------------------------------------- 
    9391      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
     
    104102         IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' 
    105103         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    106          ! 
    107          rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg 
    108104      ENDIF 
    109105 
    110106      ! Update after tracer on domain lateral boundaries 
    111107      !  
     108      ! 
    112109#if defined key_agrif 
    113110      CALL Agrif_tra                     ! AGRIF zoom boundaries 
     
    180177      !!  
    181178      !! ** Method  : - Apply a Asselin time filter on now fields. 
    182       !!              - save in (ta,sa) an average over the three time levels  
    183       !!             which will be used to compute rdn and thus the semi-implicit 
    184       !!             hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    185179      !!              - swap tracer fields to prepare the next time_step. 
    186       !!                This can be summurized for tempearture as: 
    187       !!             ztm = tn + rbcp * [ta -2 tn + tb ]       ln_dynhpg_imp = T 
    188       !!             ztm = 0                                   otherwise 
    189       !!                   with rbcp=1/4 * (1-atfp^4) / (1-atfp) 
    190       !!             tb  = tn + atfp*[ tb - 2 tn + ta ] 
    191       !!             tn  = ta   
    192       !!             ta  = ztm       (NB: reset to 0 after eos_bn2 call) 
    193180      !! 
    194181      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    195       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     182      !!               
    196183      !!---------------------------------------------------------------------- 
    197184      INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index 
     
    204191      ! 
    205192      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
    206       LOGICAL  ::   ll_tra_hpg       ! local logical 
    207193      REAL(wp) ::   ztn, ztd         ! local scalars 
    208194      !!---------------------------------------------------------------------- 
     
    214200      ENDIF 
    215201      ! 
    216       IF( cdtype == 'TRA' )  THEN   ;   ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg     
    217       ELSE                          ;   ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    218       ENDIF 
    219202      ! 
    220203      DO jn = 1, kjpt 
     
    229212                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                       ! ptn <-- pta 
    230213                  ! 
    231                   IF( ll_tra_hpg )   pta(ji,jj,jk,jn) = ztn + rbcp * ztd    ! pta <-- Brown & Campana average 
    232214               END DO 
    233215           END DO 
     
    247229      !!  
    248230      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields. 
    249       !!              - save in (ta,sa) a thickness weighted average over the three  
    250       !!             time levels which will be used to compute rdn and thus the semi- 
    251       !!             implicit hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    252231      !!              - swap tracer fields to prepare the next time_step. 
    253232      !!                This can be summurized for tempearture as: 
    254       !!             ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )   ln_dynhpg_imp = T 
    255       !!                  /( e3t_n    + rbcp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )    
    256       !!             ztm = 0                                                       otherwise 
    257       !!             tb  = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) 
    258       !!                  /( e3t_n    + atfp*[ e3t_b    - 2 e3t_n    + e3t_a    ] ) 
    259       !!             tn  = ta  
    260       !!             ta  = zt        (NB: reset to 0 after eos_bn2 call) 
    261233      !! 
    262234      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    263       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     235      !! 
    264236      !!---------------------------------------------------------------------- 
    265237      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index 
     
    275247 
    276248      !!      
    277       LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf   ! local logical 
     249      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical 
    278250      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    279251      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     
    288260      ! 
    289261      IF( cdtype == 'TRA' )  THEN    
    290          ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg 
    291262         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration 
    292263         ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs 
     
    297268         END IF 
    298269      ELSE                           
    299          ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    300270         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration 
    301271         ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs 
     
    355325                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
    356326                  ! 
    357                   IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only) 
    358                      ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d ) 
    359                      pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
    360                   ENDIF 
    361327               END DO 
    362328            END DO 
Note: See TracChangeset for help on using the changeset viewer.