Skip to main content

deriveCropPlanFractions

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-calculator/src / deriveCropPlanFractions

Function: deriveCropPlanFractions()

deriveCropPlanFractions(cultivations, bcsYear): CropPlanFractions

Defined in: fdm-calculator/src/bcs/crop-plan.ts:60

Derives crop plan fractions (d_cp_*) and crop category from cultivation history.

Uses findHoofdteelt per calendar year up to and including bcsYear to identify the main crop (hoofdteelt) for each year. The fraction for each crop type is the share of years where that crop was the hoofdteelt.

om_crop_category is based on the hoofdteelt of bcsYear itself. b_lu_is_clover is true when the bcsYear hoofdteelt has croprotation "clover".

Parameters

cultivations

CultivationForCropPlan[]

bcsYear

number

Returns

CropPlanFractions