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 5766 for branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90 – NEMO

Ignore:
Timestamp:
2015-09-28T16:42:34+02:00 (9 years ago)
Author:
cetlod
Message:

LDF: phasing the improvements/simplifications of TOP component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r5758 r5766  
    1212   !!---------------------------------------------------------------------- 
    1313   !!   trc_adv      : compute ocean tracer advection trend 
    14    !!   trc_adv_ctl  : control the different options of advection scheme 
     14   !!   trc_adv_ini  : control the different options of advection scheme 
    1515   !!---------------------------------------------------------------------- 
    1616   USE oce_trc         ! ocean dynamics and active tracers 
    1717   USE trc             ! ocean passive tracers variables 
    18    USE trcnam_trp      ! passive tracers transport namelist variables 
    1918   USE traadv_cen2     ! 2nd order centered scheme (tra_adv_cen2   routine) 
    2019   USE traadv_tvd      ! TVD      scheme           (tra_adv_tvd    routine) 
     
    2322   USE traadv_ubs      ! UBS      scheme           (tra_adv_ubs    routine) 
    2423   USE traadv_qck      ! QUICKEST scheme           (tra_adv_qck    routine) 
    25    USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine) 
    2624   USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine) 
    2725   USE ldftra          ! lateral diffusion coefficient on tracers 
     
    3129   PRIVATE 
    3230 
    33    PUBLIC   trc_adv          ! routine called by step module 
    34    PUBLIC   trc_adv_alloc    ! routine called by nemogcm module 
     31   PUBLIC   trc_adv        
     32   PUBLIC   trc_adv_alloc  
     33   PUBLIC   trc_adv_ini   
     34 
     35   !                                        !!: ** Advection (namtrc_adv) ** 
     36   LOGICAL , PUBLIC ::   ln_trcadv_cen2      ! 2nd order centered scheme flag 
     37   LOGICAL , PUBLIC ::   ln_trcadv_tvd       ! TVD scheme flag 
     38   LOGICAL , PUBLIC ::   ln_trcadv_muscl     ! MUSCL scheme flag 
     39   LOGICAL , PUBLIC ::   ln_trcadv_muscl2    ! MUSCL2 scheme flag 
     40   LOGICAL , PUBLIC ::   ln_trcadv_ubs       ! UBS scheme flag 
     41   LOGICAL , PUBLIC ::   ln_trcadv_qck       ! QUICKEST scheme flag 
     42   LOGICAL , PUBLIC ::   ln_trcadv_msc_ups   ! use upstream scheme within muscl 
    3543 
    3644   INTEGER ::   nadv   ! choice of the type of advection scheme 
     
    7987      CALL wrk_alloc( jpi,jpj,jpk,   zun, zvn, zwn ) 
    8088      ! 
    81  
    82       IF( kt == nittrc000 )   CALL trc_adv_ctl          ! initialisation & control of options 
    83  
    8489      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    8590         r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     
    131136 
    132137 
    133    SUBROUTINE trc_adv_ctl 
     138   SUBROUTINE trc_adv_ini 
    134139      !!--------------------------------------------------------------------- 
    135       !!                  ***  ROUTINE trc_adv_ctl  *** 
     140      !!                  ***  ROUTINE trc_adv_ini  *** 
    136141      !!                 
    137142      !! ** Purpose : Control the consistency between namelist options for  
     
    139144      !!---------------------------------------------------------------------- 
    140145      INTEGER ::   ioptio 
    141       !!---------------------------------------------------------------------- 
    142       ! 
     146      INTEGER ::  ios                 ! Local integer output status for namelist read 
     147      !! 
     148      NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd   ,    & 
     149         &                 ln_trcadv_muscl, ln_trcadv_muscl2,    & 
     150         &                 ln_trcadv_ubs  , ln_trcadv_qck, ln_trcadv_msc_ups 
     151      !!---------------------------------------------------------------------- 
     152      ! 
     153      REWIND( numnat_ref )              !  namtrc_adv in reference namelist  
     154      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 
     155901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp ) 
     156 
     157      REWIND( numnat_cfg )              ! namtrc_adv in configuration namelist 
     158      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 
     159902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp ) 
     160      IF(lwm) WRITE ( numont, namtrc_adv ) 
     161 
     162      IF(lwp) THEN                    ! Namelist print 
     163         WRITE(numout,*) 
     164         WRITE(numout,*) 'trc_adv_ini : choice/control of the tracer advection scheme' 
     165         WRITE(numout,*) '~~~~~~~~~~~' 
     166         WRITE(numout,*) '   Namelist namtrc_adv : chose a advection scheme for tracers' 
     167         WRITE(numout,*) '      2nd order advection scheme     ln_trcadv_cen2   = ', ln_trcadv_cen2 
     168         WRITE(numout,*) '      TVD advection scheme           ln_trcadv_tvd    = ', ln_trcadv_tvd 
     169         WRITE(numout,*) '      MUSCL  advection scheme        ln_trcadv_muscl  = ', ln_trcadv_muscl 
     170         WRITE(numout,*) '      MUSCL2 advection scheme        ln_trcadv_muscl2 = ', ln_trcadv_muscl2 
     171         WRITE(numout,*) '      UBS    advection scheme        ln_trcadv_ubs    = ', ln_trcadv_ubs 
     172         WRITE(numout,*) '      QUICKEST advection scheme      ln_trcadv_qck    = ', ln_trcadv_qck 
     173      ENDIF 
     174      ! 
     175 
    143176      ioptio = 0                      ! Parameter control 
    144177      IF( ln_trcadv_cen2   )   ioptio = ioptio + 1 
     
    169202      ENDIF 
    170203      ! 
    171    END SUBROUTINE trc_adv_ctl 
     204   END SUBROUTINE trc_adv_ini 
    172205    
    173206#else 
Note: See TracChangeset for help on using the changeset viewer.