def surface_properties_image(self):
'''Widgets for canopy properties'''
self.w_PT_But = widgets.Button(
description='Browse Initial alphaPT Image')
self.w_PT = widgets.Text(description=' ', value=str(self.max_PT), width=500)
self.w_LAD_But = widgets.Button(
description='Browse Leaf Angle Distribution Image')
self.w_LAD = widgets.Text(description='(degrees)', value=str(self.x_LAD), width=500)
self.w_leafwidth_But = widgets.Button(
description='Browse Leaf Width Image')
self.w_leafwidth = widgets.Text(description='(m)', value=str(self.leaf_width), width=500)
self.w_zsoil_But = widgets.Button(
description='Browse Soil Roughness Image')
self.w_zsoil = widgets.Text(description='(m)', value=str(self.z0soil), width=500)
self.w_lc_But = widgets.Button(
description='Browse Land Cover Image')
# Landcover classes and values come from IGBP Land Cover Type Classification
self.w_lc = widgets.Dropdown(
options={
'CROP': 12,
'GRASS': 10,
'SHRUB': 6,
'CONIFER': 1,
'BROADLEAVED': 4},
value=self.landcover,
description=" ",
width=300)
lcText = widgets.HTML(value='''Land cover information is used to estimate roughness. <BR>
For shrubs, conifers and broadleaves we use the model of <BR>
Schaudt & Dickinson (2000) Agricultural and Forest Meteorology. <BR>
For crops and grasses we use a fixed ratio of canopy height<BR>''', width=600)
self.calc_row_options()
self.veg_page = widgets.VBox([widgets.HTML('Select alphaPT image or type a constant value'),
widgets.HBox([self.w_PT_But, self.w_PT]),
widgets.HTML('Select leaf angle distribution image or type a constant value'),
widgets.HBox([self.w_LAD_But, self.w_LAD]),
widgets.HTML('Select leaf width image or type a constant value'),
widgets.HBox([self.w_leafwidth_But, self.w_leafwidth]),
widgets.HTML('Select soil roughness image or type a constant value'),
widgets.HBox([self.w_zsoil_But, self.w_zsoil]),
widgets.HTML('Select landcover image or type a constant value'),
widgets.HBox([self.w_lc_But, self.w_lc]),
lcText,
widgets.HBox([self.w_row, self.w_rowaz])], background_color='#EEE')
self.w_PT_But.on_click(
lambda b: self._on_input_clicked(b, 'Initial alphaPT', self.w_PT))
self.w_LAD_But.on_click(
lambda b: self._on_input_clicked(b, 'Leaf Angle Distribution', self.w_LAD))
self.w_leafwidth_But.on_click(
lambda b: self._on_input_clicked(b, 'Leaf Width', self.w_leafwidth))
self.w_zsoil_But.on_click(
lambda b: self._on_input_clicked(b, 'Soil Roughness', self.w_zsoil))
self.w_lc_But.on_click(
lambda b: self._input_dropdown_clicked(b, 'Land Cover', self.w_lc))
评论列表
文章目录