morphing_epw {epwshiftr}R Documentation

Morphing EPW weather variables

Description

morphing_epw() takes an epw_cmip6_data object generated using extract_data() and calculates future core EPW weather variables using Morphing Method.

Usage

morphing_epw(
  data,
  years = NULL,
  labels = NULL,
  methods = NULL,
  warning = FALSE
)

Arguments

data

An epw_cmip6_dataobject generated using extract_data()

years

An integer vector indicating the target years to be considered. If NULL, all years in input data will be considered. Default: NULL.

labels

A character or factor vector used for grouping input years. Usually are the outputs of base::cut(). labels should have the same length as years. If given, climate data of years grouped by labels will be averaged. Default: NULL.

methods

A named character giving the methods of morphing procedures of each variables. Possible variable names are tdb, rh, p, hor_ir, glob_rad, wind. Possible values are: "stretch", "shift" and "combined". For example: c(tdb = "stretch", rh = "shift"). "combined" is only applicable to tdb. The default morphing method for each variable is listed in the Return section. If NULL, the default methods will be used. Default: NULL.

warning

If TRUE, warnings will be issued for cases with input data less than a decade (10 years). This is because using data that only covers a short period of time may not be able to capture the average of future climate. Default: FALSE.

Details

The EPW weather variables that get morphed are listed in details.

Value

An epw_cmip6_morphed object, which is basically a list of 12 elements:

No. Element Type Morphing Method Description
1 epw eplusr::Epw N/A The original EPW file used for morphing
2 tdb data.table::data.table() Stretch Data of dry-bulb temperature after morphing
3 tdew data.table::data.table() Derived Data of dew-point temperature after morphing
4 rh data.table::data.table() Stretch Data of relative humidity after morphing
5 p data.table::data.table() Stretch Data of atmospheric pressure after morphing
6 hor_ir data.table::data.table() Stretch Data of horizontal infrared radiation from the sky after morphing
7 glob_rad data.table::data.table() Stretch Data of global horizontal radiation after morphing
8 norm_rad data.table::data.table() Derived Data of direct normal radiation after morphing
9 diff_rad data.table::data.table() Stretch Data of diffuse horizontal radiation after morphing
10 wind data.table::data.table() Stretch Data of wind speed after morphing
11 total_cover data.table::data.table() Derived Data of total sky cover after morphing
12 opaque_cover data.table::data.table() Derived Data of opaque sky cover after morphing

Each data.table::data.table() listed above contains 19 columns below or an empty data.table::data.table() if the corresponding variables cannot be found in the input epw_cmip6_data object.

No. Column Type Description
1 activity_drs Character Activity DRS (Data Reference Syntax)
2 institution_id Character Institution identifier
3 source_id Character Model identifier
4 experiment_id Character Root experiment identifier
5 member_id Character A compound construction from sub_experiment_id and variant_label
6 table_id Character Table identifier
7 lon Double The averaged values of input longitude
8 lat Double The averaged values of input latitude
9 dist Double The averaged spherical distances in km between EPW location and grid coordinates
10 interval Factor The label value used to average raw input data
11 datetime POSIXct The datetime value with fake year generated by calling the Epw$data() method with the input EPW
12 year Integer The original year of the raw EPW data
13 month Integer The month value of the morphed data
14 day Integer The day of the morphed data
15 hour Integer The hour of the morphed data
16 minute Integer The minute of the morphed data
17 Variable Name Double The morphed data, where ⁠Variable Name⁠ is the corresponding EPW weather variable name
18 delta Double The shift factor. Will be NA for derived values
19 alpha Double The stretch factor. Will be NA for derived values

The Morphing procedure

Here Morphing is an algorithm proposed by Belcher etc. 2005 used to morph the present-day observed weather files (here the EPWs) to produce future climate weather files. The EPW data is used as the 'baseline climate'.

The first step before morphing is to calculate the monthly means of climatological variables in the EPW file, denoted by <x_0>_m. The subscript '0' is to denote the present day weather record, and 'm' is to denote the month.

The morphing involves three generic operations, i.e. 1) a shift; 2) a linear stretch (scaling factor); and 3) a shift and a stretch:

\textrm{Shift: } x = x_0 + \Delta x_m

\textrm{Stretch: }x = \alpha_m x_m

\textrm{Shift + Stretch: } x = x_0 + \Delta x_m + \alpha_m (x_0 - <x_0>_m)

Shift

If using a shift, for each month, a shift \Delta x_m is applied to x_0. \Delta x_m is the absolute change in the monthly mean value of the variable for the month m, i.e. \Delta x_m = <x_0>_m - <x>_m. Here the monthly variance of the variable is unchanged.

Stretch

If using a stretch, for each month, a stretch \alpha _m is applied to x_0, where \alpha _m is the fractional change in the monthly-mean value of a variable, i.e. \alpha _m = <x>_m / <x_0>_m. In this case, the variance will be multiplied by to \alpha^2_m

Combined Shift and Stretch

When using a combined shift and stretch factor, both the mean and the variance will be switched off altogether.

For more details about morphing, please see (Belcher etc. 2005)

References

Belcher, S., Hacker, J., Powell, D., 2005. Constructing design weather data for future climates. Building Services Engineering Research and Technology 26, 49–61. https://doi.org/10.1191/0143624405bt112oa


[Package epwshiftr version 0.1.4 Index]