- Timestamp:
- 2016-10-21T13:32:54+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
r6487 r7061 28 28 USE wrk_nemo ! Memory Allocation 29 29 USE timing ! Timing 30 USE diaptr ! Heat/Salt transport diagnostics 30 31 31 32 IMPLICIT NONE … … 78 79 # endif 79 80 REAL(wp), POINTER, DIMENSION(:,:) :: zu_eiv, zv_eiv, zw_eiv, z2d 81 REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d, z3d_T 80 82 !!---------------------------------------------------------------------- 81 83 ! … … 84 86 # if defined key_diaeiv 85 87 CALL wrk_alloc( jpi, jpj, zu_eiv, zv_eiv, zw_eiv, z2d ) 88 CALL wrk_alloc( jpi, jpj, jpk, z3d, z3d_T ) 86 89 # else 87 90 CALL wrk_alloc( jpi, jpj, zu_eiv, zv_eiv, zw_eiv ) … … 160 163 CALL iom_put( "voce_eiv", v_eiv ) ! j-eiv current 161 164 CALL iom_put( "woce_eiv", w_eiv ) ! vert. eiv current 162 IF( iom_use('ueiv_heattr') ) THEN 163 zztmp = 0.5 * rau0 * rcp 165 166 IF( iom_use("ueiv_masstr") .OR. iom_use("ueiv_heattr") .OR. iom_use('ueiv_heattr3d') & 167 .OR. iom_use("ueiv_salttr") .OR. iom_use('ueiv_salttr3d') ) THEN 168 z3d(:,:,jpk) = 0.e0 169 DO jk = 1, jpkm1 170 z3d(:,:,jk) = rau0 * u_eiv(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) * umask(:,:,jk) 171 END DO 172 CALL iom_put( "ueiv_masstr", z3d ) ! mass transport in i-direction 173 ENDIF 174 175 IF( iom_use('ueiv_heattr') .OR. iom_use('ueiv_heattr3d') ) THEN 176 zztmp = 0.5 * rcp 164 177 z2d(:,:) = 0.e0 165 DO jk = 1, jpkm1 166 DO jj = 2, jpjm1 167 DO ji = fs_2, fs_jpim1 ! vector opt. 168 z2d(ji,jj) = z2d(ji,jj) + u_eiv(ji,jj,jk) & 169 & * (tsn(ji,jj,jk,jp_tem)+tsn(ji+1,jj,jk,jp_tem)) * e2u(ji,jj) * fse3u(ji,jj,jk) 170 END DO 171 END DO 172 END DO 173 CALL lbc_lnk( z2d, 'U', -1. ) 174 CALL iom_put( "ueiv_heattr", zztmp * z2d ) ! heat transport in i-direction 178 z3d_T(:,:,:) = 0.e0 179 DO jk = 1, jpkm1 180 DO jj = 2, jpjm1 181 DO ji = fs_2, fs_jpim1 ! vector opt. 182 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) ) 183 z2d(ji,jj) = z2d(ji,jj) + z3d_T(ji,jj,jk) 184 END DO 185 END DO 186 END DO 187 IF (iom_use('ueiv_heattr') ) THEN 188 CALL lbc_lnk( z2d, 'U', -1. ) 189 CALL iom_put( "ueiv_heattr", zztmp * z2d ) ! 2D heat transport in i-direction 190 ENDIF 191 IF (iom_use('ueiv_heattr3d') ) THEN 192 CALL lbc_lnk( z3d_T, 'U', -1. ) 193 CALL iom_put( "ueiv_heattr3d", zztmp * z3d_T ) ! 3D heat transport in i-direction 194 ENDIF 195 ENDIF 196 197 IF( iom_use('ueiv_salttr') .OR. iom_use('ueiv_salttr3d') ) THEN 198 zztmp = 0.5 * 0.001 199 z2d(:,:) = 0.e0 200 z3d_T(:,:,:) = 0.e0 201 DO jk = 1, jpkm1 202 DO jj = 2, jpjm1 203 DO ji = fs_2, fs_jpim1 ! vector opt. 204 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) ) 205 z2d(ji,jj) = z2d(ji,jj) + z3d_T(ji,jj,jk) 206 END DO 207 END DO 208 END DO 209 IF (iom_use('ueiv_salttr') ) THEN 210 CALL lbc_lnk( z2d, 'U', -1. ) 211 CALL iom_put( "ueiv_salttr", zztmp * z2d ) ! 2D salt transport in i-direction 212 ENDIF 213 IF (iom_use('ueiv_salttr3d') ) THEN 214 CALL lbc_lnk( z3d_T, 'U', -1. ) 215 CALL iom_put( "ueiv_salttr3d", zztmp * z3d_T ) ! 3D salt transport in i-direction 216 ENDIF 217 ENDIF 218 219 IF( iom_use("veiv_masstr") .OR. iom_use("veiv_heattr") .OR. iom_use('veiv_heattr3d') & 220 .OR. iom_use("veiv_salttr") .OR. iom_use('veiv_salttr3d') ) THEN 221 z3d(:,:,jpk) = 0.e0 222 DO jk = 1, jpkm1 223 z3d(:,:,jk) = rau0 * v_eiv(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) * vmask(:,:,jk) 224 END DO 225 CALL iom_put( "veiv_masstr", z3d ) ! mass transport in j-direction 175 226 ENDIF 176 227 177 IF( iom_use('veiv_heattr') ) THEN178 zztmp = 0.5 * r au0 * rcp228 IF( iom_use('veiv_heattr') .OR. iom_use('veiv_heattr3d') ) THEN 229 zztmp = 0.5 * rcp 179 230 z2d(:,:) = 0.e0 180 DO jk = 1, jpkm1 181 DO jj = 2, jpjm1 182 DO ji = fs_2, fs_jpim1 ! vector opt. 183 z2d(ji,jj) = z2d(ji,jj) + v_eiv(ji,jj,jk) & 184 & * (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * e1v(ji,jj) * fse3v(ji,jj,jk) 185 END DO 186 END DO 187 END DO 188 CALL lbc_lnk( z2d, 'V', -1. ) 189 CALL iom_put( "veiv_heattr", zztmp * z2d ) ! heat transport in i-direction 190 ENDIF 231 z3d_T(:,:,:) = 0.e0 232 DO jk = 1, jpkm1 233 DO jj = 2, jpjm1 234 DO ji = fs_2, fs_jpim1 ! vector opt. 235 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) ) 236 z2d(ji,jj) = z2d(ji,jj) + z3d_T(ji,jj,jk) 237 END DO 238 END DO 239 END DO 240 IF (iom_use('veiv_heattr') ) THEN 241 CALL lbc_lnk( z2d, 'V', -1. ) 242 CALL iom_put( "veiv_heattr", zztmp * z2d ) ! 2D heat transport in j-direction 243 ENDIF 244 IF (iom_use('veiv_heattr3d') ) THEN 245 CALL lbc_lnk( z3d_T, 'V', -1. ) 246 CALL iom_put( "veiv_heattr3d", zztmp * z3d_T ) ! 3D heat transport in j-direction 247 ENDIF 248 ENDIF 249 250 IF( iom_use('veiv_salttr') .OR. iom_use('veiv_salttr3d') ) THEN 251 zztmp = 0.5 * 0.001 252 z2d(:,:) = 0.e0 253 z3d_T(:,:,:) = 0.e0 254 DO jk = 1, jpkm1 255 DO jj = 2, jpjm1 256 DO ji = fs_2, fs_jpim1 ! vector opt. 257 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_sal) + tsn(ji,jj+1,jk,jp_sal) ) 258 z2d(ji,jj) = z2d(ji,jj) + z3d_T(ji,jj,jk) 259 END DO 260 END DO 261 END DO 262 IF (iom_use('veiv_salttr') ) THEN 263 CALL lbc_lnk( z2d, 'V', -1. ) 264 CALL iom_put( "veiv_salttr", zztmp * z2d ) ! 2D salt transport in i-direction 265 ENDIF 266 IF (iom_use('veiv_salttr3d') ) THEN 267 CALL lbc_lnk( z3d_T, 'V', -1. ) 268 CALL iom_put( "veiv_salttr3d", zztmp * z3d_T ) ! 3D salt transport in i-direction 269 ENDIF 270 ENDIF 271 272 IF( iom_use('weiv_masstr') .OR. iom_use('weiv_heattr3d') .OR. iom_use('weiv_salttr3d')) THEN ! vertical mass transport & its square value 273 z2d(:,:) = rau0 * e12t(:,:) 274 DO jk = 1, jpk 275 z3d(:,:,jk) = w_eiv(:,:,jk) * z2d(:,:) 276 END DO 277 CALL iom_put( "weiv_masstr" , z3d ) ! mass transport in k-direction 278 ENDIF 279 280 IF( iom_use('weiv_heattr3d') ) THEN 281 zztmp = 0.5 * rcp 282 DO jk = 1, jpkm1 283 DO jj = 2, jpjm1 284 DO ji = fs_2, fs_jpim1 ! vector opt. 285 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj,jk+1,jp_tem) ) 286 END DO 287 END DO 288 END DO 289 CALL lbc_lnk( z3d_T, 'T', 1. ) 290 CALL iom_put( "weiv_heattr3d", zztmp * z3d_T ) ! 3D heat transport in k-direction 291 ENDIF 292 293 IF( iom_use('weiv_salttr3d') ) THEN 294 zztmp = 0.5 * 0.001 295 DO jk = 1, jpkm1 296 DO jj = 2, jpjm1 297 DO ji = fs_2, fs_jpim1 ! vector opt. 298 z3d_T(ji,jj,jk) = z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_sal) + tsn(ji,jj,jk+1,jp_sal) ) 299 END DO 300 END DO 301 END DO 302 CALL lbc_lnk( z3d_T, 'T', 1. ) 303 CALL iom_put( "weiv_salttr3d", zztmp * z3d_T ) ! 3D salt transport in k-direction 304 ENDIF 305 191 306 END IF 192 307 # endif 193 ! 308 194 309 # if defined key_diaeiv 195 310 CALL wrk_dealloc( jpi, jpj, zu_eiv, zv_eiv, zw_eiv, z2d ) 311 CALL wrk_dealloc( jpi, jpj, jpk, z3d, z3d_T ) 196 312 # else 197 313 CALL wrk_dealloc( jpi, jpj, zu_eiv, zv_eiv, zw_eiv )
Note: See TracChangeset
for help on using the changeset viewer.