Code Monkey home page Code Monkey logo

aquacropf's Introduction

AquaCrop-OSPy

Soil-Crop-Water model based on AquaCrop-OS.

checks release last-commit license python-version image Downloads

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 a python implementation of the popular crop-water model AquaCrop, built from the AquaCrop-OS source code.

AquaCrop-OS, an open source version of FAO’s multi-crop model, was released in August 2016 and is the result of collaboration between researchers at the University of Manchester, Water for Food Global Institute, U.N. Food and Agriculture Organization, and Imperial College London.

AquaCrop-OSPy has been designed in way that users can conduct cutting edge research with only basic python experience. In particular for the design and testing of irrigation stratgeies.

AquaCrop-OSPy is currently up to date with AquaCrop FAO version 6.0, with exception of some features not yet included in Python code (salinity and fertility stress, and weed management)

Open access journal article here

It is built upon the AquaCropOS crop-growth model written in Matlab ( paper , webpage ) which itself itself is based on the FAO AquaCrop model Webpage . Comparisons to both base models are shown here.

A forum has also been created so that users of AquaCrop-OSPy and AquaCrop-OS can discuss research, bugs and future development.

There is also an extensive documentation for the model

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:

  1. Running an AquaCrop-OSPy model
  2. Estimation of irrigation water demands
  3. Optimisation of irrigation management strategies
  4. 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:

  1. 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).

  2. If Step 1 doesn't help, then you can run aquacrop in pure python (this will be slower) using:
    import os
    os.environ['DEVELOPMENT'] = 'DEVELOPMENT'

More information, including screenshots and gifs, can be found at The University of Manchester's article, Tim Foster's medium post, or twitter thread.

A seperate category inside the AquaCrop-OSPy forum has been created to discuss AquaPlan, including any issues, questions, or suggestions.

aquacropf's People

Contributors

chris-s-bowden avatar thomasdkelly avatar pacs27 avatar rbavery avatar florentdemelezi avatar arongergely avatar samaranin avatar tfoster88 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.