Package: RMAWGEN 1.3.9.3

RMAWGEN: Multi-Site Auto-Regressive Weather GENerator

S3 and S4 functions are implemented for spatial multi-site stochastic generation of daily time series of temperature and precipitation. These tools make use of Vector AutoRegressive models (VARs). The weather generator model is then saved as an object and is calibrated by daily instrumental "Gaussianized" time series through the 'vars' package tools. Once obtained this model, it can it can be used for weather generations and be adapted to work with several climatic monthly time series.

Authors:Emanuele Cordano, Emanuele Eccel

RMAWGEN_1.3.9.3.tar.gz
RMAWGEN_1.3.9.3.zip(r-4.5)RMAWGEN_1.3.9.3.zip(r-4.4)RMAWGEN_1.3.9.3.zip(r-4.3)
RMAWGEN_1.3.9.3.tgz(r-4.4-any)RMAWGEN_1.3.9.3.tgz(r-4.3-any)
RMAWGEN_1.3.9.3.tar.gz(r-4.5-noble)RMAWGEN_1.3.9.3.tar.gz(r-4.4-noble)
RMAWGEN_1.3.9.3.tgz(r-4.4-emscripten)RMAWGEN_1.3.9.3.tgz(r-4.3-emscripten)
RMAWGEN.pdf |RMAWGEN.html
RMAWGEN/json (API)

# Install 'RMAWGEN' in R:
install.packages('RMAWGEN', repos = c('https://ecor.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ecor/rmawgen/issues

Datasets:

On CRAN:

5.59 score 3 stars 4 packages 108 scripts 704 downloads 55 exports 11 dependencies

Last updated 3 months agofrom:78113000a4. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 11 2024
R-4.5-winNOTEOct 11 2024
R-4.5-linuxNOTEOct 11 2024
R-4.4-winOKOct 11 2024
R-4.4-macOKOct 11 2024
R-4.3-winOKOct 11 2024
R-4.3-macOKOct 11 2024

Exports:acvWGENadddateaddsuffixesarch_testComprehensivePrecipitationGeneratorComprehensiveTemperatureGeneratorcontinuity_ratiocovarianceElevationOfextractdaysextractmonthsextractTnFromAnomaliesextractTxFromAnomaliesextractyearsfindDateforecastResidualgenerateTemperatureTimeseriesgetDailyMeangetMonthlyMeangetVARmodelGPCAGPCA_iterationinv_GPCAinv_GPCA_iterationis.monthly.climatemonths_fNewVAReventRealizationnewVARmultieventRealizationnormality_testnormalizeGaussiannormalizeGaussian_precnormalizeGaussian_severalstationsnormalizeGaussian_severalstations_precplot_sampleplotDailyClimatePrecipitationEndDayPrecipitationStartDayqqplot_RMAWGEN_deltaTqqplot_RMAWGEN_precqqplot_RMAWGEN_Tnqqplot_RMAWGEN_Txqqplot.laggedqqplotprecWGENqqplotprecWGEN_seasonalqqplotTnTxWGENqqplotTnTxWGEN_seasonalqqplotWGENremoveNAsserial_testsetComprehensiveTemperatureGeneratorParameterssplineInterpolateMonthlytoDailysplineInterpolateMonthlytoDailyforSeveralYearsTemperatureEndDayVAR_modWhereIs

Dependencies:chrondatelatticelmtestMASSnlmesandwichstrucchangeurcavarszoo

Readme and manuals

Help Manual

Help pageTopics
R - Multi-site Autoregressive WEather GeneratorRMAWGEN-package RMAWGEN
Plots the auto- and cross- covariance functions between measured and simulated data for several stationsacvWGEN
Inserts three columns (year,month,day) passing dates to a matrix or to a dataframeadddate
Adds suffixes for daily maximum and minimum temperature to the names of a column data frameaddsuffixes
'arch.test' function for 'varest2' objectarch_test
The comprehensive Precipitation GeneratorComprehensivePrecipitationGenerator
The Comprehensive Temperature GeneratorComprehensiveTemperatureGenerator
Calculates the continuity ratio of a set of precipitation measured or generated data in several sites as defined by Wilks, 1998 (see reference link)continuity_ratio
counts NAs in each row of 'data'countNAs
Calculates the covariance matrix of the normally standardized variables obtained from the columns of 'x'covariance
Extracts the elevation of a meteorological station expressed in meters above a reference (sea level)ElevationOf
Extracts the rows of a matrix corresponding to the requested days (expressed as dates YYYY-MM-DD) given the date (origin) of the first rowextractdays
Extracts the rows of a matrix corresponding to requested months of a year given the date (origin) of the first rowextractmonths
Extracts generated time series of Daily Minimum Temperature from a random multi-realization obtained by 'generateTemperatureTimeseries' functionextractTnFromAnomalies
Extracts generated time series of Daily Maximum Temperature from a random multi-realization obtained by 'generateTemperatureTimeseries' functionextractTxFromAnomalies
Extracts the elements of a data frame corresponding to a period between 'year_min' and 'year_max' for the stations listed in 'station'extractyears
Finds the date corresponding a row index of a matrix given the date (origin) of the first rowfindDate
Forecasts the expected value of a VAR realization given the prievious oneforecastEV
Forecasts the residual value of a VAR realization given the white noise covariance matrixforecastResidual
Returns time series of Daily Maximum and Minimum with a random multi-realization obtained by using 'newVARmultieventRealization'. This function is called by 'ComprehensiveTemperatureGenerator'.generateTemperatureTimeseries
Calculates the daily means of a range of days around each date of a data frame corresponding to a period between 'year_min' and 'year_max' for stations listed in 'station'getDailyMean
Calculates the monthly means of a data frame corresponding to a period between 'year_min' and 'year_max' for stations listed in 'station'getMonthlyMean
Either creates a VAR model or chooses a VAR model by using VAR or VARselect commands of 'vars' packagegetVARmodel
This function makes a Gaussianization procedure based on PCA iteration ( see 'GPCA_iteration')GPCA
This function makes an iteration of PCA-Gaussianization processGPCA_iteration
GPCA-classGPCA-class
GPCAiteration-classGPCAiteration GPCAiteration-class
GPCAvarest2-classGPCAvarest2 GPCAvarest2-class
This function makes an inverse Gaussianization procedure besad on PCA iteration ( see 'inv_GPCA_iteration'inv_GPCA
This function makes an inverse iteration of PCA-Gaussianization processinv_GPCA_iteration
Verifies if 'climate' represents the monthly climatology in one year, i.e 'climate' is monthly.climate type matrix whose rows represent months and each column represents a station. It is also used in 'setComprehensiveTemperatureGeneratorParameters'.is.monthly.climate
months REPLACEMANTmonths_f
Generates a new realization of a VAR modelNewVAReventRealization
Generates several realizations of a VAR modelnewVARmultieventRealization
'normality.test' method for 'varest2' objectnormality_test
Converts a random variable 'x' extracted by a population represented by the sample 'data' or 'sample' to a normally-distributed variable with assigned mean and standard deviation or vice versa in case 'inverse' is 'TRUE'normalizeGaussian
Converts precipitation values to "Gaussinized" normally-distributed values taking into account the probability of no precipitation occurrences. values or vice versa in case 'inverse' is 'TRUE'normalizeGaussian_prec
Converts several samples 'x' random variable extracted by populations represented by the columns of 'data' respectively or 'sample' to a normally-distributed samples with assinged mean and standard deviation or vice versa in case 'inverse' is 'TRUE'normalizeGaussian_severalstations
DEPRECATED Converts several samples 'x' random variable (daily precipitation values) extracted by populations represented by the columns of 'data' respectively or 'sample' to a normally-distributed samples with assinged mean and standard deviation or vice versa in case 'inverse' is 'TRUE' using the function 'normalizeGaussian_prec'normalizeGaussian_severalstations_prec
It makes a plot by sampling (e.g. monthly) the variables 'x' and 'y'plot_sample
Plots daily climatology through one yearplotDailyClimate
Gets the last day in a precipitation time series, expressed in decimal julian days since 1970-1-1 00:00 UTCPrecipitationEndDay
Gets the first day in a precipitation time series, expressed in decimal julian days since 1970-1-1 00:00 UTCPrecipitationStartDay
'print' S3 method for 'GPCA' or 'GPCA_iteration' objectprint print.GPCA print.GPCAiteration
It makes the Q-Q plots observed vs generated time series of daily maximum, minimum temperature and daily thermal range for a list of collected stochastic generationsqqplot_RMAWGEN_deltaT qqplot_RMAWGEN_prec qqplot_RMAWGEN_Tn qqplot_RMAWGEN_Tx
This function creates a Q-Q plot of the 'lag'-lag moving cumulative addition of the values in the samples 'x,y,z'qqplot.lagged
Makes a qqplot of measured and simulated data for several stations.qqplotprecWGEN
Makes four seasonal qqplots (winter, spring, summer and autumn) of measured and simulated data for several stations.qqplotprecWGEN_seasonal
Makes a qqplot of measured and simulated data for several stations.qqplotTnTxWGEN
Makes four seasonal qqplots (winter, spring, summer and autumn) of measured and simulated data for several stations.qqplotTnTxWGEN_seasonal
Makes a qqplot and Wilcoxon test between the two columns of 'val'qqplotWGEN
Replaces each entry of the rows containing NA values with NAremoveNAs
This function adjusts the monthly mean to a daily weather dataset (e. g. spline-interpolated temperature)rescaling_monthly
'residuals' S3 method for 'varest2' objectresiduals residuals.varest2
'serial.test' function for 'varest2' objectserial_test
Computes climatic and correlation information useful for creating an auto-regeressive random generation of maximum and minimun daily temparature. This function is called by 'ComprehensiveTemperatureGenerator'.setComprehensiveTemperatureGeneratorParameters
Interpolates monthly data to daily data using 'spline' and preserving monthly mean valuessplineInterpolateMonthlytoDaily
Interpolates monthly data to daily data using 'splineInterpolateMonthlytoDaily' for several yearssplineInterpolateMonthlytoDailyforSeveralYears
Gets the last day in a temperature time series, expressed as decimal julian days since 1970-1-1 00:00 UTCTemperatureEndDay
Gets the first day in a temperature time series, expressed as decimal julian days since 1970-1-1 00:00 UTCTemperatureStartDay
Trentino DatasetELEVATION LOCATION PRECIPITATION PRECIPITATION_MEASUREMENT_END_DAY PRECIPITATION_MEASUREMENT_START_DAY STATION_LATLON STATION_NAMES TEMPERATURE_MAX TEMPERATURE_MEASUREMENT_END_DAY TEMPERATURE_MEASUREMENT_START_DAY TEMPERATURE_MIN trentino
Modified version of 'VAR' function allowing to describe white-noise as VAR-(0) model (i. e. 'varest' objects)VAR_mod
varest-classvarest varest-class
varest2-classvarest2 varest2-class
Gets the toponym where a meteorological station is locatedWhereIs