cdtBiasCorrectTempCMD: Temperature Bias Correction.

View source: R/cdtBias_Correction_ClimData_Cmd.R

cdtBiasCorrectTempCMDR Documentation

Temperature Bias Correction.

Description

Function to correct bias from reanalysis data.

Usage

cdtBiasCorrectTempCMD(
  time.step = "dekadal",
  dates = list(from = "range", pars = list(start = "2018011", end = "2018123")),
  netcdf.data = list(dir = "", format = "tmax_down_%s%s%s.nc", varid = "temp", ilon =
    1, ilat = 2),
  bias.method = list(method = "mbvar", dir = "", format = "STN_GRID_Bias_%s.nc"),
  output = list(dir = "", format = "tmax_adj_%s%s%s.nc"),
  GUI = FALSE
)

Arguments

time.step

character, the time step of the data. Available options: "daily", "pentad", "dekadal", "monthly".

dates

named list, providing the dates to correct the bias. The list includes an element from with available options "range", "file" or "dates", and an element pars which is a named list specifying the parameters related to from:

  • "range": pars specifies the start and end dates to merge.
    Example: pars = list(start = "2018011", end = "2018123")

  • "file": pars specifies the full path to the file containing the dates to merge. Example: pars = list(file = "/home/data/files/dates.txt")
    The contents of the file are as follows:
    ## cat /home/data/files/dates.txt
    2020011
    2020012
    2020013
    ......

  • "dates": pars specifies a vector containing the dates to merge.
    Example: pars = list(dates = c("2020011", "2020012", 2020091, 2020113))

netcdf.data

named list, providing the input netCDF dataset to be corrected.

  • dir: character, full path to the directory containing the netCDF files.

  • format: character, format of the netCDF file names

  • varid: character, name of the variable to read from the netCDF data

  • ilon: integer, order for the longitude dimension of the variable. Example: if the variable "precip" has the dimension order [Lat, Lon] then ilon must be 2

  • ilat: integer, order for the latitude dimension of the variable.

bias.method

named list, indicating the bias parameters.

  • "method": character, the bias method. Valid options: "mbvar", "mbmon", "qmdist" or "qmecdf".

    • "mbvar": Multiplicative Bias Time Step Variable

    • "mbmon": Multiplicative Bias for Each Month

    • "qmdist": Quantile Mapping with Empirical Distribution

    • "qmecdf": Quantile Mapping with Fitted Distribution

  • "dir": character, full path to the directory containing the bias coefficients in netCDF format

  • format: character, format of the bias netCDF file names

output

named list, indicating the directory to save the bias corrected data and the format of the bias corrected netCDF file name.

GUI

logical, indicating whether or not the output message should be displayed on CDT GUI. If TRUE, CDT GUI must be open.


rijaf-iri/CDT documentation built on July 3, 2024, 2:54 a.m.