Skip to content

Check for corresponding ensemble members when giving ensemble inputs to biasCorrection #21

@cicatrixx

Description

@cicatrixx

Hi,
I am just testing out this package to perform bias correction for multiple RCMs. It seems that it is important to make sure the order of rcms is the same when providing the historical and future RCM data ensembles. Looks like function doesn't check this and just assumes same order? In below code, I was not careful when setting the order of RCMs in when I used bindGrid. But biasCorrection doesn't give me any error. Or am I approaching this all wrong.

# obs  Station data containing VALUE (ECA-D) daily data for pr for DJF 1983-2002).
data(VALUE_Iberia_pr)
y <- VALUE_Iberia_pr

data("CMIP5_Iberia_pr", "CORDEX_Iberia_pr", "NCEP_Iberia_pr")  #RCM hist
obsgrid<-getGrid(y)
xens <- bindGrid(
    interpGrid(CORDEX_Iberia_pr, obsgrid), 
    interpGrid(CMIP5_Iberia_pr,obsgrid), 
    interpGrid(NCEP_Iberia_pr, obsgrid))

data( "CMIP5_Iberia_pr.rcp85", "CORDEX_Iberia_pr.rcp85") ## RCM fut
newdataens <- bindGrid(
  interpGrid(CMIP5_Iberia_pr,obsgrid), 
  interpGrid( CORDEX_Iberia_pr, obsgrid)   )

calmult <- biasCorrection(y = y, x = xens,
                      newdata = newdataens,
                      precipitation = TRUE,
                      method = "eqm",
                      extrapolation = "constant",
                      window = c(30, 15),
                      wet.threshold = 0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions