Changeset 4794 for palm/trunk/SCRIPTS/palm_csd
- Timestamp:
- Nov 24, 2020 10:40:20 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_csd
r4793 r4794 25 25 # ----------------- 26 26 # $Id$ 27 # Removed debug output; assign negative ids for tree patches 28 # 29 # 4793 2020-11-24 09:48:21Z maronga 27 30 # Added output of tree_type (species or classification). Added tree_id for 28 31 # vegetation patches. Allow for overlapping vegetation with buildings … … 1105 1108 lai = nc_read_from_file_2d(input_file_lai[ii[i]], 'Band1', domain_x0[i], domain_x1[i], domain_y0[i], domain_y1[i]) 1106 1109 1107 nc_write_to_file_2d(filename[i], 'patch_height', patch_height, datatypes["tree_data"],'y','x',fillvalues["tree_data"])1108 nc_write_attribute(filename[i], 'patch_height', 'long_name', 'tree type')1109 nc_write_attribute(filename[i], 'patch_height', 'units', '')1110 nc_write_attribute(filename[i], 'patch_height', 'res_orig', domain_px[i])1111 nc_write_attribute(filename[i], 'patch_height', 'coordinates', 'E_UTM N_UTM lon lat')1112 nc_write_attribute(filename[i], 'patch_height', 'grid_mapping', 'E_UTM N_UTM lon lat')1113 1110 1114 1111 # Determine all pixels that do not already have an LAD but which are high vegetation to a dummy value of 1.0 and remove all other pixels … … 1153 1150 lad_patch, patch_id, patch_types, patch_nz, status = process_patch(domain_dz[i],patch_height,vegetation_type,max(zlad),lai_high,settings_lai_alpha,settings_lai_beta) 1154 1151 1155 # Increase the patch ids by the maximum id for street trees to avoid double ids 1156 max_id = max(tree_id.flatten()) 1157 patch_id = np.where( patch_id != fillvalues["tree_id"], patch_id+max_id, patch_id) 1152 # Set negative ids for patches 1153 patch_id = np.where( patch_id != fillvalues["tree_id"], -patch_id, patch_id) 1158 1154 1159 1155 # 2D loop in order to avoid memory problems with large arrays
Note: See TracChangeset
for help on using the changeset viewer.