- Timestamp:
- Feb 16, 2018 4:28:14 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/surface_mod.f90
r2812 r2813 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Some more bugfixes concerning restart runs 29 ! 30 ! 2812 2018-02-16 13:40:25Z hellstea 28 31 ! Entries 'u_out', 'v_out' and 'w_out' removed from the functions 29 32 ! get_topography_top_index and get_topography_top_index_ji … … 2183 2186 INTEGER(iwp) :: lsp !< running index chemical species 2184 2187 INTEGER(iwp) :: m !< running index for surface elements on individual surface array 2185 INTEGER(iwp) 2188 INTEGER(iwp), DIMENSION(0:2) :: start_index_h !< start index for horizontal surface elements on gathered surface array 2186 2189 INTEGER(iwp), DIMENSION(0:3) :: mm !< running index for surface elements on gathered surface array 2187 2190 INTEGER(iwp), DIMENSION(0:3) :: start_index_v !< start index for vertical surface elements on gathered surface array … … 2394 2397 ! 2395 2398 !-- Gather start- and end indices 2396 start_index_h = 12399 start_index_h(l) = 1 2397 2400 DO i = nxl, nxr 2398 2401 DO j = nys, nyn 2399 2402 2400 surf_h(l)%start_index(j,i) = start_index_h 2403 surf_h(l)%start_index(j,i) = start_index_h(l) 2401 2404 surf_h(l)%end_index(j,i) = surf_h(l)%start_index(j,i) -1 2402 2405 2403 IF ( surf_def_h(l)%start_index(j,i) <=&2404 surf_def_h(l)%end_index(j,i) ) &2406 DO m = surf_def_h(l)%start_index(j,i), & 2407 surf_def_h(l)%end_index(j,i) 2405 2408 surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1 2409 ENDDO 2406 2410 IF ( l == 0 ) THEN 2407 IF ( surf_lsm_h%start_index(j,i) <=&2408 surf_lsm_h%end_index(j,i) ) &2411 DO m = surf_lsm_h%start_index(j,i), & 2412 surf_lsm_h%end_index(j,i) 2409 2413 surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1 2410 IF ( surf_usm_h%start_index(j,i) <= & 2411 surf_usm_h%end_index(j,i) ) & 2414 ENDDO 2415 DO m = surf_usm_h%start_index(j,i), & 2416 surf_usm_h%end_index(j,i) 2412 2417 surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1 2418 ENDDO 2413 2419 ENDIF 2414 start_index_h = surf_h(l)%start_index(j,i) + 1 2420 2421 start_index_h(l) = surf_h(l)%end_index(j,i) + 1 2422 2415 2423 ENDDO 2416 2424 ENDDO … … 2601 2609 ENDDO 2602 2610 ! 2603 !-- Finally, determine start- and end-index for the respective surface2604 surf_v(l)%start_index = MAX( surf_def_v(l)%start_index, &2605 surf_lsm_v(l)%start_index, &2606 surf_usm_v(l)%start_index )2607 surf_v(l)%end_index = MAX( surf_def_v(l)%end_index, &2608 surf_lsm_v(l)%end_index, &2609 surf_usm_v(l)%end_index )2610 2611 !2612 2611 !-- Gather start- and end indices 2613 2612 start_index_v(l) = 1 … … 2618 2617 surf_v(l)%end_index(j,i) = surf_v(l)%start_index(j,i) -1 2619 2618 2620 IF ( surf_def_v(l)%start_index(j,i) <=&2621 surf_def_v(l)%end_index(j,i) ) &2619 DO m = surf_def_v(l)%start_index(j,i), & 2620 surf_def_v(l)%end_index(j,i) 2622 2621 surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1 2623 IF ( l == 0 ) THEN 2624 IF ( surf_lsm_v(l)%start_index(j,i) <= & 2625 surf_lsm_v(l)%end_index(j,i) ) & 2626 surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1 2627 IF ( surf_usm_v(l)%start_index(j,i) <= & 2628 surf_usm_v(l)%end_index(j,i) ) & 2629 surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1 2630 ENDIF 2631 start_index_v(l) = surf_v(l)%start_index(j,i) + 1 2622 ENDDO 2623 DO m = surf_lsm_v(l)%start_index(j,i), & 2624 surf_lsm_v(l)%end_index(j,i) 2625 surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1 2626 ENDDO 2627 DO m = surf_usm_v(l)%start_index(j,i), & 2628 surf_usm_v(l)%end_index(j,i) 2629 surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1 2630 ENDDO 2631 2632 start_index_v(l) = surf_v(l)%end_index(j,i) + 1 2632 2633 ENDDO 2633 2634 ENDDO 2635 2634 2636 ENDDO 2637 2635 2638 2636 2639 WRITE ( 14 ) 'ns_h_on_file '
Note: See TracChangeset
for help on using the changeset viewer.