Changeset 6219
- Timestamp:
- 2016-01-06T16:39:17+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5107_mld_zint/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
r6072 r6219 193 193 194 194 ! Local variables 195 REAL(wp), PARAMETER :: zepsilon = 1.e-30 ! local small value 195 196 INTEGER, POINTER, DIMENSION(:,:) :: ikmt ! number of active tracer levels 196 197 INTEGER, POINTER, DIMENSION(:,:) :: ik_ref ! index of reference level … … 268 269 ikmt(:,:) = mbathy(:,:) - 1 269 270 270 ! Search for a uniform density/temperature region where adjacent levels 271 ! differ by less than rn_iso_frac * deltaT. 272 ! ik_iso is the index of the last level in the uniform layer 273 ! ll_found indicates whether the mixed layer depth can be found by interpolation 274 ik_iso(:,:) = ik_ref(:,:) 275 ll_found(:,:) = .false. 276 DO jj = 1, nlcj 277 DO ji = 1, nlci 271 IF ( rn_iso_frac - zepsilon > 0. ) THEN 272 ! Search for a uniform density/temperature region where adjacent levels 273 ! differ by less than rn_iso_frac * deltaT. 274 ! ik_iso is the index of the last level in the uniform layer 275 ! ll_found indicates whether the mixed layer depth can be found by interpolation 276 ik_iso(:,:) = ik_ref(:,:) 277 ll_found(:,:) = .false. 278 DO jj = 1, nlcj 279 DO ji = 1, nlci 278 280 !CDIR NOVECTOR 279 DO jk = ik_ref(ji,jj), ikmt(ji,jj)-1 280 IF ( zmoddT(ji,jj,jk) > ( rn_iso_frac * zdelta_T(ji,jj) ) ) THEN 281 ik_iso(ji,jj) = jk 282 ll_found(ji,jj) = ( zmoddT(ji,jj,jk) > zdelta_T(ji,jj) ) 283 EXIT 281 DO jk = ik_ref(ji,jj), ikmt(ji,jj)-1 282 IF ( zmoddT(ji,jj,jk) > ( rn_iso_frac * zdelta_T(ji,jj) ) ) THEN 283 ik_iso(ji,jj) = jk 284 ll_found(ji,jj) = ( zmoddT(ji,jj,jk) > zdelta_T(ji,jj) ) 285 EXIT 286 END IF 287 END DO 288 END DO 289 END DO 290 291 ! Use linear interpolation to find depth of mixed layer base where possible 292 hmld_zint(:,:) = rn_zref 293 DO jj = 1, jpj 294 DO ji = 1, jpi 295 IF (ll_found(ji,jj) .and. tmask(ji,jj,1) == 1.0) THEN 296 zdz = abs( zdelta_T(ji,jj) / zdTdz(ji,jj,ik_iso(ji,jj)) ) 297 hmld_zint(ji,jj) = fsdept(ji,jj,ik_iso(ji,jj)) + zdz 284 298 END IF 285 299 END DO 286 300 END DO 287 END DO 288 289 ! Use linear interpolation to find depth of mixed layer base where possible 290 hmld_zint(:,:) = rn_zref 291 DO jj = 1, jpj 292 DO ji = 1, jpi 293 IF (ll_found(ji,jj) .and. tmask(ji,jj,1) == 1.0) THEN 294 zdz = abs( zdelta_T(ji,jj) / zdTdz(ji,jj,ik_iso(ji,jj)) ) 295 hmld_zint(ji,jj) = fsdept(ji,jj,ik_iso(ji,jj)) + zdz 296 END IF 297 END DO 298 END DO 301 END IF 299 302 300 303 ! If ll_found = .false. then calculate MLD using difference of zdelta_T
Note: See TracChangeset
for help on using the changeset viewer.