-
Notifications
You must be signed in to change notification settings - Fork 30
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
How to get daily data #266
Comments
Hi. The data that come with esd are only sample data and typically monthly or annual (to keep its size down). But you can download daily data with |
Hello, rr <- retrieve('hgt.1966.nc', lev = 500, Then, I want to extract some specific dates in that period for further analysis: rr = subset(rr, it = as.Date(c("1966-01-08", "1966-01-10","1966-01-13", Best |
Here is the way to extract only one day:
You don't need to include |
I'm guessing that the index of your object 'rr' is of a different class (POSIXt?) than your input 'it'. Is that right? Could you check the following, please? class(index(rr)) I'm working on updating the function subset to make it more flexible with regards to time formats, but here's a workaround in the meantime: x <- subset(rr, it=as.Date(index(rr)) %in% as.Date(c("1966-01-08", "1966-01-10","1966-01-13", |
Hello
|
Hello r1 <- retrieve('hgt.1966.nc', lev = 500, it = as.Date(c('1966-01-08', r2 <- retrieve('hgt.1967.nc', lev = 500, it = as.Date(c('1967-12-19','1967-12-19')), x1 <- subset(r1, it=as.Date(index(r1)) %in% as.Date(c("1966-01-08", "1966-01-09","1966-01-10", "1966-01-12","1966-01-13", x = c(x1, x2) e_o_f = EOF(x) Error in EOF.default(x) : object 'eof' not found I guess the problem maybe from: x = c(x1, x2) because if I only use x1: e_o_f = EOF(x1) |
The problem comes from the way you combine x1 and x2. Try using cbind(x1, x2) instead. |
Yes, I also tried that way, but there is another error: Error in svd(y, nu = min(c(ny, npca)), nv = min(c(ny, npca))) : |
Sorry, it should be rbind(x1, x2), not cbind. You may still have trouble with the EOF analysis with such a small input object, containing only 8 time steps. What are you trying to figure out with the EOF analysis? |
Thank you very much. There is a limitation of daily NCEP data that I need to download for each year (1966, 1967,...2013) and extract data in specific date of each year. Then combine them (using rbind), finally I use EOF to see the pattern of the first principle component of these variables (geopotential height, sea level pressure and wind speed) in 96 events. Is it possible for me to use PCA for that matrix? or PCA is only work for data in specific station? Best |
The PCA and EOF methods are implemented in esd in similar ways, using single value decomposition (svd), but EOF is for field objects and PCA for station objects. For your purposes, you should use the EOF function. Regarding the many NCEP files, you could look into using cdo to extract data for the relevant dates and combine them into one netcdf file. Otherwise if you do this in R, I suggest saving the data in an rda-file so that you only have to do it once. Sounds like you have an interesting project going on. Good luck and let us know if you have any further issues or questions about the esd-package. |
Thank you ! Computes the EOFsX <- EOF(t2m) Plot the resultplot(X) |
Sure! |
Thank you very much for your answer. |
Yes, you see the values of the EOFs by addressing them data("slp.ERA5")
eof <- EOF(slp.ERA5)
m1 <- subset(eof,ip=1)
map(m1) -> y
y Many of the results are stored as attibutes - try |
Thank you for great support. I understand how to extract the value of eof. In the below figure, is there any way for us to know how many percentage that component 1 accounts for, component 2 accounts for, .....component 20 accounts for. Best |
Hello
How can I modify this line to get the daily data from NCEP?
t2m <- t2m.NCEP(lon=c(0,360),lat=c(35,90))
If there is no way to get the daily data from NCEP, can we get daily data from ERA5 or some other datasets?
Best,
The text was updated successfully, but these errors were encountered: