Reshapes weather station data acquired using the 'meteospain', 'worldmet' or 'weathercan' R packages into formats useful for meteoland
reshapemeteospain(weather_data, output = "SpatialPointsMeteorology",
proj4string = NULL, complete = TRUE,
verbose = TRUE)
reshapeworldmet(hourly_data, output = "SpatialPointsMeteorology",
proj4string = NULL, complete = TRUE,
verbose = TRUE)
reshapeweathercan(hourly_data, daily_data = NULL, output = "SpatialPointsMeteorology",
proj4string = NULL, complete = TRUE, verbose = TRUE)
An object of the class indicated in output
.
Hourly or daily weather data, in form of an sf (spatial) object, obtained using function 'get_meteo_from()' in package 'meteospain'.
Hourly weather data. In the case of reshapeworldmet
, a tibble or data frame returned by function 'importNOAA'. In the case of reshapeweathercan
, a tibble or data frame returned by function 'weather_dl' with 'interval="hour"'.
Daily weather data (only for reshapeweathercan
), a tibble or data frame returned by function 'weather_dl' with 'interval="day"'.
Kind of output desired. Either 'SpatialPointsTopography
', 'SpatialPointsMeteorology
' or 'MeteorologyInterpolationData
'.
A string or CRS to change the coordinate reference system of the output. If NULL the spatial reference will be geographic coordinates (i.e. CRS("+proj=longlat")
). When reshaping to MeteorologyInterpolationData
it is recommended to use a reference system with meters in units, such as UTM.
A flag to indicate that missing variables should be completed using function meteocomplete
A flag to show information of the reshape process in the console output.
Miquel De Cáceres Ainsa, CREAF
Note that to have precipitation included in downloads from 'worldmet' you should set 'precip = TRUE' when calling function 'importNOAA'. In the case of weathercan, precipitation is only provided for daily data (i.e. setting 'interval="day"' when calling 'weather_dl'), whereas wind speed and relative humidity are only availave for hourly data (i.e., setting 'interval="hour"' when calling 'weather_dl'). Hence, in meteoland
we recommend downloading both daily and hourly data and then calling function reshapeweathercan
to merge the two sources.
meteocomplete