[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #HMP-779532]: In R, how to read a netCDF file...?



Hi Fernando,

> I am a new netCDF files user and I am a Ph. D. Student from Portugal.
> I would like to have some help.
>
> The question is:
>
> In software R, how to read a netCDF file which is located in the disk
> of my PC, for example in C:\SEBAST\Doutoramento??

Sorry, but we do not have the R software installed, and do not know how
to use it to read netCDF files.  We develop, maintain, and support the
netCDF library software, but other software packages, such as the R
statistical software, must be supported by their developers.  According to

  http://www.r-project.org/

there are two netCDF packages for R, one named ncdf and the other named
RNetCDF.  Unfortunately, I could not locate an email for support for either
of these packages.

--Russ

> I am using the retrieve.nc function of the Package clim.pact version
> 2.2-30. I am not sure if this is the appropriated one!  When I apply
> the retrieve.nc function to read the AA.nc file from the disk, I get
> the following error message:
>
> X1<-retrieve.nc("C:/SEBAST/Doutoramento/AA.nc")
> [1] "ordinary"
> [1] "Attribute time_origin not found"
> [1] "ncid$dim$'time$units'"
> [1] "Time, units: hours since 1-1-1 00:00:0.0"
> [1] "Get the levels: Inf -Inf"
> [1] "torg= 1-1-1 00:00:0.0"
> [1] "Time origin: (year-month-day) 1 - 1 - 1"
> [1] "> > > > Detecting a '360-day' model year! < < < <"
> [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 1797 1797
> [1] "dim dat:"
> [1] 1797 37 144
> [1] 144 0 37 1 1797
> [1] 0.0 357.5
> Error in dat[i, , , ] <- t(matrix(data.e[, , , i], nx.e, ny, nz)) :
>  incorrect number of subscripts
> In addition: Warning messages:
> 1: In min(z.rng) : no non-missing arguments to min; returning Inf
> 2: In max(z.rng) : no non-missing arguments to max; returning -Inf
> ____________________________________________________________
>
> I am using the R Version 2.8.1 under Windows XP.
>
> Any help about the use of this function or an alternative will be
> appreciated.


Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: HMP-779532
Department: Support netCDF
Priority: Normal
Status: Closed