Can someone help me out with a "small" problem? I've started using netcdf files recently, and I want to extract the grid id and also the coordinates from a HIRHAM netcdf file. I know how to extract a slice of dataset both in space and in time and I also know the area that this file should cover, however I have no idea regarding the reference for both LAT/LON and RLAT/RLON. I tried already tried is ArcGIS to give the Lambert Conformal Conic projection as the spatial reference, by default arcgis gets the rlat and rlon for coordinates. however the resulting raster is displaced from were it should be. Can someone help me with this? Thanks A.R. [[alternative HTML version deleted]]
On Jul 29, 2011, at 10:44 AM, Ana wrote:> Can someone help me out with a "small" problem? > > I've started using netcdf files recently, and I want to extract the > grid id > and also the coordinates from a HIRHAM netcdf file. > I know how to extract a slice of dataset both in space and in time > and I > also know the area that this file should cover, however I have no idea > regarding the reference for both LAT/LON and RLAT/RLON. > > I tried already tried is ArcGIS to give the Lambert Conformal Conic > projection as the spatial reference, by default arcgis gets the rlat > and > rlon for coordinates. however the resulting raster is displaced from > were it > should be.You will get a more rapid and knowledgeable response to such questions if you pose them in the geospatial SIG mailing list.> > [[alternative HTML version deleted]]They and we would appreciate it if you set your mailer to plain text. -- David Winsemius, MD West Hartford, CT
I am not familiar with the HIRHAM netcdf files. Do you have the netcdf library installed and can you print the output of the "ncdump -h" command on one of the files? -Roy On Jul 29, 2011, at 7:44 AM, Ana wrote:> Can someone help me out with a "small" problem? > > I've started using netcdf files recently, and I want to extract the grid id > and also the coordinates from a HIRHAM netcdf file. > I know how to extract a slice of dataset both in space and in time and I > also know the area that this file should cover, however I have no idea > regarding the reference for both LAT/LON and RLAT/RLON. > > I tried already tried is ArcGIS to give the Lambert Conformal Conic > projection as the spatial reference, by default arcgis gets the rlat and > rlon for coordinates. however the resulting raster is displaced from were it > should be. > > Can someone help me with this? > > Thanks > > A.R. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected"
This problem may be more related to netcdf files than to R....And the answer to your question very much depends on which netcdf convention the AWI folks who created your data followed. Additionally it depends on the Software you use to read these ncdf files. Regarding the grid locations there it usually helps to have a look at all the attributes in the file. Additionally there may be variables called longitude/long or similar that give you the exact grid locations. Not sure whether this helped, but you may need to be more specific regarding the files you are using. Perhaps posting the result of: ncdump -h <filename> would help us to understand what kind of data you use. Jannis On 07/29/2011 04:44 PM, Ana wrote:> Can someone help me out with a "small" problem? > > I've started using netcdf files recently, and I want to extract the grid id > and also the coordinates from a HIRHAM netcdf file. > I know how to extract a slice of dataset both in space and in time and I > also know the area that this file should cover, however I have no idea > regarding the reference for both LAT/LON and RLAT/RLON. > > I tried already tried is ArcGIS to give the Lambert Conformal Conic > projection as the spatial reference, by default arcgis gets the rlat and > rlon for coordinates. however the resulting raster is displaced from were it > should be. > > Can someone help me with this? > > Thanks > > A.R. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
On Fri, Jul 29, 2011 at 7:44 AM, Ana <rrasterr@gmail.com> wrote:> Can someone help me out with a "small" problem? > > I've started using netcdf files recently, and I want to extract the grid id > and also the coordinates from a HIRHAM netcdf file. > I know how to extract a slice of dataset both in space and in time and I > also know the area that this file should cover, however I have no idea > regarding the reference for both LAT/LON and RLAT/RLON. > > I tried already tried is ArcGIS to give the Lambert Conformal Conic > projection as the spatial reference, by default arcgis gets the rlat and > rlon for coordinates. however the resulting raster is displaced from were > it > should be. > > Can someone help me with this? >Hello, I can't tell if you're asking: * How to tell what information is in your netcdf file, * How to get the data you need out of your netcdf file, * How to interpret the data you are getting from the netcdf file. Perhaps you could be a bit clearer? As a suggestion, try "ncdump -h <filename.nc>" and look to see what information is in your file. Is it what you expected & need? Regards, --Dave -- David W. Pierce Division of Climate, Atmospheric Science, and Physical Oceanography Scripps Institution of Oceanography (858) 534-8276 (voice) / (858) 534-8561 (fax) dpierce@ucsd.edu [[alternative HTML version deleted]]
> > > The rlat and rlon variables are the grid coordinate system, which > appears to be some non-standard conical projection. Climate > scientists! >Actually this file, as it contents state, follow the CF convention, which is widely used in climate science, oceanography and atmospheric science (see http://cf-pcmdi.llnl.gov/documents/cf-conventions). The particular projection used is one of the ones specified in the standard. By following this convention, there exists a host of software that can immediately understand the contents of the file. -Roy ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected"