- Timestamp:
- 2020-01-15T10:33:19+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/ZDF/zdfosm.F90
r12311 r12322 141 141 !!---------------------------------------------------------------------- 142 142 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 143 !! $Id $143 !! $Id: zdfosm.F90 12317 2020-01-14 12:40:47Z agn $ 144 144 !! Software governed by the CeCILL license (see ./LICENSE) 145 145 !!---------------------------------------------------------------------- … … 483 483 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 484 484 ! BL must be always 4 levels deep. 485 ! For calculation of lateral buoyancy gradients for FK in 486 ! zdf_osm_zmld_horizontal_gradients need halo values for ibld, so must 487 ! previously exist for hbl also. 485 488 hbl(:,:) = MAX(hbl(:,:), gdepw_n(:,:,4) ) 486 489 ibld(:,:) = 4 487 490 DO jk = 5, jpkm1 488 DO jj = 2, jpjm1489 DO ji = 2, jpim1491 DO jj = 1, jpj 492 DO ji = 1, jpi 490 493 IF ( hbl(ji,jj) >= gdepw_n(ji,jj,jk) ) THEN 491 494 ibld(ji,jj) = MIN(mbkt(ji,jj), jk) … … 526 529 END DO 527 530 528 imld = ibld! use imld to hold previous blayer index531 imld(:,:) = ibld(:,:) ! use imld to hold previous blayer index 529 532 ibld(:,:) = 4 530 533 … … 1008 1011 END DO 1009 1012 1013 IF(ln_dia_osm) THEN 1014 IF ( iom_use("zdtdz_pyc") ) CALL iom_put( "zdtdz_pyc", wmask*zdtdz_pyc ) 1015 IF ( iom_use("zdsdz_pyc") ) CALL iom_put( "zdsdz_pyc", wmask*zdsdz_pyc ) 1016 IF ( iom_use("zdbdz_pyc") ) CALL iom_put( "zdbdz_pyc", wmask*zdbdz_pyc ) 1017 END IF 1018 1010 1019 ! KPP-style Ri# mixing 1011 1020 IF( ln_kpprimix) THEN … … 1139 1148 END DO 1140 1149 END DO 1150 ! Lateral boundary conditions on final outputs for hbl, on T-grid (sign unchanged) 1151 CALL lbc_lnk_multi( 'zdfosm', hbl, 'T', 1., dh, 'T', 1., hmle, 'T', 1. ) 1141 1152 ! Lateral boundary conditions on final outputs for gham[ts], on W-grid (sign unchanged) 1142 1153 ! Lateral boundary conditions on final outputs for gham[uv], on [UV]-grid (sign unchanged) … … 2186 2197 CALL iom_set_rstw_var_active('wn') 2187 2198 CALL iom_set_rstw_var_active('hbl') 2188 CALL iom_set_rstw_var_active('hbli') 2199 CALL iom_set_rstw_var_active('dh') 2200 IF( ln_osm_mle ) THEN 2201 CALL iom_set_rstw_var_active('hmle') 2202 END IF 2189 2203 ENDIF 2190 2204 END SUBROUTINE zdf_osm_init … … 2204 2218 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 2205 2219 2206 INTEGER :: id1, id2 ! iom enquiry index2220 INTEGER :: id1, id2, id3 ! iom enquiry index 2207 2221 INTEGER :: ji, jj, jk ! dummy loop indices 2208 2222 INTEGER :: iiki, ikt ! local integer … … 2232 2246 CALL iom_get( numror, jpdom_autoglo, 'dh', dh, ldxios = lrxios ) 2233 2247 WRITE(numout,*) ' ===>>>> : hbl & dh read from restart file' 2248 IF( ln_osm_mle ) THEN 2249 id3 = iom_varid( numror, 'hmle' , ldstop = .FALSE. ) 2250 IF( id3 > 0) THEN 2251 CALL iom_get( numror, jpdom_autoglo, 'hmle' , hmle , ldxios = lrxios ) 2252 WRITE(numout,*) ' ===>>>> : hmle read from restart file' 2253 ELSE 2254 WRITE(numout,*) ' ===>>>> : hmle not found, set to hbl' 2255 hmle(:,:) = hbl(:,:) ! Initialise MLE depth. 2256 END IF 2257 END IF 2234 2258 RETURN 2235 2259 ELSE ! 'hbl' & 'dh' not in restart file, recalculate … … 2243 2267 IF( TRIM(cdrw) == 'WRITE') THEN !* Write hbli into the restart file, then return 2244 2268 IF(lwp) WRITE(numout,*) '---- osm-rst ----' 2245 IF( lwxios ) CALL iom_swap( cwxios_context ) 2246 CALL iom_rstput( kt, nitrst, numrow, 'wn' , wn , ldxios = lwxios ) 2247 CALL iom_rstput( kt, nitrst, numrow, 'hbl' , hbl , ldxios = lwxios ) 2248 CALL iom_rstput( kt, nitrst, numrow, 'dh' , dh, ldxios = lwxios ) 2249 IF( lwxios ) CALL iom_swap( cxios_context ) 2269 CALL iom_rstput( kt, nitrst, numrow, 'wn' , wn, ldxios = lwxios ) 2270 CALL iom_rstput( kt, nitrst, numrow, 'hbl' , hbl, ldxios = lwxios ) 2271 CALL iom_rstput( kt, nitrst, numrow, 'dh' , dh, ldxios = lwxios ) 2272 IF( ln_osm_mle ) THEN 2273 CALL iom_rstput( kt, nitrst, numrow, 'hmle', hmle, ldxios = lwxios ) 2274 END IF 2250 2275 RETURN 2251 2276 END IF … … 2281 2306 END DO 2282 2307 2283 IF( ln_osm_mle ) hmle(:,:) = hbl(:,:) ! Initialise MLE depth.2284 2285 2308 WRITE(numout,*) ' ===>>>> : hbl computed from stratification' 2309 2310 IF( ln_osm_mle ) THEN 2311 hmle(:,:) = hbl(:,:) ! Initialise MLE depth. 2312 WRITE(numout,*) ' ===>>>> : hmle set = to hbl' 2313 END IF 2314 2286 2315 wn(:,:,:) = 0._wp 2287 2316 WRITE(numout,*) ' ===>>>> : wn not in restart file, set to zero initially'
Note: See TracChangeset
for help on using the changeset viewer.