[R] 3D ncdf file

ecvetano at uwaterloo.ca ecvetano at uwaterloo.ca
Mon Jun 14 22:30:32 CEST 2010


I have an ncdf file with different variables for dimensions and dates  
where the dimensions are as follows, where X=i and Y=j creating a 88  
by 188 set of cells. For each cell there are 12 readings for DO taken  
at 2 hour intervals and recoded by according to the Julian calendar  
under the ordinal dates variable.

DO: [2280x188x85]
DX: [188x85]
DY: [188x85]
X: [85x1]
Y: [188x1]
Ordinal_Dates: [2280x1]
T: [2280x1]

So far, I have set up each variable as follows, and I don?t know how  
to work with the 3D DO variable which contains 12 daily values per day

setwd ("C:/Documents and Settings/Desktop/R")
profile1 <- open.ncdf("2005r1_v3_Ct=500_lerie_out_bot.nc", header=FALSE)

name1<-get.var.ncdf( profile1, "DO")
name2<-get.var.ncdf( profile1, "DX")
name3<-get.var.ncdf( profile1, "DY")
name4<-get.var.ncdf( profile1, "X")
name5<-get.var.ncdf( profile1, "Y")
name6<-get.var.ncdf( profile1, "Ordinal_Dates")
name7<-get.var.ncdf( profile1, "T")

I want to set a threshold, and calculate how many days have an average  
of DO greater then my threshold, and also what the daily averages of  
DO are

Any help is appreciated!

More information about the R-help mailing list