Re: ncl_convert2nc with ESRI shapefiles?

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 16 2010 - 14:21:24 MST

Hi,

Shapefiles are indeed generally supported, but such support is
optional to the build (alas, there's no easy way to tell which options
have been enabled -- something that is on our TODO list). Are you
using pre-built binaries (which platform?), or a custom build from
sources?

I'd be interested in seeing the result you get if you use ncl itself
to try to open the shapefile; e.g., cd to the directory where your
shapefile(s) reside, and running NCL interactively, enter something
like:

        f=addfile("./FAF_2005_Jan_day_upmw_diesel.shp","r")

Rick

On Nov 16, 2010, at 1:10 PM, Erica Bickford wrote:

> HI There,
>
> I'm attempting to use ncl_convert2nc to convert some ESRI shapefiles
> (.shp) to netcdfs, however I get the following error saying .shp is
> not supported:
>
> fatal:An internal error has occurred. The file format requested does
> not appear to be supported, could not open (./
> FAF_2005_Jan_day_upmw_diesel.shp)
> fatal:_NclIGetFileVarNames: file does not exist
> fatal:Execute: Error occurred at or near line 227 in file /tmp/
> tmp85899.ncl
>
> Yet, from what I can glean from the ncl_talk archives and release
> notes, shapefiles should be supported as of version 5.2.0--which is
> the version I'm using.
>
> Does anyone have an explanation or solution for this? Is there a
> way to convert a .shp to .grb for use with ncl_convert2nc?
>
> I've already been through this with ArcGIS--which *should* convert
> tables to netcdf, but doesn't work in practice.... I've read that
> gdal is a good/the only way to convert between these file types, but
> it'd be great not to have to install and learn another software
> package....
>
> Thanks,
>
> Erica
> UW-Madison
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 16 14:21:36 2010

This archive was generated by hypermail 2.1.8 : Wed Nov 17 2010 - 13:14:26 MST