- 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/trazdf.F90
r13517 r13551 13 13 !!---------------------------------------------------------------------- 14 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 16 ! TEMP: This change not necessary after trd_tra is tiled 17 USE domain, ONLY : dom_tile 15 USE dom_oce ! ocean space and time domain variables 18 16 USE domvvl ! variable volume 19 17 USE phycst ! physical constant … … 58 56 ! 59 57 INTEGER :: ji, jj, jk ! Dummy loop indices 60 ! TEMP: This change not necessary after trd_tra is tiled 61 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: ztrdt, ztrds ! 3D workspace 58 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrdt, ztrds ! 3D workspace 62 59 !!--------------------------------------------------------------------- 63 60 ! … … 73 70 ! 74 71 IF( l_trdtra ) THEN !* Save ta and sa trends 75 IF( ntile == 0 .OR. ntile == 1 ) THEN ! Do only on the first tile 76 ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 77 ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 78 ENDIF 79 80 DO_3D( 0, 0, 0, 0, 1, jpk ) 81 ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Kaa) 82 ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Kaa) 83 END_3D 72 ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 73 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa) 74 ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa) 84 75 ENDIF 85 76 ! … … 94 85 !!gm 95 86 96 ! TEMP: These changes not necessary after trd_tra is tiled97 87 IF( l_trdtra ) THEN ! save the vertical diffusive trends for further diagnostics 98 DO_3D( 0, 0, 0, 0, 1, jpk ) 99 ztrdt(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_tem,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_tem,Kbb)*e3t(ji,jj,jk,Kbb) ) & 100 & / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrdt(ji,jj,jk) 101 ztrds(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_sal,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_sal,Kbb)*e3t(ji,jj,jk,Kbb) ) & 102 & / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrds(ji,jj,jk) 103 END_3D 104 105 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only for the full domain 106 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 ) ! Use full domain 107 108 ! TODO: TO BE TILED- trd_tra 109 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt ) 110 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds ) 111 DEALLOCATE( ztrdt , ztrds ) 112 113 IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile ) ! Revert to tile domain 114 ENDIF 88 DO jk = 1, jpk 89 ztrdt(:,:,jk) = ( ( pts(:,:,jk,jp_tem,Kaa)*e3t(:,:,jk,Kaa) & 90 & - pts(:,:,jk,jp_tem,Kbb)*e3t(:,:,jk,Kbb) ) & 91 & / ( e3t(:,:,jk,Kmm)*rDt ) ) & 92 & - ztrdt(:,:,jk) 93 ztrds(:,:,jk) = ( ( pts(:,:,jk,jp_sal,Kaa)*e3t(:,:,jk,Kaa) & 94 & - pts(:,:,jk,jp_sal,Kbb)*e3t(:,:,jk,Kbb) ) & 95 & / ( e3t(:,:,jk,Kmm)*rDt ) ) & 96 & - ztrds(:,:,jk) 97 END DO 98 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt ) 99 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds ) 100 DEALLOCATE( ztrdt , ztrds ) 115 101 ENDIF 116 102 ! ! print mean trends (used for debugging)
Note: See TracChangeset
for help on using the changeset viewer.