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

spatial.avg.field #264

Open
cyndyfem opened this issue Jun 20, 2022 · 2 comments
Open

spatial.avg.field #264

cyndyfem opened this issue Jun 20, 2022 · 2 comments

Comments

@cyndyfem
Copy link

cyndyfem commented Jun 20, 2022

Hi,
I followed the examples on the wiki.
Everything was ok. However, I got to a stage where I should compute anomalies, spatial averaging, convert to station objects, and combine
djfs <- as.station(spatial.avg.field(anomaly(djf)))

It says Error in spatial.avg.field(anomaly(djf)) :
could not find function "spatial.avg.field"

I tried spatial too, same thing.

I tried aggregate.area, it says
Error in X[i, ] <- X[i, ] * aweights2 :
number of items to replace is not a multiple of replacement length

I tried aggregate.field, it says
Error in aggregate.field(anomaly(djf)) :
argument "by" is missing, with no default

esd version: 1.10.7

Please, what am I doing wrong?
Thanks

library(esd)
setwd("V:/ERA5/Daily/")

era40 <- subset(retrieve('era5_sp_daily_mean_regrid.nc',lon=c(-40,40),lat=c(0,25)),it=c(1990,2002))

Era40 <- as.monthly(era40)

ERA40 <- as.4seasons(Era40)
djf <- subset(ERA40,it=1)

djfs <- as.station(spatial.avg.field(anomaly(djf)))

@abdelkaderm
Copy link
Contributor

Hi,

I will have a look in all this and come back to you soon.

Bests,

@cyndyfem
Copy link
Author

OK. Thanks.

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