Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cicatrixx opened this issue Dec 5, 2018 · 2 comments

Comments

@cicatrixx
Copy link

cicatrixx commented Dec 5, 2018

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)
@miturbide
Copy link
Member

Hi @cicatrixx thank you very much for reporting.
That is right. It assumes the same order. We are working on the member consistency check at moment and will let you know once implemented.
We should have specified this in the documentation. I will fix this as soon as possible.

@cicatrixx
Copy link
Author

cicatrixx commented Dec 6, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants