Changeset 3773
- Timestamp:
- Mar 1, 2019 8:56:57 AM (6 years ago)
- Location:
- palm/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_csd
r3726 r3773 25 25 # ----------------- 26 26 # $Id$ 27 # Unspecificed changes 28 # 29 # 3726 2019-02-07 18:22:49Z maronga 27 30 # Removed some more bugs 28 31 # … … 521 524 tmp_x1 = int( domain_x1[i] * domain_px[i] / domain_px[parent_id] ) + 1 522 525 tmp_y1 = int( domain_y1[i] * domain_px[i] / domain_px[parent_id] ) + 1 523 print(tmp_x0)524 print(tmp_x1)525 print(tmp_y0)526 print(tmp_y1)527 526 528 527 tmp_x = nc_read_from_file_1d(input_file_x[ii_parent[i]], "x", tmp_x0, tmp_x1) … … 539 538 540 539 # Shift the child terrain height according to the parent mean terrain height 540 print("shifting: -" + str(np.mean(zt)) + " +" + str(np.mean(zt_ip))) 541 #zt = zt - np.min(zt) + np.min(zt_ip) 541 542 zt = zt - np.mean(zt) + np.mean(zt_ip) 542 543 … … 544 545 # Blend over the parent and child terrain height within a radius of 50 px 545 546 zt = blend_array_2d(zt,zt_ip,50) 547 # zt = zt_ip 546 548 547 549 # Final step: add zt array to the global array … … 714 716 715 717 building_type = nc_read_from_file_2d_all(filename[i], 'building_type') 716 718 717 719 vegetation_type = nc_read_from_file_2d(input_file_vegetation_type[ii[i]], 'Band1', domain_x0[i], domain_x1[i], domain_y0[i], domain_y1[i]) 718 720 vegetation_type[vegetation_type == 255] = fillvalues["vegetation_type"] … … 745 747 pavement_type = np.where((pavement_type != fillvalues["pavement_type"]) & (building_type != fillvalues["building_type"]),fillvalues["pavement_type"],pavement_type) 746 748 747 # #5 Remove pavement for pixels with water 748 pavement_type = np.where((pavement_type != fillvalues["pavement_type"]) & (water_type != fillvalues["water_type"]),fillvalues["pavement_type"],pavement_type) 749 749 # #5 Remove pavement for pixels with water. 750 pavement_type = np.where((pavement_type != fillvalues["pavement_type"]) & (water_type != fillvalues["water_type"]),fillvalues["pavement_type"],pavement_type) 751 750 752 # #6 Remove water for pixels with buildings 751 753 water_type = np.where((water_type != fillvalues["water_type"]) & (building_type != fillvalues["building_type"]),fillvalues["water_type"],water_type) 752 753 754 754 755 # Correct vegetation_type when a vegetation height is available and is indicative of low vegeetation 755 756 vegetation_height = nc_read_from_file_2d(input_file_vegetation_height[ii[i]], 'Band1', domain_x0[i], domain_x1[i], domain_y0[i], domain_y1[i]) … … 843 844 street_type[street_type == 255] = fillvalues["street_type"] 844 845 street_type = np.where((street_type < 1) & (street_type != fillvalues["street_type"]),defaultvalues["street_type"],street_type) 845 846 847 pavement_type = nc_read_from_file_2d_all(filename[i], 'pavement_type') 848 street_type = np.where((pavement_type == fillvalues["pavement_type"]),fillvalues["street_type"],street_type) 849 846 850 nc_write_to_file_2d(filename[i], 'street_type', street_type, datatypes["street_type"],'y','x',fillvalues["street_type"]) 847 851 nc_write_attribute(filename[i], 'street_type', 'long_name', 'street type') -
palm/trunk/SCRIPTS/palm_csd_files/palm_csd_canopy_generator.py
r3668 r3773 25 25 # ----------------- 26 26 # $Id$ 27 # Bugfix: conversion to integer required for indexing 28 # 29 # 3668 2019-01-14 12:49:24Z maronga 27 30 # Various improvements and bugfixes 28 31 # … … 302 305 303 306 # Define center of the tree position inside the local LAD domain 304 tree_location_x = x[ nx/2]305 tree_location_y = y[ nx/2]307 tree_location_x = x[int(nx/2)] 308 tree_location_y = y[int(nx/2)] 306 309 307 310 -
palm/trunk/SCRIPTS/palm_csd_files/palm_csd_tools.py
r3726 r3773 25 25 # ----------------- 26 26 # $Id$ 27 # Unspecificed changes 28 # 29 # 3726 2019-02-07 18:22:49Z maronga 27 30 # Index bound bugfix 28 31 # … … 95 98 for k in range(1,len(k_tmp+1)): 96 99 if k_tmp[k] > array[m,l]: 97 array[m,l] = k_tmp[k-1] 100 array[m,l] = k_tmp[k-1] + dz * 0.5 98 101 break 99 102 -
palm/trunk/SOURCE/average_3d_data.f90
r3655 r3773 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output of theta_2m*_xy_av 28 ! 29 ! 3655 2019-01-07 16:51:22Z knoop 27 30 ! Implementation of the PALM module interface 28 31 ! … … 436 439 ENDIF 437 440 441 CASE ( 'theta_2m*' ) 442 IF ( ALLOCATED( tsurf_av ) ) THEN 443 DO i = nxlg, nxrg 444 DO j = nysg, nyng 445 pt_2m_av(j,i) = pt_2m_av(j,i) / REAL( average_count_3d, KIND=wp ) 446 ENDDO 447 ENDDO 448 CALL exchange_horiz_2d( pt_2m_av, nbgp ) 449 ENDIF 450 438 451 CASE ( 't*' ) 439 452 IF ( ALLOCATED( ts_av ) ) THEN -
palm/trunk/SOURCE/sum_up_3d_data.f90
r3761 r3773 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output of theta_2m*_xy_av 28 ! 29 ! 3761 2019-02-25 15:31:42Z raasch 27 30 ! unused variables removed 28 31 ! … … 920 923 ENDIF 921 924 925 CASE ( 'theta_2m*' ) 926 IF ( ALLOCATED( pt_2m_av ) ) THEN 927 DO i = nxl, nxr 928 DO j = nys, nyn 929 match_def = surf_def_h(0)%start_index(j,i) <= & 930 surf_def_h(0)%end_index(j,i) 931 match_lsm = surf_lsm_h%start_index(j,i) <= & 932 surf_lsm_h%end_index(j,i) 933 match_usm = surf_usm_h%start_index(j,i) <= & 934 surf_usm_h%end_index(j,i) 935 936 IF ( match_def ) THEN 937 m = surf_def_h(0)%end_index(j,i) 938 pt_2m_av(j,i) = pt_2m_av(j,i) + & 939 surf_def_h(0)%pt_2m(m) 940 ELSEIF ( match_lsm .AND. .NOT. match_usm ) THEN 941 m = surf_lsm_h%end_index(j,i) 942 pt_2m_av(j,i) = pt_2m_av(j,i) + & 943 surf_lsm_h%pt_2m(m) 944 ELSEIF ( match_usm ) THEN 945 m = surf_usm_h%end_index(j,i) 946 pt_2m_av(j,i) = pt_2m_av(j,i) + & 947 surf_usm_h%pt_2m(m) 948 ENDIF 949 ENDDO 950 ENDDO 951 ENDIF 952 953 922 954 CASE ( 't*' ) 923 955 IF ( ALLOCATED( ts_av ) ) THEN
Note: See TracChangeset
for help on using the changeset viewer.