Пример #1
0
layer_thickness = 1.
n_layers = np.ceil(max_height / layer_thickness)
minimum_height = 2.
plot_area = 10.**4
subplot_area = 10. * 10.
kappa_i = 0.70
kappa = 0.50
kappa_scalar = kappa_i / kappa

heights = np.arange(0, max_height, layer_thickness) + layer_thickness
heights_rad = np.arange(0, max_height + layer_thickness, layer_thickness)

#------------------------------------------------------------------------------------
# LOADING DATA
# load field data and retrieve allometric relationships
field_data = field.load_crown_survey_data(field_file)

# Load LiDAR point clouds for the plots
plot_point_cloud = np.load('%s/10m_grid/plot_point_clouds_v2_5.npz' % data_dir,
                           allow_pickle=True)['arr_0'][()]

# Load LiDAR canopy profiles
PAD, lidar_profiles = np.load(
    '%s/10m_grid/lidar_PAD_profiles_adaptive_20m_grid_v2_5.npz' % data_dir,
    allow_pickle=True)['arr_0'][()]
PAD_mean = {}
for pp in range(0, N_plots):
    PAD_mean[Plots[pp]] = np.nansum(PAD[Plots[pp]], axis=0) / (np.sum(
        np.isfinite(PAD[Plots[pp]]), axis=0)).astype('float')

# Load LiDAR PAI
Пример #2
0
        plot_list.append('LF')
    else:
        print plot_temp
    if branch[i].split(
            '-')[1][1] == 'B':  # find out why this tree labelled as such
        tree_list.append(float(branch[i].split('-')[1][2:]))
    else:
        tree_list.append(float(branch[i].split('-')[1][1:]))

# Now need to find subplot in which this tree is located
plot = np.asarray(plot_list)
tree = np.asarray(tree_list)

census_plot, census_subplot, census_dates, tree_tag, alt_tag, DPOM, HPOM, TreeHeight, C_stem, C_coarse_root, RAINFOR, Alive_flag, census_spp, SubplotCoords, WoodDensity = field.read_ICP_census_data(
    census_file)
field_data = inventory.load_crown_survey_data(field_file)

subplot = np.zeros(N_branches) * np.nan
light_availability = np.zeros(N_branches) * np.nan
tree_centric = np.zeros(
    N_branches
)  # a flag to state whether or not we have tree-centric LAD to estimate light environment

plots = np.unique(plot)
radius = 10.
layer_thickness = 1
max_height = 80
k = 0.5
for i in range(0, N_branches):
    print i + 1, '/', N_branches, plot[i]
    tree_index = np.all(