<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ali,<div class=""><br class=""></div><div class="">I had this problem before. Since you extracted lat and lon data from ASCII, it might be that your data doesn’t have metadata information attached that tells NCL what it is (i.e., latitudes and longitudes). Without that it is just a bunch of numbers for NCL. You can add this metadata by adding this to your code after you extract your latitude and longitude variables:</div><div class=""><br class=""></div><div class=""><div class=""> latitude!0 = "lat"</div><div class=""> latitude&lat = lat</div><div class=""> latitude@long_name = "latitude"</div><div class=""> latitude@units = "degrees_north"</div><div class=""><br class=""></div><div class=""> longitude!0 = "lon"</div><div class=""> longitude&lon = lon</div><div class=""> longitude@long_name = "longitude"</div><div class=""> longitude@units = "degrees_east"</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class="">Toni</div><div class=""><br class=""></div><div class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><b class="">Toni Klemm, Ph.D.<br class=""></b>Postdoctoral Research Associate</font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Department of Ecosystem Science and Management</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">College of Agriculture and Life Sciences</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Texas A&M University, College Station, TX</div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class="">Contributor to the <a href="http://www.eccforum.org" class="">Early Career Climate Forum</a><br class=""><a href="http://www.toni-klemm.de" class="">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" class="">@toniklemm</a></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div><div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri" class=""><br class=""></font></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Apr 4, 2019, at 2:00 AM, MM Ali <<a href="mailto:mmali110@gmail.com" class="">mmali110@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I modified the ce_3.ncl code to read the ascii data. Data and the modified ncl code are attached. The variables in the data are dummy, latitude, longitude, variable, dummy2. I get the following errors</div><div class=""><br class=""></div><div class=""><font face="verdana, sans-serif" class="">(0) check_for_y_lat_coord: Warning: Data either does not contain</font></div><div class=""><font face="verdana, sans-serif" class="">(0) a valid latitude coordinate array or doesn't contain one at all.</font></div><div class=""><font face="verdana, sans-serif" class="">(0) A valid latitude coordinate array should have a 'units'</font></div><div class=""><font face="verdana, sans-serif" class="">(0) attribute equal to one of the following values:</font></div><div class=""><font face="verdana, sans-serif" class="">(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'</font></div><div class=""><font face="verdana, sans-serif" class="">(0) check_for_lon_coord: Warning: Data either does not contain</font></div><div class=""><font face="verdana, sans-serif" class="">(0) a valid longitude coordinate array or doesn't contain one at all.</font></div><div class=""><font face="verdana, sans-serif" class="">(0) A valid longitude coordinate array should have a 'units'</font></div><div class=""><font face="verdana, sans-serif" class="">(0) attribute equal to one of the following values:</font></div><div class=""><font face="verdana, sans-serif" class="">(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'</font></div><div class=""><font face="verdana, sans-serif" class="">(0) Error: scalar_field: If the input data is 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of the same length.</font></div><div class=""><span class="gmail_default"><font face="verdana, sans-serif" class="">warning:create: Bad HLU id passed to create, ignoring it </font></span></div><div class=""><font face="verdana, sans-serif" class=""><br class=""></font></div><div class=""><font face="verdana, sans-serif" class=""><span class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Please help. It would be great if the necessary corrections are made to the code (I am just a few days old for NCL, though 66+ years old!)</span></font></div><div class=""><font face="verdana, sans-serif" class=""><span class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Thanks</span></font></div><div class=""><font face="verdana, sans-serif" class=""><span class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Ali</span><br class=""></font><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><b class="">Dr. MM Ali</b></div><div dir="ltr" class="">Formerly:<br class=""></div><div dir="ltr" class=""><div class="">Scientist G & Group Director</div><div class="">NRSC/ISRO</div><div class="">email: <a href="mailto:mmali110@gmail.com" target="_blank" class="">mmali110@gmail.com</a></div><div class=""> <a href="mailto:mmali@coaps.fsu.edu" target="_blank" class="">mmali@coaps.fsu.edu</a></div><div class="">Mob: +91 9949045110</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<span id="cid:f_ju2agrrz1"><may.txt></span><span id="cid:f_ju2agkpi0"><ce3.ncl></span>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>