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.
ticket/0664_TRA_TRP (diff) – NEMO

Changes between Version 15 and Version 16 of ticket/0664_TRA_TRP


Ignore:
Timestamp:
2010-09-17T15:09:42+02:00 (13 years ago)
Author:
cetlod
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ticket/0664_TRA_TRP

    v15 v16  
    2828   in advection module (traadv...) : both the 4D tracer and transport components (e2u*e3u*u,...) are given through input argument.  
    2929 
    30    for example, for CEN2 advection the routine start as follows: 
    31 {{{ 
    32    SUBROUTINE tra_adv_cen2( kt, cdtype, pun, pvn, pwn, ptrab, ptran, ptraa, kjpt ) 
     30   for example, for TVD advection the routine start as follows: 
     31{{{ 
     32   SUBROUTINE tra_adv_tvd ( kt, cdtype, p2dt, pun, pvn, pwn,   & 
     33      &                                       ptb, ptn, pta, kjpt   ) 
    3334      !!---------------------------------------------------------------------- 
    3435      !!                  ***  ROUTINE tra_adv_cen2  *** 
     
    4142      CHARACTER(len=3), INTENT(in   )                               ::   cdtype          ! =TRA or TRC (tracer indicator) 
    4243      INTEGER         , INTENT(in   )                               ::   kjpt            ! number of tracers 
     44      REAL(wp)        , INTENT(in   ), DIMENSION(        jpk     )  ::   p2dt            ! vertical profile of tracer time-step 
    4345      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,jpk     )  ::   pun, pvn, pwn   ! 3 ocean transport components 
    4446      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,jpk,kjpt)  ::   ptrab, ptran    ! before and now tracer fields 
     
    5052'''(2)''' Test for T & S 3D arrays  [[BR]][[BR]] 
    5153 
    52    In order to test the new tra... modules without changing the temperature and salinity field every where in the code, we replace T and S 3D arrays by 4D array just within the TRA modules in the call of the new routine. For example, in the step rotuin 
     54   In order to test the new tra... modules without changing the temperature and salinity field every where in the code, we replace T and S 3D arrays by 4D array just within the TRA modules in the call of the new routine. For example, in the step routine 
    5355 
    5456{{{ 
    5557   SUBROUTINE stp( kstp ) 
    5658      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index 
     59 
     60      !+++ Initialisation phase  
     61 
     62      CALL tra_swap  
     63 
     64      !++++ 
    5765 
    5866       bla bla bla bla bla bla 
     
    6270      ! Active tracers                              (ua, va used as workspace) 
    6371      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    64                              ta(:,:,:) = 0.e0               ! set tracer trends to zero 
    65                              sa(:,:,:) = 0.e0 
    66  
    67                              CALL tra_swap 
     72 
     73                             tsa(:,:,:,:) = 0.e0               ! set tracer trends to zero 
     74 
    6875                             CALL tra_sbc    ( kstp )       ! surface boundary condition 
    6976      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr 
     
    8592         IF( ln_zdfnpc   )   CALL tra_npc    ( kstp )            ! update after fields by non-penetrative convection 
    8693                             CALL tra_nxt    ( kstp )            ! tracer fields at next time step 
    87                              CALL tra_unswap 
    88                              CALL eos( ta, sa, rhd, rhop )       ! Time-filtered in situ density for hpg computation 
    89          IF( ln_zps      )   CALL zps_hde( kstp, ta, sa, rhd,   &   ! Partial steps: time filtered hor. derivative 
    90             &                                   gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level 
    91             &                                   gtv, gsv, grv ) 
     94                             CALL eos( tsa, rhd, rhop )       ! Time-filtered in situ density for hpg computation 
     95         IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsa, gtsu, gtsv,  &    ! zps: time filtered hor. derivative 
     96            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    9297 
    9398      ELSE                                                  ! centered hpg  (eos then time stepping) 
    94                              CALL tra_unswap 
    95                              CALL eos( tn, sn, rhd, rhop )       ! now in situ density for hpg computation 
    96          IF( ln_zps      )   CALL zps_hde( kstp, tn, sn, rhd,   &   ! Partial steps: now horizontal derivative 
    97             &                                   gtu, gsu, gru,  &   ! of t, s, rd at the bottom ocean level 
    98             &                                   gtv, gsv, grv ) 
    99                              CALL tra_swap 
     99                             CALL eos( tsn, rhd, rhop )       ! now in situ density for hpg computation 
     100         IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &    ! zps: now hor. derivative 
     101            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
    100102         IF( ln_zdfnpc   )   CALL tra_npc    ( kstp )       ! update after fields by non-penetrative convection 
    101103                             CALL tra_nxt    ( kstp )       ! tracer fields at next time step 
     104      ENDIF 
    102105                             CALL tra_unswap 
    103       ENDIF 
     106 
    104107 
    105108       bla bla bla bla bla bla 
     
    188191      !                                                   ! add the eiv transport (if necessary) 
    189192      IF( lk_traldf_eiv )   CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRA' ) 
    190  
    191       CALL tra_adv_cen2( kt, 'TRA', zun, zvn, zwn, tsb, tsn, tsa, jpts )    ! 2nd order centered 
     193      CALL tra_adv_tvd( kt, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD  
     194 
    192195}}} 
    193196 
     
    229232      IF( lk_traldf_eiv )   CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRC' ) 
    230233 
    231       CALL tra_adv_cen2( kt, 'TRC', zun, zvn, zwn, trb, trn, tra, jptra )    ! 2nd order centered 
     234      CALL tra_adv_tvd( kt, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )    ! 2nd order centered 
    232235}}} 
    233236 
     
    236239 
    237240'''(4)''' Final step : replace T and S 3D arrays by 4D arrays TS throughout the code  [[BR]][[BR]] 
     241 - This action is only depends now on the replacement of these 3D by 4D arrays in OBC, BDY and AGRIF  
    238242 
    239243'''Additional Tasks'''[[BR]] 
    240244[[BR]] 
    241245 - TRENDS : As a starting point, both active & passive tracers trends modules ( trdmld.F90 & trdmld_trc.F90 ) will be encapsulate in one module 
    242  
     246 - Re-organisation of the initialisation phase : The initialisation phase of each physical processes which was done in the associated module is now moved in opa_init 
     247 - Re-organisation of OFFLINE component : The Offline part (OFF_SRC) of the code is now used the same routines of the online (OPA_SRC) + some additional 
     248 - Open boundaries conditions ( OBC and BDY ) are not merged and still not available for passive tracers 
     249  
    243250=== Testing === 
    244251Testing could consider (where appropriate) other configurations in addition to NVTK].