MODULE trabbc_tam #ifdef key_tam !!============================================================================== !! *** MODULE trabbc_tam *** !! Ocean active tracers: bottom boundary condition. !! Tangent and Adjoint Module !!============================================================================== !! History of the direct module: !! 8.1 ! 99-10 (G. Madec) original code !! 8.5 ! 02-08 (G. Madec) free form + modules !! 8.5 ! 02-11 (A. Bozec) tra_bbc_init: original code !! History of the TAM: !! ! 08-05 (A. Vidard) Skeleton !!---------------------------------------------------------------------- #if defined key_trabbc !!---------------------------------------------------------------------- !! 'key_trabbc' geothermal heat flux !!---------------------------------------------------------------------- !! tra_bbc : update the tracer trend at ocean bottom !! tra_bbc_init : initialization of geothermal heat flux trend !!---------------------------------------------------------------------- !! * Modules used USE in_out_manager, ONLY: & ! I/O manager & lwp, & & wp USE trabbc , ONLY: & ! bottom boundary condition & lk_trabbc USE tstool_tam , ONLY: & & prntst_adj IMPLICIT NONE PRIVATE PUBLIC tra_bbc_tan ! routine called by step_tam.F90 PUBLIC tra_bbc_adj ! routine called by step_tam.F90 PUBLIC tra_bbc_adj_tst ! routine called by tst.F90 CONTAINS SUBROUTINE tra_bbc_tan( kt ) !!---------------------------------------------------------------------- !! *** ROUTINE tra_bbc_tan *** !! !! ** Purpose of the direct routine: !! Compute the bottom boundary contition on temperature !! associated with geothermal heating and add it to the general !! trend of temperature equations. !! !! ** Method : The geothermal heat flux set to its constant value of !! 86.4 mW/m2 (Stein and Stein 1992, Huang 1999). !! The temperature trend associated to this heat flux through the !! ocean bottom can be computed once and is added to the temperature !! trend juste above the bottom at each time step: !! ta = ta + Qsf / (rau0 rcp e3T) for k= mbathy -1 !! Where Qsf is the geothermal heat flux. !! !! ** Action : - update the temperature trends (ta) with the trend of !! the ocean bottom boundary condition !! !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. !!---------------------------------------------------------------------- !! INTEGER, INTENT( in ) :: kt ! ocean time-step index !!---------------------------------------------------------------------- ! .... nothing to do ! END SUBROUTINE tra_bbc_tan SUBROUTINE tra_bbc_adj( kt ) !!---------------------------------------------------------------------- !! *** ROUTINE tra_bbc_adj *** !! !! ** Purpose of the direct routine: !! Compute the bottom boundary contition on temperature !! associated with geothermal heating and add it to the general !! trend of temperature equations. !! !! ** Method : The geothermal heat flux set to its constant value of !! 86.4 mW/m2 (Stein and Stein 1992, Huang 1999). !! The temperature trend associated to this heat flux through the !! ocean bottom can be computed once and is added to the temperature !! trend juste above the bottom at each time step: !! ta = ta + Qsf / (rau0 rcp e3T) for k= mbathy -1 !! Where Qsf is the geothermal heat flux. !! !! ** Action : - update the temperature trends (ta) with the trend of !! the ocean bottom boundary condition !! !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. !!---------------------------------------------------------------------- INTEGER, INTENT( in ) :: kt ! ocean time-step index !!---------------------------------------------------------------------- ! .... nothing to do !! END SUBROUTINE tra_bbc_adj SUBROUTINE tra_bbc_adj_tst( kumadt ) ! Dummy routine INTEGER, INTENT( in ) :: kumadt REAL(KIND=wp) :: & & zsp1, & ! scalar product involving the tangent routine & zsp2 ! scalar product involving the adjoint routine CHARACTER(LEN=14) :: & & cl_name zsp1 = 0.0_wp zsp2 = 0.0_wp ! 14 char:'12345678901234' cl_name = 'tra_bbc_adj ' CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 ) END SUBROUTINE tra_bbc_adj_tst #else !!---------------------------------------------------------------------- !! Default option Empty module !!---------------------------------------------------------------------- CONTAINS SUBROUTINE tra_bbc_tan( kt ) ! Empty routine WRITE(*,*) 'tra_bbc_tan: You should not have seen this print! error?', kt END SUBROUTINE tra_bbc_tan SUBROUTINE tra_bbc_adj( kt ) ! Empty routine WRITE(*,*) 'tra_bbc_adj: You should not have seen this print! error?', kt END SUBROUTINE tra_bbc_adj SUBROUTINE tra_bbc_adj_tst( kt ) ! Empty routine WRITE(*,*) 'tra_bbc_adj_tst: You should not have seen this print! error?', kt END SUBROUTINE tra_bbc_adj_tst #endif !!====================================================================== #endif END MODULE trabbc_tam