Spin-up meteorology
Usage
spin.met(
in.path,
in.prefix,
start_date,
end_date,
nyear = 1000,
nsample = 50,
resample = TRUE,
run_start_date = start_date,
overwrite = TRUE
)Arguments
- in.path
met input folder path
- in.prefix
met input file prefix (shared by all annual files, can be "")
- start_date
start of met
- end_date
end of met
- nyear
number of years of spin-up, default 1000
- nsample
sample the first nsample years of met, default 50
- resample
resample (TRUE, default) or cycle (FALSE) meteorology
- run_start_date
date the run itself starts, which can be different than the start of met
- overwrite
whether to replace previous resampling
Details
spin.met works by creating symbolic links to the sampled met file, rather than copying the whole file. Be aware that the internal dates in those files are not modified. Right now this is designed to be called within met2model.[MODEL] before the met is processed (it's designed to work with annual CF files not model-specific files) for example with models that process met into one large file
Examples
start_date <- "0850-01-01 00:00:00"
end_date <- "2010-12-31 23:59:59"
nyear <- 10
nsample <- 50
resample <- TRUE
if (FALSE) { # \dontrun{
if(!is.null(spin)){
## if spinning up, extend processed met by resampling or cycling met
start_date <- PEcAn.data.atmosphere::spin.met(
in.path, in.prefix,
start_date, end_date,
nyear, nsample, resample)
}
} # }