SDA_downscale_preprocess.Rd
This function reads and checks the input data, ensuring that the required date and carbon pool exist, and that the site coordinates are valid.
SDA_downscale_preprocess(data_path, coords_path, date, carbon_pool)
Character. File path for .rds containing ensemble data.
Character. File path for .csv file containing the site coordinates, with columns named "lon" and "lat".
Date. If SDA site run, format is yyyy/mm/dd; if NEON, yyyy-mm-dd. Restricted to years within the file supplied to 'data_path'.
Character. Carbon pool of interest. Name must match the carbon pool name found within the file supplied to 'data_path'.
A list containing The read .rds data , The cleaned site coordinates, and the preprocessed carbon data.
This function ensures that the specified date and carbon pool are present in the input data. It also checks the validity of the site coordinates and aligns the number of rows between site coordinates and carbon data.