[R] Problem with retrieve.nc of clim.pact
Pablo85
paolo.davini at gmail.com
Mon Dec 13 11:09:46 CET 2010
Goodmorning to everyone,
I'm new so sorry for bad english and formulation.
I go to the point: I am using since months the retrieve.nc function from
clim.pact to extract data from netcdf files. I always had no problem, but
some days ago I updated both R and the package to the latest versione (don't
ask me what was the previous R version, cause I don't remember).
However, now i am in serious trouble.
When i try opening the netcdf file, i use
a<-retrieve.nc(filename="/Users/P4blo/Desktop/DATA/Raw/Z500/Z500-1979-2010.nc",v.nam="hgt",t.rng=c(1,31))
just as was doing in the past.
but know, i obtain not more a 3D matrix but a 4D one!
[1] "ordinary"
[1] "Attribute time_origin not found"
[1] "The chronology is not straight forward: dt= 24 interval span= 275376
data points= 11475"
[1] "ncid$dim$'time$units'"
[1] "Time, units: hours since 1-1-1 00:00:0.0"
[1] "torg= 1-1-1 00:00:0.0"
[1] "Time origin: (year-month-day) 1 - 1 - 1"
[1] "Time unit: hours"
[1] "Latitudes: 0 - 90 degrees_north"
[1] "Longitudes: 0 - 357.5 degrees_east"
[1] "Reading hgt"
[1] "read the data from EASTERN hemisphere"
start count varsize
[1,] 1 144 144
[2,] 1 37 37
[3,] 1 1 1
[4,] 1 31 11475
[1] "dim dat:"
[1] 31 1 37 144
[1] 144 0 37 1 31
[1] 0.0 357.5
[1] 144 37 1 31
[1] "4D:"
[1] 31 1 37 144
[1] "Sort longs and lats"
[1] "First & last records: 1979 1 1 & 1979 1 31"
[1] "BEFORE scale adjustment & weeding"
Min. 1st Qu. Median Mean 3rd Qu. Max.
4684 5172 5491 5473 5818 5911
[1] "AFTER scale adjustment & weeding"
[1] "Scaling: dat <- dat * 1"
[1] "Offset: dat <- dat + 32066"
Min. 1st Qu. Median Mean 3rd Qu. Max.
36750 37240 37560 37540 37880 37980
[1] "dimensions 31 1 37 144"
but it is not over: the biggest problem is that if i try to plot the matrix,
i obtain a complete a completely fuzzy field, because i suppose that
somewhere the reading of the file was gone bad.
for instance, i use
image.plot(a$dat[1,1,,])
has anyone a similar problem?
thank you to everyone who will answer me.
Paolo Davini
--
View this message in context: http://r.789695.n4.nabble.com/Problem-with-retrieve-nc-of-clim-pact-tp3085201p3085201.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list