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

Error doing bias correction for CMIP6 tasmax #48

Open
Vik-1 opened this issue Jul 12, 2022 · 1 comment
Open

Error doing bias correction for CMIP6 tasmax #48

Vik-1 opened this issue Jul 12, 2022 · 1 comment

Comments

@Vik-1
Copy link

Vik-1 commented Jul 12, 2022

#********************************************************************************************

load observed "tasmax" data

obs.tx <- loadGridData(dataset = "tasmax_1995.2014_K.nc",

  •                    var = 'tasmax', lonLim = c(20.25,94.75), latLim = c(10.25,39.75),
    
  •                    season = 1:12, years = 1995:2014)
    

[2022-07-12 08:28:03] Defining geo-location parameters
[2022-07-12 08:28:03] Defining time selection parameters
[2022-07-12 08:28:03] Retrieving data subset ...
[2022-07-12 08:28:07] Done

h.tx <- loadGridData(dataset = "tasmax_day_ACCESS-ESM1-5_historical.r1i1p1f1.gn.1995-2014.nc",

  •                       var = 'tasmax', lonLim = c(20.25,94.75), latLim = c(10.25,39.75),
    
  •                       season  = 1:12, years = 1995:2014)
    

[2022-07-12 08:28:07] Defining geo-location parameters
[2022-07-12 08:28:07] Defining time selection parameters
[2022-07-12 08:28:07] Retrieving data subset ...
[2022-07-12 08:28:10] Done

BCC.temp.eqm <- biasCorrection(y = obs.tx, x = h.tx,

  •                            newdata = h.tx,
    
  •                            method = "eqm",
    
  •                            extrapolation = "constant",
    
  •                            wet.threshold = 0.1)
    

[2022-07-12 08:28:10] Trying to determine the time zone...
[2022-07-12 08:28:10] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
[2022-07-12 08:28:13] Already complete date record. Nothing was done
[2022-07-12 08:28:14] Trying to determine the time zone...
[2022-07-12 08:28:14] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
[2022-07-12 08:28:16] Already complete date record. Nothing was done
[2022-07-12 08:28:17] Trying to determine the time zone...
[2022-07-12 08:28:17] Time zone identified and set to GMT
See 'setGridDates.asPOSIXlt' to change the time zone
[2022-07-12 08:28:19] Already complete date record. Nothing was done
[2022-07-12 08:28:27] Argument precipitation is set as FALSE, please ensure that this matches your data.
[2022-07-12 08:28:33] Number of windows considered: 1...
[2022-07-12 08:28:34] Bias-correcting 1 members separately...
Error in if (class(mat) == "numeric") mat <- as.matrix(mat) :
the condition has length > 1

How can I solve this problem? the unit for the tasmax datasets is K

@durutti
Copy link

durutti commented Sep 23, 2022

a workaround is to reshape the 3-D arrays to 2-D (time,lat*lon) and then perform bias correction.

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