[ncl-talk] Using merged shapefiles to create PRISM data subset

Toni Klemm toni-klemm at tamu.edu
Wed Dec 19 17:13:24 MST 2018


Hi Mary!

Do you mean if I left the individual counties in the shapefile as separate features, then NCL wouldn’t have trouble subsetting my data?

Thanks,
Toni


Toni Klemm, Ph.D.
Postdoctoral Research Associate
Department of Ecosystem Science and Management
College of Agriculture and Life Sciences
Texas A&M University, College Station, TX
Contributor to the Early Career Climate Forum <http://www.eccforum.org/>
www.toni-klemm.de <http://www.toni-klemm.de/> | @toniklemm <http://twitter.com/toniklemm>








> On Dec 19, 2018, at 5:06 PM, Mary Haley <haley at ucar.edu> wrote:
> 
> Hi Toni,
> 
> Your shapefile has just one feature and several segments for that feature.  Usually the shapefiles we see have several features and several segments for each feature. Your shapefile is a little unusual, but not unheard of.  Unfortunately, the examples we have all do the averaging across shapefile *features* and not shapefile *segments*.
> 
> This doesn't mean you can't do it with NCL.  See the attached plot, where I contoured some dummy 2D data over the area of interest and then generated a second plot where the values were averaged based on whether they fell inside one of these segments.  Is this what you are trying to accomplish?  If so, I'll clean up the code and send it to you.
> 
> --Mary
> 
> On Wed, Dec 19, 2018 at 1:26 PM Toni Klemm <toni-klemm at tamu.edu <mailto:toni-klemm at tamu.edu>> wrote:
> Hello All,
> 
> I am trying to use a shapefile of merged counties in the western Great Plains to create a spatial subset of temperature and precipitation data and calculate averages and totals for those counties as a whole. However, the data subset doesn't look anything like the shapefile (see the Panoply screenshot). I attached the shapefile as GIS files and screenshot. 
> 
> My guess is that NCL gets confused about the disconnected-yet-combined counties and doesn't know how to process a shapefile like that. Does anyone know what I can do to make this work? Can I manipulate the shapefile data in QGIS somehow so NCL understands it? Alternatively I could process each county by itself and then average the results. But there are over 100 counties, which would take a very long time. 
> 
> I appreciate any help!
> 
> Thank you very much,
> Toni
> 
> 
> Toni Klemm, Ph.D.
> Postdoctoral Research Associate
> Department of Ecosystem Science and Management
> College of Agriculture and Life Sciences
> Texas A&M University, College Station, TX
> Contributor to the Early Career Climate Forum <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=S4Vpn9B9dGEDj8PfFUyL3ZZyY6XSazVZ50UULc2pwEU&s=_wmxrfPQsMF3vojIFKRAtdhltlvptw6M4HZ9fLg_3cQ&e=>
> www.toni-klemm.de <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=S4Vpn9B9dGEDj8PfFUyL3ZZyY6XSazVZ50UULc2pwEU&s=BUcEg1gjQSTNzMQTj8-c30-A9wVn4XtHJXwJ98GJFdc&e=> | @toniklemm <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_toniklemm&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=S4Vpn9B9dGEDj8PfFUyL3ZZyY6XSazVZ50UULc2pwEU&s=4uj7i-TM4DYGnhfVvqE6_pSkQa5N6ZthvK0BCZWNzK8&e=>
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=WsLJ5ywbW3XnTzqo_ETV62H6s1a5bcGgnrpl7xPRfic&m=S4Vpn9B9dGEDj8PfFUyL3ZZyY6XSazVZ50UULc2pwEU&s=PmMsnjl-ihptp2YXVfcxUt782zRG1XbIMrqgS8bUQZg&e=>
> <shapefile.000002.png>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181219/bdcee838/attachment.html>


More information about the ncl-talk mailing list