Generate Irrigation Schedule #130
Replies: 1 comment
-
Yes, what you're asking is entirely possible with AquaCrop-OSPy, and you're on the right track with rrMethod=1 for your irrigation management. Your goal to adjust irrigation depths based on specific dates and soil moisture targets (SMTs) is achievable by dynamically updating the irrigation management parameters based on the growth stage or specific dates. Your current setup with static soil moisture targets (SMTs) and a single MaxIrrSeason limit is a good starting point. However, to implement dynamic irrigation depths as per different dates (e.g., changing from 30mm after May 1st to 50mm after August 1st), you'll need to manually adjust your irrigation management strategy based on the crop's growth stage or simulation date. AquaCrop-OSPy doesn't natively support changing irrigation depths based on specific calendar dates within a single run. Instead, you would typically adjust the IrrigationManagement parameters before starting the model run. To achieve your goal, consider simulating the growth season in parts or manually manipulating the IrrigationManagement object during the simulation. Here’s a conceptual approach:
If the model.irrigation_management.Schedule returns zeros, it might be because the soil moisture never dropped below your specified thresholds, or there's an issue with how the irrigation events are being scheduled. Double-check your SMTs and ensure they are set lower than the initial soil water content to trigger irrigation. Implementing the above approach requires a solid understanding of Python and the ability to manipulate the model's parameters dynamically. Here's a rough idea of how you could adjust the irrigation parameters mid-simulation (note that this is a conceptual approach and may need adaptation): ` Assuming you have a function to adjust irrigation parametersdef adjust_irrigation(model, new_smts, new_max_irr): Run model up to a specific datemodel.run_model(till_termination=False, end_date='2018/04/30') Adjust irrigation parametersadjust_irrigation(model, [new_smts_for_next_period], new_max_irr_for_next_period) Continue simulationmodel.run_model(till_termination=True) This approach might not be directly supported by AquaCrop-OSPy's and could require more manual control over the simulation process, including potentially directly manipulating model state variables or outputs. For a more precise and tailored solution, consulting the AquaCrop-OSPy documentation and source code. |
Beta Was this translation helpful? Give feedback.
-
I would like to write some code so that AquaCrop-OSPy can suggest the irrigation schedule. I followed this tutorial regarding the Aqua Crop GUI. (https://www.youtube.com/watch?v=o5P35ogKDvw&ab_channel=FoodandAgricultureOrganizationoftheUnitedNations)
I have also studied the 4 notebooks you have attached on the documentation. I would like to to know when irrigation needs to take place. I would also like to use different water depths (in mm) over the growing season as it is shown on the video. For instance, after the 1st of May, 30mm and after the 1st of August, 50mm using a different RAW or soil moisture target.
Based on the documentation and some jupyter notebooks, I selected rrMethod=1 as the closets option to what I want to do. Irrigation is triggered if soil water content drops below a specified threshold (or four thresholds representing four major crop growth stages (emergence, canopy growth, max canopy, senescence). I have written the following code (code regarding importing the packages has been removed to keep the question short)
I cannot find when and how much water (depth in mm) needs to be irrigitated. I checked model._outputs. model.irrigation_management.Schedule retrurns an array of zeros. I also tried dir(model.irrigation_management) to have a look at other methods and attributes but without any success.
Is what I am asking possible via AquaCrop-OSPy or have I misunderstood any concept?
Thanks for your time!
Kind regards,
Ilias
Beta Was this translation helpful? Give feedback.
All reactions