Changeset 11257
- Timestamp:
- 2019-07-11T17:57:52+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_isf_eorca1_dynldfc3d_UKESM_GO6package_r9321/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90
r6486 r11257 203 203 INTEGER :: ifreq, il1, il2, ij, ii 204 204 REAL(wp) :: zahmeq, zcoff, zcoft, zmsk ! local scalars 205 REAL(wp) :: zemax , zemin, ze ref, zahmm205 REAL(wp) :: zemax , zemin, zetmax, zefmax, zeref, zahmm, zemax75 206 206 CHARACTER (len=15) :: clexp 207 207 INTEGER , POINTER, DIMENSION(:,:) :: icof 208 INTEGER , POINTER, DIMENSION(:,:) :: imsk 208 209 REAL(wp), POINTER, DIMENSION(: ) :: zcoef 209 210 REAL(wp), POINTER, DIMENSION(:,:) :: zahm0 … … 213 214 ! 214 215 CALL wrk_alloc( jpi , jpj , icof ) 216 CALL wrk_alloc( jpi , jpj , imsk ) 215 217 CALL wrk_alloc( jpk , zcoef ) 216 218 CALL wrk_alloc( jpi , jpj , zahm0 ) … … 250 252 zahmeq = 5.0 * aht0 251 253 zahmm = min( 160000.0, ahm0) 252 zemax = MAXVAL ( e1t(:,:) * e2t(:,:), tmask(:,:,1) .GE. 0.5 )253 zemin = MINVAL ( e1t(:,:) * e2t(:,:), tmask(:,:,1) .GE. 0.5 )254 zemax = MAXVAL ( e1t(:,:) * e2t(:,:), ssmask(:,:) .GE. 0.5 ) 255 zemin = MINVAL ( e1t(:,:) * e2t(:,:), ssmask(:,:) .GE. 0.5 ) 254 256 zeref = MAXVAL ( e1t(:,:) * e2t(:,:), & 255 & tmask(:,:,1) .GE. 0.5 .AND. ABS(gphit(:,:)) .GT. 50. )257 & ssmask(:,:) .GE. 0.5 .AND. ABS(gphit(:,:)) .GT. 50. ) 256 258 257 259 DO jj = 1, jpj … … 314 316 END DO 315 317 ! f-point 316 icof(:,:) = icof(:,:) * tmask(:,:,1)318 icof(:,:) = icof(:,:) * ssmask(:,:) 317 319 DO jj = 1, jpjm1 318 320 DO ji = 1, jpim1 ! NO vector opt. 319 zmsk = tmask(ji,jj+1,1) + tmask(ji+1,jj+1,1) + tmask(ji,jj,1) + tmask(ji,jj+1,1)321 zmsk = ssmask(ji,jj+1) + ssmask(ji+1,jj+1) + ssmask(ji,jj) + ssmask(ji,jj+1) 320 322 IF( zmsk == 0. ) THEN 321 323 zcoff = 1. … … 380 382 CALL lbc_lnk( ahm2, 'F', 1. ) 381 383 384 IF( jp_cfg == 1 ) THEN ! Limit AHM south of -75 (critical for Giant ice shelves with small e1/e2) 385 ! special orca1 treatment remove the grid size scaling. Need to restore it south of -75N 386 ! define max grid size south of -75 387 imsk(:,:) = 0 388 WHERE( gphit(:,:) < -75.0 ) imsk(:,:) = 1 389 zemax75 = MAX( MAXVAL( e1t(:,:)*imsk(:,:) ), MAXVAL( e2t(:,:)*imsk(:,:) ) ) 390 IF( lk_mpp ) CALL mpp_max(zemax75) 391 ! 392 ! apply grid size scaling of ahm south of -75 (no change north of it) 393 DO jj = 1, jpj 394 DO ji = 1, jpi 395 IF ( gphit(ji,jj) < -75.0 ) THEN 396 zetmax = MAX( e1t(ji,jj), e2t(ji,jj) ) 397 zefmax = MAX( e1f(ji,jj), e2f(ji,jj) ) 398 ahm1(ji,jj,:) = zetmax / zemax75 * ahm1(ji,jj,:) 399 ahm2(ji,jj,:) = zefmax / zemax75 * ahm2(ji,jj,:) 400 END IF 401 END DO 402 END DO 403 END IF 404 382 405 383 406 IF(lwp) THEN ! Control print … … 428 451 ! 429 452 CALL wrk_dealloc( jpi , jpj , icof ) 453 CALL wrk_dealloc( jpi , jpj , imsk ) 430 454 CALL wrk_dealloc( jpk , zcoef ) 431 455 CALL wrk_dealloc( jpi , jpj , zahm0 )
Note: See TracChangeset
for help on using the changeset viewer.