setComprehensiveTemperatureGeneratorParameters function

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.

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(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.

Returns

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 ( TnmesTn_{mes})

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

Tm_mes matrix calculated as to

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

DeltaT_mes matrix corresponding to TxmesTnmesTx_{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 ( TxsTx_{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 ( TnsTn_{s})

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

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

stdTn vector containing the standard deviation of minimum temperature anomalies TnmesTnsTn_{mes}-Tn_s (σTn\sigma_{Tn})

stdTx vector containing the standard deviation of maximum temperature anomalies TxmesTxsTx_{mes}-Tx_s (σTx\sigma_{Tx})

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

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

TnmesTnsσTn \frac{Tn_{mes}-Tn_s}{\sigma_{Tn}}

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

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

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

TmmesTnssdTm \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.

See Also

splineInterpolateMonthlytoDailyforSeveralYears,ComprehensiveTemperatureGenerator

Author(s)

Emanuele Cordano, Emanuele Eccel