Import the meteorology data, check its format, and eventually compute missing variables.
Meteorology(file = NULL, Period = NULL, Parameters = Import_Parameters())
file | Either the file name to read, a shell command that preprocesses the file (e.g. fread("grep filename"))
or the input itself as a string, see |
---|---|
Period | A vector of two POSIX dates that correspond to the min and max dates for the desired time period to be returned. |
Parameters | A list of parameters:
|
A daily meteorology data.frame (invisibly).
The imported file is expected to be at daily time-step. The albedo is used to compute the system net radiation that is then used to compute the soil net radiation using an extinction coefficient with the plot LAI following the Shuttleworth & Wallace (1985) formulation. This computation is likely to be depreciated in the near future as the computation has been replaced by a metamodel. It is kept for information for the moment.
Var | unit | Definition | If missing |
Date | POSIXct | Date in POSIXct format | Computed from start date parameter, or set a dummy date if missing |
year | year | Year of the simulation | Computed from Date |
DOY | day | day of the year | Computed from Date |
Rain | mm | Rainfall | Assume no rain |
Tair | Celsius | Air temperature (above canopy) | Computed from Tmax and Tmin |
Tmax | Celsius | Maximum air temperature during the day | Required (error) |
Tmin | Celsius | Minimum air temperature during the day | Required (error) |
RH | % | Relative humidity | Not used, but prefered over VPD for Rn computation |
RAD | MJ m-2 d-1 | Incident shortwave radiation | Computed from PAR |
Pressure | hPa | Atmospheric pressure | Computed from VPD, Tair and Elevation, or alternatively from Tair and Elevation. |
WindSpeed | m s-1 | Wind speed | Taken as constant: Parameters$WindSpeed |
CO2 | ppm | Atmospheric CO2 concentration | Taken as constant: Parameters$CO2 |
DegreeDays | Celsius | Growing degree days | Computed using GDD() |
PAR | MJ m-2 d-1 | Incident photosynthetically active radiation | Computed from RAD |
FDiff | Fraction | Diffuse light fraction | Computed using Diffuse_d() using Spitters et al. (1986) formula |
VPD | hPa | Vapor pressure deficit | Computed from RH |
Rn | MJ m-2 d-1 | Net radiation (will be depreciated) | Computed using Rad_net() with RH, or VPD |
DaysWithoutRain | day | Number of consecutive days with no rainfall | Computed from Rain |
Air_Density | kg m-3 | Air density of moist air (\(\rho\)) above canopy | Computed using bigleaf::air.density() |
ZEN | radian | Solar zenithal angle at noon | Computed from Date, Latitude, Longitude and Timezone |
It is highly recommended to set the system environment timezone to the one from the meteorology file. If not, the function try to use the Timezone
from the parameter files to set it. When in doubt, set it to UTC (Sys.setenv(TZ="UTC")
), as for Aquiares()
.
if (FALSE) { if(interactive()){ Sys.setenv(TZ="UTC") Met_c= Meteorology() # Get the units of the output variables: attr(Met_c,"unit") } }