biocro / biocro

https://biocro.github.io/
Other
41 stars 19 forks source link

run the soybean model with no water limiting/auto irrigation #108

Closed yaron1000 closed 3 weeks ago

yaron1000 commented 1 month ago

is thare a way to run the soybean mode run the soybean model with no water limiting/auto irrigation ? Thank you

eloch216 commented 1 month ago

Thanks for asking. Yes, there are (at least) two ways to run Soybean-BioCro without any water stress.

One method is to artificially increase the precipitation rate to a very high value at all times. At the moment, BioCro does not include any negative consequences for over-watering, so this will ensure the crop is never water-stressed. Here is an example doing this for one year:

# Load library
library(BioCro)

# Run Soybean-BioCro with the 2002 weather data included in the R package
result <- with(soybean, {run_biocro(
    initial_values,
    parameters,
    within(soybean_weather[['2002']], {precip = 1000}), # rainfall set to 1000 mm / hr at all times
    direct_modules,
    differential_modules,
    ode_solver
)})

A second method is to bypass the soil water and water stress components of the model and then stipulate that there is no water stress. Here is an example doing this for one year:

# Load library
library(BioCro)

# Specify modules to remove
modules_to_remove <- c(
    'BioCro:stomata_water_stress_linear',
    'BioCro:leaf_water_stress_exponential',
    'BioCro:soil_evaporation',
    'BioCro:two_layer_soil_profile'
)

# Specify additional parameter values; these would normally be calculated by
# the water stress modules but instead we will give them constant values.
parameters_to_add <- list(
    StomataWS = 1, # a value of 1 means no reduction of stomatal conductance due to water stress
    LeafWS = 1     # a value of 1 means no reduction of leaf growth rate due to water stress
)

# Run Soybean-BioCro with the 2002 weather data included in the R package
result <- with(soybean, {run_biocro(
    initial_values,
    c(parameters, parameters_to_add), # add water stress parameter values
    soybean_weather[['2002']],
    direct_modules[!direct_modules %in% modules_to_remove],             # exclude some direct modules
    differential_modules[!differential_modules %in% modules_to_remove], # exclude some differential modules
    ode_solver
)})

The second method is a little more complicated to set up but is probably more robust. Let me know if this answers your question.

yaron1000 commented 1 month ago

thank you very much for the Answer its help alot. i Understand also that N Fertilizer is not limiting for the crop model right? and other question is does BioCro also have Maize as a crop found some old code that deal with Maize ?

eloch216 commented 1 month ago

i Understand also that N Fertilizer is not limiting for the crop model right?

At the moment, BioCro doesn't consider nitrogen uptake or availability. Soybean-BioCro was parameterized using data from a field in Illinois where nitrogen is not expected to be limiting, so Soybean-BioCro simulations should be considered as non-nitrogen limited.

There is a paper where nitrogen limitations were included in Soybean-BioCro in a simple way: https://doi.org/10.1111/nph.19203. Basically, it was assumed that under nitrogen-limiting conditions, a certain percentage of assimilated carbon is used by nitrogen-fixing bacteria, rather than by the plant.

and other question is does BioCro also have Maize as a crop found some old code that deal with Maize ?

A maize model is in development but hasn't been completed yet. We'd like to finish it up soon but I can't really give an estimate of when we will be able to publish it and make it public.

yaron1000 commented 1 month ago

thank you very much

justinmcgrath commented 3 weeks ago

These looks like this was addressed, so I'm closing this.