- Timestamp:
- 2019-11-22T15:29:17+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Property svn:mergeinfo deleted
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcldf.F90
r11536 r11949 51 51 CONTAINS 52 52 53 SUBROUTINE trc_ldf( kt )53 SUBROUTINE trc_ldf( kt, Kbb, Kmm, ptr, Krhs ) 54 54 !!---------------------------------------------------------------------- 55 55 !! *** ROUTINE tra_ldf *** … … 58 58 !! 59 59 !!---------------------------------------------------------------------- 60 INTEGER, INTENT( in ) :: kt ! ocean time-step index 60 INTEGER, INTENT(in ) :: kt ! ocean time-step index 61 INTEGER, INTENT(in ) :: Kbb, Kmm, Krhs ! ocean time-level index 62 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 61 63 ! 62 64 INTEGER :: ji, jj, jk, jn 63 65 REAL(wp) :: zdep 64 66 CHARACTER (len=22) :: charout 65 REAL(wp), DIMENSION(jpi,jpj,jpk):: zahu, zahv66 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrtrd67 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zahu, zahv 68 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrtrd 67 69 !!---------------------------------------------------------------------- 68 70 ! … … 73 75 IF( l_trdtrc ) THEN 74 76 ALLOCATE( ztrtrd(jpi,jpj,jpk,jptra) ) 75 ztrtrd(:,:,:,:) = tra(:,:,:,:)77 ztrtrd(:,:,:,:) = ptr(:,:,:,:,Krhs) 76 78 ENDIF 77 79 ! !* set the lateral diffusivity coef. for passive tracer … … 82 84 DO jj = 1, jpj 83 85 DO ji = 1, jpi 84 IF( gdept _n(ji,jj,jk) > 200. .AND. gphit(ji,jj) < 5. .AND. gphit(ji,jj) > -5. ) THEN85 zdep = MAX( gdept _n(ji,jj,jk) - 1000., 0. ) / 1000.86 IF( gdept(ji,jj,jk,Kmm) > 200. .AND. gphit(ji,jj) < 5. .AND. gphit(ji,jj) > -5. ) THEN 87 zdep = MAX( gdept(ji,jj,jk,Kmm) - 1000., 0. ) / 1000. 86 88 zahu(ji,jj,jk) = zahu(ji,jj,jk) * MAX( 1., rn_fact_lap * EXP( -zdep ) ) 87 89 ENDIF … … 92 94 SELECT CASE ( nldf_trc ) !* compute lateral mixing trend and add it to the general trend 93 95 ! 94 CASE ( np_lap ) ! iso-level laplacian 95 CALL tra_ldf_lap ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb, tra, jptra, 1 ) 96 CASE ( np_lap_i ) ! laplacian : standard iso-neutral operator (Madec) 97 CALL tra_ldf_iso ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb, trb, tra, jptra, 1 ) 98 CASE ( np_lap_it ) ! laplacian : triad iso-neutral operator (griffies) 99 CALL tra_ldf_triad( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb, trb, tra, jptra, 1 ) 100 CASE ( np_blp , np_blp_i , np_blp_it ) ! bilaplacian: all operator (iso-level, -neutral) 101 CALL tra_ldf_blp ( kt, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, trb , tra, jptra, nldf_trc ) 96 CASE ( np_lap ) ! iso-level laplacian 97 CALL tra_ldf_lap ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, & 98 & ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs), jptra, 1 ) 99 CASE ( np_lap_i ) ! laplacian : standard iso-neutral operator (Madec) 100 CALL tra_ldf_iso ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, & 101 & ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs), jptra, 1 ) 102 CASE ( np_lap_it ) ! laplacian : triad iso-neutral operator (griffies) 103 CALL tra_ldf_triad( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, & 104 & ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs), jptra, 1 ) 105 CASE ( np_blp , np_blp_i , np_blp_it ) ! bilaplacian: all operator (iso-level, -neutral) 106 CALL tra_ldf_blp ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi, & 107 & ptr(:,:,:,:,Kbb) , ptr(:,:,:,:,Krhs), jptra, nldf_trc ) 102 108 END SELECT 103 109 ! 104 110 IF( l_trdtrc ) THEN ! send the trends for further diagnostics 105 111 DO jn = 1, jptra 106 ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn)107 CALL trd_tra( kt, 'TRC', jn, jptra_ldf, ztrtrd(:,:,:,jn) )112 ztrtrd(:,:,:,jn) = ptr(:,:,:,jn,Krhs) - ztrtrd(:,:,:,jn) 113 CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_ldf, ztrtrd(:,:,:,jn) ) 108 114 END DO 109 115 DEALLOCATE( ztrtrd ) … … 113 119 WRITE(charout, FMT="('ldf ')") 114 120 CALL prt_ctl_trc_info(charout) 115 CALL prt_ctl_trc( tab4d= tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )121 CALL prt_ctl_trc( tab4d=ptr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 116 122 ENDIF 117 123 ! … … 167 173 IF( ln_trcldf_OFF ) THEN ; nldf_trc = np_no_ldf ; ioptio = ioptio + 1 ; ENDIF 168 174 IF( ln_trcldf_tra ) THEN ; nldf_trc = nldf_tra ; ioptio = ioptio + 1 ; ENDIF 169 IF( ioptio /= 1 ) CALL ctl_stop( 'trc_ldf_ini: use ONE of the 2 operator options ( NONE/tra)' )175 IF( ioptio /= 1 ) CALL ctl_stop( 'trc_ldf_ini: use ONE of the 2 operator options (OFF/tra)' ) 170 176 171 177 ! ! multiplier : passive/active tracers ration
Note: See TracChangeset
for help on using the changeset viewer.