Hi, I'm new to R. I have some daily soil moisture data for the year 1979 in 
netcdf format such as these
sm19790101.1.nc
sm19790102.1.nc
.
.
.
sm19791231.1.nc

I need to average a variable called "sm" to monthly resolution. I've done these

days = formatC(1:31, width=2, flag="0")
ncfiles = lapply(days, function(d){
    filename = paste("sm197901", d, ".1.nc", sep="")
    #print(filename)
    open.nc(filename)
})

to open the files in January. Questions is: how may I get the variable from 
each opened file. Rnetcdf package has the var.get.nc() that only read object of 
class "Netcdf" returned from open.nc(). Any help would be appreciated.

Enhao
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to