<div dir="ltr">Thanks Dave.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 16, 2021 at 5:00 PM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>NCL currently reads only OGR data types Integer, Integer64, Real, and String from shapefiles.  In particular, OGR types Date and DateTime are <b>not</b> supported.<br><br>You might be able to read that variable with the help of an external program, <a href="https://gdal.org/programs/ogrinfo.html" target="_blank">ogrinfo</a>.  It is part of <a href="https://gdal.org" target="_blank">GDAL</a>.  If you have it installed, then first test this on the unix command line.  The spaces inside the single quotes are important.<br></div><div><br></div><div>    ogrinfo -al -geom=NO <span style="color:rgb(0,0,0);font-family:arial,sans-serif">610temp_latest</span>.shp | grep ' <span style="color:rgb(0,0,0);font-family:arial,sans-serif">Fcst_Date</span> '</div><div dir="ltr"><br></div><div>If that works, then invoke it within NCL, and extract only the data values, like this:</div><div><br></div><div>    cmd = "ogrinfo -al -geom=NO <span style="color:rgb(0,0,0);font-family:arial,sans-serif">610temp_latest</span>.shp | grep ' <span style="color:rgb(0,0,0);font-family:arial,sans-serif">Fcs</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif">t_Date</span> '  | cut -f2 -d="</div><div>    fdate = str_strip (systemfunc (cmd))</div><div dir="ltr"><br></div><div>Test that command to ensure that it is reading fields in the same order as NCL.  If not, you might try using one of the <b>ogrinfo</b> query options, and looping over the field dimension.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 14, 2021 at 8:59 PM Andrew Kren - NOAA Federal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Has anyone found a possible workaround for reading a variable from a file (shapefile) in which the recognized type (none) is not known?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 31, 2021 at 12:50 PM Andrew Kren - NOAA Federal <<a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi there,<div><br></div><div>I am plotting shapefile data from a shapefile. Two of the variables that show up when doing an ncl_filedump have 'none' in front of the names, meaning that ncl does not know the type, be it string, float, integer, etc. When I tried to grab the variable, not surprisingly I got the error message,</div><div><font face="arial, sans-serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, sans-serif" color="#000000">fatal:Variable <Fcst_Date> in file <610temp_latest> does not have a recognized type: cannot get value</font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, sans-serif" color="#000000"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font face="arial, sans-serif" color="#000000">Is there a way to get around this and retrieve the variable? Or am I stuck? I tried to look online to see if others had this issue but was not able to find anything.</font></span></p><div><font face="arial, sans-serif" color="#000000" style="background-color:rgb(255,255,255)"><br></font></div><div><font face="arial, sans-serif" color="#000000" style="background-color:rgb(255,255,255)">Thanks,</font></div><font face="arial, sans-serif" color="#000000" style="background-color:rgb(255,255,255)">-- </font><br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre cols="72" style="white-space:pre-wrap;color:rgb(34,34,34);font-family:"arial black",sans-serif"><span style="font-family:arial,helvetica,sans-serif">Andrew Kren
Meteorologist 
NOAA's National Weather Service
Raleigh Forecast Office
1005 Capability Drive, Suite 300
Raleigh, North Carolina 27606
voice: 919-326-1035 
mailto: <a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a></span><span style="font-family:arial,helvetica,sans-serif">
</span><span style="color:rgb(17,85,204);font-family:arial,helvetica,sans-serif"><a href="http://www.weather.gov/rah" style="color:rgb(17,85,204)" target="_blank">http://www.weather.gov/rah</a></span></pre></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div></blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre cols="72" style="white-space:pre-wrap;color:rgb(34,34,34);font-family:"arial black",sans-serif"><span style="font-family:arial,helvetica,sans-serif">Andrew Kren
Meteorologist 
NOAA's National Weather Service
Raleigh Forecast Office
1005 Capability Drive, Suite 300
Raleigh, North Carolina 27606
voice: 919-326-1035 
mailto: <a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a></span><span style="font-family:arial,helvetica,sans-serif">
</span><a href="http://www.weather.gov/rah" style="color:rgb(17,85,204)" target="_blank"><span style="font-family:arial,helvetica,sans-serif">http://www.weather.gov/rah</span></a></pre></div><div dir="ltr"><img src="https://www.aoml.noaa.gov/pix/AOML/50th01.png" width="420" height="65"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>