Changeset 4159 for palm/trunk/SOURCE/surface_mod.f90
- Timestamp:
- Aug 15, 2019 1:31:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_mod.f90
r4156 r4159 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Surface classification revised and adjusted to changes in init_grid 29 ! 30 ! 4156 2019-08-14 09:18:14Z schwenkel 28 31 ! Bugfix in case of cloud microphysics morrison 29 32 ! … … 939 942 LOGICAL :: building !< flag indicating building grid point 940 943 LOGICAL :: terrain !< flag indicating natural terrain grid point 944 LOGICAL :: unresolved_building !< flag indicating a grid point where actually a building is 945 !< defined but not resolved by the vertical grid 941 946 942 947 num_def_h = 0 … … 966 971 IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) ) THEN 967 972 ! 968 !-- Determine flags indicating terrain or building. 973 !-- Determine flags indicating a terrain surface, a building 974 !-- surface, 969 975 terrain = BTEST( wall_flags_0(k-1,j,i), 5 ) .OR. & 970 976 topo_no_distinct … … 972 978 topo_no_distinct 973 979 ! 980 !-- unresolved_building indicates a surface with equal height 981 !-- as terrain but with a non-grid resolved building on top. 982 !-- These surfaces will be flagged as urban surfaces. 983 unresolved_building = BTEST( wall_flags_0(k-1,j,i), 5 ) & 984 .AND. BTEST( wall_flags_0(k-1,j,i), 6 ) 985 ! 974 986 !-- Land-surface type 975 IF ( land_surface .AND. terrain ) THEN 987 IF ( land_surface .AND. terrain .AND. & 988 .NOT. unresolved_building ) THEN 976 989 num_lsm_h = num_lsm_h + 1 977 990 ! … … 1027 1040 building = BTEST( wall_flags_0(k,j-1,i), 6 ) .OR. & 1028 1041 topo_no_distinct 1029 IF ( land_surface .AND. terrain ) THEN 1042 1043 unresolved_building = BTEST( wall_flags_0(k,j-1,i), 5 ) & 1044 .AND. BTEST( wall_flags_0(k,j-1,i), 6 ) 1045 1046 IF ( land_surface .AND. terrain .AND. & 1047 .NOT. unresolved_building ) THEN 1030 1048 num_lsm_v(0) = num_lsm_v(0) + 1 1031 1049 ELSEIF ( urban_surface .AND. building ) THEN … … 1056 1074 building = BTEST( wall_flags_0(k,j+1,i), 6 ) .OR. & 1057 1075 topo_no_distinct 1058 IF ( land_surface .AND. terrain ) THEN 1076 1077 unresolved_building = BTEST( wall_flags_0(k,j+1,i), 5 ) & 1078 .AND. BTEST( wall_flags_0(k,j+1,i), 6 ) 1079 1080 IF ( land_surface .AND. terrain .AND. & 1081 .NOT. unresolved_building ) THEN 1059 1082 num_lsm_v(1) = num_lsm_v(1) + 1 1060 1083 ELSEIF ( urban_surface .AND. building ) THEN … … 1085 1108 building = BTEST( wall_flags_0(k,j,i-1), 6 ) .OR. & 1086 1109 topo_no_distinct 1087 IF ( land_surface .AND. terrain ) THEN 1110 1111 unresolved_building = BTEST( wall_flags_0(k,j,i-1), 5 ) & 1112 .AND. BTEST( wall_flags_0(k,j,i-1), 6 ) 1113 1114 IF ( land_surface .AND. terrain .AND. & 1115 .NOT. unresolved_building ) THEN 1088 1116 num_lsm_v(2) = num_lsm_v(2) + 1 1089 1117 ELSEIF ( urban_surface .AND. building ) THEN … … 1114 1142 building = BTEST( wall_flags_0(k,j,i+1), 6 ) .OR. & 1115 1143 topo_no_distinct 1116 IF ( land_surface .AND. terrain ) THEN 1144 1145 unresolved_building = BTEST( wall_flags_0(k,j,i+1), 5 ) & 1146 .AND. BTEST( wall_flags_0(k,j,i+1), 6 ) 1147 1148 IF ( land_surface .AND. terrain .AND. & 1149 .NOT. unresolved_building ) THEN 1117 1150 num_lsm_v(3) = num_lsm_v(3) + 1 1118 1151 ELSEIF ( urban_surface .AND. building ) THEN … … 2217 2250 INTEGER(iwp), DIMENSION(0:3) :: start_index_usm_v !< dummy to determing local start index in surface type for given (j,i), for vertical urban surfaces 2218 2251 2219 LOGICAL :: building !< flag indicating building grid point2220 LOGICAL :: terrain !< flag indicating natural terrain grid point2221 2252 LOGICAL :: building !< flag indicating building grid point 2253 LOGICAL :: terrain !< flag indicating natural terrain grid point 2254 LOGICAL :: unresolved_building !< flag indicating a grid point where actually a building is defined but not resolved by the vertical grid 2222 2255 ! 2223 2256 !-- Set offset indices, i.e. index difference between surface element and … … 2322 2355 building = BTEST( wall_flags_0(k-1,j,i), 6 ) .OR. & 2323 2356 topo_no_distinct 2357 2358 ! 2359 !-- unresolved_building indicates a surface with equal height 2360 !-- as terrain but with a non-grid resolved building on top. 2361 !-- These surfaces will be flagged as urban surfaces. 2362 unresolved_building = BTEST( wall_flags_0(k-1,j,i), 5 ) & 2363 .AND. BTEST( wall_flags_0(k-1,j,i), 6 ) 2324 2364 ! 2325 2365 !-- Natural surface type 2326 IF ( land_surface .AND. terrain ) THEN 2366 IF ( land_surface .AND. terrain .AND. & 2367 .NOT. unresolved_building ) THEN 2327 2368 CALL initialize_horizontal_surfaces( k, j, i, & 2328 2369 surf_lsm_h, & … … 2375 2416 building = BTEST( wall_flags_0(k,j-1,i), 6 ) .OR. & 2376 2417 topo_no_distinct 2377 IF ( urban_surface .AND. building ) THEN 2418 2419 unresolved_building = BTEST( wall_flags_0(k,j-1,i), 5 ) & 2420 .AND. BTEST( wall_flags_0(k,j-1,i), 6 ) 2421 2422 IF ( land_surface .AND. terrain .AND. & 2423 .NOT. unresolved_building ) THEN 2424 CALL initialize_vertical_surfaces( k, j, i, & 2425 surf_lsm_v(0), & 2426 num_lsm_v(0), & 2427 num_lsm_v_kji(0), & 2428 .FALSE., .FALSE., & 2429 .FALSE., .TRUE. ) 2430 ELSEIF ( urban_surface .AND. building ) THEN 2378 2431 CALL initialize_vertical_surfaces( k, j, i, & 2379 2432 surf_usm_v(0), & … … 2381 2434 num_usm_v_kji(0), & 2382 2435 .FALSE., .FALSE., & 2383 .FALSE., .TRUE. ) 2384 ELSEIF ( land_surface .AND. terrain ) THEN 2385 CALL initialize_vertical_surfaces( k, j, i, & 2386 surf_lsm_v(0), & 2387 num_lsm_v(0), & 2388 num_lsm_v_kji(0), & 2389 .FALSE., .FALSE., & 2390 .FALSE., .TRUE. ) 2436 .FALSE., .TRUE. ) 2391 2437 ELSE 2392 2438 CALL initialize_vertical_surfaces( k, j, i, & … … 2407 2453 building = BTEST( wall_flags_0(k,j+1,i), 6 ) .OR. & 2408 2454 topo_no_distinct 2409 IF ( urban_surface .AND. building ) THEN 2455 2456 unresolved_building = BTEST( wall_flags_0(k,j+1,i), 5 ) & 2457 .AND. BTEST( wall_flags_0(k,j+1,i), 6 ) 2458 2459 IF ( land_surface .AND. terrain .AND. & 2460 .NOT. unresolved_building ) THEN 2461 CALL initialize_vertical_surfaces( k, j, i, & 2462 surf_lsm_v(1), & 2463 num_lsm_v(1), & 2464 num_lsm_v_kji(1), & 2465 .FALSE., .FALSE., & 2466 .TRUE., .FALSE. ) 2467 ELSEIF ( urban_surface .AND. building ) THEN 2410 2468 CALL initialize_vertical_surfaces( k, j, i, & 2411 2469 surf_usm_v(1), & … … 2414 2472 .FALSE., .FALSE., & 2415 2473 .TRUE., .FALSE. ) 2416 ELSEIF ( land_surface .AND. terrain ) THEN2417 CALL initialize_vertical_surfaces( k, j, i, &2418 surf_lsm_v(1), &2419 num_lsm_v(1), &2420 num_lsm_v_kji(1), &2421 .FALSE., .FALSE., &2422 .TRUE., .FALSE. )2423 2474 ELSE 2424 2475 CALL initialize_vertical_surfaces( k, j, i, & … … 2439 2490 building = BTEST( wall_flags_0(k,j,i-1), 6 ) .OR. & 2440 2491 topo_no_distinct 2441 IF ( urban_surface .AND. building ) THEN 2492 2493 unresolved_building = BTEST( wall_flags_0(k,j,i-1), 5 ) & 2494 .AND. BTEST( wall_flags_0(k,j,i-1), 6 ) 2495 2496 IF ( land_surface .AND. terrain .AND. & 2497 .NOT. unresolved_building ) THEN 2498 CALL initialize_vertical_surfaces( k, j, i, & 2499 surf_lsm_v(2), & 2500 num_lsm_v(2), & 2501 num_lsm_v_kji(2), & 2502 .TRUE., .FALSE., & 2503 .FALSE., .FALSE. ) 2504 ELSEIF ( urban_surface .AND. building ) THEN 2442 2505 CALL initialize_vertical_surfaces( k, j, i, & 2443 2506 surf_usm_v(2), & … … 2445 2508 num_usm_v_kji(2), & 2446 2509 .TRUE., .FALSE., & 2447 .FALSE., .FALSE. ) 2448 ELSEIF ( land_surface .AND. terrain ) THEN 2449 CALL initialize_vertical_surfaces( k, j, i, & 2450 surf_lsm_v(2), & 2451 num_lsm_v(2), & 2452 num_lsm_v_kji(2), & 2453 .TRUE., .FALSE., & 2454 .FALSE., .FALSE. ) 2510 .FALSE., .FALSE. ) 2455 2511 ELSE 2456 2512 CALL initialize_vertical_surfaces( k, j, i, & … … 2471 2527 building = BTEST( wall_flags_0(k,j,i+1), 6 ) .OR. & 2472 2528 topo_no_distinct 2473 IF ( urban_surface .AND. building ) THEN 2529 2530 unresolved_building = BTEST( wall_flags_0(k,j,i+1), 5 ) & 2531 .AND. BTEST( wall_flags_0(k,j,i+1), 6 ) 2532 2533 IF ( land_surface .AND. terrain .AND. & 2534 .NOT. unresolved_building ) THEN 2535 CALL initialize_vertical_surfaces( k, j, i, & 2536 surf_lsm_v(3), & 2537 num_lsm_v(3), & 2538 num_lsm_v_kji(3), & 2539 .FALSE., .TRUE., & 2540 .FALSE., .FALSE. ) 2541 ELSEIF ( urban_surface .AND. building ) THEN 2474 2542 CALL initialize_vertical_surfaces( k, j, i, & 2475 2543 surf_usm_v(3), & … … 2477 2545 num_usm_v_kji(3), & 2478 2546 .FALSE., .TRUE., & 2479 .FALSE., .FALSE. ) 2480 ELSEIF ( land_surface .AND. terrain ) THEN 2481 CALL initialize_vertical_surfaces( k, j, i, & 2482 surf_lsm_v(3), & 2483 num_lsm_v(3), & 2484 num_lsm_v_kji(3), & 2485 .FALSE., .TRUE., & 2486 .FALSE., .FALSE. ) 2547 .FALSE., .FALSE. ) 2487 2548 ELSE 2488 2549 CALL initialize_vertical_surfaces( k, j, i, &
Note: See TracChangeset
for help on using the changeset viewer.