Site#
Bases: object
Site class
Object containing attributes and functions related to the nursery site.
Attributes:
Name | Type | Description |
---|---|---|
uid |
integer
|
The unique identifier for the site. |
attributes |
object
|
The default attributes for each location in IWIN dataset. |
params |
dictionary
|
The parameters to use during calculations. |
pheno_dates |
array
|
The phenology dates of the trial. |
weather |
array
|
Table with daily weather data for each location. |
raw_ndvi |
array
|
NDVI values during growing period. |
inputWPN |
object
|
A dataframe with phenology, NDVI and weather data for each site. |
errors |
dictionary
|
Dictionary with different errors presented during the model processing. |
Methods:
Name | Description |
---|---|
getAttr |
Get the attibutes of the site |
getTDay(m=None, tminFactor=None)
#
Calculate day time temperature for the selected site.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m |
object
|
Model with information to estimate grain yield |
None
|
tminFactor |
float
|
Minimum Temperature factor |
None
|
Returns:
Type | Description |
---|---|
array
|
A number or array of Day Temperature |
getPRFT(m=None, TDay=None, TOpt=None)
#
Estimate Photosynthesis reduction factor (PRFT) for each site.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m |
object
|
A tfunct model |
None
|
TDay |
float
|
Number or array of Day Temperatures |
None
|
TOpt |
float
|
Optimum Temperature. Default value 18 |
None
|
Returns:
Type | Description |
---|---|
float
|
A number or array of PRFT |
getSFvpd(m=None, VPDMAX=None, Lvpd=None, Uvpd=None, SFvpd_Lthres=None, SFvpd_Uthres=None)
#
Calculation of Vapor pressure deficit (VPD) stress factor for each site
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m |
object
|
A tfunct model |
None
|
VPDMAX |
array
|
Array of daily temperature values |
None
|
Lvpd |
float
|
A number for threshold of lower VPD. Default is 1 |
None
|
Uvpd |
array
|
A number for threshold of upper VPD. Default is 4 |
None
|
SFvpd_Lthres |
array
|
A number for threshold of stress factor of lower VPD. Default is 0.2 |
None
|
SFvpd_Uthres |
array
|
A number for threshold of stress factor of upper VPD. Default is 1 |
None
|
Returns:
Type | Description |
---|---|
array
|
A number or array of stressed factors of VPD |
getGPP(m=None, SolRad=None, PRFT=None, iPAR=None, RUE=3.0, stressFactor=1.0, SFvpd=None, is_VPDStress=False)
#
Estimate the Gross primary production (GPP) for each site
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m |
object
|
A tfunct model |
None
|
SolRad |
float
|
Solar Radiation |
None
|
PRFT |
float
|
Photosynthesis reduction factor |
None
|
iPAR |
float
|
the photosynthetically active radiation (PAR) intercepted by a plant or crop |
None
|
RUE |
float
|
Radiation-use efficiency. Default value is 3.0 |
3.0
|
stressFactor |
float
|
Stress Factor |
1.0
|
SFvpd |
float
|
Stress Factor for VPD |
None
|
is_VPDStress |
bool
|
Vapor pressure deficit stress. Default is |
False
|
Returns:
Type | Description |
---|---|
float
|
the gross primary production (GPP) |
fit(m=None, ft='PRFT', is_VPDStress=False, verbose=False)
#
Run a model to fit yield for a selected site using a specific temperature function
Deprecated.
This function was depreciated on Dec, 2022.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m |
object
|
Model to run |
None
|
ft |
str
|
Name of the temperature response function: Default is 'PRFT' |
'PRFT'
|
is_VPDStress |
bool
|
Vapor pressure deficit stress. Default is |
False
|
verbose |
bool
|
Display comments during processing |
False
|
Returns:
Type | Description |
---|---|
array
|
An array of Sites with intermediate results |