crop module
Crop growth and yield module.
Model oil palm growth and yield.
Author - Christopher Teh Boon Sung
Contents namedtuple
Contents(n, m)
namedtuple: Nitrogen and minerals contents in a given plant part
n
float: N content
m
float: minerals content
Parts namedtuple
Parts(pinnae, rachis, trunk, roots, maleflo, femaflo, bunches)
namedtuple: Plant parts of the oil palm tree
pinnae
(Part): pinnae part
rachis
(Part): rachis part
trunk
(Part): trunk part
roots
(Part): roots parts
maleflo
(Part): male flowers part
femaflo
(Part): female flowers parts
bunches
(Part): bunches part
Part class
Class for individual plant parts (e.g., pinnae, rachis, trunk, etc.).
ATTRIBUTES
content (Contents): N and mineral content (each stored as anAFGenobject)maint (float): Assimilates used for maintenance (kg CH2O/palm/day)frac (float): DM (dry matter) partitioning (fraction)growth (float): Growth rate (kg DM/palm/day)death (float): Death rate (kg DM/palm/day)weight (float): Weight of the plant part (kg DM/palm)
Constructor __init__
Part(self)
Create and initialize the Part object.
Crop class
Crop class (oil palm growth and yield).
EXTERNAL INFORMATION REQUIRED (MUST BE SUPPLIED FROM AN EXTERNAL CLASS):
assimilates (float): Total amount of assimilates from photosynthesis
(kg CH2O/palm/day)
cropstress (float): Plant water stress level
(0 = max. stress to 1 = no stress)
ATTRIBUTES
treeage (int): Age of the tree (days)plantdens (int): Planting density (palms/ha)thinplantdens (int): Thinning planting density (palms/ha)thinage (int): Thinning tree age (days)femaleprob (float): Probability of obtaining female flowers (fraction)parts (Parts):Partsnamedtuple of the various plant partsslatable (AFGen): SLA table (age vs SLA)trunkhgt (float): Trunk height (m)treehgt (float): Total tree height (m)vdmwgt (float): VDM (vegetative dry matter) weight (kg DM/palm)tdmwgt (float): Total DM weight (kg DM/palm)vdmmax (float): Maximum VDM requirement for the given planting density (kg DM/palm/year)laimax (float): Maximum LAI (leaf area index) (m2 leaf/m2 ground)sla (float): SLA (specific leaf area) (m2 leaf/kg leaf)lai (float): LAI (leaf area index) (m2 leaf/m2 ground)vdmreq (float): VDM demand for growth (kg DM/palm/day)assim4maint (float): Total maintenance (kg CH2O/palm/day)assim4growth (float): Assimilates for vegetative growth (kg CH2O/palm/day)assim4gen (float): Assimilates for generative growth (kg CH2O/palm/day)boxmaleflo (list): Boxcar for male flowersboxfemaflo (list): Boxcar for female flowers (immature bunches)boxbunches (list): Boxcar for mature bunchesbunchyield (float): Yield (kg DM/palm/year)flowersex (int): Flower sex at the start of bunch/mature phase (0 = male/abort, 1 = female)newflowersex (int): Sex of new flower (0 = male/abort, 1 = female)
METHODS
tree_height: Trunk and total tree height (canopy + trunk height) (m)dm_wgts: Weight of vegetative parts and all parts (kg DM/palm)vdm_maximum: Maximum VDM requirement for the given planting density (kg DM/palm/year)lai_maximum: Maximum LAI for the given planting density (m2 leaf/m2 ground)lookup_sla_lai: SLA-LAI lookup tablemaintenance_respiration: Maintenance requirement for every plant part (kg CH2O/palm/day)vdm_requirement: Calculate the required VDM for growth (kg DM/palm/YEAR)veg_partitioning: DM partitioning for the various plant parts (fraction)cvf: Convert weight in glucose, CH2O, to that in dry matter, DM (kg DM/kg CH2O)veg_growth_rates: Growth rates for the various plant parts (kg DM/palm/day)veg_death_rates: Death rates for the various plant parts (kg DM/palm/day)update_veg_weights: Increment the various plant parts (kg DM/palm)new_flower_sex: Determine the gender of the first (newest) flower in the "boxcar"gen_growth_rates: Growth rates for generative organs (kg DM/palm/day)update_gen_weights: Increment the weights for all generative organs (kg DM/palm)daily_growth: Solve for the crop growth and yielddoy_has_changed: Day of year has changed, so update crop propertiesupdate: Calls thedaily_growth()method
Constructor __init__
Crop(self, fname_in)
Create and initialize the Crop object.
Arguments
- fname_in (str): path and filename of the model initialization file
tree_height
Crop.tree_height(self, cropstress)
Trunk and total tree height (canopy + trunk height) (m).
Arguments
- cropstress (float): 0-1 plant water stress; 0 = max stress, 1 = no stress
Returns
tuple: trunk and total tree height (float)
dm_wgts
Crop.dm_wgts(self)
Weight of vegetative parts and all parts (kg DM/palm).
Returns
tuple: VDM and TDM (float)
vdm_maximum
Crop.vdm_maximum(self)
Maximum VDM requirement for the given planting density (kg DM/palm/year).
Returns
float: max VDM
lai_maximum
Crop.lai_maximum(self)
Maximum LAI for the given planting density (m2 leaf/m2 ground).
Returns
float: maximum LAI
lookup_sla_lai
Crop.lookup_sla_lai(self)
SLA-LAI lookup table.
Lookup from AFGen the current SLA (specific leaf area, m2 leaf/kg leaf)
then calculate the LAI (m2 leaf/m2 ground).
Returns
tuple: SLA and LAI (float)
maintenance_respiration
Crop.maintenance_respiration(self, assimilates)
Maintenance requirement for every plant part (kg CH2O/palm/day).
Arguments
- assimilates (float): amount of assimilates from photosynthesis (kg CH2O/palm/day)
Returns
tuple: maintenance for every plant part (float)
vdm_requirement
Crop.vdm_requirement(self)
Calculate the required VDM for growth (kg DM/palm/YEAR).
VDM is per annual basis, so don't forget to divide by 365 to obtain the required VDM per DAY.
Returns
float: VDM
veg_partitioning
Crop.veg_partitioning(self)
DM partitioning for the various plant parts (fraction).
Returns
tuple: DM partitioning between all plant parts(float)
cvf
Crop.cvf(self)
Convert weight in glucose, CH2O, to that in dry matter, DM (kg DM/kg CH2O).
Returns
float: conversion factor
veg_growth_rates
Crop.veg_growth_rates(self)
Growth rates for the various plant parts (kg DM/palm/day).
Returns
tuple: growth rates (float)
veg_death_rates
Crop.veg_death_rates(self)
Death rates for the various plant parts (kg DM/palm/day).
Returns
tuple: death rates (float)
update_veg_weights
Crop.update_veg_weights(self, assimilates)
Increment the various plant parts (kg DM/palm).
Arguments
- assimilates (float): amount of assimilates from photosynthesis (kg CH2O/palm/day)
Returns
None:
new_flower_sex
Crop.new_flower_sex(self)
Determine the gender of the first (newest) flower in the "boxcar".
Returns
int: sex of flower (0 = male/abortl 1 = female)
gen_growth_rates
Crop.gen_growth_rates(self)
Growth rates for generative organs (kg DM/palm/day).
Returns
tuple: generative growth rates (float)
update_gen_weights
Crop.update_gen_weights(self, cropstress)
Increment the weights for all generative organs (kg DM/palm).
Arguments
- cropstress (float): 0-1 plant water stress; 0 = max stress, 1 = no stress
Returns
None:
daily_growth
Crop.daily_growth(self, assimilates, cropstress)
Solve for the crop growth and yield.
Arguments
- assimilates (float): amount of assimilates from photosynthesis (kg CH2O/palm/day)
- cropstress (float): 0-1 plant water stress; 0 = max stress, 1 = no stress
Returns
None:
doy_has_changed
Crop.doy_has_changed(self)
DOY has changed, so change the tree age.
Returns
None:
update
Crop.update(self, external_info)
Update the crop properties by calling the daily_growth method.
Arguments
- external_info (dict): requires information on the assimilates and crop stress level
Returns
None: