Spaces:
Runtime error
Runtime error
| def frost_bool(Tmin,Tfrost): | |
| """ | |
| Test if the day is a frost day (minimum daily temperature below frost threshold). | |
| Parameters | |
| ---------- | |
| Tmin : float | |
| Minimum daily air temperature (deg Celsius). | |
| Tfrost : float | |
| Frost temperature (regular or strong frost) (deg Celsius). | |
| Returns | |
| ------- | |
| bool | |
| True if it's a frost day, else False. | |
| """ | |
| return Tmin <= Tfrost | |
| def scorch_bool(Tmax,Tscorch): | |
| """ | |
| Test if the day is a scorching day (jour échaudant) (maximum daily temperature above scorch threshold). | |
| Parameters | |
| ---------- | |
| Tmax : float | |
| Maximum daily air temperature (deg Celsius). | |
| Tscorch : float | |
| Temperature threshold above which the day is considered scorching (crop-dependent) (deg Celsius). | |
| Returns | |
| ------- | |
| bool | |
| True if it's a scorching day, else False. | |
| """ | |
| return Tmax >= Tscorch | |
| def thermalstress_bool(Tmax, Tstress): | |
| """ | |
| Define if the day is a source of thermal stress (maximum daily temperature above stress threshold). | |
| Parameters | |
| ---------- | |
| Tmax : float | |
| Maximum daily air temperature (deg Celsius). | |
| Tstress : float | |
| Temperature threshold above which the day is considered stressful (deg Celsius). | |
| Returns | |
| ------- | |
| bool | |
| True if the day is a source of thermal stress, else False. | |
| """ | |
| return Tmax >= Tstress | |
| def summerday_bool(Tmax): | |
| """ | |
| Define if the day is a summer day (maximum daily temperature above 25°C). | |
| Parameters | |
| ---------- | |
| Tmax : float | |
| Maximum daily air temperature (deg Celsius). | |
| Returns | |
| ------- | |
| bool | |
| True if it's a summer day, else False. | |
| """ | |
| return Tmax >= 25 | |
| def tropicalnight_bool(Tmin): | |
| """ | |
| Define if night is a tropical night (min night temperature above 20°). | |
| Parameters | |
| ---------- | |
| Tmin : float | |
| Min Night Air temperature (degrees Celsius). | |
| Returns | |
| ------- | |
| bool | |
| True if tropical night, else False. | |
| """ | |
| return Tmin >= 20 | |