Changeset 1175 for trunk/NEMO/TOP_SRC/TRP/trcbbc.F90
- Timestamp:
- 2008-09-11T18:26:34+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/TOP_SRC/TRP/trcbbc.F90
r1152 r1175 4 4 !! Ocean passive tracers: bottom boundary condition 5 5 !!====================================================================== 6 #if defined key_top && defined key_trcbbc 7 !!---------------------------------------------------------------------- 8 !! 'key_top' and 'key_trcbbc' TOP model and geothermal heat flux 6 !! History : 8.1 ! 99-10 (G. Madec) original code 7 !! 8.5 ! 02-08 (G. Madec) free form + modules 8 !! ! 02-11 (A. Bozec) trc_bbc_init 9 !! 9.0 ! 04-03 (C. Ethe) adpated for passive tracers 10 !! ! 07-02 (C. Deltel) Diagnose ML trends for passive tracers 11 !!---------------------------------------------------------------------- 12 #if defined key_top && defined key_trcbbc 13 !!---------------------------------------------------------------------- 14 !! 'key_trcbbc' geothermal heat flux 9 15 !!---------------------------------------------------------------------- 10 16 !! trc_bbc : update the tracer trend at ocean bottom 11 17 !! trc_bbc_init : initialization of geothermal heat flux trend 12 18 !!---------------------------------------------------------------------- 13 !! * Modules used14 19 USE oce_trc ! ocean dynamics and active tracers variables 15 USE tr p_trc ! ocean passive tracers variables20 USE trc ! ocean passive tracers variables 16 21 USE prtctl_trc ! Print control for debbuging 17 22 USE trdmld_trc 23 USE trdmld_trc_oce 24 18 25 IMPLICIT NONE 19 26 PRIVATE 20 27 21 !! * Accessibility22 28 PUBLIC trc_bbc ! routine called by trcstp.F90 23 29 24 !! to be transfert in the namelist ???!30 !! >>>>>>>>>>>>>>>>>>>>>>>>> MOVE TO NAMELIST >>>>>>>>>>>>>>>>>>>>>>>>>> 25 31 LOGICAL, PUBLIC, PARAMETER :: lk_trcbbc = .TRUE. !: bbc flag 26 27 !! * Module variables 28 INTEGER :: & !!! ** bbc namelist (nambbc) ** 29 ngeo_trc_flux = 1 ! Geothermal flux (0:no flux, 1:constant flux, 30 ! ! 2:read in file ) 31 REAL(wp) :: & !!! ** bbc namlist ** 32 ngeo_trc_flux_const = 86.4e-3 ! Constant value of geothermal heat flux 33 34 INTEGER, DIMENSION(jpi,jpj) :: & 35 nbotlevt ! ocean bottom level index at T-pt 36 REAL(wp), DIMENSION(jpi,jpj) :: & 37 qgh_trd ! geothermal heating trend 38 32 33 INTEGER :: ngeo_trc_flux = 1 !!! ** bbc namelist (nambbc) ** 34 ! ! Geothermal flux (0:no flux, 1:constant flux, 35 ! ! 2:read in file ) 36 REAL(wp) :: ngeo_trc_flux_const = 86.4e-3 !!! ** bbc namlist ** 37 ! ! Constant value of geothermal heat flux 38 39 INTEGER, DIMENSION(jpi,jpj) :: nbotlevt ! ocean bottom level index at T-pt 40 REAL(wp), DIMENSION(jpi,jpj) :: qgh_trd ! geothermal heating trend 41 !! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 42 39 43 !! * Substitutions 40 44 # include "top_substitute.h90" 41 45 !!---------------------------------------------------------------------- 42 46 !! TOP 1.0 , LOCEAN-IPSL (2005) 43 !! $ Id$44 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt47 !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcbbc.F90,v 1.11 2006/09/12 11:10:13 opalod Exp $ 48 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 45 49 !!---------------------------------------------------------------------- 46 50 … … 68 72 !! References : 69 73 !! Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. 70 !! 71 !! History : 72 !! 8.1 ! 99-10 (G. Madec) original code 73 !! 8.5 ! 02-08 (G. Madec) free form + modules 74 !! 9.0 ! 04-03 (C. Ethe) adpated for passive tracers 75 !!---------------------------------------------------------------------- 76 !! * Arguments 77 INTEGER, INTENT( in ) :: kt ! ocean time-step index 78 79 !! * Local declarations 74 !!---------------------------------------------------------------------- 75 INTEGER, INTENT( in ) :: kt ! ocean time-step index 76 80 77 #if defined key_vectopt_loop && ! defined key_mpp_omp 81 INTEGER :: ji, jn ! dummy loop indices82 #else 83 INTEGER :: ji, jj, jn ! dummy loop indices84 #endif 85 REAL(wp) :: ztra ! temporary scalar78 INTEGER :: ji, jn ! dummy loop indices 79 #else 80 INTEGER :: ji, jj, jn ! dummy loop indices 81 #endif 82 REAL(wp) :: ztra ! temporary scalar 86 83 CHARACTER (len=22) :: charout 84 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrtrd ! trends 87 85 !!---------------------------------------------------------------------- 88 86 89 87 ! 0. Initialization 88 ! ----------------- 89 90 90 IF( kt == nittrc000 ) CALL trc_bbc_init 91 91 92 IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 93 94 92 95 ! 1. Add the geothermal heat flux trend on temperature 96 ! ---------------------------------------------------- 93 97 94 98 SELECT CASE ( ngeo_trc_flux ) … … 96 100 CASE ( 1:2 ) ! geothermal heat flux 97 101 98 DO jn = 1, jptra 102 ! ! =========== 103 DO jn = 1, jptra ! tracer loop 104 ! ! =========== 105 !CDIR COLLAPSE 106 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 107 108 99 109 #if defined key_vectopt_loop && ! defined key_mpp_omp 100 110 DO ji = jpi+2, jpij-jpi-1 ! vector opt. (forced unrolling) … … 108 118 END DO 109 119 #endif 110 END DO 111 112 IF(ln_ctl) THEN ! print mean trends (used for debugging) 120 121 IF( l_trdtrc ) THEN 122 !CDIR COLLAPSE 123 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 124 IF (luttrd(jn)) CALL trd_mod_trc(ztrtrd, jn, jptrc_trd_bbc, kt) 125 END IF 126 127 ! ! =========== 128 END DO ! tracer loop 129 ! ! =========== 130 131 IF( l_trdtrc ) DEALLOCATE( ztrtrd ) 132 133 IF( ln_ctl ) THEN ! print mean trends (used for debugging) 113 134 WRITE(charout, FMT="('bbc')") 114 135 CALL prt_ctl_trc_info(charout) … … 128 149 !! bottom ocean level 129 150 !! 130 !! ** Method : Read the namt rabbc namelist and check the parameters.151 !! ** Method : Read the namtopbbc namelist and check the parameters. 131 152 !! called at the first time step (nittrc000) 132 153 !! 133 !! ** Input : - Namlist namt rcbbc154 !! ** Input : - Namlist namtopbbc 134 155 !! - NetCDF file : passivetrc_geothermal_heating.nc 135 156 !! ( if necessary ) … … 137 158 !! ** Action : - compute the heat geothermal trend qgh_trd 138 159 !! - compute the bottom ocean level nbotlevt 139 !! 140 !! history : 141 !! 8.5 ! 02-11 (A. Bozec) original code 142 !!---------------------------------------------------------------------- 143 !! * Modules used 160 !!---------------------------------------------------------------------- 144 161 USE iom 145 162 146 !! * local declarations147 163 CHARACTER (len=32) :: clname 148 164 INTEGER :: ji, jj ! dummy loop indices 149 165 INTEGER :: inum = 11 ! temporary logical unit 150 166 151 NAMELIST/namt rcbbc/ngeo_trc_flux, ngeo_trc_flux_const167 NAMELIST/namtopbbc/ngeo_trc_flux, ngeo_trc_flux_const 152 168 !!---------------------------------------------------------------------- 153 169 154 170 ! Read Namelist nambbc : bottom momentum boundary condition 155 REWIND ( numna mtra)156 READ ( numna mtra, namtrcbbc )171 REWIND ( numnat ) 172 READ ( numnat, namtopbbc ) 157 173 158 174 ! Control print
Note: See TracChangeset
for help on using the changeset viewer.