SoilManageR 1.2.1
Changes in behaviour and
results
- Straw removals without own
crop_product and
crop_residue take the values of the last harvest of the
same crop (harvest_main_crop since the last sowing) for the
C input and the residue cover. Previously, the reference yield of
C_input_crops_LUT was used, so too much or too little straw
was removed (the above ground residue C could become negative). Values
entered in the straw removal record are still used.
calculate_indicators_by_crop() takes the yield and relative
yield of a crop from its last harvest_main_crop instead of
the last record of the crop period, which was NA if the
straw was removed after the harvest. Results with the same values in
harvest and straw removal (e.g. EXAMPLE_data) are unchanged
(#44)
SoilManageR 1.2.0
New features
- New indicator for the stable organic matter (OM) of organic
amendments (#6):
stable_OM_amendments() (one amendment),
calculate_stable_OM_amended_tibble() (per operation),
stable_OM_amended() (per year, with
extended.output) and
stable_OM_amended_by_crop() (per crop period). The OM input
is derived from the C input (C input / 0.5797) and multiplied by the
indicator of organic matter stability (ISMO) of the amendment.
Amendments without ISMO give a warning and NA, and are
skipped in the sums. Crop residues and cover crops are not included yet.
The indicator is not part of calculate_indicators()
- New column
ISMO (and ISMO_source) in
CN_input_amendments_LUT, from the new field
ISMO of the organic fertilizers in
inst/spec/fertilizers.json. Values from Levavasseur et
al. (2020), Bouthier et al. (2014) and RECORD (2022).
check-specifications warns about organic fertilizers
without ISMO (SM-W004)
- New harvest device
grazing for the operations
harvest_main_crop and harvest_cover_crop
(draft, to be reviewed). Grazing harvests are treated like the other
harvests; the excreta of the grazing animals are not counted as organic
amendment (#42)
check_management_df() warns about dates that are not of
class Date, e.g. POSIXct
(SM-W217) (#39)
plot() of a management_df draws the
management timeline of plot_management_df()
plot_management_df() marks mineral fertilization events
with “F” (once per date), like tillage (“T”) and crop protection
(“P”)
check_management_df() additionally returns its findings
as a table diagnostics in the test report, with a stable
code (e.g. SM-W204), the affected row of the input data and
the attribute. The warnings are unchanged (#36)
- New management data template (version 3.0.0), generated from the
specifications: dependent dropdowns (category > operation > device
> unit) and checks for 500 rows, new sheets Options,
Crops and Products instead of Choice_list,
completed descriptions, no locked sheets (#36)
- Mineral fertilizers can be entered as product amount
(
kg/ha, or l/ha for liquid fertilizers) with
the fertilizer as product; the N input is derived from the
new lookup table mineral_fertilizers_LUT. If a fertilizer
is entered on the same date both as product amount and as
kg N/ha, only the product amount is used (#36)
- Organic fertilizers can be entered as plant-available N
(
kg N_available/ha). The total N input is the amount
divided by the N availability of the fertilizer (new column
N_availability of CN_input_amendments_LUT,
default 0.7); the C input follows from the C/N ratio.
CN_input_amendments() gets the arguments unit
and N_availability (#36)
- Seed mixtures of the specifications
(
inst/spec/seed_mixtures.json) can be entered as one sowing
record with the mixture as product;
plant_diversity() counts their component species. The
Products sheet of the template lists the seed mixtures
(#36)
- New catalogue data (drafts, to be reviewed): 61 mineral fertilizers,
17 liming materials and 5 organic fertilizers of the LANDOR DüngeKompass
2026, 32 seed mixtures and single-species products of the UFA green
manure catalogue, and 22 cover crop species (without parameters for the
calculations). Spring faba bean, spring and winter oat, spring pea,
winter rye, sorghum and sunflower can also be selected as cover crops
(#36)
- JSON input:
management_df_from_json() reads management
data as JSON (an object with spec_version and
records), validates types, dates, required values, the
vocabulary (historical names allowed) and the allowed combinations of
category, operation, device and unit, and returns a
management_df; invalid data raises an error with a
diagnostics table (codes SM-E4xx).
management_df_to_json() writes a management_df
as JSON. The JSON Schema management.schema.json (folder
schemas of the package) is generated from the
specifications and checked in addition if the package
jsonvalidate is installed. jsonlite is now
imported (#36)
check_management_df() warns about mineral fertilizers
entered as product amount without N content or density
(SM-W215) and about fertilizers entered twice on the same
date (SM-W216), and informs about products that are not in
the catalogue of their operation (SM-I301, message only;
information alone returns no test report) (#36)
- Contributor guide
CONTRIBUTING.md (adding devices,
crops, fertilizers, mixtures and products; drafts; releases). The GitLab
CI checks the specifications, fails if generated files are not up to
date (--check mode of
tools/build-specifications.R and
tools/build-template.R), runs R CMD check and provides the
template as artifact. Tags template-vX.Y.Z create a draft
of a new template version on Zenodo
(tools/release-template.R) (#36)
C_input(), calculate_indicators(),
calculate_indicators_by_crop(), and
calculate_indicators_by_date() report the C input from
above ground residues (product and straw left on the field) separately
for crops and cover crops: C_input_crop_abvg and
C_input_cover_crop_abvg (C_input_CC_abvg in
the by crop and by date outputs). These values are part of the existing
C input, not added on top
calculate_indicators() returns the main crop of the
year as column crop: the crop of the last management record
on or before June 1st, also if this record is from an earlier year
(e.g. winter crops without spring operations) (#21, #40)
check_management_df() warns about categories and
combinations of category and operation that are not in the choice list
of the management template, and about crops that are harvested more than
once
- The indicator calculations are considerably faster
- Added new organic amendments: Azoplum, Bio_enne,
Ramial_Chipped_Wood
- Added three categories for STIR to output of
calculate_indicators_by_crop(): STIR_main_crop, STIR_cover_crop,
STIR_weeding
- Added N fixation by crops and cover crops into
calculate_N_input_tibble() (N_fixation_legumes())
- Added reference data for N fixation (N_fixation_legumes_LUT.xlsx and
N_fixation_legumes_LUT.Rd)
Changes in behaviour and
results
- Management data without harvest records:
C_input(),
productivity_indicator() and the functions that use them
(calculate_indicators(),
calculate_indicators_by_crop(),
calculate_indicators_by_date(),
plot_management_df()) no longer fail. The crop C input is
0, productivity_indicator() returns an empty table and the
relative yield is NA (#37)
- All calculation functions convert dates that are not of class
Date (e.g. POSIXct from readxl)
with as.Date(). calculate_indicators_by_crop()
and calculate_indicators_by_date() no longer fail or give
different results for POSIXct dates when
lubridate is not attached (#39)
- Temporary leys:
crop_product is the yield of each cut.
calculate_indicators_by_crop() now sums the yields of all
cuts in the year of the last harvest (as
productivity_indicator() does) instead of taking the last
cut only, so the same input gives consistent relative yields. The
handling of ley cuts in the sowing year is documented in
productivity_indicator(),
calculate_indicators_by_crop() and C_input()
(#41)
- The organic matter content (
OM) of the organic
fertilizers in fertilizers.json and
CN_input_amendments_LUT is now given per dry matter (g
OM/kg DM), as stated in the specification schema; the values of the
Swiss fertilizer recommendations were per fresh mass. OM is
not used in calculations, all results are unchanged
- The template is shipped as
inst/extdata/SoilManageR_mgmt_data_template.xlsx (without
version in the file name; the version is shown on its Read_me sheet).
The template V2.6 was removed from the package; templates filled with
earlier versions can still be imported with
management_df_from_excel() (#36)
- The lookup tables (
STIR_values_LUT,
C_input_crops_LUT, plant_cover_LUT,
N_fixation_legumes_LUT,
CN_input_amendments_LUT), the allowed operations and the
historical name corrections are now generated from JSON specifications
in inst/spec. All values in the lookup tables are
unchanged. The spreadsheet copies in inst/extdata are
generated as well; C_input_crops_LUT.xlsx now contains the
rounded values that the package uses (#36)
- Cover crops: a sowing with a roller now counts as a cover crop
sowing (previously, all operations with a roller were ignored, so a
cover crop sown with a roller was never terminated), and terminating
operations without a device now end a cover crop. A roller pass still
does not terminate a cover crop. For the
EXAMPLE_data, the
C input of the cover crop in 2015 changes from 2197 to 2187 kg C/ha,
because the roller pass of its two-step sowing now counts as sowing date
(#36)
- Organic amendments that are not in
CN_input_amendments_LUT and have no DMC, C and N content:
CN_input_amendments() gives a warning and returns
NA instead of an error, so the other indicators are still
calculated; these amendments get no C and N input (#36)
Azoplume (alias Azoplum) uses the values
of the LANDOR DüngeKompass 2026: OM 850 instead of 750 g/kg and C from
the declared C/N ratio (598 instead of 435 g/kg). The C input of this
amendment increases by 37 %, the N input is unchanged (#36)
EXAMPLE_data (and EXAMPLE_data.xlsx): the
combination marker “A” is replaced by 1, so combination is
an integer as described in the template. The results are unchanged
(#36)
plant_diversity() ignores sowing records without
product instead of records with the device roller. The results for the
EXAMPLE_data are unchanged (#36)
- STIR: every sowing pass is now counted exactly once. Previously,
sowings on the same day as another operation or with the same device as
the previous operation, and cover crop mixtures, were left out. This
increases the STIR values of
tillage_intensity(),
calculate_indicators(), and
calculate_indicators_by_crop(), e.g. for the
EXAMPLE_data in 2019 from 42 to 49
- Soil cover: mixtures recorded as one sowing line per species bury
residues only once per sowing pass and no longer start the crop or cover
crop one day early.
- C input: if a crop (except temporary ley) is harvested more than
once without a sowing in between, only the first harvest gets a C
input
indicators_by_date() is renamed to
calculate_indicators_by_date()
calculate_indicators_by_date() issues a warning instead
of an error when the selected date is after the last management
operation, and still computes the indicators
- Management template V2.6: the Choice_list uses the category
“fertilizer_application” instead of “fertilization” for fertilizer
operations
SoilManageR 1.1.0
- Integrated undersowing into soil_cover(), cover crops can now
overlap with crops. However, crops can not overlap with each other (no
intercropping)
- Updated the management data template (V2.6), incl. new operations
(harvest_cover_crop, total_herbicide, frost_kill_cover_crop)
- Updated the way the C input by cover crops is calculated (now goes
to 0 for short term cover crops)
- New indicator to count pesticide applications
(count_pesticide_applications())
- New function to calculate management indicators by crop
(calculate_indicators_by_crop())
- New function to calculate indicators by a specific date
(calculate_indicators_by_date())
- Added specific color for cover crops into
plot.soil_cover_tibble()
- PDI (plant diversity indicator) was renamed into CDI (crop diversity
indicator)
- Updated Vignette and ReadMe files
SoilManageR 1.0.1
- Initial release version of the SoilManageR