Closed javakh closed 7 years ago
Try setting verbose=TRUE
, splitting up the commands and check the individual bits. Eg use diagnose
and plot
. Check all the bits.
This is the results I have obtained: ceof=EOF(combine(x1,z1))
ds=DS.comb(y1,ceof,biascorrect=T,verbose=T) [1] "DS.comb" [1] "Bias correcion - bias-fix common EOF" Error in apply(coredata(X), 2, mean, na.rm = TRUE) : dim(X) must have a positive length diagnose(ceof) $mean.diff [,1] [,2] [,3] [,4] [,5] CMIP5 4.104444e-17 3.845015e-17 5.260717e-17 1.246739e-16 1.235177e-17 [,6] [,7] [,8] [,9] [,10] CMIP5 6.135433e-17 7.74108e-18 3.892138e-16 2.318954e-16 4.828403e-16 [,11] [,12] CMIP5 8.430611e-17 1.109922e-15
$sd.ratio [,1] [,2] [,3] [,4] [,5] [,6] [,7] CMIP5 0.2877986 0.138918 0.1065822 0.1525996 0.08791121 0.139281 0.1166833 [,8] [,9] [,10] [,11] [,12] CMIP5 0.04182473 0.1882926 0.1322217 0.1959158 0.2983779
$autocorr.ratio [,1] [,2] [,3] [,4] [,5] [,6] [,7] CMIP5 -0.7370777 -0.7925867 0.8598023 0.95957 -0.7795867 -0.9219605 -0.8632522 [,8] [,9] [,10] [,11] [,12] CMIP5 0.9605013 0.9902146 -0.927463 -0.8818522 0.9366334
$common.period [1] "1951-01-01" "2005-01-01"
$sd0 1.y 2.y 3.y 4.y 5.y 6.y 7.y 0.10748277 0.08879543 0.10096439 0.10278856 0.09170408 0.08877393 0.10137559 8.y 9.y 10.y 11.y 12.y x.1 x.2 0.09817552 0.08576234 0.10199616 0.08527407 0.10781237 0.08346241 0.10312076 x.3 x.4 x.5 x.6 x.7 x.8 x.9 0.09123985 0.08917976 0.10054293 0.10313927 0.09078275 0.09423420 0.10565671 x.10 x.11 x.12 0.09008497 0.10605117 0.08303620
$calibrationdata [1] "monthly"
attr(,"variable") [1] "rhum" attr(,"evaluation_period") [1] "1951-01-01-2005-01-01" attr(,"history") attr(,"history")$call attr(,"history")$call[[1]] diagnose.comb.eof(x, ...)
attr(,"history")$timestamp [1] "Tue Dec 20 07:38:23 2016"
attr(,"history")$session attr(,"history")$session$R.version [1] "R version 3.2.3 (2015-12-10)"
attr(,"history")$session$esd.version [1] "esd_1.5"
attr(,"history")$session$platform [1] "x86_64-w64-mingw32/x64 (64-bit)"
attr(,"class") [1] "diagnose" "comb" "eof" "list"
I suspect the problem may occur in DS.eof() function which is used inside DS.comb()
ds <- DS.eof(ceof,y,verbos=T) [1] "DS.eof" [1] "DS.pca" [1] "zoo" [1] "Predictor is a zoo object" [1] "DS.pca" [1] "eof" "zoo" [1] "Predictor is OK - an EOF object" [1] "Make the Ip lool like PCAs before downscaling" [1] "DS.pca" [1] "eof" "zoo" [1] "Predictor is OK - an EOF object" [1] "matchdate: t = [ 1951 - 2005 ], it= [ 1951 - 2005 ]" [1] "1951-01-01" "1951-01-01" "1975-05-06" [1] "select 55 dates" [1] "1951-01-01" "1952-01-01" "1953-01-01" "1954-01-01" "1955-01-01" [6] "1956-01-01" "1957-01-01" "1958-01-01" "1959-01-01" "1960-01-01" [11] "1961-01-01" "1962-01-01" "1963-01-01" "1964-01-01" "1965-01-01" [16] "1966-01-01" "1967-01-01" "1968-01-01" "1969-01-01" "1970-01-01" [21] "1971-01-01" "1972-01-01" "1973-01-01" "1974-01-01" "1975-01-01" [26] "1976-01-01" "1977-01-01" "1978-01-01" "1979-01-01" "1980-01-01" [31] "1981-01-01" "1982-01-01" "1983-01-01" "1984-01-01" "1985-01-01" [36] "1986-01-01" "1987-01-01" "1988-01-01" "1989-01-01" "1990-01-01" [41] "1991-01-01" "1992-01-01" "1993-01-01" "1994-01-01" "1995-01-01" [46] "1996-01-01" "1997-01-01" "1998-01-01" "1999-01-01" "2000-01-01" [51] "2001-01-01" "2002-01-01" "2003-01-01" "2004-01-01" "2005-01-01" [1] "55 matching dates" [1] "matchdate: index(y)" [1] 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 [16] 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 [31] 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 [46] 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 [1] "matchdate: t = [ 1951 - 2005 ], it= [ 1951 - 2005 ]" [1] "1951-01-01" "1951-01-01" "1975-05-06" [1] "select 55 dates" [1] "1951-01-01" "1952-01-01" "1953-01-01" "1954-01-01" "1955-01-01" [6] "1956-01-01" "1957-01-01" "1958-01-01" "1959-01-01" "1960-01-01" [11] "1961-01-01" "1962-01-01" "1963-01-01" "1964-01-01" "1965-01-01" [16] "1966-01-01" "1967-01-01" "1968-01-01" "1969-01-01" "1970-01-01" [21] "1971-01-01" "1972-01-01" "1973-01-01" "1974-01-01" "1975-01-01" [26] "1976-01-01" "1977-01-01" "1978-01-01" "1979-01-01" "1980-01-01" [31] "1981-01-01" "1982-01-01" "1983-01-01" "1984-01-01" "1985-01-01" [36] "1986-01-01" "1987-01-01" "1988-01-01" "1989-01-01" "1990-01-01" [41] "1991-01-01" "1992-01-01" "1993-01-01" "1994-01-01" "1995-01-01" [46] "1996-01-01" "1997-01-01" "1998-01-01" "1999-01-01" "2000-01-01" [51] "2001-01-01" "2002-01-01" "2003-01-01" "2004-01-01" "2005-01-01" [1] "55 matching dates" [1] "matchdate: index(y)" [1] 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 [16] 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 [31] 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 [46] 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 [1] "match date for error" [1] "lm" [1] "Default" [1] "Prepare output data" [1] "PC 1 PC 2 PC 3 PC 4 PC 5 PC 6 PC 7" [1] "Predictor pattern" num [1:4, 1:3, 1:12] 0.336 0.33 0.293 0.234 0.326 ... d d
4 3 12 [1] 55 12 [1] "station" "field" "annual" "zoo"
[1] "eof" "zoo" [1] "--- DS.station ---" [1] "i= 1" [1] "station" "field" "annual" "zoo"
[1] "index" "class" "location" "variable" "unit"
[6] "longitude" "latitude" "altitude" "country" "longname"
[11] "station_id" "quality" "calendar" "source" "URL"
[16] "type" "aspect" "reference" "info" "method"
[21] "history"
[1] "The predictor is some kind of EOF-object" [1] " EOF " [1] "--- DS.default ---" [1] "index(y)" [1] 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 [16] 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 [31] 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 [46] 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 [1] "station" "field" "annual" "zoo"
[1] "eof" "zoo" Error: is.matrix(X) is not TRUE
However
is.matrix(ceof) [1] TRUE
This is contradictory.,
I fixed some bugs in the EOF.comb function that may have caused the problems that you describe. Can you update esd and try again?
Thanks, Kajsa
Hii, Getting the following error:
[Here y1: observed data; x1: reanalysis,z1: GCM data]
How to solve this problem???
Thanks.