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.
trcsbc.F90 in trunk/NEMO/TOP_SRC/TRP – NEMO

source: trunk/NEMO/TOP_SRC/TRP/trcsbc.F90 @ 202

Last change on this file since 202 was 202, checked in by opalod, 19 years ago

CT : UPDATE142 : Check the consistency between passive tracers transport modules (in TRP directory) and those used for the active tracers

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
1MODULE trcsbc
2   !!==============================================================================
3   !!                       ***  MODULE  trcsbc  ***
4   !! Ocean passive tracers:  surface boundary condition
5   !!==============================================================================
6#if defined key_passivetrc
7   !!----------------------------------------------------------------------
8   !!   trc_sbc      : update the tracer trend at ocean surface
9   !!----------------------------------------------------------------------
10   !! * Modules used
11   USE oce_trc             ! ocean dynamics and active tracers variables
12   USE trc                 ! ocean  passive tracers variables
13
14   IMPLICIT NONE
15   PRIVATE
16
17   !! * Routine accessibility
18   PUBLIC trc_sbc              ! routine called by step.F90
19
20   !! * Substitutions
21#  include "passivetrc_substitute.h90"
22   !!----------------------------------------------------------------------
23   !!   OPA 9.0 , LODYC-IPSL (2003)
24   !!----------------------------------------------------------------------
25
26CONTAINS
27
28   SUBROUTINE trc_sbc ( kt )
29      !!----------------------------------------------------------------------
30      !!                  ***  ROUTINE trc_sbc  ***
31      !!                   
32      !! ** Purpose :   Compute the tracer surface boundary condition trend of
33      !!      (concentration/dilution effect) and add it to the general
34      !!       trend of tracer equations.
35      !!
36      !! ** Method :
37      !!      * concentration/dilution effect:
38      !!            The surface freshwater flux modify the ocean volume
39      !!         and thus the concentration of a tracer as :
40      !!            tra = tra + emp * trn / e3t   for k=1
41      !!         where emp, the surface freshwater budget (evaporation minus
42      !!         precipitation minus runoff) given in kg/m2/s is divided
43      !!         by 1000 kg/m3 (density of plain water) to obtain m/s.
44      !!
45      !! ** Action  : - Update the 1st level of tra with the trend associated
46      !!                with the tracer surface boundary condition
47      !!
48      !! History :
49      !!   8.2  !  98-10  (G. Madec, G. Roullet, M. Imbard)  Original code
50      !!   8.2  !  01-02  (D. Ludicone)  sea ice and free surface
51      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module
52      !!   9.0  !  04-03  (C. Ethe)  adapted for passive tracers
53      !!----------------------------------------------------------------------
54      !! * Arguments
55      INTEGER, INTENT( in ) ::   kt          ! ocean time-step index
56
57      !! * Local declarations
58      INTEGER  ::   ji, jj, jn           ! dummy loop indices
59      REAL(wp) ::   ztra, zsrau, zse3t   ! temporary scalars
60      !!----------------------------------------------------------------------
61
62      IF( kt == nittrc000 ) THEN
63         IF(lwp) WRITE(numout,*)
64         IF(lwp) WRITE(numout,*) 'trc_sbc : Passive tracers surface boundary condition'
65         IF(lwp) WRITE(numout,*) '~~~~~~~ '
66      ENDIF
67
68      ! 0. initialization
69      zsrau = 1. / rauw
70#if ! defined key_s_coord
71      zse3t = 1. / fse3t(1,1,1)
72#endif
73
74      DO jn = 1, jptra
75         ! 1. Concentration dillution effect on tra
76         DO jj = 2, jpj
77            DO ji = fs_2, fs_jpim1   ! vector opt.
78#if defined key_s_coord
79               zse3t = 1. / fse3t(ji,jj,1)
80#endif
81               ! concent./dilut. effect
82               ztra = emps(ji,jj) * zsrau * trn(ji,jj,1,jn) * zse3t * tmask(ji,jj,1)
83               
84               ! add the trend to the general tracer trend
85               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ztra
86            END DO
87         END DO
88         
89         IF(l_ctl) THEN         ! print mean trends (used for debugging)
90            ztra = SUM( tra(2:nictl,2:njctl,1:jpkm1,jn) * tmask(2:nictl,2:njctl,1:jpkm1) )
91            WRITE(numout,*) ' trc/sbc  - ',ctrcnm(jn),' : ', ztra-tra_ctl(jn)
92            tra_ctl(jn) = ztra 
93         ENDIF
94      END DO
95
96   END SUBROUTINE trc_sbc
97
98#else
99   !!----------------------------------------------------------------------
100   !!   Dummy module :                      NO passive tracer
101   !!----------------------------------------------------------------------
102CONTAINS
103   SUBROUTINE trc_sbc (kt)              ! Empty routine
104      INTEGER, INTENT(in) :: kt
105      WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt
106   END SUBROUTINE trc_sbc
107#endif
108   
109   !!======================================================================
110END MODULE trcsbc
Note: See TracBrowser for help on using the repository browser.