Skip to content
Prev 24071 / 29559 Next

adapting spatial points and wrld_smpl to a reference system implicit in a .nc file

On Tue, 23 Feb 2016, Agus Camacho wrote:

            
Thanks for the link. The proj4 string is missing +units=km (the spherical 
axes are certainly not in metres), but is wrong anyway.

This says:
Error in .local(.Object, ...) :
   No UNIDATA NC_GLOBAL:Conventions attribute

The values of the coordinate variables are:

library(ncdf4)
r <- nc_open("results_us_future_output_none_0.nc")
pts <- cbind(c(ncvar_get(r, "lon")), c(ncvar_get(r, "lat")))
V1                V2
  Min.   :-151.30   Min.   :12.36
  1st Qu.:-120.44   1st Qu.:25.45
  Median :-100.00   Median :35.72
  Mean   :-100.00   Mean   :35.71
  3rd Qu.: -79.56   3rd Qu.:45.91
  Max.   : -48.70   Max.   :58.33

which are obviously not a grid:

pts1 <- SpatialPoints(pts)
plot(pts1)
# gridded(pts1) <- TRUE fails miserably

This is definitely not lcc, irrespective of what the originator says.

Mike - any forensics?

Roger

  
    

Thread (18 messages)

Alex Mandel adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 22 Roger Bivand adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Michael Sumner adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Roger Bivand adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Dominik Schneider adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Chris Reudenbach adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Chris Reudenbach adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Michael Sumner adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Dominik Schneider adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Agus Camacho adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 23 Chris Reudenbach adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 24 Jonathan Greenberg adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 26 Jonathan Greenberg adapting spatial points and wrld_smpl to a reference system implicit in a .nc file Feb 26