<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1447356695731_2846">Dear Mary,</div><div id="yui_3_16_0_1_1447356695731_2925"><br></div><div id="yui_3_16_0_1_1447356695731_2879">Thanks so much!!! Your answer is always very helpful.</div><div id="yui_3_16_0_1_1447356695731_2922"><br></div><div id="yui_3_16_0_1_1447356695731_2923">With my best regards,</div><div id="yui_3_16_0_1_1447356695731_2924">Mark<br></div><div id="yui_3_16_0_1_1447356695731_2841"><span></span></div> <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, November 11, 2015 5:30 PM, Mary Haley <haley@ucar.edu> wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv1001217707"><div><div dir="ltr"><div class="yiv1001217707gmail_default" style="font-size:small;">Mark,</div><div class="yiv1001217707gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv1001217707gmail_default" style="font-size:small;">Just FYI: your message ended up in my spam box, and I imagine it might have ended up in other people's spam box as well. I've noticed that <a rel="nofollow" shape="rect" target="_blank" href="http://yahoo.com/">yahoo.com</a> addresses frequently get marked as "spam" by gmail.</div><div class="yiv1001217707gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv1001217707gmail_default" style="font-size:small;">Anyway, there's not really enough information here to answer your question. I'm not sure what you mean by "standard" netcdf data. Is this data rectilinear (1D lat/lon coordinate variables) or curvilinear (2D lat/lon) arrays or unstructured (1D data/lat/lon or something like a triangular mesh)?</div><div class="yiv1001217707gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv1001217707gmail_default" style="font-size:small;">If the data is rectilinear, then you can grab the points you want using the special { and } syntax:</div><div class="yiv1001217707gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv1001217707gmail_default" style=""><div class="yiv1001217707gmail_default" style="">;---Open data file with coordinate arrays "lat" and "lon"</div><div class="yiv1001217707gmail_default" style="">f = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/<a rel="nofollow" shape="rect" target="_blank" href="http://uv300.nc/">uv300.nc</a>","r")</div><div class="yiv1001217707gmail_default" style="">lon_points = (/-25,10,0,-100,50/)</div><div class="yiv1001217707gmail_default" style="">lat_points = (/-70,0,70/)</div><div class="yiv1001217707gmail_default" style="">lon_subset = f->lon({lon_points})</div><div class="yiv1001217707gmail_default" style="">lat_subset = f->lat({lat_points})</div><div class="yiv1001217707gmail_default" style=""><br clear="none"></div><div class="yiv1001217707gmail_default" style="">print("requested lat value = " + lat_points + \</div><div class="yiv1001217707gmail_default" style=""> ", closest lat value = " + lat_subset)</div><div class="yiv1001217707gmail_default" style="">print("requested lon value = " + lon_points + \</div><div class="yiv1001217707gmail_default" style=""> ", closest lon value = " + lon_subset)</div></div><div class="yiv1001217707gmail_default" style=""><div class="yiv1001217707gmail_default" style=""><div class="yiv1001217707gmail_default"><br clear="none"></div><div class="yiv1001217707gmail_default">Note that the values returned are the closest values that are *less than* (not interpolated values) to the points you specified.</div><div class="yiv1001217707gmail_default"><br clear="none"></div><div class="yiv1001217707gmail_default">If you have 2D lat/lon arrays, then you can use the getind_latlon2d function:</div><div class="yiv1001217707gmail_default"><br clear="none"></div><div class="yiv1001217707gmail_default"><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml</a><br clear="none"></div><div class="yiv1001217707gmail_default"><br clear="none"></div><div class="yiv1001217707gmail_default">There's a good example on that page of how to use this function.</div><div class="yiv1001217707gmail_default"><br clear="none"></div><div class="yiv1001217707gmail_default">--Mary</div><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd23858"><div><br clear="none"></div></div></div></div><div class="yiv1001217707gmail_extra"><div class="yiv1001217707gmail_quote"><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd89546"><div> </div></div><blockquote class="yiv1001217707gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;"><div><div style="color:rgb(0,0,0);font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;font-size:16px;background-color:rgb(255,255,255);"><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd44306"><div></div><div>Thanks very much in advance!</div><span class="yiv1001217707"><font color="#888888"></font></span></div><div><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd57667">Mark</div><br clear="none"></div></div></div><br clear="none">_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd10147"><br clear="none">
<br clear="none"></div></blockquote></div><div class="yiv1001217707yqt6354155771" id="yiv1001217707yqtfd01373"><br clear="none"></div></div></div></div></div><br><br></div> </div> </div> </div></div></body></html>