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 @ 247

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

CL : Add CVS Header and CeCILL licence information

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