- Timestamp:
- Jun 12, 2019 6:33:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_csd_files/palm_csd_canopy_generator.py
r3944 r4021 20 20 # Current revisions: 21 21 # ----------------- 22 # 22 # Added support for tree shape 23 23 # 24 24 # Former revisions: … … 79 79 tree_id_counter = tree_id_counter + 1 80 80 # print(" Processing tree No " + str(tree_id_counter) + " ...", end="") 81 lad_loc, bad_loc, x_loc, y_loc, z_loc, status = process_single_tree(dx,dz,tree_type[j,i], tree_height[j,i],tree_lai[j,i],tree_dia[j,i],trunk_dia[j,i],season)81 lad_loc, bad_loc, x_loc, y_loc, z_loc, status = process_single_tree(dx,dz,tree_type[j,i],fill,tree_height[j,i],tree_lai[j,i],tree_dia[j,i],trunk_dia[j,i],season) 82 82 if ( np.any(lad_loc) != fill ): 83 83 … … 116 116 117 117 118 def process_single_tree(dx,dz,tree_type,tree_ height,tree_lai,tree_dia,trunk_dia,season):118 def process_single_tree(dx,dz,tree_type,tree_shape,tree_height,tree_lai,tree_dia,trunk_dia,season): 119 119 120 120 # Set some parameters … … 236 236 tree_type = int(tree_type) 237 237 238 if ( tree_shape == fillvalues["tree_data"] ): 239 tree_shape = default_trees[tree_type].shape 240 238 241 if ( tree_height == fillvalues["tree_data"] ): 239 242 tree_height = default_trees[tree_type].height … … 254 257 255 258 # Assign values that are not defined as user input from lookup table 256 tree_shape = default_trees[tree_type].shape257 259 tree_ratio = default_trees[tree_type].ratio 258 260 lad_max_height = default_trees[tree_type].lad_max_height … … 453 455 454 456 455 # Dreate BAD array and populate456 bad_loc = np.where(lad_loc != fillvalues["tree_data"], lad_loc*0.01,lad_loc)457 # Create BAD array and populate. TODO: revise as low LAD inside the foliage does not result in low BAD values. 458 bad_loc = np.where(lad_loc != fillvalues["tree_data"],(1.0 - lad_loc)*0.1,lad_loc) 457 459 458 460
Note: See TracChangeset
for help on using the changeset viewer.