Changeset 1601 for trunk/NEMO/OPA_SRC/TRA/trabbc.F90
- Timestamp:
- 2009-08-11T12:09:19+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/TRA/trabbc.F90
r1152 r1601 15 15 !! tra_bbc_init : initialization of geothermal heat flux trend 16 16 !!---------------------------------------------------------------------- 17 !! * Modules used18 17 USE oce ! ocean dynamics and active tracers 19 18 USE dom_oce ! ocean space and time domain … … 32 31 LOGICAL, PUBLIC, PARAMETER :: lk_trabbc = .TRUE. !: bbc flag 33 32 34 ! !* Namelist nambbc: bottom boundary condition35 INTEGER :: n geo_flux= 1 ! Geothermal flux (0:no flux, 1:constant flux, 2:read in file )36 REAL(wp) :: ngeo_flux_const = 86.4e-3 ! Constant value of geothermal heat flux33 ! !!* Namelist nambbc: bottom boundary condition * 34 INTEGER :: nn_geoflx = 1 ! Geothermal flux (0:no flux, 1:constant flux, 2:read in file ) 35 REAL(wp) :: rn_geoflx_cst = 86.4e-3 ! Constant value of geothermal heat flux 37 36 38 37 INTEGER , DIMENSION(jpi,jpj) :: nbotlevt ! ocean bottom level index at T-pt … … 42 41 # include "domzgr_substitute.h90" 43 42 !!---------------------------------------------------------------------- 44 !! OPA 9.0 , LOCEAN-IPSL (2006)43 !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 45 44 !! $Id$ 46 45 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 54 53 !! 55 54 !! ** Purpose : Compute the bottom boundary contition on temperature 56 !! associated with geothermal heating and add it to the general57 !! trend of temperature equations.55 !! associated with geothermal heating and add it to the 56 !! general trend of temperature equations. 58 57 !! 59 58 !! ** Method : The geothermal heat flux set to its constant value of 60 !! 86.4 mW/m2 (Stein and Stein 1992, Huang 1999).59 !! 86.4 mW/m2 (Stein and Stein 1992, Huang 1999). 61 60 !! The temperature trend associated to this heat flux through the 62 61 !! ocean bottom can be computed once and is added to the temperature … … 69 68 !! 70 69 !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. 70 !! Emile-Geay and Madec, 2009, Ocean Science. 71 71 !!---------------------------------------------------------------------- 72 72 USE oce, ONLY : ztrdt => ua ! use ua as 3D workspace … … 75 75 INTEGER, INTENT( in ) :: kt ! ocean time-step index 76 76 !! 77 #if defined key_vectopt_loop 78 INTEGER :: ji ! dummy loop indices 79 #else 80 INTEGER :: ji, jj ! dummy loop indices 81 #endif 77 INTEGER :: ji, jj ! dummy loop indices 82 78 REAL(wp) :: zqgh_trd ! geothermal heat flux trend 83 79 !!---------------------------------------------------------------------- … … 92 88 ! Add the geothermal heat flux trend on temperature 93 89 94 SELECT CASE ( n geo_flux )90 SELECT CASE ( nn_geoflx ) 95 91 ! 96 92 CASE ( 1:2 ) ! geothermal heat flux 97 93 #if defined key_vectopt_loop 98 DO ji = jpi+2, jpij-jpi-1 ! vector opt. (forced unrolling) 99 zqgh_trd = ro0cpr * qgh_trd0(ji,1) / fse3t(ji,1,nbotlevt(ji,1) ) 100 ta(ji,1,nbotlevt(ji,1)) = ta(ji,1,nbotlevt(ji,1)) + zqgh_trd 101 END DO 94 DO jj = 1, 1 95 DO ji = jpi+2, jpij-jpi-1 ! vector opt. (forced unrolling) 102 96 #else 103 97 DO jj = 2, jpjm1 104 98 DO ji = 2, jpim1 99 #endif 105 100 zqgh_trd = ro0cpr * qgh_trd0(ji,jj) / fse3t(ji,jj,nbotlevt(ji,jj)) 106 101 ta(ji,jj,nbotlevt(ji,jj)) = ta(ji,jj,nbotlevt(ji,jj)) + zqgh_trd 107 102 END DO 108 103 END DO 109 #endif110 104 END SELECT 111 105 … … 115 109 ENDIF 116 110 ! 117 IF(ln_ctl) CALL prt_ctl( tab3d_1=ta, clinfo1=' bbc - Ta: ', mask1=tmask, clinfo3='tra-ta')111 IF(ln_ctl) CALL prt_ctl( tab3d_1=ta, clinfo1=' bbc - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 118 112 ! 119 113 END SUBROUTINE tra_bbc … … 124 118 !! *** ROUTINE tra_bbc_init *** 125 119 !! 126 !! ** Purpose : Compute once for all the trend associated with geo -127 !! thermalheating that will be applied at each time step at the128 !! bottomocean level120 !! ** Purpose : Compute once for all the trend associated with geothermal 121 !! heating that will be applied at each time step at the 122 !! last ocean level 129 123 !! 130 124 !! ** Method : Read the nambbc namelist and check the parameters. 131 !! called at the first time step (nit000)132 125 !! 133 126 !! ** Input : - Namlist nambbc … … 141 134 INTEGER :: ji, jj ! dummy loop indices 142 135 INTEGER :: inum ! temporary logical unit 143 144 NAMELIST/nambbc/n geo_flux, ngeo_flux_const136 !! 137 NAMELIST/nambbc/nn_geoflx, rn_geoflx_cst 145 138 !!---------------------------------------------------------------------- 146 139 … … 148 141 READ ( numnam, nambbc ) 149 142 150 !! Control print151 IF(lwp)WRITE(numout,*)152 IF(lwp) WRITE(numout,*) 'tra_bbc : tempearture Bottom Boundary Condition (bbc)'153 IF(lwp) WRITE(numout,*) '~~~~~~~ Geothermal heatflux'154 IF(lwp) WRITE(numout,*) 'Namelist nambbc : set bbc parameters'155 IF(lwp) WRITE(numout,*)156 IF(lwp) WRITE(numout,*) ' Geothermal flux ngeo_flux = ', ngeo_flux157 IF(lwp) WRITE(numout,*) ' Constant geothermal flux ngeo_flux_const = ', ngeo_flux_const158 IF(lwp) WRITE(numout,*)143 IF(lwp) THEN ! Control print 144 WRITE(numout,*) 145 WRITE(numout,*) 'tra_bbc : temperature Bottom Boundary Condition (bbc), Geothermal heatflux' 146 WRITE(numout,*) '~~~~~~~ ' 147 WRITE(numout,*) ' Namelist nambbc : set bbc parameters' 148 WRITE(numout,*) ' Geothermal flux nn_geoflx = ', nn_geoflx 149 WRITE(numout,*) ' Constant geothermal flux rn_geoflx_cst = ', rn_geoflx_cst 150 WRITE(numout,*) 151 ENDIF 159 152 160 153 ! ! level of the ocean bottom at T-point … … 165 158 END DO 166 159 167 SELECT CASE ( n geo_flux ) ! initialization of geothermal heat flux160 SELECT CASE ( nn_geoflx ) ! initialization of geothermal heat flux 168 161 ! 169 162 CASE ( 0 ) ! no geothermal heat flux 170 IF(lwp) WRITE(numout,*) 171 IF(lwp) WRITE(numout,*) ' *** no geothermal heat flux' 163 IF(lwp) WRITE(numout,*) ' *** no geothermal heat flux' 172 164 ! 173 165 CASE ( 1 ) ! constant flux 174 IF(lwp) WRITE(numout,*) ' *** constant heat flux = ', ngeo_flux_const 175 qgh_trd0(:,:) = ngeo_flux_const 166 IF(lwp) WRITE(numout,*) ' *** constant heat flux = ', rn_geoflx_cst 176 167 ! 177 CASE ( 2 ) ! variable geothermal heat flux 178 ! read the geothermal fluxes in mW/m2 168 qgh_trd0(:,:) = rn_geoflx_cst 179 169 ! 180 IF(lwp) WRITE(numout,*) ' *** variable geothermal heat flux' 170 CASE ( 2 ) ! variable geothermal heat flux : read the geothermal fluxes in mW/m2 171 IF(lwp) WRITE(numout,*) ' *** variable geothermal heat flux' 181 172 CALL iom_open ( 'geothermal_heating.nc', inum ) 182 CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd0 )183 CALL iom_close (inum)173 CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd0 ) 174 CALL iom_close( inum ) 184 175 ! 185 176 qgh_trd0(:,:) = qgh_trd0(:,:) * 1.e-3 ! conversion in W/m2 186 177 ! 187 178 CASE DEFAULT 188 WRITE(ctmp1,*) ' bad flag value for n geo_flux = ', ngeo_flux179 WRITE(ctmp1,*) ' bad flag value for nn_geoflx = ', nn_geoflx 189 180 CALL ctl_stop( ctmp1 ) 190 181 ! 191 182 END SELECT 192 193 183 ! 194 184 END SUBROUTINE tra_bbc_init 195 185
Note: See TracChangeset
for help on using the changeset viewer.