Changeset 11602
- Timestamp:
- 2019-09-26T17:16:00+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/ENHANCE-03_domcfg/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-03_domcfg/src/dom_oce.F90
r11201 r11602 208 208 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gdept_0 !: t- depth [m] 209 209 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gdepw_0 !: w- depth [m] 210 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gde3w_0 !: w- depth (sum of e3w) [m]211 210 ! 212 211 INTEGER, PUBLIC :: nla10 !: deepest W level Above ~10m (nlb10 - 1) … … 240 239 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:), TARGET :: wmask !: land/ocean mask at W- pts 241 240 242 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_opnsea, msk_closea !: open ocean mask, closed sea mask (all of them)243 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_glo , msk_rnf , msk_emp !: closed sea masks244 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_gloid, msk_rnfid, msk_empid !: closed sea masks241 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_opnsea, msk_closea !: open ocean mask, closed sea mask (all of them) 242 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_glo , msk_rnf , msk_emp !: closed sea masks 243 INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: msk_gloid, msk_rnfid, msk_empid !: closed sea masks 245 244 246 245 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: tpol, fpol !: north fold mask (jperio= 3 or 4) … … 322 321 & ff_f (jpi,jpj) , ff_t (jpi,jpj) , STAT=ierr(3) ) 323 322 ! 324 ALLOCATE( gdept_0(jpi,jpj,jpk) , gdepw_0(jpi,jpj,jpk) , gde3w_0(jpi,jpj,jpk) ,STAT=ierr(4) )323 ALLOCATE( gdept_0(jpi,jpj,jpk) , gdepw_0(jpi,jpj,jpk) , STAT=ierr(4) ) 325 324 ! 326 325 ALLOCATE( e3t_0 (jpi,jpj,jpk) , e3u_0 (jpi,jpj,jpk) , e3v_0(jpi,jpj,jpk) , e3f_0(jpi,jpj,jpk) , e3w_0(jpi,jpj,jpk) , & -
NEMO/branches/2019/ENHANCE-03_domcfg/src/domzgr.F90
r11201 r11602 170 170 WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 171 171 WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ), & 172 & ' w ', MINVAL( gdepw_0(:,:,:) ) , '3w ', MINVAL( gde3w_0(:,:,:) )172 & ' w ', MINVAL( gdepw_0(:,:,:) ) 173 173 WRITE(numout,*) ' MIN val e3 t ', MINVAL( e3t_0(:,:,:) ), ' f ', MINVAL( e3f_0(:,:,:) ), & 174 174 & ' u ', MINVAL( e3u_0(:,:,:) ), ' u ', MINVAL( e3v_0(:,:,:) ), & … … 177 177 178 178 WRITE(numout,*) ' MAX val depth t ', MAXVAL( gdept_0(:,:,:) ), & 179 & ' w ', MAXVAL( gdepw_0(:,:,:) ) , '3w ', MAXVAL( gde3w_0(:,:,:) )179 & ' w ', MAXVAL( gdepw_0(:,:,:) ) 180 180 WRITE(numout,*) ' MAX val e3 t ', MAXVAL( e3t_0(:,:,:) ), ' f ', MAXVAL( e3f_0(:,:,:) ), & 181 181 & ' u ', MAXVAL( e3u_0(:,:,:) ), ' u ', MAXVAL( e3v_0(:,:,:) ), & … … 484 484 risfdep(:,:)=0.e0 485 485 misfdep(:,:)=1 486 !487 ! (ISF) TODO build ice draft netcdf file for isomip and build the corresponding part of code488 IF( cp_cfg == "isomip" .AND. ln_isfcav ) THEN489 risfdep(:,:)=200.e0490 misfdep(:,:)=1491 ij0 = 1 ; ij1 = 40492 DO jj = mj0(ij0), mj1(ij1)493 risfdep(:,jj)=700.0_wp-(gphit(:,jj)+80.0_wp)*125.0_wp494 END DO495 WHERE( bathy(:,:) <= 0._wp ) risfdep(:,:) = 0._wp496 !497 ELSEIF ( cp_cfg == "isomip2" .AND. ln_isfcav ) THEN498 !499 risfdep(:,:)=0.e0500 misfdep(:,:)=1501 ij0 = 1 ; ij1 = 40502 DO jj = mj0(ij0), mj1(ij1)503 risfdep(:,jj)=700.0_wp-(gphit(:,jj)+80.0_wp)*125.0_wp504 END DO505 WHERE( bathy(:,:) <= 0._wp ) risfdep(:,:) = 0._wp506 END IF507 486 ! 508 487 DEALLOCATE( idta, zdta ) … … 857 836 gdept_0(:,:,jk) = gdept_1d(jk) 858 837 gdepw_0(:,:,jk) = gdepw_1d(jk) 859 gde3w_0(:,:,jk) = gdepw_1d(jk)860 838 e3t_0 (:,:,jk) = e3t_1d (jk) 861 839 e3u_0 (:,:,jk) = e3t_1d (jk) … … 1095 1073 IF( MINVAL( gdept_0(:,:,:) ) < 0._wp ) CALL ctl_stop( ' zgr_zps : e r r o r gdept_0 < 0' ) 1096 1074 IF( MINVAL( gdepw_0(:,:,:) ) < 0._wp ) CALL ctl_stop( ' zgr_zps : e r r o r gdepw_0 < 0' ) 1097 1098 ! Compute gde3w_0 (vertical sum of e3w) 1099 IF ( ln_isfcav ) THEN ! if cavity 1100 WHERE( misfdep == 0 ) misfdep = 1 1101 DO jj = 1,jpj 1102 DO ji = 1,jpi 1103 gde3w_0(ji,jj,1) = 0.5_wp * e3w_0(ji,jj,1) 1104 DO jk = 2, misfdep(ji,jj) 1105 gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 1106 END DO 1107 IF( misfdep(ji,jj) >= 2 ) gde3w_0(ji,jj,misfdep(ji,jj)) = risfdep(ji,jj) + 0.5_wp * e3w_0(ji,jj,misfdep(ji,jj)) 1108 DO jk = misfdep(ji,jj) + 1, jpk 1109 gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 1110 END DO 1111 END DO 1112 END DO 1113 ELSE ! no cavity 1114 gde3w_0(:,:,1) = 0.5_wp * e3w_0(:,:,1) 1115 DO jk = 2, jpk 1116 gde3w_0(:,:,jk) = gde3w_0(:,:,jk-1) + e3w_0(:,:,jk) 1117 END DO 1118 END IF 1119 ! 1075 ! 1076 ! if in the future gde3w_0 need to be compute, use the function defined in NEMO 1077 ! for now gde3w_0 computation is removed as not an output of domcfg 1078 1120 1079 DEALLOCATE( zprt ) 1121 1080 ! … … 2136 2095 WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 2137 2096 WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ), & 2138 & ' w ', MINVAL( gdepw_0(:,:,:) ) , '3w ' , MINVAL( gde3w_0(:,:,:) )2097 & ' w ', MINVAL( gdepw_0(:,:,:) ) 2139 2098 WRITE(numout,*) ' MIN val e3 t ', MINVAL( e3t_0 (:,:,:) ), ' f ' , MINVAL( e3f_0 (:,:,:) ), & 2140 2099 & ' u ', MINVAL( e3u_0 (:,:,:) ), ' u ' , MINVAL( e3v_0 (:,:,:) ), & … … 2143 2102 2144 2103 WRITE(numout,*) ' MAX val depth t ', MAXVAL( gdept_0(:,:,:) ), & 2145 & ' w ', MAXVAL( gdepw_0(:,:,:) ) , '3w ' , MAXVAL( gde3w_0(:,:,:) )2104 & ' w ', MAXVAL( gdepw_0(:,:,:) ) 2146 2105 WRITE(numout,*) ' MAX val e3 t ', MAXVAL( e3t_0 (:,:,:) ), ' f ' , MAXVAL( e3f_0 (:,:,:) ), & 2147 2106 & ' u ', MAXVAL( e3u_0 (:,:,:) ), ' u ' , MAXVAL( e3v_0 (:,:,:) ), & … … 2246 2205 REAL(wp) :: ztmpu1, ztmpv1, ztmpf1 2247 2206 ! 2248 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3 , z_gsi3w32207 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3 2249 2208 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 2250 2209 !!---------------------------------------------------------------------- 2251 2210 2252 ALLOCATE( z_gsigw3 (jpi,jpj,jpk), z_gsigt3 (jpi,jpj,jpk) , z_gsi3w3 (jpi,jpj,jpk))2211 ALLOCATE( z_gsigw3 (jpi,jpj,jpk), z_gsigt3 (jpi,jpj,jpk) ) 2253 2212 ALLOCATE( z_esigt3 (jpi,jpj,jpk), z_esigw3 (jpi,jpj,jpk), z_esigtu3(jpi,jpj,jpk), z_esigtv3(jpi,jpj,jpk) ) 2254 2213 ALLOCATE( z_esigtf3(jpi,jpj,jpk), z_esigwu3(jpi,jpj,jpk), z_esigwv3(jpi,jpj,jpk) ) 2255 2214 2256 z_gsigw3 = 0._wp ; z_gsigt3 = 0._wp ; z_gsi3w3 = 0._wp2215 z_gsigw3 = 0._wp ; z_gsigt3 = 0._wp 2257 2216 z_esigt3 = 0._wp ; z_esigw3 = 0._wp 2258 2217 z_esigtu3 = 0._wp ; z_esigtv3 = 0._wp ; z_esigtf3 = 0._wp … … 2281 2240 z_esigt3(ji,jj,jpk) = 2._wp * ( z_gsigt3(ji,jj,jpk) - z_gsigw3(ji,jj,jpk) ) 2282 2241 ! 2283 ! Coefficients for vertical depth as the sum of e3w scale factors2284 z_gsi3w3(ji,jj,1) = 0.5_wp * z_esigw3(ji,jj,1)2285 DO jk = 2, jpk2286 z_gsi3w3(ji,jj,jk) = z_gsi3w3(ji,jj,jk-1) + z_esigw3(ji,jj,jk)2287 END DO2288 !2289 2242 DO jk = 1, jpk 2290 2243 zcoeft = ( REAL(jk,wp) - 0.5_wp ) / REAL(jpkm1,wp) … … 2292 2245 gdept_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigt3(ji,jj,jk)+rn_hc*zcoeft ) 2293 2246 gdepw_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigw3(ji,jj,jk)+rn_hc*zcoefw ) 2294 gde3w_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsi3w3(ji,jj,jk)+rn_hc*zcoeft )2295 2247 END DO 2296 2248 ! … … 2337 2289 END DO 2338 2290 ! 2339 DEALLOCATE( z_gsigw3, z_gsigt3 , z_gsi3w3)2291 DEALLOCATE( z_gsigw3, z_gsigt3 ) 2340 2292 DEALLOCATE( z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 ) 2341 2293 ! … … 2365 2317 REAL(wp) :: ztmpu1, ztmpv1, ztmpf1 2366 2318 ! 2367 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3 , z_gsi3w32319 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_gsigw3, z_gsigt3 2368 2320 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 2369 2321 !!---------------------------------------------------------------------- 2370 2322 ! 2371 ALLOCATE( z_gsigw3 (jpi,jpj,jpk), z_gsigt3 (jpi,jpj,jpk) , z_gsi3w3 (jpi,jpj,jpk))2323 ALLOCATE( z_gsigw3 (jpi,jpj,jpk), z_gsigt3 (jpi,jpj,jpk) ) 2372 2324 ALLOCATE( z_esigt3 (jpi,jpj,jpk), z_esigw3 (jpi,jpj,jpk), z_esigtu3(jpi,jpj,jpk), z_esigtv3(jpi,jpj,jpk)) 2373 2325 ALLOCATE( z_esigtf3(jpi,jpj,jpk), z_esigwu3(jpi,jpj,jpk), z_esigwv3(jpi,jpj,jpk) ) 2374 2326 2375 z_gsigw3 = 0._wp ; z_gsigt3 = 0._wp ; z_gsi3w3 = 0._wp2327 z_gsigw3 = 0._wp ; z_gsigt3 = 0._wp 2376 2328 z_esigt3 = 0._wp ; z_esigw3 = 0._wp 2377 2329 z_esigtu3 = 0._wp ; z_esigtv3 = 0._wp ; z_esigtf3 = 0._wp … … 2425 2377 z_esigt3(ji,jj,jpk) = 2.0_wp * (z_gsigt3(ji,jj,jpk) - z_gsigw3(ji,jj,jpk)) 2426 2378 2427 ! Coefficients for vertical depth as the sum of e3w scale factors2428 z_gsi3w3(ji,jj,1) = 0.5 * z_esigw3(ji,jj,1)2429 DO jk = 2, jpk2430 z_gsi3w3(ji,jj,jk) = z_gsi3w3(ji,jj,jk-1) + z_esigw3(ji,jj,jk)2431 END DO2432 2433 2379 DO jk = 1, jpk 2434 2380 gdept_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigt3(ji,jj,jk) 2435 2381 gdepw_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigw3(ji,jj,jk) 2436 gde3w_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsi3w3(ji,jj,jk)2437 2382 END DO 2438 2383 … … 2503 2448 CALL lbc_lnk('domzgr',e3uw_0,'T',1.) ; CALL lbc_lnk('domzgr',e3vw_0,'T',1.) 2504 2449 ! 2505 DEALLOCATE( z_gsigw3, z_gsigt3 , z_gsi3w3)2450 DEALLOCATE( z_gsigw3, z_gsigt3 ) 2506 2451 DEALLOCATE( z_esigt3, z_esigw3, z_esigtu3, z_esigtv3, z_esigtf3, z_esigwu3, z_esigwv3 ) 2507 2452 ! … … 2521 2466 INTEGER :: ji, jj, jk ! dummy loop argument 2522 2467 REAL(wp) :: zcoeft, zcoefw ! temporary scalars 2523 REAL(wp), ALLOCATABLE, DIMENSION(:) :: z_gsigw, z_gsigt , z_gsi3w2468 REAL(wp), ALLOCATABLE, DIMENSION(:) :: z_gsigw, z_gsigt 2524 2469 REAL(wp), ALLOCATABLE, DIMENSION(:) :: z_esigt, z_esigw 2525 2470 !!---------------------------------------------------------------------- 2526 2471 2527 ALLOCATE( z_gsigw(jpk), z_gsigt(jpk) , z_gsi3w(jpk))2472 ALLOCATE( z_gsigw(jpk), z_gsigt(jpk) ) 2528 2473 ALLOCATE( z_esigt(jpk), z_esigw(jpk) ) 2529 2474 2530 z_gsigw = 0._wp ; z_gsigt = 0._wp ; z_gsi3w = 0._wp2475 z_gsigw = 0._wp ; z_gsigt = 0._wp 2531 2476 z_esigt = 0._wp ; z_esigw = 0._wp 2532 2477 … … 2547 2492 z_esigt(jpk) = 2._wp * ( z_gsigt(jpk) - z_gsigw(jpk) ) 2548 2493 ! 2549 ! Coefficients for vertical depth as the sum of e3w scale factors2550 z_gsi3w(1) = 0.5_wp * z_esigw(1)2551 DO jk = 2, jpk2552 z_gsi3w(jk) = z_gsi3w(jk-1) + z_esigw(jk)2553 END DO2554 !!gm: depuw, depvw can be suppressed (modif in ldfslp) and depw=dep3w can be set (save 3 3D arrays)2555 2494 DO jk = 1, jpk 2556 2495 zcoeft = ( REAL(jk,wp) - 0.5_wp ) / REAL(jpkm1,wp) … … 2558 2497 gdept_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigt(jk) + hift(:,:)*zcoeft ) 2559 2498 gdepw_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigw(jk) + hift(:,:)*zcoefw ) 2560 gde3w_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsi3w(jk) + hift(:,:)*zcoeft ) 2561 END DO 2562 !!gm: e3uw, e3vw can be suppressed (modif in dynzdf, dynzdf_iso, zdfbfr) (save 2 3D arrays) 2499 END DO 2500 2563 2501 DO jj = 1, jpj 2564 2502 DO ji = 1, jpi … … 2576 2514 END DO 2577 2515 ! 2578 DEALLOCATE( z_gsigw, z_gsigt , z_gsi3w)2579 DEALLOCATE( z_esigt, z_esigw 2516 DEALLOCATE( z_gsigw, z_gsigt ) 2517 DEALLOCATE( z_esigt, z_esigw ) 2580 2518 ! 2581 2519 END SUBROUTINE s_tanh
Note: See TracChangeset
for help on using the changeset viewer.