Re: Fwd: shapefile/NCL help

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 03 2013 - 13:47:38 MDT

Hi Jennifer,

From the docs, I believe you pass in the filename (i.e, a string) of the shapefile as argument 2 for gsn_add_shapefile_polygons(), rather than a file-variable.

As for map projections and coordinate systems, it does indeed matter although I'm not sure I can characterize how (its a bit of a mystery to me :-/ Check out the Map Projections page:

http://www.ncl.ucar.edu/Document/Graphics/map_projections.shtml

In any case, the GDAL tool can come in handy (gdal.org) as you deal with shapefiles of differing projections. In particular, "gdalwarp" can readily convert from one projection to another.

Hope that helps…
Rick

I'm not certain about the
On Apr 3, 2013, at 10:52 AM, Jennifer McCabe <jennifer.mccabe@maine.edu> wrote:

>
> I'm a graduate student at the University of Maine. I'm currently taking a NCL scripting class and am really new to NCL coding. For a portion of my dissertation I need to plot shapefiles using NCL. We just updated to version 6.1.2 and I've been trying to plot using gsn_add_shapefile_polygons but keep getting an error message "Argument type mismatch on argument (2) of (gsn_add_shapefile_polygons) can not coerce". This is a really simple shapefile of US state boundaries and I only want to plot the outlines but haven't had any luck. I've attached the script for your convince. The shapefile, even compressed would not send. I tried to upload it to the ftp site following the directions provided but couldn't. I downloaded it from the national atlas. http://www.nationalatlas.gov/atlasftp.html?openChapters=chpbound#chpbound
>
> I'm also wondering how the geographic coordinate system and datums work in NCL. The shapefile has a projected coordinate system of North American Lambert con but a geographic coordinated system and datum of NA 1983 datum. Does the original coordinate systems matter when adding them in NCL? There is a bunch of code at the bottom of the script that I commented out. The commented out code was another attempt to add the shapefile. I realize I could do this using ncl and not a shapefile but I am starting easy because the other shapefiles I will be plotting are more complex so I thought I would try something easy first!
> Thank you for your time!
> Jenny
>
> --
> Jennifer McCabe
> PhD Student, Ecology and Environmental Science
> 204 Roger Clapp Greenhouse, UMaine
> Orono, ME 04469
> p:307-413-5512
> jennifer.mccabe@maine.edu
>
>
>
>
>
> --
> Jennifer McCabe
> PhD Student, Ecology and Environmental Science
> 204 Roger Clapp Greenhouse, UMaine
> Orono, ME 04469
> p:307-413-5512
> jennifer.mccabe@maine.edu
>
> <project2.ncl>_______________________________________________
> 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 Wed Apr 3 13:47:48 2013

This archive was generated by hypermail 2.1.8 : Thu Apr 04 2013 - 21:06:41 MDT