 Timestamp:
 20150302T16:30:57+01:00 (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
r5098 r5111 298 298 ENDIF 299 299 300 ! IF ( ln_isfcav ) THEN 300 301 ! need to be like this to compute the pressure gradient with ISF. If not, level beneath the ISF are not aligned (sum(e3t) /= depth) 301 302 ! define e3t_0 and e3w_0 as the differences between gdept and gdepw respectively 302 DO jk = 1, jpkm1 303 e3t_1d(jk) = gdepw_1d(jk+1)gdepw_1d(jk) 304 END DO 305 e3t_1d(jpk) = e3t_1d(jpk1) ! we don't care because this level is masked in NEMO 306 307 DO jk = 2, jpk 308 e3w_1d(jk) = gdept_1d(jk)  gdept_1d(jk1) 309 END DO 310 e3w_1d(1 ) = 2._wp * (gdept_1d(1)  gdepw_1d(1)) 303 DO jk = 1, jpkm1 304 e3t_1d(jk) = gdepw_1d(jk+1)gdepw_1d(jk) 305 END DO 306 e3t_1d(jpk) = e3t_1d(jpk1) ! we don't care because this level is masked in NEMO 307 308 DO jk = 2, jpk 309 e3w_1d(jk) = gdept_1d(jk)  gdept_1d(jk1) 310 END DO 311 e3w_1d(1 ) = 2._wp * (gdept_1d(1)  gdepw_1d(1)) 312 ! END IF 311 313 312 314 !!gm BUG in scoordinate this does not work! … … 473 475 ! (ISF) TODO build ice draft netcdf file for isomip and build the corresponding part of code 474 476 IF( cp_cfg == "isomip" .AND. ln_isfcav ) THEN 475 ! 476 risfdep(:,:)=200.e0 477 misfdep(:,:)=1 478 ij0 = 1 ; ij1 = 40 479 DO jj = mj0(ij0), mj1(ij1) 480 risfdep(:,jj)=700.0_wp(gphit(:,jj)+80.0_wp)*125.0_wp 481 END DO 477 risfdep(:,:)=200.e0 478 misfdep(:,:)=1 479 ij0 = 1 ; ij1 = 40 480 DO jj = mj0(ij0), mj1(ij1) 481 risfdep(:,jj)=700.0_wp(gphit(:,jj)+80.0_wp)*125.0_wp 482 END DO 482 483 WHERE( bathy(:,:) <= 0._wp ) risfdep(:,:) = 0._wp 483 484 ! 484 485 ELSEIF ( cp_cfg == "isomip2" .AND. ln_isfcav ) THEN 485 486 ! … … 536 537 CALL iom_get ( inum, jpdom_data, 'Bathymetry', bathy ) 537 538 CALL iom_close( inum ) 538 ! 539 ! 539 540 risfdep(:,:)=0._wp 540 541 misfdep(:,:)=1 … … 963 964 !! 964 965 !! 965 INTEGER :: ji, jj, jk , jl! dummy loop indices966 INTEGER :: ji, jj, jk ! dummy loop indices 966 967 INTEGER :: ik, it ! temporary integers 967 INTEGER :: id, jd, nprocd968 968 LOGICAL :: ll_print ! Allow control print for debugging 969 969 REAL(wp) :: ze3tp , ze3wp ! Last ocean level thickness at T and Wpoints 970 970 REAL(wp) :: zdepwp, zdepth ! Ajusted ocean depth to avoid too small e3t 971 REAL(wp) :: zmax , zmin ! Maximum and minimum depth971 REAL(wp) :: zmax ! Maximum depth 972 972 REAL(wp) :: zdiff ! temporary scalar 973 973 REAL(wp) :: zrefdep ! temporary scalar … … 1046 1046 & * ((gdept_1d( ik )  gdepw_1d(ik) ) & 1047 1047 & / ( gdepw_1d( ik+1)  gdepw_1d(ik) )) 1048 e3t_0 (ji,jj,ik) = e3t_1d(ik) * ( gdepw_0 (ji,jj,ik+1)  gdepw_1d(ik) ) &1049 & / ( gdepw_1d( ik+1)  gdepw_1d(ik) )1048 e3t_0 (ji,jj,ik) = e3t_1d (ik) * ( gdepw_0 (ji,jj,ik+1)  gdepw_1d(ik) ) & 1049 & / ( gdepw_1d( ik+1)  gdepw_1d(ik) ) 1050 1050 e3w_0(ji,jj,ik) = 0.5_wp * ( gdepw_0(ji,jj,ik+1) + gdepw_1d(ik+1)  2._wp * gdepw_1d(ik) ) & 1051 1051 & * ( e3w_1d(ik) / ( gdepw_1d(ik+1)  gdepw_1d(ik) ) ) … … 1202 1202 1203 1203 ! Compute gdep3w_0 (vertical sum of e3w) 1204 IF ( ln_isfcav ) THEN 1204 IF ( ln_isfcav ) THEN ! if cavity 1205 1205 WHERE (misfdep == 0) misfdep = 1 1206 1206 DO jj = 1,jpj … … 1335 1335 misfdep(jpi,:) = misfdep( 2 ,:) 1336 1336 ENDIF 1337 1337 1338 1338 IF( nperio == 1 .OR. nperio == 4 .OR. nperio == 6 ) THEN 1339 1339 mbathy( 1 ,:) = mbathy(jpim1,:) ! local domain is cyclic eastwest 1340 1340 mbathy(jpi,:) = mbathy( 2 ,:) 1341 1341 ENDIF 1342 1342 1343 1343 ! split last cell if possible (only where water column is 2 cell or less) 1344 1344 DO jk = jpkm1, 1, 1 … … 1358 1358 END WHERE 1359 1359 END DO 1360 1360 1361 1361 1362 1362 ! Case where bathy and risfdep compatible but not the level variable mbathy/misfdep because of partial cell condition … … 1639 1639 IF( zmbathy(ji,jj) .LT. misfdep(ji ,jj+1) ) ibtestjp1 = 0 1640 1640 ibtest=MAX(ibtestim1, ibtestip1, ibtestjm1, ibtestjp1) 1641 IF( ibtest == 0 ) THEN1641 IF( ibtest == 0 .AND. misfdep(ji,jj) .GE. 2) THEN 1642 1642 mbathy(ji,jj) = 0 ; bathy(ji,jj) = 0.0_wp ; misfdep(ji,jj) = 0 ; risfdep(ji,jj) = 0.0_wp ; 1643 1643 END IF
Note: See TracChangeset
for help on using the changeset viewer.