# setComprehensiveTemperatureGeneratorParameters: Computes climatic and correlation information useful for... In RMAWGEN: Multi-Site Auto-Regressive Weather GENerator

## Description

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.

## Usage

 1 2 3 4 5 setComprehensiveTemperatureGeneratorParameters(station, Tx_all, Tn_all, mean_climate_Tn = NULL, mean_climate_Tx = NULL, Tx_spline = NULL, Tn_spline = NULL, year_max = 1990, year_min = 1961, leap = TRUE, nmonth = 12, verbose = FALSE, cpf = NULL, normalize = TRUE, sample = NULL, option = 2, yearly = FALSE) 

## Arguments

 station character vector of the IDs of the considered meteorological stations Tx_all data frame containing daily maximum temperature of all meteorological station. See TEMPERATURE_MAX for formatting. Tn_all data frame containing daily minimum temperature of all meteorological station. See TEMPERATURE_MIN for formatting. mean_climate_Tn a matrix containing monthly mean minimum daily temperature for the considered station or an object as returned by getMonthlyMean. If NULL, it is calculated. See input of is.monthly.climate mean_climate_Tx a matrix containing monthly mean maximum daily temperature for the considered station or an object as returned by getMonthlyMean. If NULL, it is calculated. See input of is.monthly.climate Tx_spline daily timeseries (from the first day of year_min to the last day of year_max) of averaged maximum temperature which can be obtained by a spline interpolation of monthly mean values. Default is NULL and returned as output. See for spline interpolation utilized: splineInterpolateMonthlytoDailyforSeveralYears. Tn_spline daily timeseries (from the first day of year_min to the last day of year_max) of averaged minimum temperature which can be obtained by a spline interpolation of monthly mean values. Default is NULL and returned as output. See for spline interpolation utilized: splineInterpolateMonthlytoDailyforSeveralYears. year_max start year of the recorded (calibration) period year_min end year of the recorded (calibration) period leap logical variables. It is TRUE (Default) if leap years are considered nmonth number of months in one year. Default is 12. verbose logical variable cpf see normalizeGaussian_severalstations normalize logical variable If TRUE normalizeGaussian_severalstations is used, otherwise it is not. If option is 2, it is always TRUE. sample see normalizeGaussian_severalstations option integer value. If 1, the generator works with minimum and maximum temperature, if 2 (default) it works with the average value between maximum and minimum temperature and the respective daily thermal range. yearly logical value. If TRUE the monthly mean values are calculated for each year from year_min to year_max separately. Default is FALSE.

## Value

This function creates and returns the following gloabal variables:

data_original matrix containing normalized and standardized data (i.e. data_original)

data_for_var matrix returned from normalizeGaussian_severalstations by processing data_original if normalize is TRUE), otherwise it is equal to data_original.

Tn_mes matrix containing measured minimum daily temperature in the analyzed time period ( Tn_{mes})

Tx_mes matrix containing measured maximum daily temperature in the analyzed time period ( Tx_{mes})

Tm_mes matrix calculated as to

\frac{Tx_{mes}+Tn_{mes}}{2}

DeltaT_mes matrix corresponding to Tx_{mes}-Tn_{mes}

monthly_mean_Tn matrix containing monthly means of minimum daily temperature for the considered station. It is calculated according to the input format is.monthly.climate if saveMonthlyClimate is TRUE.

monthly_mean_Tx matrix containing monthly means of maximum daily temperature for the considered station. It is calculated according to the input format is.monthly.climate if saveMonthlyClimate is TRUE.

Tx_spline matrix containing the averaged daily values of maximimum temperature obtained by a spline interpolation of the monthly climate monthly_mean_Tx or mean_climate_Tx using splineInterpolateMonthlytoDailyforSeveralYears ( Tx_{s})

Tn_spline matrix containing the averaged daily values of minimun temperature obtained by a spline interpolation of the monthly climate monthly_mean_Tn or mean_climate_Tn using splineInterpolateMonthlytoDailyforSeveralYears ( Tn_{s})

SplineAdvTm matrix calculated as \frac{Tx_{s}+Tn_{s}}{2}

SplineAdvDeltaT, matrix corresponding to Tx_{s}-Tn_{s}

stdTn vector containing the standard deviation of minimum temperature anomalies Tn_{mes}-Tn_s (σ_{Tn})

stdTx vector containing the standard deviation of maximum temperature anomalies Tx_{mes}-Tx_s (σ_{Tx})

stdTm vector containing the standard deviation of "mean" temperature anomalies Tm_{mes}-Tm_s (σ_{Tm})

Tn_mes_res standard core (standardization) of Tn_mes obtained by solving column by column the expression

\frac{Tn_{mes}-Tn_s}{σ_{Tn}}

Tx_mes_res standard core (standardization) of Tx_mes obtained by solving column-by-column the expression

\frac{Tx_{mes}-Tn_s}{sd_{Tm}}

Tm_mes_res standard core (standardization) of Tm_mes obtained by solving column-by-column the expression

\frac{Tm_{mes}-Tn_s}{sd_{Tm}}

DeltaT_mes_res equal to DeltaT_mes

data_original matrix obtained as cbind(Tx_mes_res,Tn_mes_res) if option==1, or cbind(Tm_mes_res,DeltaT_mes_res) if option==2

See the R code for further details.

## Author(s)

Emanuele Cordano, Emanuele Eccel

splineInterpolateMonthlytoDailyforSeveralYears,ComprehensiveTemperatureGenerator

RMAWGEN documentation built on May 29, 2017, 9:09 a.m.