- Timestamp:
- 2015-12-16T10:25:22+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90
r5386 r6060 13 13 14 14 !!---------------------------------------------------------------------- 15 !! tra_npc : apply the non penetrative convection scheme16 !!---------------------------------------------------------------------- 17 USE oce 18 USE dom_oce 19 USE phycst 20 USE zdf_oce 21 USE trd_oce 22 USE trdtra 23 USE eosbn2 15 !! tra_npc : apply the non penetrative convection scheme 16 !!---------------------------------------------------------------------- 17 USE oce ! ocean dynamics and active tracers 18 USE dom_oce ! ocean space and time domain 19 USE phycst ! physical constants 20 USE zdf_oce ! ocean vertical physics 21 USE trd_oce ! ocean active tracer trends 22 USE trdtra ! ocean active tracer trends 23 USE eosbn2 ! equation of state (eos routine) 24 24 ! 25 USE lbclnk 26 USE in_out_manager 27 USE lib_mpp 28 USE wrk_nemo 29 USE timing 25 USE lbclnk ! lateral boundary conditions (or mpp link) 26 USE in_out_manager ! I/O manager 27 USE lib_mpp ! MPP library 28 USE wrk_nemo ! Memory Allocation 29 USE timing ! Timing 30 30 31 31 IMPLICIT NONE … … 35 35 36 36 !! * Substitutions 37 # include "domzgr_substitute.h90"38 37 # include "vectopt_loop_substitute.h90" 39 38 !!---------------------------------------------------------------------- … … 55 54 !! (i.e. static stability computed locally) 56 55 !! 57 !! ** Action : - (ta,sa) after the application odthe npc scheme56 !! ** Action : - tsa: after tracers with the application of the npc scheme 58 57 !! - send the associated trends for on-line diagnostics (l_trdtra=T) 59 58 !! … … 115 114 zvts(:,jp_tem) = tsa(ji,jj,:,jp_tem) ! temperature 116 115 zvts(:,jp_sal) = tsa(ji,jj,:,jp_sal) ! salinity 117 116 ! 118 117 zvab(:,jp_tem) = zab(ji,jj,:,jp_tem) ! Alpha 119 118 zvab(:,jp_sal) = zab(ji,jj,:,jp_sal) ! Beta 120 119 zvn2(:) = zn2(ji,jj,:) ! N^2 121 120 ! 122 121 IF( l_LB_debug ) THEN !LB debug: 123 122 lp_monitor_point = .FALSE. … … 126 125 lp_monitor_point = (narea == nncpu).AND.lp_monitor_point 127 126 ENDIF !LB debug end 128 127 ! 129 128 ikbot = mbkt(ji,jj) ! ikbot: ocean bottom T-level 130 129 ikp = 1 ! because N2 is irrelevant at the surface level (will start at ikp=2) … … 132 131 jiter = 0 133 132 l_column_treated = .FALSE. 134 133 ! 135 134 DO WHILE ( .NOT. l_column_treated ) 136 135 ! 137 136 jiter = jiter + 1 138 137 ! 139 138 IF( jiter >= 400 ) EXIT 140 139 ! 141 140 l_bottom_reached = .FALSE. 142 141 ! 143 142 DO WHILE ( .NOT. l_bottom_reached ) 144 143 ! 145 144 ikp = ikp + 1 146 145 ! 147 146 !! Testing level ikp for instability 148 147 !! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 148 IF( zvn2(ikp) < -zn2_zero ) THEN ! Instability found! 150 149 ! 151 150 ilayer = ilayer + 1 ! yet another instable portion of the water column found.... 152 151 ! 153 152 IF( lp_monitor_point ) THEN 154 153 WRITE(numout,*) … … 165 164 WRITE(numout,*) 166 165 ENDIF 167 168 166 ! 169 167 IF( jiter == 1 ) inpcc = inpcc + 1 170 168 ! 171 169 IF( lp_monitor_point ) WRITE(numout, *) 'Negative N2 at ikp =',ikp,' for layer #', ilayer 172 170 ! 173 171 !! ikup is the uppermost point where mixing will start: 174 172 ikup = ikp - 1 ! ikup is always "at most at ikp-1", less if neutral levels overlying 175 173 ! 176 174 !! If the points above ikp-1 have N2 == 0 they must also be mixed: 177 175 IF( ikp > 2 ) THEN … … 184 182 END DO 185 183 ENDIF 186 184 ! 187 185 IF( ikup < 1 ) CALL ctl_stop( 'tra_npc : PROBLEM #1') 188 186 ! 189 187 zsum_temp = 0._wp 190 188 zsum_sali = 0._wp … … 195 193 DO jk = ikup, ikbot ! Inside the instable (and overlying neutral) portion of the column 196 194 ! 197 zdz = fse3t(ji,jj,jk)195 zdz = e3t_n(ji,jj,jk) 198 196 zsum_temp = zsum_temp + zvts(jk,jp_tem)*zdz 199 197 zsum_sali = zsum_sali + zvts(jk,jp_sal)*zdz … … 244 242 245 243 !! Interpolating alfa and beta at W point: 246 zrw = ( fsdepw(ji,jj,jk ) - fsdept(ji,jj,jk)) &247 & / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk))244 zrw = (gdepw_n(ji,jj,jk ) - gdept_n(ji,jj,jk)) & 245 & / (gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk)) 248 246 zaw = zvab(jk,jp_tem) * (1._wp - zrw) + zvab(jk-1,jp_tem) * zrw 249 247 zbw = zvab(jk,jp_sal) * (1._wp - zrw) + zvab(jk-1,jp_sal) * zrw … … 252 250 zvn2(jk) = grav*( zaw * ( zvts(jk-1,jp_tem) - zvts(jk,jp_tem) ) & 253 251 & - zbw * ( zvts(jk-1,jp_sal) - zvts(jk,jp_sal) ) ) & 254 & / fse3w(ji,jj,jk) * tmask(ji,jj,jk)252 & / e3w_n(ji,jj,jk) * tmask(ji,jj,jk) 255 253 256 254 !! OR, faster => just considering the vertical gradient of density
Note: See TracChangeset
for help on using the changeset viewer.