The API documentation provides a description of the interface and internals of all SimulationObjects, AncillaryObjects and utility routines available in the PCSE source distribution. All SimulationObjects and AncillaryObjects are described using the same structure:
- A short description of the object
- The positional parameters and keywords specified in the interface.
- A table specifying the simulation parameters needed for the simulation
- A table specifying the state variables of the SimulationObject
- A table specifying the rate variables of the SimulationObject
- Signals sent or received by the SimulationObject
- External dependencies on state/rate variables of other SimulationObjects.
- The exceptions that are raised under which conditions.
One or more of these sections may be excluded when they are not appropriate for the SimulationObject that is described.
The table specifying the simulation parameters has the following columns:
- The name of the parameter.
- A description of the parameter.
- The type of the parameter. This is provided as a three-character code with the following interpretation. The first character indicates of the parameter is a scalar (S) or table (T) parameter. The second and third character indicate whether this parameter should be present in the timerdata 'Ti', cropdata 'Cr', soildata 'So' or sitedata 'Si' dictionary.
- The physical unit of the parameter.
The tables specifying state/rate variables have the following columns:
- The name of the variable.
- A description of the variable.
- Whether the variable is published in the kiosk or not: Y|N
- The physical unit of the variable.
Finally, all public methods of all objects are described as well.
pcse.engine
pcse.models
The routines below implement the agromanagement system in PCSE including crop calendars, rotations, state and timed events. For reading agromanagement data from a file or a database structure see the sections on the reading file input <FileInput>
and the database tools <DBtools>
.
pcse.agromanager.AgroManager
pcse.agromanager.CropCalendar
pcse.agromanager.TimedEventsDispatcher
pcse.agromanager.StateEventsDispatcher
pcse.timer.Timer
- The PCSE distribution provides several waterbalance modules:
- WaterbalancePP which is used for simulation under non-water-limited production
- WaterbalanceFD which is used for simulation of water-limited production under conditions of freely draining soils
- The SnowMAUS for simulation the build-up and melting of the snow cover.
- A multi-layer waterbalance implementing simulations for potential conditions, water-limited free drainage conditions and water-limited groundwater conditions (in case of shallow ground water tables). This waterbalance is in a prototype stage and not yet usable, although the source code is available in PCSE.
pcse.soil.WaterbalancePP
pcse.soil.WaterbalanceFD
pcse.soil.SnowMAUS
pcse.crop.phenology.DVS_Phenology
pcse.crop.phenology.Vernalisation
pcse.crop.partitioning.DVS_Partitioning
pcse.crop.assimilation.WOFOST_Assimilation
pcse.crop.respiration.WOFOST_Maintenance_Respiration
pcse.crop.evapotranspiration.Evapotranspiration
pcse.crop.evapotranspiration.SWEAF
pcse.crop.leaf_dynamics.WOFOST_Leaf_Dynamics
pcse.crop.root_dynamics.WOFOST_Root_Dynamics
pcse.crop.stem_dynamics.WOFOST_Stem_Dynamics
pcse.crop.storage_organ_dynamics.WOFOST_Storage_Organ_Dynamics
pcse.crop.npk_dynamics.NPK_Crop_Dynamics
pcse.crop.nutrients.NPK_Demand_Uptake
pcse.crop.nutrients.NPK_Stress
pcse.crop.nutrients.NPK_Translocation
pcse.crop.abioticdamage.FROSTOL
pcse.crop.abioticdamage.CrownTemperature
pcse.crop.lingra
pcse.crop.lingra.LINGRA
pcse.crop.lingra.SourceLimitedGrowth
pcse.crop.lingra.SinkLimitedGrowth
pcse.crop.lingra_ndynamics.N_Demand_Uptake
pcse.crop.lingra_ndynamics.N_Stress
pcse.crop.lingra_ndynamics.N_Crop_Dynamics
The base classes define much of the functionality which is used "under the hood" in PCSE. Except for the VariableKiosk and the WeatherDataContainer all classes are not to be called directly but should be subclassed instead.
pcse.base.VariableKiosk
pcse.base.StatesTemplate
pcse.base.RatesTemplate
pcse.base.ParamTemplate
pcse.base.WeatherDataProvider
pcse.base.WeatherDataContainer
pcse.signals
The utilities section deals with tools for reading weather data and parameter values from files or databases.
The file_input tools contain three classes: the CABOFileReader for reading in parameter files in the CABO format, the CABOWeatherDataProvider for reading files from the CABO weather system and the PCSEFileReader for reading files in PCSE format.
This class of data providers can be used to provide parameter values in cases where separate files or a database is not needed or not practical. An example is the set of soil parameters for simulation of potential production conditions where the value of the parameters does not matter but nevertheless some values must be provided to the model.
The database tools contain functions and classes for retrieving agromanagement, parameter values and weather variables from database structures implemented for different versions of the European Crop Growth Monitoring System.
Note that the data providers only provide functionality for reading data, there are no tools here writing simulation results to a CGMS database. This was done on purpose as writing data can be a complex matter and it is our experience that this can be done more easily with dedicated database loader tools such as SQLLoader for ORACLE or the load data infile
syntax of MySQL
The CGMS8 tools are for reading data from a database structure that is used by CGMS executable version 9 and 10.
pcse.db.cgms8.GridWeatherDataProvider
pcse.db.cgms8.SoilDataIterator
pcse.db.cgms8.CropDataProvider
pcse.db.cgms8.STU_Suitability
pcse.db.cgms8.SiteDataProvider
The CGMS12 tools are for reading data from a CGMS12 database structure that is used by CGMS executable version 11 and BioMA 2014.
pcse.db.cgms12
WeatherObsGridDataProvider
AgroManagementDataProvider
SoilDataIterator
CropDataProvider
STU_Suitability
SiteDataProvider
The CGMS14 database is the database structure that is compatible with the 2015 BioMA implementation of WOFOST. Note that the CGMS14 database structure is considerably different from CGMS8 and CGMS12.
pcse.db.NASAPowerWeatherDataProvider
These routines are there for conveniently starting a WOFOST simulation for the demonstration and tutorials. They can serve as an example to build your own script but have no further relevance.
pcse.start_wofost.start_wofost
Many miscelaneous for a variety of purposes such as the Arbitrary Function Generator (AfGen) for linear interpolation and functions for calculating Penman Penman/Monteith reference evapotranspiration, the Angstrom equation and astronomical calculations such as day length.
pcse.util.reference_ET
pcse.util.penman_monteith
pcse.util.penman
pcse.util.check_angstromAB
pcse.util.wind10to2
pcse.util.angstrom
pcse.util.doy
pcse.util.limit
pcse.util.daylength
pcse.util.astro
pcse.util.merge_dict
pcse.util.Afgen
pcse.util.ConfigurationLoader
pcse.util.is_a_month
pcse.util.is_a_dekad
pcse.util.is_a_week
pcse.util.load_SQLite_dump_file