[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-geo
Subject:    Re: [R-sig-Geo] ncdf file with non-equally spaced grid
From:       "Matt Oliver" <moliver () udel ! edu>
Date:       2008-07-31 21:31:49
Message-ID: 6d4aad460807311431g777882f7lccb58849a6582ea4 () mail ! gmail ! com
[Download RAW message or body]

Sorry, dlat is what changes

an example file can be found at

http://www.ocean.udel.edu/CMS/moliver/20071003.276.0237.n17.nc

use

require(ncdf)

f <- open.ncdf("20071003.276.0237.n17.nc"<http://www.ocean.udel.edu/CMS/moliver/20071003.276.0237.n17.nc>
)

lon <- get.var.ncdf(f, "lon")

lat <- get.var.ncdf(f, "lat")



Thanks in advance

Matt






On Thu, Jul 31, 2008 at 5:03 PM, Michael Sumner <mdsumner@utas.edu.au>wrote:

> You can use gdalwarp in FWTools to re-grid the data with control points
> (perhaps with with some effort), but as you say that will interpolate to a
> regular grid.
>
> Is it definitely dlon that increases? Can you post a link to an example
> file?
>
> Some netCDF files I've seen are actually using Mercator, but store the
> pixel coordinates as lon/lat.
>
> There are totally irregular grids as well though, so as a raster you would
> have to resample it in some way. Otherwise you can interpret the data as a
> SpatialPointsDataFrame and use it as you would in Matlab. Note that the
> image() function will handle irregular (but xy locked) grid spacings, so you
> can jig a function to plot these things as an image pretty easily.
>
> Cheers, Mike.
>
>
> Matt Oliver wrote:
>
>> Hi All, I have CF compliant ncdf files of sea surface temperature. The
>> lon,
>> lat grid is known but not equally spaced (ie dlon increases). Is there a
>> clean way to get this matrix ported over to a geo-tiff or some other file
>> that Arc will read? I have talked with some arc users that tell me that
>> the
>> grid needs to be equally spaced. I guess I could interpolate to an equally
>> spaced grid, but I would rather preserve the original grid if possible.
>>
>> Thanks in advance
>>
>> Matt
>>
>>
>>
>>
>
>


-- 
Matthew J. Oliver
Assistant Professor
College of Marine and Earth Studies
University of Delaware
700 Pilottown Rd.
Lewes, DE, 19958
302-645-4079
http://www.ocean.udel.edu/people/profile.aspx?moliver

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic