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.
trctrp.F90 in branches/dev_001_GM/NEMO/TOP_SRC/TRP – NEMO

source: branches/dev_001_GM/NEMO/TOP_SRC/TRP/trctrp.F90 @ 771

Last change on this file since 771 was 771, checked in by gm, 16 years ago

dev_001_GM - small error corrections

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 7.4 KB
RevLine 
[186]1MODULE trctrp
2   !!======================================================================
3   !!                       ***  MODULE trctrp  ***
[202]4   !! Ocean Physics    : manage the passive tracer transport
[186]5   !!======================================================================
[771]6   !! History :   1.0  !  2004-03 (C. Ethe) Original code
7   !!----------------------------------------------------------------------
[186]8#if defined key_passivetrc
9   !!----------------------------------------------------------------------
[771]10   !!   'key_passivetrc'                                         TOP models
11   !!----------------------------------------------------------------------
[186]12   !!   trc_trp        : passive tracer transport
13   !!----------------------------------------------------------------------
[202]14   USE oce_trc         ! ocean dynamics and active tracers variables
15   USE trc             ! ocean passive tracers variables
[771]16   USE trctrp_lec      ! passive tracers transport parameters
[186]17
[202]18   USE trcbbl          ! bottom boundary layer               (trc_bbl routine)
19   USE trcdmp          ! internal damping                    (trc_dmp routine)
[186]20
[202]21   USE trcldf_bilapg   ! lateral mixing               (trc_ldf_bilapg routine)
22   USE trcldf_bilap    ! lateral mixing                (trc_ldf_bilap routine)
23   USE trcldf_iso      ! lateral mixing                  (trc_ldf_iso routine)
24   USE trcldf_iso_zps  ! lateral mixing              (trc_ldf_iso_zps routine)
25   USE trcldf_lap      ! lateral mixing                  (trc_ldf_lap routine)
[186]26 
[202]27   USE trcnxt          ! time-stepping                       (trc_nxt routine)
[334]28   USE trcrad          ! positivity                          (trc_rad routine)
[186]29
[202]30   USE trcadv_cen2     ! 2nd order centered advection   (trc_adv_cen2 routine)
31   USE trcadv_muscl    ! MUSCL advection               (trc_adv_muscl routine)
[186]32   USE trcadv_muscl2   ! MUSCL2 advection             (trc_adv_muscl2 routine)
[202]33   USE trcadv_tvd      ! TVD advection                   (trc_adv_tvd routine)
[186]34   USE trcadv_smolar   ! SMOLAR advection             (trc_adv_smolar routine)
35
[202]36   USE trczdf_exp      ! vertical diffusion              (trc_zdf_exp routine)
37   USE trczdf_imp      ! vertical diffusion              (trc_zdf_exp routine)
38   USE trczdf_iso      ! vertical diffusion              (trc_zdf_exp routine)
39   USE trczdf_iso_vopt ! vertical diffusion              (trc_zdf_exp routine)
40   USE trcsbc          ! surface boundary condition          (trc_sbc routine)
[186]41
[202]42   USE zpshde_trc      ! partial step: hor. derivative   (zps_hde_trc routine)
[186]43
44   IMPLICIT NONE
45   PRIVATE
46
[771]47   PUBLIC   trc_trp    ! called by trc_stp
[186]48
49   !! * Substitutions
50#  include "domzgr_substitute.h90"
51   !!----------------------------------------------------------------------
[771]52   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005)
53   !! $Id$
54   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
[186]55   !!----------------------------------------------------------------------
56
57CONTAINS
58
59   SUBROUTINE trc_trp( kt )
60      !!----------------------------------------------------------------------
61      !!                     ***  ROUTINE trc_trp  ***
62      !!                     
[771]63      !! ** Purpose :   Management of passive tracers transport
[186]64      !!
[771]65      !! ** Method  : - Compute the passive tracers trends
66      !!              - Update the passive tracers
[186]67      !!----------------------------------------------------------------------
68      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
69      !! ---------------------------------------------------------------------
70
[202]71                               CALL trc_sbc( kt )            ! surface boundary condition
72# if defined key_trcbbc
[771]73!!gm bug : this should be control during the initialisation phase, not here!
[501]74       CALL ctl_stop( '  Bottom heat flux not yet implemented with passive tracer         ' &
75           &          '  Check in trc_trp routine ' )
[202]76# endif 
77      !                                                      ! bottom boundary condition
[771]78      IF( lk_trcbbl_dif    )   CALL trc_bbl_dif( kt )            ! diffusive bottom boundary layer scheme
79      IF( lk_trcbbl_adv    )   CALL trc_bbl_adv( kt )            ! advective (and/or diffusive) bottom boundary layer scheme
[186]80
[202]81      IF( lk_trcdmp        )   CALL trc_dmp( kt )            ! internal damping trends
[261]82
[202]83      !                                                      ! horizontal & vertical advection
[771]84      IF( ln_trcadv_cen2   )   CALL trc_adv_cen2  ( kt )         ! 2nd order centered scheme
85      IF( ln_trcadv_muscl  )   CALL trc_adv_muscl ( kt )         ! MUSCL scheme
86      IF( ln_trcadv_muscl2 )   CALL trc_adv_muscl2( kt )         ! MUSCL2 scheme
87      IF( ln_trcadv_tvd    )   CALL trc_adv_tvd   ( kt )         ! TVD scheme
88      IF( ln_trcadv_smolar )   CALL trc_adv_smolar( kt )         ! SMOLARKIEWICZ scheme
[261]89
[186]90 
[501]91      IF( n_cla == 1   ) THEN
[771]92!!gm bug : this should be control during the initialisation phase, not here!
[501]93         WRITE(ctmp1,*) ' Cross Land Advection not yet implemented with passive tracer n_cla = ',n_cla
[771]94         CALL ctl_stop( ctmp1 )
[186]95      ENDIF
96
[202]97      !                                                      ! lateral mixing
[771]98      IF( l_trcldf_bilapg  )   CALL trc_ldf_bilapg ( kt )        ! s-coord. horizontal bilaplacian
99      IF( l_trcldf_bilap   )   CALL trc_ldf_bilap  ( kt )        ! iso-level bilaplacian
100      IF( l_trcldf_iso     )   CALL trc_ldf_iso    ( kt )        ! iso-neutral laplacian
101      IF( l_trcldf_iso_zps )   CALL trc_ldf_iso_zps( kt )        ! partial step iso-neutral laplacian
102      IF( l_trcldf_lap     )   CALL trc_ldf_lap    ( kt )        ! iso-level laplacian
[186]103 
[202]104      !                                                      ! vertical diffusion
[771]105      IF( l_trczdf_exp     )   CALL trc_zdf_exp     ( kt )       ! explicit time stepping (time splitting scheme)
106      IF( l_trczdf_imp     )   CALL trc_zdf_imp     ( kt )       ! implicit time stepping (euler backward)
107      IF( l_trczdf_iso     )   CALL trc_zdf_iso     ( kt )       ! isopycnal
108      IF( l_trczdf_iso_vo  )   CALL trc_zdf_iso_vopt( kt )       ! vector opt. isopycnal
[186]109
110                               CALL trc_nxt( kt )            ! tracer fields at next time step
111 
[771]112                               CALL trc_rad( kt )            ! Correct artificial negative concentrations
113      !                                                      ! especially useful when isopycnal mixing is used
[433]114      !                                                     
[186]115
[771]116      IF( ln_zps .AND. .NOT. lk_trccfg_1d )   &              ! Partial steps: now horizontal gradient of passive
117         &                     CALL zps_hde_trc( kt, trb, gtru, gtrv )       ! tracers at the bottom ocean level
118      !
119      IF(ln_ctl) THEN      ! print mean trends (used for debugging)
120         WRITE(charout, FMT="('TRP')")
121         CALL prt_ctl_trc_info( charout )
122         CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm )
123      ENDIF
124      !
125   END SUBROUTINE trc_trp
[186]126
127#else
128   !!----------------------------------------------------------------------
[771]129   !!   Dummy module :                                        No TOP models
[186]130   !!----------------------------------------------------------------------
131CONTAINS
[771]132   SUBROUTINE trc_trp( kt )              ! Empty routine
133      INTEGER, INTENT(in) ::   kt
[186]134      WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt
135   END SUBROUTINE trc_trp
136#endif
137   
138   !!======================================================================
139END MODULE trctrp
Note: See TracBrowser for help on using the repository browser.