Changeset 3773 for palm/trunk/SCRIPTS/palm_csd
- Timestamp:
- Mar 1, 2019 8:56:57 AM (6 years ago)
- File:
-
- 1 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')
Note: See TracChangeset
for help on using the changeset viewer.