Hello everyone. I have downloaded some windspeed data from the ECMWF and I want to build and save a dataframe with some of it. Unfortunately, I obtain an error when doing so.
I start by opening the file and reading the variables in question
ncnameECMWF <- "_mars-webmars-public-svc-green-005-6fe5cac1a363ec1525f54343b6cc9fd8-rJIrn0"
ncfnameECMWF <- paste(ncpath, ncnameECMWF, ".nc", sep="")
ncinECMWF <- nc_open(ncfnameECMWF)
dataECMWF_U <- ncvar_get(ncinECMWF, "u")
dataECMWF_T <- as.POSIXct(ncvar_get(ncinECMWF, "time"), origin = "1900-01-01 00:00", tz = "UTC")
UEnsembleSquare=dataECMWF_U
data_UV_jaime_all_here_Square <- data.frame(UEnsembleSquare, dataECMWF_T)
Then, I obtain the following error
Error in data.frame(UEnsembleSquare,dataECMWF_T :
arguments imply differing number of rows: 361, 31.
UEnsembleSquare is a 4D matrix of size 36120150*31 and dataECMWF_T is a 31 membler srting.
I am very new to R and I don't understand it propperly, but as far as I kow, in R, one can make datasets with variables with different dimensions each.
Can someone please tell me what I am doing wrong?
Any answer is appreciated.
Regards.
Jaime.