- Timestamp:
- 2020-10-01T12:04:12+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_qck.F90
r13516 r13551 17 17 USE oce ! ocean dynamics and active tracers 18 18 USE dom_oce ! ocean space and time domain 19 ! TEMP: This change not necessary after trd_tra is tiled20 USE domain, ONLY : dom_tile21 19 USE trc_oce ! share passive tracers/Ocean variables 22 20 USE trd_oce ! trends: ocean variables … … 93 91 INTEGER , INTENT(in ) :: kjpt ! number of tracers 94 92 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 95 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled93 ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support) 96 94 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pU, pV, pW ! 3 ocean volume transport components 97 95 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) :: pt ! tracers and RHS of tracer equation … … 132 130 INTEGER , INTENT(in ) :: kjpt ! number of tracers 133 131 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 134 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled132 ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support) 135 133 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pU ! i-velocity components 136 134 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) :: pt ! active tracers and RHS of tracer equation 137 135 !! 138 ! TEMP: This change not necessary after trd_tra is tiled139 INTEGER :: itile140 136 INTEGER :: ji, jj, jk, jn ! dummy loop indices 141 137 REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk ! local scalars 142 138 REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) :: zwx, zfu, zfc, zfd 143 ! TEMP: This change not necessary after trd_tra is tiled144 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: ztrdx145 139 !---------------------------------------------------------------------- 146 ! TEMP: This change not necessary after trd_tra is tiled 147 itile = ntile 148 ! 149 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 150 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only on the first tile 151 IF( kt == nit000 .AND. l_trd ) THEN 152 ALLOCATE( ztrdx(jpi,jpj,jpk) ) 153 ENDIF 154 ENDIF 140 ! 155 141 ! ! =========== 156 142 DO jn = 1, kjpt ! tracer loop … … 218 204 END_3D 219 205 ! ! trend diagnostics 220 ! TEMP: These changes not necessary after trd_tra is tiled 221 IF( l_trd ) THEN 222 DO_3D( 1, 0, 1, 0, 1, jpk ) 223 ztrdx(ji,jj,jk) = zwx(ji,jj,jk) 224 END_3D 225 226 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only for the full domain 227 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 228 229 ! TODO: TO BE TILED- trd_tra 230 CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kmm) ) 231 232 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile ) ! Revert to tile domain 233 ENDIF 234 ENDIF 206 IF( l_trd ) CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, zwx, pU, pt(:,:,:,jn,Kmm) ) 235 207 ! 236 208 END DO … … 248 220 INTEGER , INTENT(in ) :: kjpt ! number of tracers 249 221 REAL(wp) , INTENT(in ) :: p2dt ! tracer time-step 250 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled222 ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support) 251 223 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pV ! j-velocity components 252 224 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) :: pt ! active tracers and RHS of tracer equation 253 225 !! 254 ! TEMP: This change not necessary after trd_tra is tiled255 INTEGER :: itile256 226 INTEGER :: ji, jj, jk, jn ! dummy loop indices 257 227 REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk ! local scalars 258 228 REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) :: zwy, zfu, zfc, zfd ! 3D workspace 259 ! TEMP: This change not necessary after trd_tra is tiled260 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: ztrdy261 229 !---------------------------------------------------------------------- 262 ! TEMP: This change not necessary after trd_tra is tiled 263 itile = ntile 264 ! 265 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 266 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only on the first tile 267 IF( kt == nit000 .AND. l_trd ) THEN 268 ALLOCATE( ztrdy(jpi,jpj,jpk) ) 269 ENDIF 270 ENDIF 230 ! 271 231 ! ! =========== 272 232 DO jn = 1, kjpt ! tracer loop … … 341 301 END_3D 342 302 ! ! trend diagnostics 343 ! TEMP: These changes not necessary after trd_tra is tiled 344 IF( l_trd ) THEN 345 DO_3D( 1, 0, 1, 0, 1, jpk ) 346 ztrdy(ji,jj,jk) = zwy(ji,jj,jk) 347 END_3D 348 349 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only for the full domain 350 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 351 352 ! TODO: TO BE TILED- trd_tra 353 CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kmm) ) 354 355 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile ) ! Revert to tile domain 356 ENDIF 357 ENDIF 303 IF( l_trd ) CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, zwy, pV, pt(:,:,:,jn,Kmm) ) 358 304 ! ! "Poleward" heat and salt transports (contribution of upstream fluxes) 359 305 IF( l_ptr ) CALL dia_ptr_hst( jn, 'adv', zwy(:,:,:) ) … … 372 318 CHARACTER(len=3) , INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 373 319 INTEGER , INTENT(in ) :: kjpt ! number of tracers 374 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled320 ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support) 375 321 REAL(wp), DIMENSION(jpi,jpj,jpk ), INTENT(in ) :: pW ! vertical velocity 376 322 REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) :: pt ! active tracers and RHS of tracer equation 377 323 ! 378 ! TEMP: This change not necessary after trd_tra is tiled379 INTEGER :: itile380 324 INTEGER :: ji, jj, jk, jn ! dummy loop indices 381 325 REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) :: zwz ! 3D workspace 382 ! TEMP: This change not necessary after trd_tra is tiled 383 REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE :: ztrdz 384 !!---------------------------------------------------------------------- 385 ! TEMP: This change not necessary after trd_tra is tiled 386 itile = ntile 387 ! 388 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 389 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only on the first tile 390 IF( kt == nit000 .AND. l_trd ) THEN 391 ALLOCATE( ztrdz(jpi,jpj,jpk) ) 392 ENDIF 393 ENDIF 394 326 !!---------------------------------------------------------------------- 327 ! 395 328 zwz(:,:, 1 ) = 0._wp ! surface & bottom values set to zero for all tracers 396 329 zwz(:,:,jpk) = 0._wp … … 421 354 END_3D 422 355 ! ! Send trends for diagnostic 423 ! TEMP: These changes not necessary after trd_tra is tiled 424 IF( l_trd ) THEN 425 DO_3D( 0, 0, 0, 0, 1, jpk ) 426 ztrdz(ji,jj,jk) = zwz(ji,jj,jk) 427 END_3D 428 429 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only for the full domain 430 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 431 432 ! TODO: TO BE TILED- trd_tra 433 CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz, pW, pt(:,:,:,jn,Kmm) ) 434 435 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile ) ! Revert to tile domain 436 ENDIF 437 ENDIF 356 IF( l_trd ) CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, zwz, pW, pt(:,:,:,jn,Kmm) ) 438 357 ! 439 358 END DO
Note: See TracChangeset
for help on using the changeset viewer.