Changeset 1175 for trunk/NEMO/TOP_SRC/TRP/trcldf_lap.F90
- Timestamp:
- 2008-09-11T18:26:34+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/TOP_SRC/TRP/trcldf_lap.F90
r1152 r1175 1 1 MODULE trcldf_lap 2 !!====================================================================== ========2 !!====================================================================== 3 3 !! *** MODULE trcldf_lap *** 4 4 !! Ocean passive tracers: horizontal component of the lateral tracer mixing trend 5 !!============================================================================== 5 !!====================================================================== 6 !! History : 1.0 ! 87-06 (P. Andrich, D. L Hostis) Original code 7 !! ! 91-11 (G. Madec) 8 !! ! 95-02 (M. Levy) passive tracers 9 !! ! 95-11 (G. Madec) suppress volumetric scale factors 10 !! ! 96-01 (G. Madec) statement function for e3 11 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 12 !! 9.0 ! 04-03 (C. Ethe) passive tracer 13 !! ! 07-02 (C. Deltel) Diagnose ML trends for passive tracers 14 !!---------------------------------------------------------------------- 6 15 #if defined key_top 7 !!----------------------------------------------------------------------8 !! 'key_top' TOP models9 16 !!---------------------------------------------------------------------- 10 17 !! trc_ldf_lap : update the tracer trend with the horizontal diffusion … … 14 21 USE trp_trc ! ocean passive tracers variables 15 22 USE prtctl_trc ! Print control for debbuging 23 USE trdmld_trc 24 USE trdmld_trc_oce 16 25 17 26 IMPLICIT NONE … … 25 34 !!---------------------------------------------------------------------- 26 35 !! TOP 1.0 , LOCEAN-IPSL (2005) 27 !! $ Id$28 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt36 !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcldf_lap.F90,v 1.10 2006/09/12 11:10:14 opalod Exp $ 37 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 29 38 !!---------------------------------------------------------------------- 30 39 … … 53 62 !! ** Action : - Update tra arrays with the before iso-level 54 63 !! harmonic mixing trend. 55 !! - Save the trends in trtrd ('key_trc_diatrd') 56 !! 57 !! History : 58 !! 1.0 ! 87-06 (P. Andrich, D. L Hostis) Original code 59 !! ! 91-11 (G. Madec) 60 !! ! 95-02 (M. Levy) passive tracers 61 !! ! 95-11 (G. Madec) suppress volumetric scale factors 62 !! ! 96-01 (G. Madec) statement function for e3 63 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 64 !! 9.0 ! 04-03 (C. Ethe) passive tracer 64 !! - Save the trends ('key_trdmld_trc') 65 65 !!---------------------------------------------------------------------- 66 66 USE oce_trc , ztu => ua, & ! use ua as workspace 67 67 & ztv => va ! use va as workspace 68 68 69 !! * Arguments70 69 INTEGER, INTENT( in ) :: kt ! ocean time-step index 71 70 72 71 !! * Local save 73 72 REAL(wp), DIMENSION(jpi,jpj), SAVE :: & 74 73 ze1ur, ze2vr, zbtr2 ! scale factor coefficients 75 74 76 !! * Local declarations 77 INTEGER :: ji, jj, jk,jn ! dummy loop indices 75 INTEGER :: ji, jj, jk, jn ! dummy loop indices 78 76 REAL(wp) :: & 79 zabe1, zabe2, zbtr ! temporary scalars77 zabe1, zabe2, zbtr ! temporary scalars 80 78 81 79 REAL(wp) :: & 82 ztra, ztrax, ztray ! workspace80 ztra, ztrax, ztray ! workspace 83 81 CHARACTER (len=22) :: charout 82 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrtrd 84 83 !!---------------------------------------------------------------------- 85 84 … … 92 91 zbtr2(:,:) = 1. / ( e1t(:,:) * e2t(:,:) ) 93 92 ENDIF 94 95 DO jn = 1, jptra 93 94 IF( l_trdtrc ) THEN 95 ! STOP 'trcldf_lap: this was never validated, please comment this line to proceed...' 96 ENDIF 97 98 IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 99 100 ! ! =========== 101 DO jn = 1, jptra ! tracer loop 102 ! ! =========== 103 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) 96 104 97 105 ! ! ============= … … 99 107 ! ! ============= 100 108 ! 1. First derivative (gradient) 101 ! ------------------- 109 ! ------------------------------ 102 110 DO jj = 1, jpjm1 103 111 DO ji = 1, fs_jpim1 ! vector opt. … … 116 124 117 125 ! 2. Second derivative (divergence) 118 ! -------------------- 126 ! --------------------------------- 119 127 DO jj = 2, jpjm1 120 128 DO ji = fs_2, fs_jpim1 ! vector opt. … … 130 138 ! add it to the general tracer trends 131 139 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztrax + ztray 132 133 140 #if defined key_trc_diatrd 134 141 ! save the horizontal diffusive trends … … 136 143 IF (luttrd(jn)) trtrd(ji,jj,jk,ikeep(jn),5) = ztray 137 144 #endif 145 138 146 END DO 139 147 END DO … … 141 149 END DO ! End of slab 142 150 ! ! ============= 151 IF( l_trdtrc ) THEN 152 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 153 IF (luttrd(jn)) CALL trd_mod_trc( ztrtrd, jn, jptrc_trd_ldf, kt ) ! trends diags 154 END IF 155 ! ! =========== 156 END DO ! tracer loop 157 ! ! =========== 143 158 144 END DO159 IF( l_trdtrc ) DEALLOCATE( ztrtrd ) 145 160 146 IF(ln_ctl) THEN! print mean trends (used for debugging)161 IF( ln_ctl ) THEN ! print mean trends (used for debugging) 147 162 WRITE(charout, FMT="('ldf - lap')") 148 CALL prt_ctl_trc_info( charout)149 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd')163 CALL prt_ctl_trc_info( charout ) 164 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 150 165 ENDIF 151 166
Note: See TracChangeset
for help on using the changeset viewer.