Reads weather data from CF-formatted NetCDFs and writes it in the .clim
format expected by SIPNET: a 14-column tab-separated table with no headers.
Usage
met2model.SIPNET(
in.path,
in.prefix,
outfolder,
start_date,
end_date,
var.names = NULL,
overwrite = FALSE,
verbose = FALSE,
year.fragment = FALSE,
...
)Arguments
- in.path
location on disk where inputs are stored
- in.prefix
prefix of input and output files,
- outfolder
location on disk where outputs will be stored
- start_date
the start date of the data to be downloaded (will only use the year part of the date)
- end_date
the end date of the data to be downloaded (will only use the year part of the date)
- var.names
character: list of variable names to be extracted. Default is NULL.
- overwrite
should existing files be overwritten
- verbose
should the function be very verbose
- year.fragment
the function should ignore whether or not the data is stored as a set of complete years (such as for forecasts).
- ...
Additional arguments, currently ignored
Details
The columns of the output file are:
Grid index. Always 0 from this function; PEcAn configures SIPNET not to use this.
4-digit year
Day of year
Hour of day
Timestep size (days)
Air temperature (degrees C)
Soil temperature (degrees C)
PAR (mol/m2/hr)
Precip (mm)
VPD (Pa)
VPD of soil (Pa)
Canopy vapor pressure (Pa)
Wind speed (m/s)
Soil moisture (fraction of saturation). Always 0.6 from this function; PEcAn configures SIPNET to calculate it internally.
SIPNET does not allow missing values in its inputs. If the result contains
NAs after conversion, no file is written and the process returns an error.
To fix this, consider using a formal gap-filling method such as
PEcAn.data.atmosphere::metgapfill() before calling met2model.