Changeset 10980 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/TRA/traldf.F90
- Timestamp:
- 2019-05-15T13:34:04+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/TRA/traldf.F90
r10954 r10980 47 47 CONTAINS 48 48 49 SUBROUTINE tra_ldf( kt, Kbb, Kmm, Krhs )49 SUBROUTINE tra_ldf( kt, Kbb, Kmm, pts, Krhs ) 50 50 !!---------------------------------------------------------------------- 51 51 !! *** ROUTINE tra_ldf *** … … 53 53 !! ** Purpose : compute the lateral ocean tracer physics. 54 54 !!---------------------------------------------------------------------- 55 INTEGER, INTENT( in ) :: kt ! ocean time-step index 56 INTEGER, INTENT( in ) :: Kbb, Kmm, Krhs ! ocean time level indices 55 INTEGER, INTENT(in ) :: kt ! ocean time-step index 56 INTEGER, INTENT(in ) :: Kbb, Kmm, Krhs ! ocean time level indices 57 REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts ! active tracers and RHS of tracer equation 57 58 !! 58 59 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdt, ztrds … … 63 64 IF( l_trdtra ) THEN !* Save ta and sa trends 64 65 ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 65 ztrdt(:,:,:) = ts(:,:,:,jp_tem,Krhs)66 ztrds(:,:,:) = ts(:,:,:,jp_sal,Krhs)66 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 67 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 67 68 ENDIF 68 69 ! 69 70 SELECT CASE ( nldf_tra ) !* compute lateral mixing trend and add it to the general trend 70 71 CASE ( np_lap ) ! laplacian: iso-level operator 71 CALL tra_ldf_lap ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts, 1, Kmm)72 CALL tra_ldf_lap ( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) 72 73 CASE ( np_lap_i ) ! laplacian: standard iso-neutral operator (Madec) 73 CALL tra_ldf_iso ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts, 1, Kmm)74 CALL tra_ldf_iso ( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) 74 75 CASE ( np_lap_it ) ! laplacian: triad iso-neutral operator (griffies) 75 CALL tra_ldf_triad( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts, 1, Kmm)76 CALL tra_ldf_triad( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, 1 ) 76 77 CASE ( np_blp , np_blp_i , np_blp_it ) ! bilaplacian: iso-level & iso-neutral operators 77 CALL tra_ldf_blp ( kt, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, ts(:,:,:,:,Kbb), ts(:,:,:,:,Krhs), jpts, nldf_tra, Kmm)78 CALL tra_ldf_blp ( kt, Kmm, nit000,'TRA', ahtu, ahtv, gtsu, gtsv, gtui, gtvi, pts(:,:,:,:,Kbb), pts(:,:,:,:,Krhs), jpts, nldf_tra ) 78 79 END SELECT 79 80 ! 80 81 IF( l_trdtra ) THEN !* save the horizontal diffusive trends for further diagnostics 81 ztrdt(:,:,:) = ts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)82 ztrds(:,:,:) = ts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:)82 ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 83 ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 83 84 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 84 85 CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) … … 86 87 ENDIF 87 88 ! !* print mean trends (used for debugging) 88 IF(ln_ctl) CALL prt_ctl( tab3d_1= ts(:,:,:,jp_tem,Krhs), clinfo1=' ldf - Ta: ', mask1=tmask, &89 & tab3d_2= ts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' )89 IF(ln_ctl) CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' ldf - Ta: ', mask1=tmask, & 90 & tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 90 91 ! 91 92 IF( ln_timing ) CALL timing_stop('tra_ldf')
Note: See TracChangeset
for help on using the changeset viewer.