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 2392 for branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90 – NEMO

Ignore:
Timestamp:
2010-11-15T22:20:05+01:00 (13 years ago)
Author:
gm
Message:

v3.3beta: Cross Land Advection (ticket #127) full rewriting + MPP bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90

    r2287 r2392  
    2121   USE traadv_qck      ! QUICKEST scheme           (tra_adv_qck    routine) 
    2222   USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine) 
     23   USE cla             ! cross land advection      (cla_traadv     routine) 
    2324   USE ldftra_oce      ! lateral diffusion coefficient on tracers 
    2425   USE in_out_manager  ! I/O manager 
     
    2930   PRIVATE 
    3031 
    31    PUBLIC   tra_adv         ! routine called by step module 
    32    PUBLIC   tra_adv_init    ! routine called by opa module 
     32   PUBLIC   tra_adv        ! routine called by step module 
     33   PUBLIC   tra_adv_init   ! routine called by opa module 
    3334  
    34    !                                                   !!* Namelist namtra_adv * 
    35    LOGICAL ::   ln_traadv_cen2   = .TRUE.       ! 2nd order centered scheme flag 
    36    LOGICAL ::   ln_traadv_tvd    = .FALSE.      ! TVD scheme flag 
    37    LOGICAL ::   ln_traadv_muscl  = .FALSE.      ! MUSCL scheme flag 
    38    LOGICAL ::   ln_traadv_muscl2 = .FALSE.      ! MUSCL2 scheme flag 
    39    LOGICAL ::   ln_traadv_ubs    = .FALSE.      ! UBS scheme flag 
    40    LOGICAL ::   ln_traadv_qck    = .FALSE.      ! QUICKEST scheme flag 
     35   !                                        !!* Namelist namtra_adv * 
     36   LOGICAL ::   ln_traadv_cen2   = .TRUE.    ! 2nd order centered scheme flag 
     37   LOGICAL ::   ln_traadv_tvd    = .FALSE.   ! TVD scheme flag 
     38   LOGICAL ::   ln_traadv_muscl  = .FALSE.   ! MUSCL scheme flag 
     39   LOGICAL ::   ln_traadv_muscl2 = .FALSE.   ! MUSCL2 scheme flag 
     40   LOGICAL ::   ln_traadv_ubs    = .FALSE.   ! UBS scheme flag 
     41   LOGICAL ::   ln_traadv_qck    = .FALSE.   ! QUICKEST scheme flag 
    4142 
    4243   INTEGER ::   nadv   ! choice of the type of advection scheme 
    4344 
    44    REAL(wp), DIMENSION(jpk) ::   r2dt  ! vertical profile time-step, = 2 rdttra 
    45       !                                ! except at nit000 (=rdttra) if neuler=0 
     45   REAL(wp), DIMENSION(jpk) ::   r2dt   ! vertical profile time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0 
    4646 
    4747   !! * Substitutions 
     
    5151   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    5252   !! $Id$ 
    53    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     53   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    5454   !!---------------------------------------------------------------------- 
    55  
    5655CONTAINS 
    5756 
     
    6564      !!---------------------------------------------------------------------- 
    6665      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    67       !! 
     66      ! 
    6867      INTEGER ::   jk   ! dummy loop index 
    6968      REAL(wp), DIMENSION(jpi,jpj,jpk)   ::  zun, zvn, zwn   ! 3D workspace: effective transport 
     
    7574         r2dt(:) = 2. * rdttra(:)                      ! = 2 rdttra (leapfrog) 
    7675      ENDIF 
     76      ! 
     77      IF( nn_cla == 1 )   CALL cla_traadv( kt )       !==  Cross Land Advection  ==! (hor. advection) 
     78      ! 
    7779      !                                               !==  effective transport  ==! 
    7880      DO jk = 1, jpkm1 
     
    8486      ! 
    8587      IF( lk_traldf_eiv .AND. .NOT. ln_traldf_grif )   & 
    86          &                  CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRA' )      ! add the eiv transport (if necessary) 
     88         &              CALL tra_adv_eiv( kt, zun, zvn, zwn, 'TRA' )          ! add the eiv transport (if necessary) 
    8789      ! 
    8890      CALL iom_put( "uoce_eff", zun )                                         ! output effective transport       
     
    9799      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  UBS  
    98100      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  QUICKEST  
    99  
    100101      ! 
    101102      CASE (-1 )                                      !==  esopa: test all possibility with control print  ==! 
     
    118119         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv6 - Ta: ', mask1=tmask,               & 
    119120            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    120          ! 
    121121      END SELECT 
    122  
     122      ! 
    123123      !                                              ! print mean trends (used for debugging) 
    124124      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv  - Ta: ', mask1=tmask,               & 
     
    137137      INTEGER ::   ioptio 
    138138      !! 
    139       NAMELIST/namtra_adv/ ln_traadv_cen2 , ln_traadv_tvd,    & 
    140          &                 ln_traadv_muscl, ln_traadv_muscl2, & 
     139      NAMELIST/namtra_adv/ ln_traadv_cen2 , ln_traadv_tvd,     & 
     140         &                 ln_traadv_muscl, ln_traadv_muscl2,  & 
    141141         &                 ln_traadv_ubs  , ln_traadv_qck 
    142142      !!---------------------------------------------------------------------- 
     
    156156         WRITE(numout,*) '      UBS    advection scheme        ln_traadv_ubs    = ', ln_traadv_ubs 
    157157         WRITE(numout,*) '      QUICKEST advection scheme      ln_traadv_qck    = ', ln_traadv_qck 
    158     ENDIF 
     158      ENDIF 
    159159 
    160160      ioptio = 0                      ! Parameter control 
     
    168168 
    169169      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE advection scheme in namelist namtra_adv' ) 
    170  
    171       IF( n_cla == 1 .AND. .NOT. ln_traadv_cen2 )   & 
    172          &                CALL ctl_stop( 'cross-land advection only with 2nd order advection scheme' ) 
    173170 
    174171      !                              ! Set nadv 
Note: See TracChangeset for help on using the changeset viewer.