Changeset 12766 for NEMO/branches/UKMO/dev_r12745_HPC-02_Daley_Tiling_trial_structure/src/OCE/TRA/traldf.F90
- Timestamp:
- 2020-04-17T14:54:46+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/dev_r12745_HPC-02_Daley_Tiling_trial_structure/src/OCE/TRA/traldf.F90
r12377 r12766 45 45 CONTAINS 46 46 47 SUBROUTINE tra_ldf( kt, Kbb, Kmm, pts, Krhs )47 SUBROUTINE tra_ldf(ktile, kt, Kbb, Kmm, pts, Krhs ) 48 48 !!---------------------------------------------------------------------- 49 49 !! *** ROUTINE tra_ldf *** … … 51 51 !! ** Purpose : compute the lateral ocean tracer physics. 52 52 !!---------------------------------------------------------------------- 53 TYPE(TILE), INTENT(in ) :: ktile ! Tile indices 53 54 INTEGER, INTENT(in ) :: kt ! ocean time-step index 54 55 INTEGER, INTENT(in ) :: Kbb, Kmm, Krhs ! ocean time level indices … … 58 59 !!---------------------------------------------------------------------- 59 60 ! 60 IF( ln_timing ) CALL timing_start('tra_ldf') 61 IF( ktile % ntile == 1 ) THEN ! Do only on the first tile 62 ! TODO: TO BE TILED 63 IF( ln_timing ) CALL timing_start('tra_ldf') 64 ENDIF 61 65 ! 62 IF( l_trdtra ) THEN !* Save ta and sa trends 63 ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 64 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 65 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 66 IF( ktile % ntile == jpnijtile ) THEN ! Do only after all tiles finish 67 IF( l_trdtra ) THEN !* Save ta and sa trends 68 ! TODO: TO BE TILED 69 ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 70 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 71 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 72 ENDIF 66 73 ENDIF 67 74 ! … … 70 77 CALL tra_ldf_lap ( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) 71 78 CASE ( np_lap_i ) ! laplacian: standard iso-neutral operator (Madec) 72 CALL tra_ldf_iso ( kt , Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 )79 CALL tra_ldf_iso ( ktile, kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) 73 80 CASE ( np_lap_it ) ! laplacian: triad iso-neutral operator (griffies) 74 81 CALL tra_ldf_triad( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) … … 77 84 END SELECT 78 85 ! 79 IF( l_trdtra ) THEN !* save the horizontal diffusive trends for further diagnostics 80 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 81 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 82 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 83 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) 84 DEALLOCATE( ztrdt, ztrds ) 86 IF( ktile % ntile == jpnijtile ) THEN ! Do only after all tiles finish 87 IF( l_trdtra ) THEN !* save the horizontal diffusive trends for further diagnostics 88 ! TODO: TO BE TILED 89 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 90 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 91 ! TODO: TO BE TILED 92 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 93 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) 94 DEALLOCATE( ztrdt, ztrds ) 95 ENDIF 96 97 ! !* print mean trends (used for debugging) 98 ! TODO: TO BE TILED 99 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' ldf - Ta: ', mask1=tmask, & 100 & tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 101 ! 102 ! TODO: TO BE TILED 103 IF( ln_timing ) CALL timing_stop('tra_ldf') 85 104 ENDIF 86 ! !* print mean trends (used for debugging)87 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' ldf - Ta: ', mask1=tmask, &88 & tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' )89 !90 IF( ln_timing ) CALL timing_stop('tra_ldf')91 105 ! 92 106 END SUBROUTINE tra_ldf
Note: See TracChangeset
for help on using the changeset viewer.