suppressMessages(library( fields))



#  colorado climate data 
  data(COmonthlyMet)
 
  x<- CO.loc
  y<- CO.tmin.MAM.climate
  elev<- CO.elev
  good<- !is.na( y)
  x<- x[good,]
  y<- y[good]
  elev<- elev[good]
 
    NGRID <- 50 
 # get elevations on a grid (will use these later) 
   COGrid<- fields.x.to.grid( x, nx=NGRID, ny=NGRID)
   COGridPoints<- make.surface.grid( COGrid)
   data( RMelevation)
   COElevGrid<- interp.surface( RMelevation, COGridPoints )
  
 
  
# take a look at the data
  quilt.plot( x, y) 
  US( add=TRUE)

  plot( elev, y)

  plot( x[,2], y)