AquaCrop
A free open-source tool for assessing climate and water impacts on agriculture.
https://github.com/aquacropos/aquacrop
Category: Consumption
Sub Category: Agriculture and Nutrition
Keywords
aquacrop aquacrop-os aquacrop-ospy irrigation python
Last synced: about 18 hours ago
JSON representation
Repository metadata
AquaCrop-OSPy: Python implementation of AquaCrop-OS
- Host: GitHub
- URL: https://github.com/aquacropos/aquacrop
- Owner: aquacropos
- License: apache-2.0
- Created: 2020-12-01T12:11:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-16T15:42:55.000Z (3 months ago)
- Last Synced: 2025-04-20T09:44:06.124Z (7 days ago)
- Topics: aquacrop, aquacrop-os, aquacrop-ospy, irrigation, python
- Language: Python
- Homepage: https://aquacropos.github.io/aquacrop/
- Size: 112 MB
- Stars: 111
- Watchers: 13
- Forks: 80
- Open Issues: 24
- Releases: 26
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
README.md
AquaCrop-OSPy
Soil-Crop-Water model based on AquaCrop-OS.
from aquacrop import AquaCropModel, Soil, Crop, InitialWaterContent
from aquacrop.utils import prepare_weather, get_filepath
weather_file_path = get_filepath('tunis_climate.txt')
model_os = AquaCropModel(
sim_start_time=f"{1979}/10/01",
sim_end_time=f"{1985}/05/30",
weather_df=prepare_weather(weather_file_path),
soil=Soil(soil_type='SandyLoam'),
crop=Crop('Wheat', planting_date='10/01'),
initial_water_content=InitialWaterContent(value=['FC']),
)
model_os.run_model(till_termination=True)
model_results = model_os.get_simulation_results().head()
print(model_results)
About
AquaCrop-OSPy is an open-source Python crop-water model developed by Tim Foster and others (Tom Kelly and Chris Bowden) within the Agriculture, Water and Climate research group at the University of Manchester. The AquaCrop-OSPy code has been developed with support from the the University of Manchester, Daugherty Water for Food Global Institute, Imperial College London, along with input from the United Nations Food and Agriculture Organization's (FAO) AquaCrop Core Development Group.
Please note that AquaCrop-OSPy is not an official implementation or version of the FAO AquaCrop model. AquaCrop-OSPy currently mirrors most features available in version 7.1 of the official FAO AquaCrop model, with the exception of routines for salinity and fertility stress, weed management, and perennial herbaceous crops that are still to be developed. AquaCrop-OSPy has been rigorously tested to verify that the model reproduces accurately the calculations and outputs performed by the official FAO AquaCrop model. However, some bugs or errors may still be found. Please use the Issues tab to raise any issues encountered with the AquaCrop-OSPy. More details about the official FAO AquaCrop model on which AquaCrop-OSPy is based can be obtained here .
For further information about the AquaCrop-OSPy model, you can consult the accompanying open-access journal paper on the code here .
There is also an extensive documentation for the model, along with a series of tutorials to help you get started with the Python code (see Quickstart below). AquaCrop-OSPy builds upon an earlier version of code developed in Matlab, more information about which can be found here .
More information about the official FAO AquaCrop model on which AquaCrop-OSPy is based can be obtained here , where you can also access the official raw source AquaCrop code, compiled executables, and most recent code releases that are developed and provided by FAO.
Install
pip install aquacrop
Quickstart
A number of tutorials has been created (more to be added in future) to help users jump straight in and run their first simulation. Run these tutorials instantly on Google Colab:
- Running an AquaCrop-OSPy model
- Estimation of irrigation water demands
- Optimisation of irrigation management strategies
- Projection of climate change impacts
Installation troubleshooting
If you receive an error message such as "No module named aquacrop.scripts.initiate_library" or "ModuleNotFoundError: No module named 'aquacrop.solution.solution_root_zone_water'", please try the following troubleshooting steps:
-
Run "python -m aquacrop.scripts.initiate_library" in your terminal, if this generates an error such as "RuntimeError: Attempted to compile AOT function without the compiler used by numpy.distutils present. Cannot find suitable msvc.", then you need to download and install an MSVC compiler such as the one included in Visual Studio build tools (see https://www.youtube.com/watch?v=p_R3tXSq0KI).
-
If Step 1 doesn't help, then you can run aquacrop in development mode using the code below. This will turn off some function compilation, resulting in minor increases in runtime:
import os
os.environ['DEVELOPMENT'] = 'DEVELOPMENT'
Owner metadata
- Name: AquaCrop-OS
- Login: aquacropos
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/97301367?v=4
- Repositories: 3
- Last ynced at: 2023-03-06T01:51:23.650Z
- Profile URL: https://github.com/aquacropos
GitHub Events
Total
- Create event: 2
- Release event: 3
- Issues event: 8
- Watch event: 14
- Issue comment event: 4
- Push event: 4
- Pull request event: 5
- Pull request review event: 2
- Fork event: 5
Last Year
- Create event: 2
- Release event: 3
- Issues event: 8
- Watch event: 14
- Issue comment event: 4
- Push event: 4
- Pull request event: 5
- Pull request review event: 2
- Fork event: 5
Committers metadata
Last synced: 5 days ago
Total Commits: 450
Total Committers: 9
Avg Commits per committer: 50.0
Development Distribution Score (DDS): 0.473
Commits in past year: 47
Committers in past year: 3
Avg Commits per committer in past year: 15.667
Development Distribution Score (DDS) in past year: 0.085
Name | Commits | |
---|---|---|
Chris | c****n@l****k | 237 |
Tom Kelly | t****k@g****m | 128 |
pacs27 | p****5@g****m | 59 |
Ryan Avery | r****y@u****u | 9 |
Aron Gergely | a****y@r****l | 6 |
Mykhailo Boiko | s****2@g****m | 4 |
Oleksandr Mialyk | 4****k | 3 |
Tim Foster | t****r@m****k | 2 |
thomasdkelly | t****2@g****m | 2 |
Committer domains:
- manchester.ac.uk: 1
- rasterra.nl: 1
- ucsb.edu: 1
- live.co.uk: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 79
Total pull requests: 81
Average time to close issues: 6 months
Average time to close pull requests: about 2 months
Total issue authors: 41
Total pull request authors: 16
Average comments per issue: 1.65
Average comments per pull request: 0.91
Merged pull request: 53
Bot issues: 0
Bot pull requests: 5
Past year issues: 20
Past year pull requests: 20
Past year average time to close issues: 28 days
Past year average time to close pull requests: 13 days
Past year issue authors: 15
Past year pull request authors: 5
Past year average comments per issue: 1.25
Past year average comments per pull request: 0.05
Past year merged pull request: 12
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- thomasdkelly (25)
- xhb-fortunate (4)
- rbavery (3)
- git-divyamgarg (3)
- 1150376430 (3)
- NickAlexander18 (2)
- YuqiLiunx (2)
- arongergely (2)
- SoothingMist (2)
- anj-ML (2)
- nuds-zhao (1)
- cgalea15 (1)
- TomasMiskov (1)
- Rachael001l (1)
- charalamm (1)
Top Pull Request Authors
- chris-s-bowden (29)
- thomasdkelly (19)
- Bowhaven (6)
- Han-Su22 (5)
- dependabot[bot] (5)
- pacs27 (3)
- arongergely (2)
- rbavery (2)
- SongshGeo (2)
- tfoster88 (2)
- fclof (1)
- atlasul-hub (1)
- samaranin (1)
- charalamm (1)
- AstridVa (1)
Top Issue Labels
- enhancement (8)
- model mistake (4)
- documentation (3)
- minor improvement (2)
- code structure (2)
- bug (1)
- gh-action / build issues (1)
- dependencies (1)
- speed/efficiency (1)
Top Pull Request Labels
- dependencies (5)
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 3,094 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 2 (may contain duplicates)
- Total versions: 56
- Total maintainers: 3
pypi.org: aquacrop
Soil-Crop-Water model based on AquaCrop-OS.
- Homepage: https://github.com/aquacropos/aquacrop
- Documentation: https://aquacrop.readthedocs.io/
- Licenses: MIT License
- Latest release: 3.0.11 (published 3 months ago)
- Last Synced: 2025-04-25T12:08:52.893Z (2 days ago)
- Versions: 53
- Dependent Packages: 0
- Dependent Repositories: 2
- Downloads: 2,936 Last month
-
Rankings:
- Forks count: 5.963%
- Dependent packages count: 7.31%
- Stargazers count: 8.269%
- Average: 8.445%
- Downloads: 8.884%
- Dependent repos count: 11.798%
- Maintainers (2)
pypi.org: aquacrop-ss
A copy of aquacrop model based on version 3.0.7, fixed some deprecated warnings.
- Homepage:
- Documentation: https://aquacrop-ss.readthedocs.io/
- Licenses: MIT
- Latest release: 3.0.7.dev2 (published 7 months ago)
- Last Synced: 2025-04-25T12:08:52.465Z (2 days ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 158 Last month
-
Rankings:
- Dependent packages count: 10.803%
- Average: 35.82%
- Dependent repos count: 60.838%
- Maintainers (1)
Dependencies
- cffi ==1.15.0
- numba ==0.55.0
- numpy >=1.18.0,<1.22.0
- pandas >=1.3.5
- tqdm >=4.64.0
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
Score: 15.141334113562397