Questions tagged [open-dataset]
2 questions
2
votes
1 answer
R, How to refer to variable name as string, in function that uses arrow:open_dataset internally
Trying to create a function that will compute the average of some variable, whose name is provided in the function. For instance:
mean_of_var <- function(var){
open_dataset('myfile') %>% summarise(meanB=mean(get(var) ,na.rm = T),
…

LucasMation
- 2,408
- 2
- 22
- 45
0
votes
0 answers
How can i open several .nc files as one in python with xarray?
I have 30 .nc files with dimensions: time, lat, lon, pres; coordinates: time, lat, lon, pres and 18 different variables. I would like to open them in one dataset.
If I use xarray.open_mfdataset (), it won't work, as the dimensions of pres are all…

Cathi
- 1