[ncl-talk] Using merged shapefiles to create PRISM data subset
Toni Klemm
toni-klemm at tamu.edu
Wed Dec 19 23:28:56 MST 2018
Hi Mary,
Thank you very much! Your result is almost exactly what I’m trying to get. What I need is the average temperature / annual precipitation for all the counties together, not separate for each county or shapefile feature. I just tried it again with a shapefile in which each county is a separate feature, but unfortunately I got pretty much the same result as before. I attached the shapefiles (there are two sets, for counties with the center point east and west of the 100th meridian). I also attached a screenshot of the data result in Panoply and my NCL code.
I would greatly appreciate if you could take a look at the shapefile data and change it so it works correctly in NCL.
Thanks again,
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://www.eccforum.org/>
www.toni-klemm.de <http://www.toni-klemm.de/> | @toniklemm <https://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/20181220/0ccfcb99/attachment-0015.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2018-12-20 at 12.25.32 AM.png
Type: image/png
Size: 201288 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0001.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0016.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.cpg
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0013.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0017.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.dbf
Type: application/octet-stream
Size: 359054 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0014.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0018.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.prj
Type: application/octet-stream
Size: 143 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0015.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0019.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.qpj
Type: application/octet-stream
Size: 257 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0016.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0020.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.shp
Type: application/octet-stream
Size: 371220 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0017.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0021.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_east.shx
Type: application/octet-stream
Size: 1788 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0018.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0022.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.cpg
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0019.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0023.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.dbf
Type: application/octet-stream
Size: 172604 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0020.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0024.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.prj
Type: application/octet-stream
Size: 143 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0021.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0025.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.qpj
Type: application/octet-stream
Size: 257 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0022.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0026.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.shp
Type: application/octet-stream
Size: 281696 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0023.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0027.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8x_west.shx
Type: application/octet-stream
Size: 908 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0024.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0028.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subset_PRISM_SHP_E-W_annually.ncl
Type: application/octet-stream
Size: 10655 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0025.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181220/0ccfcb99/attachment-0029.html>
More information about the ncl-talk
mailing list