Skip to content

BioCro

3.4.0Package record

Modular Crop Growth Simulations

0packages depend
29.2Kdownloads / year
90.4%test coverage
13/13flavors OK

Overview

About

A cross-platform representation of models as sets of equations that facilitates modularity in model building and allows users to harness modern techniques for numerical integration and data visualization. Documentation is provided by several vignettes included in this package; also see Lochocki et al. (2022) doi:10.1093/insilicoplants/diac003.

Changes in 3.4.0

Minor User-Facing Changes

  • Made canopy photosynthesis integral explicit for c3_canopy and c4_canopy modules: canopy photosynthesis is now computed using numerical quadrature, making the integration over canopy depth explicit. This change addresses a long-standing design goal and results in a significant performance improvement. Several other changes are related to this change:
  • Added numerical quadrature library: A new C++ header file quad.h in src/math/quadrature/
  • New canopy_light_distribution module: Added a new module that computes light distribution through the canopy at any given cumulative LAI depth, allowing users to examine canopy light profiles by layer.
  • The internal temperature response functions, such as arrhenius_exponential, now return values normalized to the parameter value at a reference temperature (25 degrees C). Because of this, several "scaling" parameters such as Vcmax_c, Jmax_c, RL_c, etc, are no longer required.
Show all changes in 3.4.0Hide the rest of the changes in 3.4.0
  • Several new temperature response functions, including peaked_arrhenius_response, were also added to temperature_response_functions.h
  • The Dekker method is now used to check for consistent values of stomatal conductance when solving the combined assimilation + energy balance models in the BioCro:c3_leaf_photosynthesis, BioCro:c3_canopy, BioCro:c4_leaf_photosynthesis, and BioCro:c4_canopy modules.
  • Added two new years of weather data (2023 and 2025) to the weather data set and one year of globally-averaged atmospheric CO2 concentration (2025) to the catm_data data set.
  • Added several new modules for simulating soil water dynamics, which are generally based on DSSAT and its original sources:
  • BioCro:atmospheric_pressure_from_elevation
  • BioCro:multi_layer_soil_profile
  • BioCro:multilayer_soil_profile_avg
  • BioCro:soil_evaporation_ritchie
  • BioCro:soil_surface_runoff
  • BioCro:soil_type_selector
  • BioCro:soil_water_downflow
  • BioCro:soil_water_dynamic_rooting
  • BioCro:soil_water_tiledrain
  • BioCro:soil_water_upflow
  • BioCro:soil_water_uptake

These modules are now used in the soybean_sw model. Eventually, soybean_sw

will replace the original soybean model, but it will take some time to

ensure that all examples that currently use soybean will be able to to work

with soybean_sw.

  • The BioCro:stomata_water_stress_linear module was updated to be more flexible, and a related module was added (BioCro:stomata_water_stress_bilinear). The soybean model now uses the bilinear version since it produces more realistic results when the soil is dry.
  • The new stomata water stress modules use input parameters called StomataWS_gradient and StomataWS_intercept. A script for calibrating the values of these parameters for soybean has been added to the package: inst/extdata/optimize_StomataWS_linear.R.
  • The C3 photosynthesis calculations now include mesophyll conductance, and they determine Cc along with Ci. Setting gm_at_25 to infinity will ensure that Cc = Ci, reproducing the behavior of previous BioCro versions.
  • The inst/extdata/parameterize_soybean.R script has been updated to use a better approach, where the evolutionary optimizer is followed by a Nelder-Mead optimizer.
  • The upper bound for the grc_ parameters in the parmaterization script was changed to a safer value.
  • The behavior of the BioCro:partitioning_growth_calculator module was changed so that respiratory losses are subtracted from each tissue proportional to its biomass, rather than proportional to its partitioning factor.

Internal changes

  • Refactored code organization:
  • Renamed sunML struct/function to canopy_light and Light_model to atmosphere_light_scattering for improved clarity.
  • Moved canopy light distribution functions to canopy_light_helpers.h.
  • Moved atmospheric light scattering calculations to atmosphere_light_scattering.h.
  • Added photosynthesis utilities including the new leaf_assim vector-space type and canopy_integrand functor to photosynthesis.h.
  • New tests were added to test.cumulative_modules.R to ensure that all carbon and water mass is conserved.

Bug Fixes

  • Changed the minimum version of macOS checked by the R-CMD-check from 4.2.0 to 4.3.0.
  • CRAN now only provides R versions 4.2.3 and above for Mac.
  • Somehow the vignette builder cannot find the knitr package when using the the online testing setup for R version 4.2.0 or 4.2.3 even when knitr is installed, causing a spurious test failure. This problem does not occur for R version 4.3.0.
  • A small typo was fixed in the BioCro:solar_position_michalsky module; this typo had no influence on the model outputs.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 9.1 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 3.4.0
READMEYes · 1,238 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 3.4.0Citation fileYes · cites a publicationWebsiteYes
Help pages
36
Examples that run
100%18 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

29.2K
CRAN downloads in the past year
Rank #6,972 · ~80/day · ~2.4K/mo
Daily download trend is not available in this view yet.
48230 days
1.2K90 days
29.2K1 year
Compare downloads with other packages →
Also on544 r2u49 autocran

Repository

52Stars
24Forks
26Open issues
4Open PRs
14Releases
4,511Commits
30Commit identities
4,511 commits · Last activity 2026-08-25 · 0% stars, 30d · Discussions: 19 posts
Responsiveness
How these are sampled
PRs merged (all time)
83%
Median days to close, 50 most recently updated closed issues
23
Median days to close, 50 most recently updated closed PRs
2

Stars over time

2026-07-14 · 482026-08-24 · 52
PracticesBeta

7 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/biocro/biocro on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux

Docs source (1)
pkgdown
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
EditorConfig
Show all practicesHide 1 practice
Git structural (2)
.gitattributesSubmodules
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing BioCro adds no packages beyond those that come with R.

Depends (1)
R >= 4.1.0
Imports (1)
stats
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (13)
Maintainer since 3.1.3 (2024), Author
Author · added in 3.2.0
Author · added in 3.2.0
Contributor
Contributor
Copyright holder
Copyright holder
Copyright holder of included Boost library
Releases (5)

Pick two releases to compare their code metrics.

  • 3.4.0Latest
    record
    2026-08-21 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 3.3.1
    record
    2026-02-06 · diff ↗
  • 3.3.0
    record
    2025-12-14 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 3.2.0
    record
    2025-03-07 · diff ↗ ·
    added 5 exports
    compare_model_output, model_test_case, module_write, run_model_test_cases, update_stored_model_results
  • 3.1.3
    record
    2024-04-30
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-04-30
Total releases
5 / 2 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
2.1 MB / 15 files
Download size
5.8 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("BioCro")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for BioCro version 3.4.0 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy