calculate_eurocordex_relative_humidity: calculate relative humidity from specific humidity,...

Description Usage Arguments Details Value Examples

Description

The relative humidity was missing in some archived simulations. In these cases, it can be approximately calculated from the specific humidity, temperature, and pressure. This is done by this funciton. It uses 'read_eurocordex_data' to obtain the data of the three needed variables.

Usage

1
2
3
calculate_eurocordex_relative_humidity(dir, domain, driver, experiment,
  ensemble, institute, model, downscaling_realisation, time_frequency, time,
  stations)

Arguments

dir

string: file direcotory

domain

string: model domain, see EURO-CORDEX Doc

driver

string: driving global model, see EURO-CORDEX Doc

experiment

string: experiment type (historical, rcp2.6, rcp4.5, rcp8.5), see EURO-CORDEX Doc

ensemble

string: ensemble (e.g. r12i1p1), see EURO-CORDEX Doc

institute

string: institution who did the model run, see EURO-CORDEX Doc

model

string: used RCM (regional climate model), see EURO-CORDEX Doc

downscaling_realisation

string: version of the downscaling realisation (most often 'v1'), see EURO-CORDEX Doc

time_frequency

string: time frequency of model output (e.g. 'day'), see EURO-CORDEX Doc

stations

data.frame of three columns station_name, lon, and lat

time_lim

string, numeric or integer: array of length 2 containing start and end time to read in format 'YYYYMMDD' (as character, numeric or integer)

Details

The relative humidity was missing in some archived simulations. In these cases, it can be approximately calculated from the specific humidity, temperature, and pressure. This is done by this funciton. It uses 'read_eurocordex_data' to obtain the data of the three needed variables.

The relative humidity is calculated given in the equation below. The '=' is actually an 'approximately'.

hurs = 0.263 Pa^{-1} huss * ps * exp(-17.67 * (tas - 273.16 K)/(tas - 29.65 K))

with specific humidity (huss, dimensionless), pressure (ps in Pa), and temperature (tas in K).

Value

data.frame imported data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# define directory that contains the model data
dir <- '/my/data/directory/for/EUROCORDEX/data'

# define EURO-CORDEX model run details
domain <- 'EUR-11'
driver <- 'ICHEC-EC-EARTH'
experiment <- 'rcp85'
ensemble <- 'r12i1p1'
institute <- 'CLMcom'
model <- 'CCLM4-8-17'
downscaling_realisation <- 'v1'
time_frequency <- 'day'
time <- c('20110201', '20170301')

# define stations
stations <- data.frame(c('abc', 'def', 'ghi', 'jkl'), c(10.31, 11.12, 9.2, 9.31), c(55.19, 54.77, 55.02, 53.2), c(44, 1, 5, 107), stringsAsFactors = FALSE)
names(stations) <- c('station_name', 'lon', 'lat', 'elev')

# read in the data
my_data <- calculate_eurocordex_relative_humidity(dir, domain, driver, experiment, ensemble, institute, model, downscaling_realisation, time_frequency, time, stations)


# have a look into the README for further details

neumannd/eurocordex2swatTools documentation built on May 14, 2019, 2:17 p.m.