<div dir="ltr"><div><div><div>'For convenience', primarily graphical convenience, NCL allows multidimensional attributes to be associated with variables. However, the underlying netCDF software precludes writing multi-dimensional attributes. Multidimensional attributes are written as 1D.<br><br></div><div>As a side point: netCDF and NCL do not allow cascading attributes: attributes can not have attributes. <br></div><div><br></div><div>See:<br><a href="http://www.unidata.ucar.edu/software/netcdf/netcdf/Differences-between-Attributes-and-Variables.html">http://www.unidata.ucar.edu/software/netcdf/netcdf/Differences-between-Attributes-and-Variables.html</a><br></div><div><br></div>---<br></div>Again, 'for convenience', NCL high level graphical interfaces are aware of specific multi-dimensional attributes (eg: 'lat2d', 'lon2d' ). However, if variables X, Y, Z each has associated with it the lat2d, lon2d attributes for graphical reasons and, subsequently, each variable is written to a netCDF file, the file will have these attributes written for each variable. If the lat2d & lon2d arrays are large, this could have a significant impact on file size.<br><br></div><div>IMHO: when writing netCDF<br><br></div><div>[1] <br>Write the lat2d, lon2d as separate variables. Any name: LAT, LON, LAT2D, LON2D, XLAT, XLONG,.....).<br><br></div><div>[2] <br>Not required, but recommended, associate with each variable being written a 'coordinates' attribute specifying the variables containing coordinates (separated by spaces), say<br><br></div><div> X@coordinates = "XLONG XLAT"<br></div><div> Y@coordinates = "XLONG XLAT"</div><div><br></div><div>[3] <br>Delete the 'lat2d' and 'lon2d' attributes *PRIOR* to writing the variables to the file<br></div><div> delete([/ X@lat2d, X@lon2d, ....., Z@lat2d, Z@lon2d /])<br></div><div><br></div><div>D<br></div><div><br><br></div><div><br></div><br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 1, 2017 at 10:03 AM, Alan Brammer <span dir="ltr"><<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">There’s something weird going on with how ncl interprets the lat2d and lon2d attributes. <div><br></div><div>If you redefine the attributes in the script as you had commented out.</div><div>e.g.</div><div><div>l_obs@lat2d := xlat(0,:,:) ; this is for plotting</div><div>l_obs@lon2d := xlon(0,:,:) ; using gsn_csm routines</div><div><br></div><div>When they get written to netcdf they are converted to actual 1d arrays. While they’re in the script they are in a weird world of being a fake 2d array. </div><div><br></div><div>I’m surprised that NCL doesn’t handle a 1d array and unwrap it accordingly though. </div><div><br></div><div><br></div><div>Good luck.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><blockquote type="cite"><span class=""><div>On 1 Feb 2017, at 11:17, Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:</div><br class="m_7780780363244979642Apple-interchange-newline"></span><div><div dir="ltr"><span class="">I hope someone might have a suggestion. Thank you.<br></span><div class="gmail_quote"><span class="">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Barry Lynn</b> <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>></span><br>Date: Sun, Jan 29, 2017 at 2:36 PM<br>Subject: Another dimensions problem<br>To: ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br><br><br></span><div dir="ltr"><span class="">Hi:<div><br></div><div>I cannot succeed to map a variable from the <a href="http://wrfinput_d02.nc/" target="_blank">wrfinput_d02.nc</a> file.</div><div><br></div><div>I get a dimension problem (different dimensions, different sizes).</div><div><br></div><div>This problem seems to happen often and using (/var/) didn't solve it.</div><div><br></div><div>Thank you,</div><div><br></div></span><div>Barry<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B3E3GjUeKpBdUXBVdk5VeW95WUk/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">wrfinput_d02.nc</span></a></div><br clear="all"><div><br></div><div><div class="h5">-- <br><div class="m_7780780363244979642m_4643836788590333745gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com/" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div></div></div></div>
</div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><div class="m_7780780363244979642gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com/" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div></div></div>
<span id="m_7780780363244979642cid:62CC2542-3233-428D-9D07-0E836CD5EC44@eas.albany.edu"><l_obs_map.ncl></span><span id="m_7780780363244979642cid:34E316B6-FC0A-4376-8E9E-576928489E6D@eas.albany.edu"><map_output.<wbr>file></span>_________________________<wbr>______________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>