KiwiFert turns published New Zealand fertiliser practice into a recommendation for one point on a map. This note sets out exactly how — what comes from a workbook, what comes from a soil map, what the application itself contributes, and where each of those is likely to be wrong. Nothing here is hidden inside the code: if you disagree with a coefficient, it is on the Parameters tab and you can change it.
KiwiFert 把已发表的新西兰施肥做法,转化为针对地图上某一点的推荐方案。本文原原本本地说明这是怎么做的——哪些来自工作簿,哪些来自土壤图,哪些是应用自身加进去的,以及其中每一项可能错在哪里。这里没有任何东西藏在代码里:如果你不同意某个系数,它就在“参数”选项卡上,你可以修改。
1What this is, and what it is not本文是什么,不是什么
The application answers one question: given this block, this crop and this rotation, what would typical New Zealand practice put on, and what mass of each element does that amount to? It is a structured lookup with site adjustment, not a mechanistic model. There is no soil chemistry solver, no plant growth model, no leaching simulation and no economics.
本应用只回答一个问题:给定这个地块、这种作物和这套轮作,新西兰的典型做法会施些什么,折算下来每种元素各有多少质量?它是一个带地点调整的结构化查表工具,而不是机理模型。其中没有土壤化学求解器,没有植物生长模型,没有淋失模拟,也没有经济分析。
Three claims it does make, and can defend:
它确实提出了三点主张,而且站得住脚:
- The published practice is reproduced faithfully. Where the source workbook gives an application event, KiwiFert re-derives every nutrient in it from the product analysis and the product rate. Across all 466 events and 855 nutrient figures, the largest discrepancy between the re-derivation and the workbook is 0.05 kg/ha — rounding, nothing more. You can run this check yourself: open the calculator, open the browser console, and type
KF.selfTest(). - Every co-delivered nutrient is counted. Superphosphate applied for phosphorus also delivers sulphur and calcium; DAP applied for phosphorus also delivers nitrogen; muriate of potash applied for potassium also delivers 46 % chloride. A budget that counts only the nutrient you were aiming at will over-apply the others, and that is precisely the error the source workbook was built to prevent.
- Every number carries its provenance. Each site variable is labelled KiwiMap, entered, estimated or soil test; each coefficient names the sheet, the regulation or the fact that KiwiFert invented it.
- 如实再现已发表的做法。凡源工作簿给出一次施用事件,KiwiFert 都会根据产品成分含量和产品施用量,把其中每一种养分重新推算一遍。在全部 466 次事件、855 个养分数值中,重新推算结果与工作簿之间的最大差异为 0.05 kg/ha——只是四舍五入,仅此而已。你可以自己做这项检查:打开计算器,打开浏览器控制台,输入
KF.selfTest()。 - 每一种伴随施入的养分都计算在内。为补磷而施的过磷酸钙同时带来硫和钙;为补磷而施的 DAP 同时带来氮;为补钾而施的氯化钾同时带来 46 % 的氯。只计入目标养分的收支,会使其他养分施用过量,而源工作簿正是为防止这种错误而编制的。
- 每一个数字都带着数据出处。每个地点变量都标明 KiwiMap、手动输入、估算或土壤测试;每个系数都注明出自哪张工作表、哪项法规,或者注明它是 KiwiFert 自行设定的。
This is not a fertiliser recommendation. The source workbooks describe typical commercial practice, not what any particular block needs. A real recommendation comes from a soil test, a herbage or leaf test, and a nutrient budget for that block, interpreted by someone who has stood on it. The Fertiliser Association of New Zealand Code of Practice for Nutrient Management is the governing document. Treat KiwiFert as a way of seeing the arithmetic quickly and consistently, and of asking better questions of a real adviser.
这不是施肥推荐方案。源工作簿描述的是典型的商业做法,而不是某个具体地块的需要。真正的推荐方案来自土壤测试、牧草或叶片测试,以及针对该地块的养分收支,并由亲自到过那块地的人来解读。Fertiliser Association of New Zealand 的 Code of Practice for Nutrient Management 是起主导作用的文件。请把 KiwiFert 当作一种快速而一致地看清算术的办法,以及向真正的顾问提出更好问题的办法。
2The data the model rests on模型所依据的数据
Four sources, three of them workbooks compiled from published New Zealand industry guidance, one of them a spatial data application.
共四个来源,其中三个是根据已发表的新西兰行业指南汇编的工作簿,一个是空间数据应用。
| Source | What it supplies | Rows |
|---|---|---|
| NZ fertilisation and liming schedules | Nutrient rates by plant type; one row per fertiliser application event, keyed to rotation and phase; the liming schedule; fertiliser product analyses; soil order adjustments; trace elements | 51 plant types, 466 events, 27 liming rows, 43 products, 15 soil orders, 10 trace elements |
| NZ agricultural and forestry rotations | Rotations and their phases — species, timing, duration, expected yield, and the link to the plant nutrient database | 45 rotations, 175 phases |
| NZ plant nutrient database | Yield ranges, dry matter content, harvest index, and nutrient concentration on two bases — removed in harvest, and whole above-ground plant | 194 plant types × 19 elements × 2 bases |
| KiwiMap | Soil order and subgroup, pH, cation exchange capacity, carbon, drainage, texture, depth, bypass flow, land use, land cover, ecological district, nine climate variables, 65-element soil geochemistry | Read at a point, from national rasters on a 100 m grid |
| 来源 | 提供的内容 | 行数 |
|---|---|---|
| NZ fertilisation and liming schedules | 按植物类型列出的养分施用量;每次肥料施用事件一行,对应到轮作和阶段;施石灰方案;肥料产品成分含量;土纲调整;微量元素 | 51 种植物类型、466 次事件、27 行施石灰记录、43 种产品、15 个土纲、10 种微量元素 |
| NZ agricultural and forestry rotations | 轮作及其各阶段——物种、时间安排、持续时间、预期产量,以及与植物养分数据库的链接 | 45 套轮作、175 个阶段 |
| NZ plant nutrient database | 产量范围、干物质含量、收获指数,以及按两种基准给出的养分浓度——随收获物移出的,和整个地上部植株的 | 194 种植物类型 × 19 种元素 × 2 种基准 |
| KiwiMap | 土纲与亚类、pH、阳离子交换量、碳、排水性、质地、土层深度、优先流、土地利用、土地覆盖、生态区、九个气候变量、65 种元素的土壤地球化学 | 在单点读取,来自 100 m 网格的全国栅格 |
The workbooks are converted to JavaScript by scripts/extract.py, which writes the files in data/. Nothing in data/ is hand-edited: if a figure is wrong, the spreadsheet is corrected and the script is re-run. The join keys are exact string matches and all of them resolve — 175 of 175 phase links land on a plant database row, 51 of 51 rate rows land on a plant database row, and 32 of 33 named products in the schedule land on a product row (the thirty-third is the sentinel “No fertiliser applied”).
工作簿由 scripts/extract.py 转换为 JavaScript,并写成 data/ 中的文件。data/ 里的内容一概不手工编辑:如果某个数字有误,就改正电子表格,再重新运行脚本。连接键采用精确的字符串匹配,而且全部都能对上——175 个阶段链接全部对应到植物数据库中的某一行,51 行施用量全部对应到植物数据库中的某一行,方案表中 33 个具名产品有 32 个对应到产品行(第三十三个是占位值 “No fertiliser applied”)。
Units, and why they are the ones they are. Macronutrient concentrations in the plant database are g kg−1 of dry matter, which is numerically identical to kg per tonne of dry matter and to ten times the percentage. That identity is why removal falls straight out of a multiplication with no conversion factor: a pasture at 40 g N kg−1 DM cut at 15 t DM ha−1 removes 600 kg N ha−1. Micronutrients are mg kg−1 (= ppm), so the same multiplication gives g ha−1. Phosphorus and potassium are elemental throughout, following New Zealand soil test convention, not the P2O5 and K2O of fertiliser labels; the oxide equivalents are shown alongside on the budget tab (P × 2.291, K × 1.205).
单位,以及为何采用这些单位。植物数据库中的大量元素浓度以每千克干物质的克数(g kg−1)表示,在数值上等同于每吨干物质的千克数,也等于百分含量的十倍。正因为有这一恒等关系,移出量只需一次乘法即可得出,无需换算系数:含 40 g N kg−1 DM 的牧草,刈割 15 t DM ha−1,移出 600 kg N ha−1。微量元素以 mg kg−1(= ppm)表示,因此同样的乘法得到 g ha−1。磷和钾全程按元素计,遵循新西兰土壤测试的惯例,而不采用肥料标签上的 P2O5 和 K2O;氧化物当量在“养分收支”选项卡上并列显示(P × 2.291,K × 1.205)。
3Reading the site from KiwiMap从 KiwiMap 读取地点信息
A click on the map projects the latitude and longitude to NZTM2000 (EPSG:2193) and reads one full-resolution pixel from each of nineteen national rasters plus sixteen geochemistry bands, using HTTP Range requests against Cloud-Optimized GeoTIFFs. KiwiFert does not reimplement any of this: it loads KiwiMap's own libraries and its cog-layer.js, and calls KiwiMap's CogRenderer.readValue(). If KiwiMap's pipeline is re-run with better data, KiwiFert reads the better data with no change.
在地图上点击一下,程序就把经纬度投影到 NZTM2000(EPSG:2193),并通过对 Cloud-Optimized GeoTIFF 发出 HTTP Range 请求,从十九个全国栅格外加十六个地球化学波段中各读取一个全分辨率像元。这些功能 KiwiFert 一概没有重新实现:它加载 KiwiMap 自己的库及其 cog-layer.js,并调用 KiwiMap 的 CogRenderer.readValue()。如果 KiwiMap 的处理流程用更好的数据重跑一遍,KiwiFert 无需任何改动就能读到更好的数据。
Provenance, and the order of precedence数据出处与优先顺序
Every site variable resolves through one function, and the order never varies:
每个地点变量都通过同一个函数确定取值,顺序始终不变:
- A laboratory soil test, where one has been entered. A measured pH replaces the modelled pH everywhere in the calculation.
- A value typed into the Site table, which overrides the map for that variable only.
- The value KiwiMap read at the point.
- Nothing — in which case the calculation that needed it is not performed, and says so, rather than substituting a national average.
- 实验室土壤测试结果,如果已经输入的话。实测 pH 会在计算的所有环节取代模型预测的 pH。
- 在“地点”表中键入的数值,它只覆盖地图中该变量的值。
- KiwiMap 在该点读取的数值。
- 没有数值——这种情况下,需要它的那项计算不予执行,并明确说明,而不是用全国平均值顶替。
The soil order join土纲的对接
KiwiMap's legend labels the raster “Brown Soils”, “Podzols”, “Allophanic Soils”; the workbook keys on “Brown”, “Podzol”, “Allophanic”. The mapping is an explicit table in js/lookup.js (SOIL_ORDER_FROM_MAP), not a string transformation, so a legend change breaks loudly rather than silently. Six map units carry no soil at all — lake, estuary, river bed, quarry, permanent ice, urban area — and the application says so and makes no soil-order adjustment.
KiwiMap 的图例把栅格标注为 “Brown Soils”、“Podzols”、“Allophanic Soils”;工作簿使用的键则是 “Brown”、“Podzol”、“Allophanic”。两者的对应关系是 js/lookup.js 中一张明确的表(SOIL_ORDER_FROM_MAP),而不是字符串变换,因此图例一旦改动,程序会明显地报错,而不是悄无声息地出错。有六个制图单元根本不含土壤——湖泊、河口、河床、采石场、永久冰雪、城市用地——应用会说明这一点,并且不做土纲调整。
Rainfall: the one estimated variable降雨量:唯一靠估算的变量
KiwiMap carries wet days, not rainfall depth. Two parts of the calculation need annual rainfall — the sulphur leaching term and the lime longevity formula — so where no rainfall has been entered, KiwiFert estimates it as
KiwiMap 提供的是降雨日数,而不是降雨深度。计算中有两处需要年降雨量——硫的淋失项和石灰持效期公式——因此在未输入降雨量时,KiwiFert 按下式估算
rainfall (mm) = wet days (≥1 mm) × rainfallPerWetDay (default 9.5 mm)
This is a crude proxy. Mean wet-day intensity in New Zealand varies from about 6 mm in inland Otago to well over 15 mm on the West Coast, so a single national coefficient will be wrong by tens of percent in both directions. The estimate is labelled estimated everywhere it appears and raises a note on the Recommendation tab. If either the sulphur rate or the lime interval matters to you, type the real annual rainfall from the nearest climate station. Extending KiwiMap with a rainfall surface would remove this weakness entirely and is the single largest available improvement to the model.
这是一个粗糙的替代指标。新西兰降雨日的平均雨强,从 Otago 内陆的约 6 mm 到 West Coast 的远超 15 mm 不等,因此单一的全国系数在两个方向上都会有百分之几十的误差。凡出现这一估算值的地方都标为估算,并在“推荐方案”选项卡上给出提示。如果硫的施用量或施石灰间隔对你来说要紧,请键入最近气候站的实际年降雨量。给 KiwiMap 增加一个降雨量图层可以彻底消除这一弱点,这也是该模型目前可做的最大一项改进。
Geochemistry is evidence, not a rate地球化学数据是证据,不是施用量
Fourteen elements from the national geochemical survey are read and shown: B, Co, Cu, Mn, Mo, Se, Zn, P, S, K, Ca, Mg, Na and Fe, as total soil concentration in mg kg−1. Total concentration is not plant availability — a soil can carry 1300 mg kg−1 of total phosphorus and still have an Olsen P of 8. These values never enter a rate calculation. They are there to support or contradict a deficiency flag, and to give a sense of the geochemical setting.
程序读取并显示全国地球化学调查中的十四种元素:B、Co、Cu、Mn、Mo、Se、Zn、P、S、K、Ca、Mg、Na 和 Fe,以土壤全量浓度(mg kg−1)表示。全量浓度不等于植物有效性——一种土壤的全磷可以高达 1300 mg kg−1,而 Olsen P 仍然只有 8。这些数值从不进入施用量计算。它们的作用是佐证或反驳某个缺乏标记,并让人对地球化学背景有个概念。
4The baseline nutrient rate基准养分施用量
The Nutrient rates by plant type sheet gives, for each of 51 land uses, a low–high range of typical New Zealand practice for N, P, K, S, Ca and Mg, and a typical single-application rate for the trace elements. The basis differs by crop and is stated on the row: per year for perennials and pasture, per crop for annuals, per rotation for forestry.
Nutrient rates by plant type 工作表为 51 种土地利用各给出新西兰典型做法中 N、P、K、S、Ca 和 Mg 的低–高范围,以及微量元素的典型单次施用量。计量基准因作物而异,并在各行注明:多年生作物和牧场按每年计,一年生作物按每茬计,林业按每个轮伐期计。
KiwiFert positions itself within that range with a single dial:
KiwiFert 只用一个调节量来确定自己在这一范围内的位置:
basee = lowe + (highe − lowe) × ratePosition (default 0.5)
A position of 0 applies the low end of every range, which suits an extensive block, a low yield target, or a nitrogen-sensitive catchment. A position of 1 applies the high end, which suits an irrigated high-production system. The default of 0.5 is the midpoint and carries no more authority than that.
位置取 0 即采用每个范围的低端,适合粗放经营的地块、产量目标较低的情形,或对氮敏感的集水区。位置取 1 即采用高端,适合有灌溉的高产系统。默认值 0.5 是中点,除此之外并无更多依据。
Where a range starts at zero, zero is a real answer. Pulses need no nitrogen, and a well-clovered sheep and beef pasture may need none either. Crops in the workbook's Legume and Pulse groups have their nitrogen zeroed outright unless nApplyToLegumes is turned on. Note that this test is on the crop group, not the crop name: a ryegrass/white clover pasture has “clover” in its name and is emphatically not a legume stand — it is the most nitrogen-fertilised land use in the country.
范围从零起算时,零就是一个实实在在的答案。豆类作物不需要氮,三叶草长势良好的绵羊与肉牛场牧场可能也不需要。工作簿中属于 Legume 和 Pulse 组的作物,其氮直接归零,除非打开 nApplyToLegumes。请注意,这项判断依据的是作物组别,而不是作物名称:黑麦草/白三叶牧场的名称里带有 “clover”,却绝对不是豆科草地——它是全国施氮最多的土地利用类型。
5Soil and climate adjustment土壤与气候调整
The published rate is a national figure. Four multiplicative factors move it towards the site. Each is computed once and then used in both calculation modes — multiplying the annual target in one, and multiplying the product rate of each application event in the other.
已发表的施用量是全国性的数字。四个乘性系数把它向具体地点修正。每个系数只计算一次,然后在两种计算模式中都使用——在一种模式中乘以年度目标值,在另一种模式中乘以每次施用事件的产品施用量。
Phosphorus: anion storage capacity磷:阴离子吸持容量
fP = MASC(soil order)
Straight from the Soil order adjustments sheet, with Pallic as the reference at 1.0. Allophanic and Oxidic soils are 1.6; Granular and Podzol 1.4; Ultic 1.3; Pumice 1.2; Brown 1.1. The physical basis is phosphate retention: it takes about 11 kg P ha−1 to lift Olsen P by one unit on an Allophanic soil against about 5 kg on a Pallic one, because allophane and ferrihydrite adsorb phosphate on the same sites that make those soils well-structured. Set pSoilOrderMultiplier to 0 to switch this off.
直接取自 Soil order adjustments 工作表,以 Pallic 为参照,取 1.0。Allophanic 和 Oxidic 土壤为 1.6;Granular 和 Podzol 为 1.4;Ultic 为 1.3;Pumice 为 1.2;Brown 为 1.1。其物理依据是磷固持:在 Allophanic 土壤上把 Olsen P 提高一个单位约需 11 kg P ha−1,而在 Pallic 土壤上约需 5 kg,因为水铝英石和水铁矿吸附磷酸根的位点,正是使这些土壤结构良好的那些位点。把 pSoilOrderMultiplier 设为 0 即可关闭这一项。
The compensation. A high-ASC soil holds a large slow-release reserve. Withhold P from a well-supplied Allophanic soil and production holds for at least five years; withhold it from a Pallic soil and pasture production declines immediately. The multiplier is about the cost of building the reserve, not the cost of maintaining production.
补偿的一面。高 ASC 土壤保有一个庞大的缓释储备。对供磷充足的 Allophanic 土壤停止施磷,产量至少可维持五年;对 Pallic 土壤停止施磷,牧草产量立即下降。这个乘数反映的是建立储备的代价,而不是维持产量的代价。
Potassium: weatherable reserve钾:可风化储量
fK = CK(soil order K reserve class)
The workbook states the reserve as a word — very low, low, moderate, moderate to high, high — and KiwiFert turns that word into a number using four editable factors (kReserveVeryLow 1.30, kReserveLow 1.15, kReserveModerate 1.00, kReserveHigh 0.85). A compound class such as “moderate to high” is read as the mean of its two neighbours rather than needing a parameter of its own. These four numbers are KiwiFert's, not the workbook's, and are the sort of thing to argue with.
工作簿用文字表述储量——极低、低、中等、中等至高、高——KiwiFert 则用四个可编辑的系数把这些文字转成数字(kReserveVeryLow 1.30、kReserveLow 1.15、kReserveModerate 1.00、kReserveHigh 0.85)。像“中等至高”这样的复合等级,按其相邻两级的平均值读取,而不必单设一个参数。这四个数字是 KiwiFert 的,不是工作簿的,正属于值得商榷的那一类。
Cation exchange capacity from KiwiMap enters separately, and only as a splitting rule: below kCecSplitThreshold (12 cmol(+) kg−1) the threshold at which a potassium dressing is split in two is halved, because a soil with little exchange capacity cannot hold a large dressing against leaching.
来自 KiwiMap 的阳离子交换量另行进入计算,而且只作为分次规则:当它低于 kCecSplitThreshold(12 cmol(+) kg−1)时,把一次钾肥施用拆成两次的那个阈值减半,因为交换量很小的土壤留不住大剂量的施用,挡不住淋失。
Sulphur: leaching class and water through the profile硫:淋失等级与通过剖面的水量
fS = CS(leaching class) × [1 + sRainfallSlope × (R + I − sRainfallRef) / 100] for R + I > sRainfallRef
where R is annual rainfall and I applied irrigation. The class factors run from 0.85 (low — Allophanic, Oxidic and Granular soils, which retain sulphate on the same sites that hold phosphate) to 1.30 (very high — Podzol and Raw). The rainfall term adds three percent per 100 mm above 1000 mm, the threshold the workbook itself uses when it describes sulphur leaching as a problem “in >1000 mm rainfall”. Both the class factors and the slope are KiwiFert's.
其中 R 为年降雨量,I 为灌溉水量。等级系数从 0.85(低——Allophanic、Oxidic 和 Granular 土壤,它们在固持磷酸根的同一类位点上吸持硫酸根)到 1.30(极高——Podzol 和 Raw)。降雨量项在 1000 mm 以上每增加 100 mm 加百分之三;1000 mm 正是工作簿自己把硫淋失描述为“在降雨量 >1000 mm 时”成问题所用的阈值。等级系数和斜率都是 KiwiFert 设定的。
The factor raises the rate. It does not choose the product, and on a high-leaching soil the product choice matters more: sulphate-S is immediately available and immediately leachable, while elemental sulphur must be oxidised by Thiobacillus over three to nine months before a plant can use it. Elemental sulphur cannot rescue a deficiency that is showing now; sulphate-S can. A high-leaching site wants both forms, and that decision is left to the user.
该系数提高的是施用量,它并不选择产品;而在高淋失土壤上,产品的选择更为要紧:硫酸盐态硫立即有效,也立即可被淋失,而元素硫必须先经 Thiobacillus 氧化三到九个月,植物才能利用。元素硫救不了眼下已经显现的缺乏;硫酸盐态硫可以。高淋失的地点两种形态都需要,这一决定留给用户。
Nitrogen: growth potential from temperature氮:由温度推算的生长潜力
fN = clamp(1 + nTempSlope × (T − nTempOptimum), 1 ± nTempClamp)
T is the mean annual air temperature at the point. The reference of 13 °C is roughly the mean annual temperature of the Waikato and coastal Canterbury dairy country the published rates were written for; the slope is 3 % per degree, bounded at ±20 %. This is a first-order growth-potential scaler and nothing more.
T 是该点的年平均气温。参照值 13 °C 大致是 Waikato 和 Canterbury 沿海奶牛场地区的年平均气温,已发表的施用量正是针对这些地区写成的;斜率为每度 3 %,上下限为 ±20 %。这只是一个一阶的生长潜力缩放系数,仅此而已。
It is applied to pasture, herb, forage and legume rows only. An arable or horticultural nitrogen rate is set by the yield target and by growth-stage timing — urea split at Zadoks GS30 and GS32–37, side-dressing at maize V6–V8 — and scaling those by a site mean temperature would be a fiction. Set nTempSlope to 0 to disable the term entirely.
它只用于牧草、草本、饲料作物和豆科各行。大田作物或园艺作物的施氮量取决于产量目标和按生育期确定的施用时机——尿素在 Zadoks GS30 和 GS32–37 分次施用,玉米在 V6–V8 期侧施——用地点的平均气温去缩放它们,纯属虚构。把 nTempSlope 设为 0 可完全停用此项。
After adjustment, nitrogen on pastoral land is capped at nCapPastoral (190 kg N ha−1 yr−1). That is a regulatory ceiling, not an agronomic one — see section 11.
调整之后,牧场用地上的氮以 nCapPastoral(190 kg N ha−1 yr−1)封顶。这是法规上限,而不是农艺上限——见第 11 节。
What is deliberately not adjusted. Calcium and magnesium from fertiliser carry no site factor: calcium is dominated by lime, which is calculated separately and properly, and magnesium is a soil-test and animal-health decision the workbook does not model spatially. Drainage, texture, depth, bypass flow, carbon, solar radiation, humidity, wind and frost days are read, reported and used to raise cautions, but do not scale any rate. Inventing a coefficient for each of them would add precision without accuracy.
有意不作调整的部分。肥料带入的钙和镁不设地点系数:钙主要由石灰决定,而石灰是另行、并且认真计算的;镁则是取决于土壤测试和动物健康的决定,工作簿并未对它做空间上的建模。排水性、质地、土层深度、优先流、碳、太阳辐射、湿度、风和霜冻日数都会被读取、报告,并用来提出注意事项,但不缩放任何施用量。为它们逐一编造一个系数,只会增加精密度而不增加准确度。
6Capital phosphorus基础性施磷
Maintenance phosphorus replaces what the crop removes and what the soil fixes. Capital phosphorus is different: it is the investment that moves a block from below its target Olsen P into the target range. The two are budgeted separately because they behave differently — maintenance is an annual cost, capital is a one-off with a multi-year payback.
维持性施磷补充的是作物移出的和土壤固定的磷。基础性施磷则不同:它是一项投资,把地块从低于 Olsen P 目标值提升到目标范围之内。两者分开核算,因为它们的性质不同——维持性施用是年度成本,基础性施用是一次性投入,回报期长达多年。
Capital P is calculated only when an Olsen P has been entered. Without a soil test the application gives maintenance only and says so, because there is no honest way to guess where a block sits.
只有在输入了 Olsen P 之后才计算基础性施磷。没有土壤测试时,应用只给出维持性施用量并予以说明,因为地块处在什么水平,没有哪种诚实的办法可以猜出来。
target = bandlo + (bandhi − bandlo) × p
deficit = target − measured Olsen P
capital P (kg ha−1) = deficit × KOlsen(soil order)
years = ⌈ capital P / pCapitalMaxPerYear ⌉
The band is the workbook's Olsen P target for that soil order, chosen by land use: the pastoral column for dairy, sheep and beef and deer, the cropping and horticulture column otherwise. KOlsen is the workbook's kilograms of P per Olsen unit for that order — 5 on Pallic and Recent, 7 on Brown and Pumice, 11 on Allophanic and Oxidic, 12 on Organic.
该区间是工作簿针对该土纲给出的 Olsen P 目标值,按土地利用选取:奶牛场、绵羊与肉牛场以及养鹿场用牧场一栏,其余情况用种植与园艺一栏。KOlsen 是工作簿给出的该土纲每个 Olsen 单位所需的磷千克数——Pallic 和 Recent 为 5,Brown 和 Pumice 为 7,Allophanic 和 Oxidic 为 11,Organic 为 12。
The position p within the band is olsenTargetPosition (default 0.5), except on a soil the workbook classes as low or very low P retention, where it is olsenTargetPositionLowASC (default 0.25). That distinction is the workbook's own note 6: low-ASC soils — Pallic, Recent, Raw, Semiarid — are where applied phosphorus is most likely to reach water, so the advice on them is to target the lower end of the range, not the upper.
区间内的位置 p 取 olsenTargetPosition(默认 0.5),但在工作簿归为磷固持低或极低的土壤上,取 olsenTargetPositionLowASC(默认 0.25)。这一区分出自工作簿自己的注 6:低 ASC 土壤——Pallic、Recent、Raw、Semiarid——是施入的磷最容易进入水体的地方,因此对它们的建议是瞄准范围的低端,而不是高端。
Worked. A Waikato Allophanic block growing potatoes, measured Olsen P 22. The cropping band for Allophanic soils is 30–45, so the target at position 0.5 is 37.5. The deficit is 15.5 Olsen units. At 11 kg P per unit that is 171 kg P ha−1 — which at the 60 kg default limit is spread over three years at 57 kg P ha−1 yr−1, on top of maintenance. On a Pallic soil the same 15.5-unit deficit would cost 78 kg P ha−1. That difference — the same soil test result implying a fertiliser bill more than twice as large — is the single most important thing the soil order does in this model.
算例。Waikato 一块种马铃薯的 Allophanic 地块,实测 Olsen P 为 22。Allophanic Soils 的种植区间为 30–45,因此位置 0.5 处的目标值为 37.5。亏缺为 15.5 个 Olsen 单位。按每单位 11 kg P 计,即 171 kg P ha−1——按 60 kg 的默认限额,分三年施入,每年 57 kg P ha−1 yr−1,另加维持性施用量。在 Pallic 土壤上,同样 15.5 个单位的亏缺只需 78 kg P ha−1。这一差别——同样的土壤测试结果,意味着肥料账单相差一倍以上——是土纲在这个模型中所起的最重要的作用。
7Lime, and the acidity the fertiliser itself creates石灰,以及肥料自身造成的酸度
Liming is calculated from the Liming schedule sheet, which gives a target pH band, a trigger pH, capital and maintenance rates, an interval, a timing and an incorporation note for each of 27 land uses. Where no liming row covers a crop, the crop's own target pH from the Nutrient rates sheet is used with the generic soil-order arithmetic.
施石灰量根据 Liming schedule 工作表计算,该表为 27 种土地利用各给出目标 pH 区间、触发 pH、基础性和维持性施用量、施用间隔、施用时机以及一条关于混入土壤的说明。没有施石灰行覆盖的作物,则采用 Nutrient rates 工作表中该作物自己的目标 pH,并配合通用的土纲算法。
Crops that must not be limed不可施石灰的作物
Three land uses are flagged calcifuge and never receive lime — blueberries, plantation forestry, and manuka. Blueberries want pH 4.5–5.5; liming a blueberry block is one of the most expensive and slowest-to-reverse mistakes in New Zealand horticulture. Radiata pine is well adapted to acid soils and liming a stand can induce boron, zinc and manganese deficiency and disturb the mycorrhizal association. For blueberries above pH 5.5 the application calculates an acidification requirement in elemental sulphur instead, at roughly 1 t ha−1 of the 90 % product per pH unit.
有三种土地利用被标为嫌钙,从不施石灰——蓝莓、人工林和麦卢卡。蓝莓需要 pH 4.5–5.5;给蓝莓地块施石灰,是新西兰园艺业中代价最高、也最难挽回的错误之一。辐射松很适应酸性土壤,给林分施石灰可能诱发硼、锌和锰缺乏,并扰乱菌根共生关系。对于 pH 高于 5.5 的蓝莓地,应用改为计算以元素硫表示的酸化需要量,大致为每个 pH 单位施 1 t ha−1 含量 90 % 的产品。
Capital lime基础性石灰
Capital lime is calculated only when the current pH is below the trigger:
只有当前 pH 低于触发值时才计算基础性石灰:
target pH = bandlo + (bandhi − bandlo) × limeTargetPosition
ΔpH = target pH − current pH
lime (t ha−1) = ΔpH × Torder × (d / limeReferenceDepth) × (limeReferenceNV / limeProductNV)
Torder is the workbook's tonnes of lime to raise pH one unit on that soil order, taken from the Soil order adjustments sheet: 9–10 t ha−1 on Pallic, 10–11 on Brown, 13–15 on Allophanic, and 7–17 on Organic. Using that column directly is preferable to the more familiar rule of thumb (1 t ha−1 of good lime lifts pH by 0.1 in the top 75 mm), because the column already carries the buffering differences between orders that the rule of thumb averages away.
Torder 是工作簿给出的在该土纲上把 pH 提高一个单位所需的石灰吨数,取自 Soil order adjustments 工作表:Pallic 为 9–10 t ha−1,Brown 为 10–11,Allophanic 为 13–15,Organic 为 7–17。直接使用这一栏,比使用人们更熟悉的经验法则(1 t ha−1 优质石灰可使表层 75 mm 的 pH 提高 0.1)更可取,因为这一栏已经包含了各土纲之间缓冲能力的差异,而经验法则把这些差异平均掉了。
Two corrections follow:
随后有两项校正:
- Depth. The published rates act over the top 75 mm, the depth the target pH is quoted at. Some crops need the pH corrected deeper — lucerne wants 6.2–6.4 through 150 mm, asparagus is incorporated to 250–300 mm — so more lime is needed. The depth is parsed out of the liming row's own text, so it cannot drift away from the source. The correction is bounded at
limeDepthFactorMax(default ×2). Scaling linearly with depth assumes the subsoil is as acid and as strongly buffered as the topsoil, which it usually is not, and which the published capital rates flatly contradict: a straight-line reading would put asparagus at 3.7 times the surface rate against a published pre-plant range of 4–6 t ha−1. When the bound bites, the recommendation says so and reports the unbounded figure alongside. - Grade. New Zealand agricultural limestone runs 60–90 % CaCO3 by region. A low-grade rock needs proportionally more tonnage for the same pH effect, and the rate is scaled by the ratio of the reference neutralising value to the one you will actually buy.
- 深度。已发表的施用量作用于表层 75 mm,也就是目标 pH 所对应的深度。有些作物需要在更深的土层校正 pH——紫花苜蓿要求 150 mm 土层内达到 6.2–6.4,芦笋的石灰要混入 250–300 mm 深——因此需要更多石灰。深度是从施石灰行自身的文字中解析出来的,因此不会与数据源脱节。该校正以
limeDepthFactorMax为上限(默认 ×2)。随深度线性放大,等于假定底土与表土一样酸、缓冲能力一样强,而实际情况通常并非如此,已发表的基础性施用量也断然与之相悖:按直线推算,芦笋的施用量会是表层施用量的 3.7 倍,而已发表的种植前施用范围是 4–6 t ha−1。上限起作用时,推荐方案会说明这一点,并同时报告未设限的数值。 - 品位。新西兰农用石灰石的 CaCO3 含量因地区而异,在 60–90 % 之间。品位低的石灰石要达到同样的 pH 效果,需要按比例增加吨数;施用量按参照中和值与你实际要买的产品的中和值之比进行缩放。
The result is split into applications of at most limeMaxPerApplication (5 t ha−1), except on Organic soils where the workbook's own peat capital range applies and is much larger. Where the calculated figure falls outside the published capital range for that land use, the application says so — that is a prompt to confirm the pH with a laboratory test before spending the money, not a sign that the arithmetic is wrong.
计算结果拆分为每次不超过 limeMaxPerApplication(5 t ha−1)的若干次施用,但 Organic Soils 除外,那里适用工作簿自己给出的泥炭基础性施用范围,数值要大得多。计算值落在该土地利用已发表的基础性施用范围之外时,应用会予以说明——这是提醒你在花钱之前先用实验室测试确认 pH,而不表示算术有误。
How long a dressing lasts一次施用能管多久
life (yr) = a(rate) − limeLifeRainfallCoef × (R + I)
with a = 7 for a 1.25 t ha−1 dressing, 9 for 2.5, and 11 for 5.0, and the coefficient 0.0012 yr per mm. This is the liming sheet's own note 2. At 1200 mm a 2.5 t ha−1 dressing lasts about 7.6 years.
其中,施用量为 1.25 t ha−1 时 a = 7,2.5 时为 9,5.0 时为 11,系数为每毫米 0.0012 年。这是施石灰工作表自己的注 2。在 1200 mm 时,一次 2.5 t ha−1 的施用约可维持 7.6 年。
Maintenance, and the acidity the programme creates维持性施用,以及施肥方案造成的酸度
Nitrogen fertiliser acidifies. The Fertiliser products sheet gives the lime needed to neutralise each kilogram of nitrogen applied: about 1.8 kg for urea and the urea-based and ammonium phosphate products, about 5.4 kg for ammonium sulphate, and effectively zero for calcium ammonium nitrate. KiwiFert computes
氮肥会使土壤酸化。Fertiliser products 工作表给出了中和每千克施入的氮所需的石灰量:尿素以及尿素基产品和磷酸铵类产品约为 1.8 kg,硫酸铵约为 5.4 kg,硝酸铵钙实际上为零。KiwiFert 计算
acidification (t ha−1 yr−1) = N target × acid coefficient / 1000
and reports the larger of that figure and the published maintenance rate as the maintenance lime requirement. The two are not added: the published maintenance rate is typical practice on land already carrying a typical nitrogen programme, so adding them would double-count. Maintenance is an annual figure and is deliberately kept out of the one-off capital requirement.
并把该数值与已发表的维持性施用量两者中较大的一个,报告为维持性石灰需要量。两者不相加:已发表的维持性施用量,是在已经实行典型氮肥方案的土地上的典型做法,相加就会重复计算。维持性施用量是年度数字,有意不计入一次性的基础性需要量。
A long-running ammonium sulphate programme carries a lime bill that is easy to overlook: at 5.4 kg lime per kg N, a 150 kg N ha−1 programme needs 810 kg lime ha−1 yr−1 just to stand still. The same nitrogen as urea needs 270 kg.
长期施用硫酸铵的方案背着一笔容易被忽视的石灰账:按每千克氮 5.4 kg 石灰计,150 kg N ha−1 的方案仅仅为了维持原状,就需要 810 kg ha−1 yr−1 的石灰。同样多的氮若以尿素施入,只需 270 kg。
8Targets into products从目标值到产品
There are two ways to get from a nutrient target to a bag of fertiliser, and KiwiFert uses whichever the selection implies.
从养分目标值到一袋肥料,有两条路可走,KiwiFert 按所作的选择走相应的那一条。
8a. Rotation mode — the workbook's own events8a. 轮作模式——工作簿自己的施用事件
With a rotation chosen, the programme is the Schedule by rotation phase sheet filtered to that rotation: real application events, in the months and at the growth stages New Zealand practice actually uses. Each event is scaled as follows.
选定轮作后,施肥方案就是按该轮作筛选出来的 Schedule by rotation phase 工作表:真实的施用事件,发生在新西兰实际做法所用的月份和生育期。每次事件按如下方式缩放。
- Identify the nutrient the product was bought for. A phosphate-group product is bought for P, a nitrogen-group product for N, a trace-element carrier for whichever trace element it carries at the highest analysis, and so on. The mapping is a table in
js/lookup.js. - Scale the product rate by the site factor for that nutrient. Superphosphate on an Allophanic soil is scaled by fP = 1.6, so 389 kg ha−1 becomes 622 kg ha−1.
- Recompute every nutrient from the scaled product rate and the product analysis. That 622 kg of superphosphate delivers 56.0 kg P, 68.5 kg S and 124.5 kg Ca. The sulphur and calcium rise with the phosphorus because that is what physically happens when you spread more of the same product — and this is exactly the arithmetic the workbook used to derive its own co-delivered nutrient columns, which is why at a scale factor of 1.000 the recomputation reproduces the sheet to the decimal place.
- Count the repeats. The sheet's Applies within the phase column distinguishes a one-off establishment dressing from one that repeats every year of a multi-year phase, and marks alternative crop options that are not additive. An annual dressing in an eight-year pasture phase is one row carrying ×8, not eight rows; alternative options are excluded from the totals unless
includeAlternativesis turned on.
- 确定购买该产品是为了哪种养分。磷肥类产品为 P 而买,氮肥类产品为 N 而买,微量元素载体则为其中成分含量最高的那种微量元素而买,依此类推。这一对应关系是
js/lookup.js中的一张表。 - 按该养分的地点系数缩放产品施用量。Allophanic 土壤上的过磷酸钙按 fP = 1.6 缩放,于是 389 kg ha−1 变为 622 kg ha−1。
- 根据缩放后的产品施用量和产品成分含量,重新计算每一种养分。这 622 kg 过磷酸钙带来 56.0 kg P、68.5 kg S 和 124.5 kg Ca。硫和钙随磷一同增加,因为多撒同一种产品时,实际发生的就是这样——而这也正是工作簿推导其伴随养分各栏时所用的算法,所以在缩放系数为 1.000 时,重新计算的结果与工作表精确到小数位地吻合。
- 计入重复次数。工作表的 Applies within the phase 一栏区分一次性的建植期施用和在多年阶段中每年重复的施用,并标出不可累加的备选作物方案。八年牧场阶段中的一次年度施用,是带 ×8 的一行,而不是八行;备选方案不计入总量,除非打开
includeAlternatives。
One place the source contradicts itself数据源自相矛盾的一处
The mid-rotation forestry nitrogen dressings are marked “every year of the phase”, while the note on the same row says nitrogen is “applied once or at most a few times in a 25–30 year rotation” and the Forest Owners Association source gives an estate-wide average of about 8 kg N ha−1 yr−1. Read literally, Douglas fir's 25-year growth phase would carry 3750 kg N ha−1.
林业轮伐期中期的氮肥施用被标为“阶段内每年”,而同一行的备注却说氮“在 25–30 年的轮伐期内只施一次,至多几次”,Forest Owners Association 的资料给出的全林地平均值约为 8 kg N ha−1 yr−1。照字面理解,花旗松 25 年的生长阶段将承受 3750 kg N ha−1。
KiwiFert resolves this in favour of the note: in the Forestry sector, a nitrogen product marked “every year of the phase” is counted forestryNitrogenApplications times (default 1), the affected row says so on hover, and the parameter restores the literal reading if you disagree. It applies to nitrogen products only, and only in that sector: the annual superphosphate and selenium prill in the silvopastoral rotation are the pasture programme running underneath the trees and are genuinely annual. With the default, radiata pine comes to 650 kg N ha−1 over a 28-year rotation (23 kg ha−1 yr−1), which is three dressings — “a few times”.
KiwiFert 按备注来解决这一矛盾:在林业部门,标为“阶段内每年”的氮肥产品按 forestryNitrogenApplications 次计(默认 1),受影响的行在鼠标悬停时会说明这一点;如果你不同意,可用该参数恢复字面读法。这只适用于氮肥产品,也只适用于该部门:林牧复合轮作中每年施用的过磷酸钙和硒颗粒,是树下照常运行的牧场施肥方案,确实是每年施用。按默认值,辐射松在 28 年的轮伐期内合计 650 kg N ha−1(23 kg ha−1 yr−1),即三次施用——正是“几次”。
The general safeguard against this class of error is a cross-check between the two sheets. After the programme is built, the whole-cycle total for nitrogen, phosphorus and potassium is compared against the published envelope for the selected plant type, scaled to the cycle length. A disagreement of more than a factor of two raises a flag. The two sheets are independent compilations of the same practice, so a gross mismatch means one of them is being read wrongly — or, just as often, that the rotation spends most of its cycle growing something other than the plant type you selected.
防范这类错误的通用保障,是两张工作表之间的交叉核对。施肥方案建好之后,把氮、磷、钾的全周期总量与所选植物类型的已发表范围(按周期长度折算)相比较。相差超过两倍就会给出标记。两张工作表是对同一做法各自独立的汇编,因此严重不符意味着其中一张被读错了——或者,同样常见的是,该轮作在周期的大部分时间里种的并不是你所选的植物类型。
One event in the rotation programme is not from the workbook: where a soil test shows the block below its Olsen P target, the capital phosphorus programme is added at the front of the rotation, labelled as KiwiFert's addition. The event schedule describes typical practice and cannot contain a soil-test answer, so without this the capital requirement would appear in the target table and never reach the programme, the totals or the budget.
轮作施肥方案中有一次事件不是来自工作簿:当土壤测试显示地块低于其 Olsen P 目标值时,基础性施磷方案会加在轮作的最前面,并标明是 KiwiFert 添加的。事件表描述的是典型做法,不可能包含针对土壤测试的答案;没有这一步,基础性需要量就只会出现在目标值表中,而永远进不了施肥方案、总量或养分收支。
The rotation programme will not match the annual target table exactly, and should not. The targets come from the annual rate sheet for one land use; the programme comes from the event schedule across every phase of the rotation, including the phases growing something else entirely. They are two views of the same practice. A large gap between them is a question worth asking, not an error to fix.
轮作施肥方案不会与年度目标值表完全吻合,也不应该吻合。目标值来自针对单一土地利用的年度施用量表;施肥方案来自覆盖轮作每个阶段的事件表,其中包括种着完全不同作物的阶段。它们是同一做法的两种视角。两者之间差距很大,是一个值得追问的问题,而不是一个需要修正的错误。
8b. Annual mode — a solved product basket8b. 年度模式——求解出的产品组合
Without a rotation, KiwiFert solves a basket against the adjusted targets, sequentially, in the order P, K, S, Mg, N:
没有选定轮作时,KiwiFert 针对调整后的目标值依次求解一个产品组合,顺序为 P、K、S、Mg、N:
residuale = targete − already suppliede
product rate = residuale / (analysise / 100)
supplied += rate × analysis / 100, for every element in the product
The order is not arbitrary. Co-delivery runs one way: superphosphate brings sulphur and calcium with the phosphorus, DAP brings nitrogen with the phosphorus, sulphate of potash brings sulphur with the potassium. Solving phosphorus first means the sulphur step only has to supply what is left; solving nitrogen first would over-apply everything downstream of it. Where a step's target is already met by co-delivery, the application says so explicitly rather than leaving a blank row.
这个顺序并非随意。伴随施入是单向的:过磷酸钙随磷带来硫和钙,DAP 随磷带来氮,硫酸钾随钾带来硫。先解磷,意味着硫这一步只需补足剩余的部分;先解氮,则会使其下游的每一种养分都施用过量。某一步的目标值已由伴随施入满足时,应用会明确说明,而不是留下一个空行。
The product for each step is read from the crop's own row — “Triple super pre-plant plus DAP starter”, “Sulphate of potash, incorporated pre-plant” — by matching the prose against the product table, longest and most specific alias first. Where the prose names no stocked product (“Up to 30 kg K/ha down the spout”), a sensible default is substituted and the substitution is reported. For a chloride-sensitive crop the potassium default is sulphate of potash rather than muriate.
每一步所用的产品读自作物自己那一行——“种植前施重过磷酸钙,外加 DAP 作种肥”、“硫酸钾,种植前混入土壤”——方法是把这段文字与产品表进行匹配,最长、最具体的别名优先。文字中没有指明任何在列产品时(“随播种机下种管施入至多 30 kg K/ha”),就代之以一个合理的默认值,并报告这一替换。对于忌氯作物,钾的默认产品是硫酸钾而不是氯化钾。
Dressings are then split: nitrogen at nMaxSingleDressing (50 kg N ha−1), potassium at kSplitAboveKg (50 kg K ha−1, halved on a low-CEC soil). Splitting is why the timing summary on the crop row matters: the number of dressings is arithmetic, but when they go on is agronomy.
随后对施用进行分次:氮按 nMaxSingleDressing(50 kg N ha−1)拆分,钾按 kSplitAboveKg(50 kg K ha−1,在低 CEC 土壤上减半)拆分。正因为要分次,作物行上的施用时机摘要才显得重要:分几次施是算术,什么时候施则是农艺。
Trace elements微量元素
Trace elements listed on the crop's own row are delivered from the carriers named in the Trace elements sheet — granular borate for boron, sodium selenate prill for selenium, cobalt sulphate for cobalt, sodium molybdate for molybdenum.
作物自己那一行列出的微量元素,由 Trace elements 工作表中指明的载体提供——硼用颗粒硼酸盐,硒用硒酸钠颗粒,钴用硫酸钴,钼用钼酸钠。
Trace elements that the soil order is flagged for, but the crop row does not list, are shown as advice and are never added to the programme or the totals. The workbook's flag is a possibility, not a prescription: Allophanic soils are flagged “Mo (clover), occasionally B and Cu”, and Gley soils are flagged for manganese and iron excess rather than deficiency. Adding 2 kg B ha−1 to a dairy pasture on the strength of the word “occasionally” would be both wrong and, for boron, unsafe. The flag is surfaced with the workbook's own wording, the critical test value and the caution, and the decision is left where it belongs.
土纲被标记、但作物行并未列出的微量元素,只作为建议显示,绝不加入施肥方案或总量。工作簿的标记是一种可能性,而不是处方:Allophanic Soils 的标记是“Mo(三叶草),偶尔 B 和 Cu”,Gley Soils 的标记则是锰和铁过量而非缺乏。仅凭“偶尔”一词就给奶牛场牧场加施 2 kg B ha−1,既是错误的,而且就硼而言也不安全。该标记连同工作簿的原话、临界测试值和注意事项一并呈现,决定则留给该做决定的人。
9Total mass applied per hectare每公顷施用总质量
Every application event carries a product rate and a product analysis, so the mass of each element follows directly:
每次施用事件都带有产品施用量和产品成分含量,因此每种元素的质量可以直接得出:
macronutrient (kg ha−1) = product rate (kg ha−1) × analysis (%) / 100
trace element (g ha−1) = product rate × analysis / 100 × 1000
These are summed over the whole programme, with each event multiplied by its repeat count, to give the mass per rotation cycle. Dividing by the cycle length gives the annual figure. Sixteen elements are tracked — N, P, K, S, Ca, Mg, Na and Cl in kg ha−1; B, Zn, Cu, Mo, Se, Co, Mn and Fe in g ha−1 — and oxide equivalents are shown alongside for the elements whose labels use them.
这些数值在整个施肥方案上求和,每次事件乘以其重复次数,得出每个轮作周期的质量。除以周期长度即得年度数值。共追踪十六种元素——N、P、K、S、Ca、Mg、Na 和 Cl 以 kg ha−1 计;B、Zn、Cu、Mo、Se、Co、Mn 和 Fe 以 g ha−1 计——对于标签采用氧化物表示的元素,氧化物当量并列显示。
Lime is reported separately, in three places. Its calcium load dwarfs everything else — a 5 t ha−1 dressing of agricultural lime delivers 1900 kg Ca ha−1, against perhaps 200 kg ha−1 from a year of superphosphate — so folding it into one column would make every other calcium figure invisible. The annual maintenance lime is included in the combined annual total; the one-off capital dressing is shown in its own column, because averaging a one-off over a rotation would misrepresent both.
石灰单独报告,分三处列出。它带入的钙量使其他一切相形见绌——一次 5 t ha−1 的农用石灰施用带来 1900 kg Ca ha−1,而一年的过磷酸钙大约只带来 200 kg ha−1——因此若把它并入同一栏,其他所有钙的数值就都看不出来了。年度维持性石灰计入合并的年度总量;一次性的基础性施用单列一栏,因为把一次性施用摊到整个轮作上平均,对两者都是歪曲。
Read the chloride row. Muriate of potash at 150 kg K ha−1 also delivers about 276 kg Cl ha−1; sulphate of potash delivers none. That is the whole argument for using the more expensive product on potatoes, onions and berries, and it is only visible if you count the chloride.
看一看氯那一行。以 150 kg K ha−1 施用氯化钾,同时带来约 276 kg Cl ha−1;硫酸钾则一点不带。在马铃薯、洋葱和浆果上使用这种更贵的产品,全部理由就在这里,而只有把氯算进去才看得见。
10Removal and the balance移出量与平衡
The other half of a nutrient budget is what leaves. This comes from the plant nutrient database, and the units make the arithmetic trivial:
养分收支的另一半是离开地块的部分。这来自植物养分数据库,而所用单位使算术变得极其简单:
harvested DM (t ha−1) = yield × (dry matter basis ? 1 : DM% / 100)
removal (kg ha−1) = concentration (g kg−1 DM) × harvested DM (t ha−1)
removal (g ha−1) = concentration (mg kg−1 DM) × harvested DM (t ha−1)
The database quotes pasture, forage crops and forestry as dry matter and everything else as fresh weight as harvested, and says which on every row, so the conversion is never guessed.
数据库对牧草、饲料作物和林业按干物质给出数值,其余一律按收获时的鲜重给出,并在每一行注明是哪一种,因此换算从不靠猜。
Two concentration bases, and when to use which两种浓度基准,以及各自何时使用
Each plant row carries concentrations on two bases. Removed in harvest is the concentration in the fraction that physically leaves — grain, tuber, bulb, fruit, seed, cut herbage, stemwood plus bark. Whole above-ground plant includes the residues left in situ: straw, stover, tops, prunings, leaf fall.
每个植物行都带有两种基准的浓度。随收获物移出是实际离开地块的那部分的浓度——籽粒、块茎、鳞茎、果实、种子、刈割的牧草、带皮树干材。整个地上部植株则包括留在原地的残体:秸秆、玉米秸、茎叶、修剪枝、落叶。
KiwiFert uses the removed basis when residueRetained is 1, and the whole-plant basis applied to total above-ground biomass when it is 0. The difference is largest for potassium, which is overwhelmingly returned in cereal straw rather than exported in grain: baling the straw off a wheat crop turns a small potassium export into a large one, and that single switch is worth more to a potassium budget than any coefficient in section 5.
当 residueRetained 为 1 时,KiwiFert 使用移出基准;为 0 时,使用整株基准,并乘以地上部总生物量。两者的差别在钾上最大,因为钾绝大部分随谷物秸秆归还,而不是随籽粒输出:把小麦的秸秆打捆运走,会使原本很小的钾输出变成很大的输出,而这一个开关对钾收支的影响,超过第 5 节中的任何一个系数。
Grazing returns: uptake is not export放牧归还:吸收量不等于输出
For grazed pasture, herbage uptake is not farm export. Grazing animals return roughly 70–95 % of what they eat to the same paddock in dung and urine — redistributed unevenly, and concentrated in camps and laneways. Net export is the small fraction retained in liveweight, milk, wool and velvet, plus leaching, runoff and gaseous loss. KiwiFert applies
对于放牧牧场,牧草吸收量不等于农场输出。放牧牲畜把所采食养分的大约 70–95 % 以粪尿的形式归还到同一块围场——只是分布不均,集中在牲畜歇息处和通道上。净输出是留存在活重、牛奶、羊毛和鹿茸中的那一小部分,加上淋失、径流和气态损失。KiwiFert 采用
net exporte = uptakee × (1 − grazingReturnFraction) (default 0.85)
to every element, macro and trace, on rows the database marks as grazed. The source database quotes the return range for nitrogen, phosphorus, potassium and sulphur; the same fraction is used for calcium, magnesium, sodium, chloride and the trace elements, which animals also excrete far more of than they retain. It is a single coefficient, so it is rougher for calcium, which a milking herd retains more of than the others. Cut-and-carry silage and hay are listed as separate rows in the database and do remove the full herbage load — which is why a silage paddock and a grazed paddock on the same farm need different potassium budgets.
这一算式用于数据库标为放牧的各行中的每一种元素,大量元素和微量元素皆然。源数据库给出了氮、磷、钾和硫的归还范围;钙、镁、钠、氯和微量元素采用同一比例,牲畜对它们的排泄量同样远多于留存量。这是单独一个系数,因此对钙来说更为粗略,因为泌乳牛群留存的钙比留存的其他元素多。刈割移走的青贮和干草在数据库中另列为单独的行,确实会移走牧草中的全部养分——这就是同一农场里青贮围场和放牧围场需要不同钾收支的原因。
Removal through a rotation轮作过程中的移出量
With a rotation selected, removal is computed phase by phase: each phase's own species, its own published yield, its own duration. A yield quoted per year applies for every year of the phase; a yield quoted per phase is the whole phase already. The phase totals are summed to give whole-cycle export, and divided by the cycle length for the annual figure.
选定轮作后,移出量逐阶段计算:每个阶段有自己的物种、自己的已发表产量、自己的持续时间。按年给出的产量适用于该阶段的每一年;按阶段给出的产量已经是整个阶段的量。各阶段的总量相加得到全周期输出,再除以周期长度得到年度数值。
Why this matters more than it looks. The rotations workbook makes the point directly: a fertilisation calculator built on annual averages will systematically mis-set inputs in any rotation carrying a legume or pasture phase. The pasture phase in a Canterbury mixed-cropping rotation banks nitrogen that the following wheat crop spends. Fertilise that wheat as though the pasture never happened and you will over-apply by 100–150 kg N ha−1 and leach the difference. KiwiFert does not model the nitrogen carry-over — no simple model can — but by presenting the phases in sequence with their own removal it at least makes the omission visible rather than burying it in an average.
为什么这比看上去更重要。轮作工作簿说得很直接:建立在年平均值之上的施肥计算器,在任何含有豆科或牧场阶段的轮作中,都会系统性地把投入定错。Canterbury 混合种植轮作中的牧场阶段积攒下氮,供随后的小麦消耗。给这茬小麦施肥时若当作牧场阶段从未存在,就会多施 100–150 kg N ha−1,多出的部分随之淋失。KiwiFert 并不模拟氮的结转——任何简单模型都做不到——但它把各阶段连同各自的移出量依次呈现,至少让这一缺漏看得见,而不是把它埋在平均值里。
The balance平衡
balancee = appliede + maintenance limee − removede
A positive balance builds soil reserves, or is lost to water and air. A negative balance mines them. Neither is automatically wrong: a capital phosphorus programme is deliberately positive, and a well-supplied Allophanic soil can run a negative phosphorus balance for five years with no production penalty at all. What matters is that the sign is the one you intended, and that you know how long you can hold it.
正平衡会积累土壤储备,或者损失到水和空气中。负平衡则消耗土壤储备。两者都不必然是错的:基础性施磷方案有意为正,而供磷充足的 Allophanic 土壤可以连续五年维持磷的负平衡而完全不减产。要紧的是,正负号是你本来想要的那个,并且你清楚这种状态能维持多久。
11Ceilings and cautions上限与注意事项
Three limits are hard, in the sense that exceeding them is a regulatory or toxicological problem rather than an agronomic judgement.
有三项限值是硬性的,意思是超出它们属于法规或毒理学问题,而不是农艺上的判断。
| Limit | Value | Basis |
|---|---|---|
| Synthetic nitrogen on pastoral land | 190 kg N ha−1 yr−1 | Resource Management (National Environmental Standards for Freshwater) Regulations 2020. Applies both to each individual hectare of pasture and to the average across all pastoral land use on the farm. Dairy farmers report annually by 31 July for the year to 30 June. |
| Selenium | 20 g Se ha−1 | Narrowest margin between deficiency and toxicity of anything applied to New Zealand pasture. Double-dosing through both fertiliser and animal treatment is the usual way it is exceeded. |
| Boron ahead of a cereal | 3 kg B ha−1 | A corrective 3 kg B ha−1 is safe for a brassica; 6 kg will damage a cereal following in the same rotation. |
| 限值 | 数值 | 依据 |
|---|---|---|
| 牧场用地上的合成氮肥 | 190 kg N ha−1 yr−1 | Resource Management (National Environmental Standards for Freshwater) Regulations 2020。既适用于每一公顷牧场,也适用于农场内全部牧场用地的平均值。奶牛场主须在每年 7 月 31 日前就截至 6 月 30 日的年度进行申报。 |
| 硒 | 20 g Se ha−1 | 在施用于新西兰牧场的所有物质中,硒的缺乏与中毒之间的余地最窄。通过肥料和动物处理两条途径重复给硒,是超限的常见原因。 |
| 谷类作物之前施硼 | 3 kg B ha−1 | 3 kg B ha−1 的矫正用量对芸薹属作物是安全的;6 kg 则会损害同一轮作中后茬的谷类作物。 |
The selenium ceiling is enforced in the calculation, not merely reported: a target above it is clamped. The other two raise flags.
硒的上限在计算中强制执行,而不只是报告:高于它的目标值会被截断。另外两项则给出标记。
Softer cautions are raised for: chloride on a chloride-sensitive crop; low anion storage capacity with phosphorus applied, where loss to water is most likely; poorly drained soil, where drainage is the first fertiliser decision and denitrification removes nitrogen before the crop sees it; molybdenum applied without copper, since herbage Mo above about 3 mg kg−1 DM induces secondary copper deficiency in cattle and deer; high pH on a Melanic soil, where over-liming rather than acidity is the risk; a calculated lime rate outside the published capital range; and any element delivered far past its own target by co-delivery.
较软性的注意事项针对以下情形提出:在忌氯作物上施氯;阴离子吸持容量低而又施了磷,此时最容易损失到水体;排水不良的土壤,那里排水才是第一项施肥决策,反硝化作用会在作物用上氮之前就把它带走;施钼而不施铜,因为牧草 Mo 高于约 3 mg kg−1 DM 时会在牛和鹿身上诱发继发性铜缺乏;Melanic 土壤上的高 pH,那里的风险是施石灰过量而不是酸度;计算出的石灰施用量超出已发表的基础性施用范围;以及任何因伴随施入而远超自身目标值的元素。
Data-quality flags are raised for a missing soil order, a missing pH, an estimated rainfall, and the absence of a soil test. These are not decoration. An answer computed without a soil test is a different kind of object from one computed with one, and the application should say so every time.
数据质量标记针对以下情形给出:缺少土纲、缺少 pH、降雨量为估算值,以及没有土壤测试。这些并非点缀。没有土壤测试算出的答案,与有土壤测试算出的答案是性质不同的两种东西,应用每一次都应该说明这一点。
12Where the model is weakest模型最薄弱之处
In rough order of how much damage each could do:
大致按各项可能造成的损害大小排序:
- The soil test is usually missing. Without an Olsen P there is no capital phosphorus calculation at all, and the maintenance rate is a national typical figure rather than anything about this block. This dominates every other source of error.
- KiwiMap's pH is modelled, not measured. The layer is a quantile regression forest prediction on a 100 m grid. Lime is the most pH-sensitive output in the whole application — a 0.2 pH unit error on an Allophanic soil is 2.8 t ha−1 of lime — so a laboratory pH on a real sample changes the answer more than any coefficient here.
- Rainfall is estimated from wet days. See section 3. Affects the sulphur rate and the lime interval.
- The K, S and N adjustment factors are KiwiFert's, not the workbook's. The workbook states these as classes; turning a class into a number is an interpolation this application makes. They are the coefficients most worth challenging, and they are all on the Parameters tab.
- Tissue concentrations are central estimates. They vary with cultivar, growth stage at harvest, season, soil supply and fertiliser history. Luxury uptake of potassium alone can double the tabulated value on a high-K soil. Silicon, aluminium and chloride are the weakest columns in the database and should be treated as indicative only.
- Rotations are modal, not prescriptive. Real farms vary the sequence with soil type, irrigation, contract availability and season.
- Nothing carries nitrogen over between phases. The pasture-to-wheat nitrogen credit, the pulse-to-cereal credit and the residual value of an effluent block are all real and all absent. This is the largest structural omission in the model.
- No economics. The economically optimal rate is almost always below the agronomically maximal one, and it moves with both the product price and the commodity price.
- 土壤测试通常缺失。没有 Olsen P,就根本没有基础性施磷的计算,维持性施用量也只是全国典型数字,与这个地块本身毫无关系。这一项压倒其他所有误差来源。
- KiwiMap 的 pH 是模型预测的,不是实测的。该图层是 100 m 网格上的分位数回归森林预测。石灰是整个应用中对 pH 最敏感的输出——在 Allophanic 土壤上,0.2 个 pH 单位的误差就是 2.8 t ha−1 石灰——因此对真实样品做一次实验室 pH 测定,对答案的改变超过这里的任何一个系数。
- 降雨量由降雨日数估算。见第 3 节。影响硫的施用量和施石灰间隔。
- K、S 和 N 的调整系数是 KiwiFert 的,不是工作簿的。工作簿以等级表述这些因素;把等级变成数字,是本应用所做的一种插值。它们是最值得质疑的系数,而且全都在“参数”选项卡上。
- 组织浓度是中心估计值。它们随品种、收获时的生育期、季节、土壤供给和施肥历史而变。单是钾的奢侈吸收,就能使高钾土壤上的数值比表列值翻一番。硅、铝和氯是数据库中最薄弱的几栏,只应视为参考。
- 轮作是典型模式,不是规定。实际农场会根据土壤类型、灌溉、能否拿到合同以及季节调整顺序。
- 各阶段之间没有任何氮的结转。牧场转小麦的氮素贡献、豆类转谷类的氮素贡献,以及施用过养殖废水的地块的残效,都真实存在,也都没有纳入。这是模型中最大的结构性缺漏。
- 没有经济分析。经济最优施用量几乎总是低于农艺上的最大施用量,并随产品价格和农产品价格两者而变动。
13Parameter reference参数参考
Every coefficient the model uses, its default, and where the default comes from. A source of KiwiFert means the application introduced that number: it is an interpretation, not a published figure, and it is the kind you should feel free to change. All of these are editable on the Parameters tab, and a saved scenario records only the ones you changed — so a scenario saved today picks up a corrected default tomorrow.
模型所用的每一个系数、其默认值,以及默认值的来源。来源为 KiwiFert 表示该数字是本应用引入的:它是一种解读,而不是已发表的数字,也是你尽可放手修改的那一类。所有这些都可在“参数”选项卡上编辑,已保存的情景只记录你改动过的那些——因此今天保存的情景,明天会自动采用更正后的默认值。
| Parameter参数 | Default默认值 | Unit单位 | Source来源 |
|---|---|---|---|
The table is built from the same file the application reads (js/params.js), so it cannot drift out of step with the code. If it has not appeared, JavaScript is disabled — the same list is on the calculator's Parameters tab.该表由应用读取的同一个文件(js/params.js)生成,因此不会与代码脱节。如果它没有出现,说明 JavaScript 已被禁用——同样的清单见计算器的“参数”选项卡。 | |||
14A worked example一个算例
A Waikato dairy block at 37.43997 °S, 175.78125 °E, growing the default rotation D1 (permanent ryegrass/white clover pasture with periodic renewal, 10-year cycle), with every parameter at its default and no soil test entered.
Waikato 的一个奶牛场地块,位于 37.43997 °S、175.78125 °E,采用默认轮作 D1(多年生黑麦草/白三叶牧场,定期更新,10 年周期),所有参数取默认值,未输入土壤测试。
Step 1 — the site, read from KiwiMap第 1 步——从 KiwiMap 读取的地点信息
| Variable | Value | Variable | Value |
|---|---|---|---|
| Soil order | Allophanic | Mean annual air temperature | 14.0 °C |
| Soil pH (0–10 cm) | 5.37 | Wet days | 143 yr−1 |
| Cation exchange capacity | 25.9 cmol(+) kg−1 | Rainfall (estimated) | 1359 mm |
| Soil carbon | 3.00 % | PED | 80 mm |
| Drainage / texture / depth | Well drained / silty / deep | Land use (2020) | Grassland – high producing |
| 变量 | 数值 | 变量 | 数值 |
|---|---|---|---|
| 土纲 | Allophanic | 年平均气温 | 14.0 °C |
| 土壤 pH(0–10 cm) | 5.37 | 降雨日数 | 143 yr−1 |
| 阳离子交换量 | 25.9 cmol(+) kg−1 | 降雨量(估算) | 1359 mm |
| 土壤碳 | 3.00 % | PED | 80 mm |
| 排水性 / 质地 / 土层深度 | 排水良好 / 粉质 / 深厚 | 土地利用(2020) | 草地——高产 |
Step 2 — the factors第 2 步——各项系数
fP = 1.600 (Allophanic, very high P retention). fK = 0.925 (K reserve “moderate to high”, read as the mean of the moderate and high factors). fS = 0.850 × 1.108 = 0.941 (low leaching class, then +10.8 % for 359 mm of rainfall above the 1000 mm reference). fN = 1.030 (14.0 °C against the 13 °C reference, at 3 % per degree).
fP = 1.600(Allophanic,磷固持极高)。 fK = 0.925(钾储量“中等至高”,按中等与高两个系数的平均值读取)。 fS = 0.850 × 1.108 = 0.941(低淋失等级,再因降雨量超出 1000 mm 参照值 359 mm 而 +10.8 %)。 fN = 1.030(14.0 °C 对比 13 °C 的参照值,每度 3 %)。
Step 3 — the targets第 3 步——目标值
| Element元素 | Published range已发表范围 | Base at position 0.5位置 0.5 处的基准值 | Factor系数 | Target目标值 |
|---|---|---|---|---|
| N | 100–190 | 145.0 | ×1.030 | 149.4 |
| P | 30–45 | 37.5 | ×1.600 | 60.0 |
| K | 0–80 | 40.0 | ×0.925 | 37.0 |
| S | 30–50 | 40.0 | ×0.941 | 37.7 |
| Ca | 60–100 | 80.0 | ×1.000 | 80.0 |
| Mg | 0–30 | 15.0 | ×1.000 | 15.0 |
All in kg ha−1 yr−1. Nitrogen at 149.4 sits below the 190 cap, so no clamping. Selenium comes through from the crop row at 10 g ha−1. Boron, copper and molybdenum are flagged as possible deficiencies on Allophanic soils and appear as advice only.
单位均为 kg ha−1 yr−1。氮为 149.4,低于 190 的上限,因此不作截断。硒由作物行带入,为 10 g ha−1。硼、铜和钼在 Allophanic Soils 上被标为可能缺乏,只作为建议出现。
Step 4 — lime第 4 步——石灰
The liming row for permanent ryegrass/white clover pasture gives a target band of 5.8–6.0 and a trigger of 5.6. At position 0.5 the target is pH 5.90, and the current 5.37 is below the trigger, so capital lime is due: ΔpH = 0.53, at 14 t ha−1 per pH unit on Allophanic soil, with no depth or grade correction, gives 7.41 t ha−1 — split into two dressings of 3.70 t ha−1, each lasting about 7.4 years at 1359 mm of rainfall. That is above the published capital range of 2.5–5.0 t ha−1, so the application flags it: confirm the pH with a real sample before spending it.
多年生黑麦草/白三叶牧场的施石灰行给出的目标区间为 5.8–6.0,触发值为 5.6。在位置 0.5 处目标值为 pH 5.90,而当前的 5.37 低于触发值,因此需要施基础性石灰:ΔpH = 0.53,Allophanic 土壤上每个 pH 单位需 14 t ha−1,不作深度或品位校正,得出 7.41 t ha−1——分两次施用,每次 3.70 t ha−1,在 1359 mm 降雨量下每次约可维持 7.4 年。这高于已发表的基础性施用范围 2.5–5.0 t ha−1,因此应用给出标记:花这笔钱之前,先用真实样品确认 pH。
Maintenance is the larger of the published 400–625 kg ha−1 yr−1 (midpoint 513) and the acidification the nitrogen programme creates (149.4 kg N × 1.8 kg lime kg N−1 = 269), so 513 kg ha−1 yr−1.
维持性施用量取已发表的 400–625 kg ha−1 yr−1(中点 513)与氮肥方案造成的酸化量(149.4 kg N × 1.8 kg lime kg N−1 = 269)两者中的较大值,即 513 kg ha−1 yr−1。
Step 5 — the programme第 5 步——施肥方案
Fifteen application events across the three phases of D1. The annual maintenance dressing of single superphosphate is the one to watch: the workbook's 389 kg ha−1 is scaled by fP = 1.6 to 622 kg ha−1, delivering 56.0 kg P, 68.5 kg S and 124.5 kg Ca — and the sulphur and calcium come with it whether they were wanted or not.
D1 的三个阶段共有十五次施用事件。最值得留意的是每年一次的普通过磷酸钙维持性施用:工作簿中的 389 kg ha−1 按 fP = 1.6 缩放为 622 kg ha−1,带来 56.0 kg P、68.5 kg S 和 124.5 kg Ca——硫和钙不管要不要,都跟着一起来。
Step 6 — totals and balance第 6 步——总量与平衡
| Element元素 | Applied, kg ha−1 yr−1施用量,kg ha−1 yr−1 | From maintenance lime来自维持性石灰 | Net export净输出 | Balance平衡 |
|---|---|---|---|---|
| N | 121.3 | – | 86.3 | +35.0 |
| P | 53.6 | – | 8.2 | +45.4 |
| K | 37.0 | – | 65.3 | −28.3 |
| S | 60.9 | – | 7.3 | +53.6 |
| Ca | 205.2 | 194.8 | 11.5 | +388.5 |
| Mg | 20.2 | – | 4.5 | +15.7 |
| Cl | 34.0 | – | 26.4 | +7.6 |
Three things in that table are worth a postgraduate's attention.
表中有三点值得研究生留意。
The nitrogen balance of +35 is not a soil accumulation. Grazed pasture returns most ingested nitrogen to the paddock as urine, and urine patches are the dominant nitrate leaching pathway in New Zealand pastoral systems — so a modest positive balance on paper can coexist with substantial loss to water. The balance is a mass-conservation statement, not an environmental one.
氮平衡 +35 并不是土壤中的积累。放牧牧场把采食的氮大部分以尿液形式归还围场,而尿斑是新西兰牧场系统中硝酸盐淋失的主要途径——因此账面上不大的正平衡,可以与大量损失到水体同时存在。平衡是关于质量守恒的陈述,而不是关于环境的陈述。
The potassium balance of −28 is real and is what the workbook predicts: the published potassium range starts at zero and rises only where silage is cut, so a maintenance-only programme on a grazed platform runs a potassium deficit that the soil reserve absorbs. On an Allophanic soil with moderate-to-high reserve that is sustainable for some years; on a Pumice soil, with essentially no weatherable potassium, it is not.
钾平衡 −28 是真实的,也正是工作簿所预示的:已发表的钾范围从零起算,只有在刈割青贮的地方才上升,因此放牧区上只做维持性施用的方案会出现钾亏缺,由土壤储备来承担。在储量中等至高的 Allophanic 土壤上,这可以持续若干年;在基本没有可风化钾的 Pumice 土壤上,则不行。
The sulphur balance of +54 is co-delivery. Nobody chose to apply 61 kg S ha−1; it arrived inside the superphosphate bought for phosphorus. On a low-leaching Allophanic soil most of it stays put, which is fine; on a Podzol it would be gone by spring, which is why the same programme on the West Coast wants an elemental sulphur component instead.
硫平衡 +54 是伴随施入的结果。没有人决定要施 61 kg S ha−1;它是随着为补磷而买的过磷酸钙一起来的。在淋失低的 Allophanic 土壤上,其中大部分留在原地,这没有问题;在 Podzol 上,到春天它就已流失殆尽,所以同样的方案在 West Coast 需要改用含元素硫的成分。
15For whoever maintains this致维护者
The application is plain HTML, CSS and JavaScript — no framework, no build step, no external requests, no dependencies beyond KiwiMap's vendored libraries. It will still work in ten years.
本应用是纯粹的 HTML、CSS 和 JavaScript——没有框架,没有构建步骤,没有外部请求,除 KiwiMap 随附的库之外没有任何依赖。十年后它仍然能用。
| File | What lives there |
|---|---|
scripts/extract.py | Reads the three .xlsx workbooks and writes data/*.js. Re-run it after any spreadsheet change: python3 scripts/extract.py (needs openpyxl). |
data/*.js | Generated. Never hand-edited. Each file extends one global, KF_DATA. |
js/params.js | Every coefficient, with its default, unit, help text and source. Adding a parameter here makes it appear on the Parameters tab and in the table in section 13 automatically. |
js/lookup.js | Indexes and joins, plus the two mapping tables that are not in the workbooks: KiwiMap soil-order label → workbook soil order, and plant type → liming row. |
js/model.js | The calculation. Touches no DOM; can be driven from the console. Its nine sections correspond one-to-one with sections 3 to 11 of this document. |
js/kiwimap.js | The KiwiMap picker map. Reading the point is done by the site's shared reader, ../ks-kiwimap.js, which loads KiwiMap's libraries and manifest, re-bases its paths and reads the point for every tool on the site. |
js/scenario.js | Scenario JSON: format, versioning, save, load, autosave. |
js/contaminants.js | Cadmium, uranium and fluorine added with phosphate fertiliser, and the years to each threshold (section 16). Touches no DOM. |
js/app.js | Everything that touches the DOM. One renderer per tab. |
scripts/check_contaminants_vs_tutor.js | Checks section 16's arithmetic against the Numerical Tutor's cadmium question: node kiwifert/scripts/check_contaminants_vs_tutor.js from the site root. |
../scripts/kiwiscience_server.py | The site's local server, with HTTP Range support, serving the whole KiwiScience folder so KiwiFert can see the KiwiMap folder and the shared site files. Open KiwiScience.command wraps it for Finder, and Open KiwiFert.command hands over to it with KiwiFert already open. |
| 文件 | 内容 |
|---|---|
scripts/extract.py | 读取三个 .xlsx 工作簿并写出 data/*.js。电子表格有任何改动后都要重新运行:python3 scripts/extract.py(需要 openpyxl)。 |
data/*.js | 自动生成,绝不手工编辑。每个文件都扩展同一个全局对象 KF_DATA。 |
js/params.js | 每一个系数,连同其默认值、单位、帮助文字和来源。在这里添加一个参数,它就会自动出现在“参数”选项卡和第 13 节的表中。 |
js/lookup.js | 索引与连接,外加两张不在工作簿中的对应表:KiwiMap 土纲标签 → 工作簿土纲,以及植物类型 → 施石灰行。 |
js/model.js | 计算本身。不接触 DOM;可从控制台驱动。它的九个部分与本文第 3 至 11 节一一对应。 |
js/kiwimap.js | KiwiMap 选点地图。读取该点的工作由全站共用的读取器 ../ks-kiwimap.js 完成,它加载 KiwiMap 的库和清单文件,重新设定其路径基准,并为站内每一个工具读取该点。 |
js/scenario.js | 情景 JSON:格式、版本管理、保存、加载、自动保存。 |
js/contaminants.js | 随磷肥带入的镉、铀和氟,以及达到各阈值所需的年数(第 16 节)。不接触 DOM。 |
js/app.js | 所有接触 DOM 的部分。每个选项卡一个渲染函数。 |
scripts/check_contaminants_vs_tutor.js | 对照 Numerical Tutor 的镉题目检查第 16 节的算术:在站点根目录运行 node kiwifert/scripts/check_contaminants_vs_tutor.js。 |
../scripts/kiwiscience_server.py | 本站的本地服务器,支持 HTTP Range,提供整个 KiwiScience 文件夹,使 KiwiFert 能访问 KiwiMap 文件夹和全站共用文件。Open KiwiScience.command 把它封装起来供 Finder 使用,Open KiwiFert.command 则转交给它,并直接打开 KiwiFert。 |
To change a coefficient, edit js/params.js. Do not type a constant into js/model.js: the Parameters tab, the scenario file and section 13 of this document are all generated from the parameter list, and a hard-coded number is invisible to all three.
要修改某个系数,请编辑 js/params.js。不要把常数直接写进 js/model.js:“参数”选项卡、情景文件和本文第 13 节都由参数列表生成,硬编码的数字对这三者都是不可见的。
To add a site variable, add it to QUERY_PLAN in ../ks-kiwimap.js, read it in Model.deriveSite(), and add it to SITE_FIELDS in js/app.js so it becomes editable.
要添加一个地点变量,请把它加入 ../ks-kiwimap.js 的 QUERY_PLAN,在 Model.deriveSite() 中读取它,并加入 js/app.js 的 SITE_FIELDS,使其可以编辑。
To check the model against the workbook, open the calculator and run KF.selfTest() in the browser console. It re-derives every nutrient figure in all 466 application events from the product analyses and reports the largest discrepancy. Anything above about 0.1 kg ha−1 means a product analysis has changed and the arithmetic no longer reconciles.
要对照工作簿检查模型,请打开计算器,在浏览器控制台中运行 KF.selfTest()。它根据产品成分含量重新推算全部 466 次施用事件中的每一个养分数值,并报告最大差异。凡超过约 0.1 kg ha−1,就说明某个产品的成分含量已经改动,算术不再对得上。
16Contaminants in phosphate fertiliser磷肥中的污染物
Phosphate rock carries cadmium, uranium and fluorine, and they come onto the block with the phosphorus. The Contaminants tab works out how much the programme adds each year, what the soil holds now, and how many years of the same programme it takes to reach each threshold that applies. The arithmetic lives in js/contaminants.js.
磷矿石含有镉、铀和氟,它们随磷一起进入地块。污染物选项卡算出施肥方案每年带入多少、土壤现在含有多少,以及按同样的方案要多少年才达到每一项适用的阈值。相关算术写在 js/contaminants.js 中。
The phosphorus that carries them携带它们的磷
Only phosphorus from products made from phosphate rock is counted: the superphosphates, the ammonium phosphates, reactive phosphate rock, the potash supers and the compound blends. It is summed over the programme as in section 9 and divided by the cycle length. Organic P sources (blood and bone, compost, effluent) are left out. They carry their own contaminants, which a mg-per-kg-P figure for rock phosphate does not describe.
只计入以磷矿石为原料的产品中的磷:各种过磷酸钙、磷酸铵类、活性磷矿粉、含钾过磷酸钙和复混肥。它按第 9 节的方法在整个施肥方案上求和,再除以周期长度。有机磷源(血骨粉、堆肥、养殖废水)不计入。它们带有自己的污染物,而针对磷矿石的每千克磷毫克数并不能描述这些污染物。
The mass balance质量平衡
This is the calculation the Numerical Tutor teaches in Cadmium: years to a threshold, line for line, so that a student who works the question by hand gets the number the tool prints:
这就是 Numerical Tutor 在 Cadmium: years to a threshold 一题中所教的计算,逐行对应,这样手算这道题的学生得到的数字就是本工具给出的数字:
added (g ha−1 yr−1) = P applied (kg ha−1 yr−1) × content (mg kg−1 P) / 1000
soil mass (t ha−1) = 10 000 m2 × depth (m) × bulk density (t m−3)
now (g ha−1) = soil mass × current concentration (mg kg−1 = g t−1)
at the threshold (g ha−1) = soil mass × threshold (mg kg−1)
years = (at the threshold − now) / added, rounded up
The result is rounded up because the threshold is first exceeded during that year. scripts/check_contaminants_vs_tutor.js draws problems from the tutor's own generator and confirms the two give the same answer. At its last run, all 5 000 matched, with no difference in the unrounded years. Run it after changing either file.
结果向上取整,因为阈值是在那一年当中首次被超过的。scripts/check_contaminants_vs_tutor.js 从 Tutor 自己的出题器中抽取题目,并确认两者给出相同的答案。最近一次运行时,5 000 道题全部吻合,未取整的年数没有任何差异。修改其中任一文件后都要运行它。
It is a straight accumulation. Everything added stays in the layer: nothing leaves by plant offtake, leaching or erosion, and nothing arrives from lime, biosolids or the atmosphere. Offtake and leaching remove a little cadmium each year, so the years shown are the shortest plausible time, not a forecast. That is the right side to err on for a screening figure, and it is what the tutor teaches.
这是直线累积。加进去的一切都留在该土层中:没有任何东西因植物带走、淋失或侵蚀而离开,也没有任何东西从石灰、生物固体或大气中进来。植物带走和淋失每年会移除少量镉,因此所示年数是合理范围内的最短时间,而不是预测。对于一个筛查性的数值,宁可偏向这一边,这也是 Tutor 所教的。
The inputs, and where their defaults come from输入项及其默认值的来源
| Input | Default | Source |
|---|---|---|
| Cd in the fertiliser | 280 mg Cd/kg P | The New Zealand fertiliser industry's voluntary upper limit, which is also the figure in the tutor's Unit 4 slides. It gives the fastest accumulation a compliant product allows. Enter the supplier's declared figure for the product actually used. |
| U and F in the fertiliser | none (0 = not entered) | Neither KiwiFert nor KiwiChem holds a figure. Without one, uranium and fluorine are not accumulated. For scale, superphosphate is often quoted at 1.5–2 % F, about 170 000–220 000 mg F/kg P at 9 % P. |
| Accumulation depth | 75 mm pastoral; 150 mm cultivated | The Tiered Fertiliser Management System's sampling depths: 0–75 mm screening samples for pasture, where unploughed soil keeps fertiliser cadmium near the surface, and 0–150 mm definitive samples for cultivated soil. Whether the block is pastoral follows the plant type. |
| Bulk density | 1.0 t/m3 | KiwiFert's choice for a pasture topsoil. Allophanic and pumice soils run nearer 0.7 t/m3 (less soil, so each threshold is reached sooner). Enter a measured value. |
| 输入项 | 默认值 | 来源 |
|---|---|---|
| 肥料中的 Cd | 280 mg Cd/kg P | 新西兰肥料行业自愿执行的上限,也是 Tutor 第 4 单元幻灯片中的数字。它给出的是合规产品所允许的最快累积速度。请输入供应商就实际所用产品申报的数值。 |
| 肥料中的 U 和 F | 无(0 = 未输入) | KiwiFert 和 KiwiChem 都没有相应数值。没有数值时,铀和氟不作累积计算。作为量级参考,过磷酸钙的含氟量常被引为 1.5–2 % F,按含 P 9 % 计约合 170 000–220 000 mg F/kg P。 |
| 累积深度 | 牧场 75 mm;耕作地 150 mm | Tiered Fertiliser Management System(分级肥料管理体系)的采样深度:牧场取 0–75 mm 筛查样品,因为未翻耕的土壤使肥料带入的镉留在近地表;耕作土壤取 0–150 mm 确证样品。地块是否属于牧场,由植物类型决定。 |
| 容重 | 1.0 t/m3 | KiwiFert 为牧场表土选定的数值。Allophanic 和 Pumice 土壤接近 0.7 t/m3(土壤更少,因此每项阈值都更早达到)。请输入实测值。 |
The soil now is, in order of preference: a value typed into the tab; the KiwiMap geochemistry at the point read on the Site tab; KiwiChem's New Zealand background median (0.08 mg Cd kg−1 nationally). The KiwiMap value is the GNS Geochemical Atlas interpolated from 676 samples over 2–20 cm. That is a regional estimate rather than a paddock measurement, and a deeper layer than the 75 mm pasture sample. Fertiliser cadmium concentrates at the surface, so on long-fertilised pasture a soil test of the top 75 mm is likely to read higher, and it should be entered when there is one.
土壤现状按优先顺序取:在该选项卡中键入的数值;在“地点”选项卡上读取的该点 KiwiMap 地球化学数据;KiwiChem 的新西兰背景中位数(全国为 0.08 mg Cd kg−1)。KiwiMap 的数值来自 GNS Geochemical Atlas,由 676 个 2–20 cm 深度的样品插值而成。那是区域性的估计而不是围场的实测值,而且所对应的土层比 75 mm 的牧场样品更深。肥料带入的镉集中在表层,因此在长期施肥的牧场上,表层 75 mm 的土壤测试读数很可能更高;有这样的测试结果时就应当输入。
The thresholds阈值
| Element | Threshold | mg/kg | Where it comes from |
|---|---|---|---|
| Cd | TFMS Tier 1 | 0.6 | Tiered Fertiliser Management System, NZ Cadmium Management Strategy. Each tier restricts the choice and rate of phosphate fertiliser further; at Tier 4 no further accumulation is allowed without a site-specific investigation. Held in js/contaminants.js, because these are industry triggers, not soil guideline values, and KiwiChem does not carry them. |
| TFMS Tier 2 | 1.0 | ||
| TFMS Tier 3 | 1.4 | ||
| TFMS Tier 4 | 1.8 | ||
| Rural residential / lifestyle block | 0.8 | KiwiChem soil guideline values: the MfE Soil Contaminant Standards (rural residential, 25 % home-grown produce; residential, 10 %) and the Eco-SGV for agricultural land. Read from KiwiChem's API when the tab opens. The residential values are there because farmland is subdivided, and a soil that passes as pasture can fail as a house section with a vegetable garden. | |
| Eco-SGV, agricultural land | 1.5 | ||
| Residential | 3 | ||
| U | CCME agricultural (Canada) | 23 | KiwiChem holds no New Zealand value for uranium; the Canadian agricultural guideline is the nearest it has. |
| F | none | KiwiChem holds neither a soil guideline value nor a New Zealand background for fluorine, so the tab shows the annual addition only. | |
| 元素 | 阈值 | mg/kg | 出处 |
|---|---|---|---|
| Cd | TFMS 第 1 级 | 0.6 | Tiered Fertiliser Management System,出自 NZ Cadmium Management Strategy。级别每升一级,对磷肥的选择和施用量的限制就更严一层;到第 4 级,未经针对具体地点的调查,不得再有任何累积。这些数值存放在 js/contaminants.js 中,因为它们是行业触发值,不是土壤指导值,KiwiChem 并不收录。 |
| TFMS 第 2 级 | 1.0 | ||
| TFMS 第 3 级 | 1.4 | ||
| TFMS 第 4 级 | 1.8 | ||
| 乡村住宅 / 生活方式地块 | 0.8 | KiwiChem 的土壤指导值:MfE 的 Soil Contaminant Standards(乡村住宅,自产农产品占 25 %;住宅,占 10 %)以及农业用地的 Eco-SGV。在该选项卡打开时从 KiwiChem 的 API 读取。之所以列出住宅类数值,是因为农地会被分割出售,作为牧场合格的土壤,作为带菜园的住宅地块可能就不合格。 | |
| Eco-SGV,农业用地 | 1.5 | ||
| 住宅 | 3 | ||
| U | CCME 农业用地(加拿大) | 23 | KiwiChem 没有新西兰的铀数值;加拿大的农业用地指导值是它手头最接近的。 |
| F | 无 | KiwiChem 既没有氟的土壤指导值,也没有新西兰背景值,因此该选项卡只显示年增加量。 | |
A worked example一个算例
This uses the tutor's slide figures: pasture receiving 50 kg P ha−1 a year at 280 mg Cd kg−1 P, onto 75 mm of soil at 1.0 t m−3 that starts at the national background of 0.08 mg kg−1. That adds 50 × 280 / 1000 = 14 g Cd ha−1 yr−1 to 10 000 × 0.075 × 1.0 = 750 t of soil, which holds 750 × 0.08 = 60 g now.
这里采用 Tutor 幻灯片中的数字:牧场每年施入 50 kg P ha−1,含镉 280 mg Cd kg−1 P,施到 75 mm 厚、容重 1.0 t m−3 的土壤上,其起始浓度为全国背景值 0.08 mg kg−1。这样每年加入 50 × 280 / 1000 = 14 g Cd ha−1 yr−1,加到 10 000 × 0.075 × 1.0 = 750 t 土壤中,而这些土壤现在含有 750 × 0.08 = 60 g。
| Threshold阈值 | mg/kg | g/ha at the threshold阈值处的 g/ha | (threshold − now) / added(阈值 − 现状)/ 年增加量 | Years年数 |
|---|---|---|---|---|
| TFMS Tier 1TFMS 第 1 级 | 0.6 | 450 | (450 − 60) / 14 = 27.86 | 28 |
| Rural residential乡村住宅 | 0.8 | 600 | (600 − 60) / 14 = 38.57 | 39 |
| TFMS Tier 2TFMS 第 2 级 | 1.0 | 750 | (750 − 60) / 14 = 49.29 | 50 |
| TFMS Tier 3TFMS 第 3 级 | 1.4 | 1050 | (1050 − 60) / 14 = 70.71 | 71 |
| Eco-SGV, agriculturalEco-SGV,农业用地 | 1.5 | 1125 | (1125 − 60) / 14 = 76.07 | 77 |
| TFMS Tier 4TFMS 第 4 级 | 1.8 | 1350 | (1350 − 60) / 14 = 92.14 | 93 |
| Residential住宅 | 3 | 2250 | (2250 − 60) / 14 = 156.43 | 157 |
The depth matters as much as the rate. Mixed through 150 mm instead of 75 mm, the same programme takes twice as long to reach every threshold.
深度与施用量同样要紧。若混匀到 150 mm 而不是 75 mm,同样的方案达到每一项阈值所需的时间都要加倍。
Sources for the Tiered Fertiliser Management System tiers and sampling depths: Abraham (2018), New Zealand Journal of Agricultural Research; Sneath (2020) and Stafford (2014), Fertiliser and Lime Research Centre workshop papers, Massey University; the Cadmium Management Group's guidance published by MPI.
Tiered Fertiliser Management System 各级阈值及采样深度的出处:Abraham (2018), New Zealand Journal of Agricultural Research;Sneath (2020) 与 Stafford (2014),Fertiliser and Lime Research Centre 研讨会论文,Massey University;Cadmium Management Group 经 MPI 发布的指南。
Prepared for KiwiScience postgraduate students. The three source workbooks were compiled in August 2026 from published New Zealand industry guidance; see Data sources & terms for the full reference list and for the limits on what any of this may be used for.
为 KiwiScience 的研究生编写。三个源工作簿于 2026 年 8 月根据已发表的新西兰行业指南汇编而成;完整的参考文献列表,以及对这些内容用途的各项限制,见数据来源与条款。