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.
trabbc_tam.F90 in branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/TRA – NEMO

source: branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/TRA/trabbc_tam.F90 @ 1885

Last change on this file since 1885 was 1885, checked in by rblod, 14 years ago

add TAM sources

File size: 5.8 KB
Line 
1MODULE trabbc_tam
2#ifdef key_tam
3   !!==============================================================================
4   !!                       ***  MODULE  trabbc_tam  ***
5   !! Ocean active tracers:  bottom boundary condition.
6   !!                        Tangent and Adjoint Module
7   !!==============================================================================
8   !! History of the direct module:
9   !!            8.1  ! 99-10 (G. Madec)  original code
10   !!            8.5  ! 02-08 (G. Madec)  free form + modules
11   !!            8.5  ! 02-11 (A. Bozec)  tra_bbc_init: original code
12   !! History of the TAM:
13   !!                 ! 08-05 (A. Vidard) Skeleton
14   !!----------------------------------------------------------------------
15#if   defined key_trabbc 
16   !!----------------------------------------------------------------------
17   !!   'key_trabbc'                                  geothermal heat flux
18   !!----------------------------------------------------------------------
19   !!   tra_bbc      : update the tracer trend at ocean bottom
20   !!   tra_bbc_init : initialization of geothermal heat flux trend
21   !!----------------------------------------------------------------------
22   !! * Modules used
23   USE in_out_manager, ONLY: &  ! I/O manager
24      & lwp,                 &
25      & wp
26   USE trabbc        , ONLY: &  ! bottom boundary condition
27      & lk_trabbc
28   USE tstool_tam    , ONLY: &
29      & prntst_adj
30
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC tra_bbc_tan          ! routine called by step_tam.F90
35   PUBLIC tra_bbc_adj          ! routine called by step_tam.F90
36   PUBLIC tra_bbc_adj_tst      ! routine called by tst.F90
37
38CONTAINS
39
40   SUBROUTINE tra_bbc_tan( kt )
41      !!----------------------------------------------------------------------
42      !!                  ***  ROUTINE tra_bbc_tan  ***
43      !!
44      !! ** Purpose of the direct routine:
45      !!      Compute the bottom boundary contition on temperature
46      !!      associated with geothermal heating and add it to the general
47      !!      trend of temperature equations.
48      !!
49      !! ** Method  :   The geothermal heat flux set to its constant value of
50      !!       86.4 mW/m2 (Stein and Stein 1992, Huang 1999).
51      !!       The temperature trend associated to this heat flux through the
52      !!       ocean bottom can be computed once and is added to the temperature
53      !!       trend juste above the bottom at each time step:
54      !!            ta = ta + Qsf / (rau0 rcp e3T) for k= mbathy -1
55      !!       Where Qsf is the geothermal heat flux.
56      !!
57      !! ** Action  : - update the temperature trends (ta) with the trend of
58      !!                the ocean bottom boundary condition
59      !!
60      !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129.
61      !!----------------------------------------------------------------------
62      !!
63      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
64      !!----------------------------------------------------------------------
65      ! .... nothing to do
66      !
67   END SUBROUTINE tra_bbc_tan
68   SUBROUTINE tra_bbc_adj( kt )
69      !!----------------------------------------------------------------------
70      !!                  ***  ROUTINE tra_bbc_adj  ***
71      !!
72      !! ** Purpose of the direct routine:
73      !!      Compute the bottom boundary contition on temperature
74      !!      associated with geothermal heating and add it to the general
75      !!      trend of temperature equations.
76      !!
77      !! ** Method  :   The geothermal heat flux set to its constant value of
78      !!       86.4 mW/m2 (Stein and Stein 1992, Huang 1999).
79      !!       The temperature trend associated to this heat flux through the
80      !!       ocean bottom can be computed once and is added to the temperature
81      !!       trend juste above the bottom at each time step:
82      !!            ta = ta + Qsf / (rau0 rcp e3T) for k= mbathy -1
83      !!       Where Qsf is the geothermal heat flux.
84      !!
85      !! ** Action  : - update the temperature trends (ta) with the trend of
86      !!                the ocean bottom boundary condition
87      !!
88      !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129.
89      !!----------------------------------------------------------------------
90      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
91      !!----------------------------------------------------------------------
92      ! .... nothing to do
93      !!
94   END SUBROUTINE tra_bbc_adj
95   SUBROUTINE tra_bbc_adj_tst( kumadt )           ! Dummy routine
96      INTEGER, INTENT( in ) ::   kumadt
97      REAL(KIND=wp) ::     &
98         & zsp1,           & ! scalar product involving the tangent routine
99         & zsp2              ! scalar product involving the adjoint routine
100      CHARACTER(LEN=14) :: &
101         & cl_name
102         
103      zsp1 = 0.0_wp
104     
105      zsp2 = 0.0_wp
106
107      ! 14 char:'12345678901234'
108      cl_name = 'tra_bbc_adj   '
109      CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
110     
111   END SUBROUTINE tra_bbc_adj_tst
112#else
113   !!----------------------------------------------------------------------
114   !!   Default option                                         Empty module
115   !!----------------------------------------------------------------------
116CONTAINS
117   SUBROUTINE tra_bbc_tan( kt )           ! Empty routine
118      WRITE(*,*) 'tra_bbc_tan: You should not have seen this print! error?', kt
119   END SUBROUTINE tra_bbc_tan
120   SUBROUTINE tra_bbc_adj( kt )           ! Empty routine
121      WRITE(*,*) 'tra_bbc_adj: You should not have seen this print! error?', kt
122   END SUBROUTINE tra_bbc_adj
123   SUBROUTINE tra_bbc_adj_tst( kt )           ! Empty routine
124      WRITE(*,*) 'tra_bbc_adj_tst: You should not have seen this print! error?', kt
125   END SUBROUTINE tra_bbc_adj_tst
126#endif
127
128   !!======================================================================
129#endif
130END MODULE trabbc_tam
Note: See TracBrowser for help on using the repository browser.