<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=""><div class="">Possibly 2 things:</div><div class=""><br class=""></div><div class="">1. </div><div class="">Would help to see the printVarSummary(sst) outputs, but I think you might be missing the actual coordinate values.  You named the dimension and set the units, but that doesn’t set the values. </div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class="">sst!1 = "longitude"<br class="">sst!2 = “latitude”</div></div></blockquote>sst&latitude   = f->Latitude        ;; assuming there is a variable in the file <br class="">sst&longitude = f->Longitude<br class=""><blockquote type="cite" class=""><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;"><div class="">sst&latitude@units = "degrees_north"<br class="">sst&longitude@units =“degrees_east"</div></div></blockquote><div class=""><br class=""></div><div class="">When you printVarSummary(sst) you want to see values in the “Coordinates:” section of the output (highlighted below).</div><div class=""><br class=""></div><div class=""><div class="">Variable: example</div><div class="">...</div><div class="">Number of Dimensions: 2</div><div class="">Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">   </span>[lat | 10] x [lon | 10]</div><div class="">Coordinates:</div><div class=""><b class="">            lat: [ 0.. 9]</b></div><div class=""><b class="">            lon: [ 0.. 9]</b></div><div class="">Number Of Attributes: 1</div><div class="">  _FillValue :<span class="Apple-tab-span" style="white-space:pre">   </span>9.96921e+36</div></div><div class=""><br class=""></div><div class="">If this doesn’t work, include the printVarSummary(sst) outputs you’re getting. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">2. </div><div class="">Would also help to see the line that actually gives you the error. </div><div class="">From gsn_csm_contour_map() "<span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.333333015441895px;" class="">If</span><span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.333333015441895px;" class=""> </span><em style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.333333015441895px; margin: 0px; padding: 0px;" class="">data</em><span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.333333015441895px;" class=""> </span><span style="color: rgb(51, 51, 51); font-family: verdana, sans-serif; font-size: 13.333333015441895px;" class="">is two-dimensional, then the leftmost dimension is represented on the Y (latitude) axis, and the rightmost dimension on the X (longitude) axis."</span></div><div class=""><br class=""></div><div class="">Currently your data is not ordered in this manner, so a simple way to plot it would be :</div><div class="">time_index = 0</div><div class=""> plot = gsn_csm_contour_map(wks, sst( Time | time_index, latitude | :, longitude | : ), res)</div><div class=""><br class=""></div><div class="">See the reference manual here: <a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#NamedSubscripting" class="">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#NamedSubscripting</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Good luck, </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Alan</div><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 19 Dec 2017, at 09:26, Sourav Chatterjee via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: 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-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">My original variable is as below:</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">    float SLA(Time, Longitude, Latitude) ;<br class="">        SLA:_FillValue = 9.96921e+36f ;<br class="">        SLA:scale_factor = 1.f ;<br class="">        SLA:coordinates = "Sea Level Anomaly Estimate" ;<br class="">        SLA:add_offset = 0.f ;<br class="">        SLA:long_name = "Sea Level Anomaly Estimate" ;<br class="">        SLA:standard_name = "Sea Level Anomaly Estimate" ;<br class="">        SLA:units = "m" ;<br class=""><br class=""></div>As the lat lon dimensions has no units I was not getting the plot properly.<span class="Apple-converted-space"> </span><br class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I tried this:</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">sst = f->SLA<br class="">printVarSummary(sst)<br class=""><br class="">sst!1 = "longitude"<br class="">sst!2 = "latitude"<br class=""><br class="">sst&latitude@units = "degrees_north"<br class="">sst&longitude@units ="degrees_east"<br class=""><br class="">printVarSummary(sst)</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">But still getting the error,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class=""><br class="">(0)    check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br class="">(0)    A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:<span class="Apple-converted-space"> </span><br class=""><br class=""></div>Why is the units attribute is not getting assigned?<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Sourav<br class=""></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ncl-talk mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:ncl-talk@ucar.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">ncl-talk@ucar.edu</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">List instructions, subscriber options, unsubscribe:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div></blockquote></div><br class=""></div></body></html>