Skip to content
Repository for the Python Crop Simulation Environment
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Modified code.rst to take the pcse.base package into account Dec 30, 2018
pcse bumped version number to 5.4.2 Mar 26, 2019
tests Update to YAMLCropDataProvider to fix issues Mar 26, 2019
.gitignore All YAML files are now testing OK. Testing code included Jan 14, 2019
LICENSE Fixed filename error in NPK test. Renamed agromanagement file extensi… Jan 22, 2018
README.rst final updates for PCSE 5.4 Sep 25, 2018
requirements.txt final updates for PCSE 5.4 Sep 25, 2018 bumped version number to 5.4.2 Mar 26, 2019
tox.ini Update to CSV weatherdata provider Dec 21, 2018


Python Crop Simulation Environment - PCSE

PCSE is a framework developed for implementing crop simulation models developed in Wageningen. Many of the Wageningen crop simulation models were originally developed in FORTRAN77 or using the FORTRAN Simulation Translator (FST). Although this approach has yielded high quality models with high numerical performance, the inherent limitations of models written in FORTRAN is also becoming increasingly evident:

  • The structure of the models is often rather monolithic and the different parts are very tightly coupled. Replacing parts of the model with another simulation approach is not easy.
  • The models rely on file-based I/O which is difficult to change. For example, interfacing with databases is complicated in FORTRAN.
  • In general, with low-level languages like FORTRAN, simple things already take many lines of code and mistakes are easily made, particularly by agronomists and crop scientist that have limited experience in developing or adapting software.

To overcome many of the limitations above, the Python Crop Simulation Environment (PCSE) was developed which provides an environment for developing simulation models as well as a number of implementations of crop simulation models. PCSE is written in pure python code which makes it more flexible, easier to modify and extensible allowing easy interfacing with databases, graphical user interfaces, visualization tools and numerical/statistical packages. PCSE has several interesting features:

  • Implementation in pure python with dependencies only on popular packages available from the Python Package Index (PyPI) (SQLAlchemy, PyYAML, pandas, xlwt, xlrd, requests and numpy)
  • Modular design allowing you to add or change components relatively quickly with a simple but powerful approach to communicate variables between modules.
  • Similar to FST, it enforces good model design by explicitly separating parameters, rate variables and state variables. Moreover PCSE takes care of the module initialization, calculation of rates of changes, updating of state variables and actions needed to finalize the simulation.
  • Input/Output is completely separated from the simulation model itself. Therefore PCSE models can easily read from and write to text files, databases and scientific formats such as HDF or NetCDF.
  • Tools are available for reading parameter and weather files from existing models to have as much backward compatibility as possible.
  • An AgroManager module which allows to define the agromanagement actions that happen on a farmers field. Such actions can be specified as events based on time or model state.
  • Built-in testing of program modules ensuring integrity of the system.

To contribute to PCSE, you can fork your own copy at

Full documentation is available on

You can’t perform that action at this time.