aquacropos / aquacrop

AquaCrop-OSPy: Python implementation of AquaCrop-OS
https://aquacropos.github.io/aquacrop/
Apache License 2.0
102 stars 73 forks source link

Soil fertility stress AQv7 #128

Closed Han-Su22 closed 9 months ago

Han-Su22 commented 9 months ago

How to test: see another video

Brief explanations on changes: • aquacrop/entities/crop.py Add the variables needed for soil fertility stress simulation and give the default values. The default values are the values under no soil fertility stress. • aquacrop/entities/crops/crop_params.py Add testing crops which will be the same as AQ-WIN • aquacrop/entities/initParamVariables.py Initialize some global variables for soil fertility stress calculation. These variables keep some critical values during the soil fertility stress simulation. • aquacrop/entities/output.py Add soil fertility stress output for testing • aquacrop/entities/soil.py I changed the logic to calculate the soil hydraulic parameters according to AQ-WIN, which should have no impact on soil fertility stress simulation. For my own global model, the previous code may lead to some errors. • aquacrop/initialize/compute_crop_calendar.py Calculate the crop phenological calendar with soil fertility stress parameters Initialize soil fertility stress simulation Calibrate soil fertility stress if needed • aquacrop/initialize/compute_variables.py Adjust to ensure CO2 data is available during initialization • aquacrop/initialize/read_model_parameters.py Read CO2 data first for soil fertility stress calculation and delete the redundant codes • aquacrop/solution/adjust_CCx.py Adjustment of CCx and canopy development because of soil fertility stress • aquacrop/solution/biomass_accumulation.py Adjustment of water productivity and biomass because of soil fertility stress There is a dynamic update of soil fertility stress according to AQ-WIN • aquacrop/solution/canopy_cover.py Adjustment of CCx, canopy development, and senescence because of soil fertility stress There is an interaction between soil fertility stress and early senescence • aquacrop/timestep/outputs_when_model_is_finished.py Add soil fertility stress output • aquacrop/timestep/reset_initial_conditions.py Reset initial conditions for soil fertility stress. Almost the same as aquacrop/initialize/compute_crop_calendar.py • aquacrop/timestep/run_single_timestep.py Enable some global variables to pass to the next time step

Han-Su22 commented 9 months ago

Note, that biomass_accumulation fails to be compiled. Under development mode, this function works. There seems a bug related to compiling after adding Crop class in the output