Title: | Data Processing of SMN Hi-Res Weather Forecast from 'AWS' |
---|---|
Description: | Exploration of Weather Research & Forecasting ('WRF') Model data of Servicio Meteorologico Nacional (SMN) from Amazon Web Services (<https://registry.opendata.aws/smn-ar-wrf-dataset/>) cloud. The package provides the possibility of data downloading, processing and correction methods. It also has map management and series exploration of available meteorological variables of 'WRF' forecast. |
Authors: | Gonzalo Diaz [cre, aut] |
Maintainer: | Gonzalo Diaz <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.5 |
Built: | 2025-03-09 06:29:21 UTC |
Source: | CRAN |
Data transformation from daily to monthly scale
daily2monthly(data = data)
daily2monthly(data = data)
data |
matrix with daily data from mg.evaluation output function |
Data frame with monthly data
....
daily.data.fields(raster.list, aggregate)
daily.data.fields(raster.list, aggregate)
raster.list |
Spat Raster variable with several times for a unique variable (T2 or HR2 or ...) |
aggregate |
Type of aggregation (sum, mean, min, max) |
Spat Raster with daily information
Data of evaporation from in-situ observation and several soil model outputs
data(eva)
data(eva)
An object of class "data.frame"
.
1st column with dates
2nd column with evaporation observation
Precipitation
Evaporation
Runoff
Baseflow
Soil moisture from 1st layer
Evaporation from canopy
Surface temperature
Diaz et al. (2024) AAGG 2024 Not yet published
data(eva)
data(eva)
Location of nearest point to lon/lat and temporal serie of location
find.nearest.point(data.spat.raster = data.spat.raster, lon = lon, lat = lat)
find.nearest.point(data.spat.raster = data.spat.raster, lon = lon, lat = lat)
data.spat.raster |
Spat Raster of WRF SMN (only one or several) |
lon |
Longitude location of nearest point to find |
lat |
Latitude location of nearest point to find |
a vector with the nearest location (lon/lat) and time serie of that location
Character string with the filenames of WRF SMN located in AWS Bucket
get.wrf.files(year = year, month = month, day = day, cycle = cycle, time = time)
get.wrf.files(year = year, month = month, day = day, cycle = cycle, time = time)
year |
character or numeric of year |
month |
character or numeric of month |
day |
character or numeric of day |
cycle |
cycle of forecast, "00", "06", "12" or "18" |
time |
selection of datasets, "01H", "24H" or "10M" |
string of the list of elements in the Bucket
ITH index calculation is made from gridded observational or model data. If the data is needed in lat/lon projection is better to use first the load.by.variable function to change projection
The index is calculated as:
where T(ªC) is the temperature in celsius degrees and RelHum(%) is the relative humidity in percentage
ith(raster.list = raster.list)
ith(raster.list = raster.list)
raster.list |
Spat Raster variable with several variables and times or only one Spat Raster field |
Spat Raster with ITH calculation for each time
Open of netcdf files of WRF SMN from AWS and optional projection
load.by.variable(nc.filenames, variable, transform, method)
load.by.variable(nc.filenames, variable, transform, method)
nc.filenames |
netcdf files |
variable |
name of variable from https://odp-aws-smn.github.io/documentation_wrf_det/Formato_de_datos/ as character |
transform |
TRUE to project data to longlat datum=WGS84 |
method |
if transform is set TRUE define projection method taken from project function of terra package |
Spat Raster with the chosen variable (optional: with the projection changed)
Evaluation of the linear multiple regression obtained from the multiple.guidance function
mg.evaluation( input.data = input.data, predictand = predictand, predictors = predictors, var.model = var.model, lmodel = lmodel )
mg.evaluation( input.data = input.data, predictand = predictand, predictors = predictors, var.model = var.model, lmodel = lmodel )
input.data |
Data frame with first column as a "POSIXct" class and one or more columns with data values. The predictand and predictors variables should be located in these columns |
predictand |
Character with column name of the predictand variable |
predictors |
Character array with one or more elements of the predictors chosen by the user |
var.model |
Character with column name of the modeled predicting variable |
lmodel |
Element of class lm obtained from multiple.guidance output function |
List of two elements. First element is a matrix with the columns of observed data, modeled data and corrected data. Second element is a data frame of the statistical results of the modeled and corrected data versus observed data
Definition of linear multiple regression adjustment based on predictor variables that fit a predicting variable
multiple.guidance( input.data = input.data, predictand = predictand, predictors = predictors )
multiple.guidance( input.data = input.data, predictand = predictand, predictors = predictors )
input.data |
Data frame with first column as a "POSIXct" class and one or more columns with data values. The predictand and predictors variables should be located in these columns |
predictand |
Character with column name of the predictand variable |
predictors |
Character array with one or more elements of the predictors chosen by the user |
an element of class lm
Plot of observed, modeled and corrected guidance series
ploting(data = data)
ploting(data = data)
data |
Data frame from daily2monthly output function or any other temporal series |
ggplot element
Download of WRF SMN data from AWS
wrf.download(wrf.name = wrf.name)
wrf.download(wrf.name = wrf.name)
wrf.name |
list of names to download from get.wrf.files. e.g.: "DATA/WRF/DET/2024/01/01/18/WRFDETAR_24H_20240101_18_000.nc" |
downloaded netcdf files