<div dir="ltr"><div>As noted, your ncl talk questions are being 'stopped' somewhere. NCL has legendary support. More so than othere tools.</div><div><br></div><div><span>  diri="/home/zmumba/CORDEX/CDO_Out/"<br>  filename = "<a>month01.nc</a>"<br>  f = addfile(diri+filename,"r")<br><br>  p = f->pr            ; keep meta data<br></span></div><div><span>  pr = pr*86400    ; alter values<br></span></div><div><span>  pr@units = "..."  ; change to reflect ne values</span></div><div><span>  <br></span></div><div><span>  printVarSummary(pr)</span></div><div><span>  printMinMax(pr, 0)<br></span></div><div><span><br>  lat2d    = f->lat             ; (y,x)<br>  lon2d    = f->lon             ; (y,x)<br></span><span></span><div><br></div><div>; Lines below added to effect masking</div><div><br></div><div>;; NO!!!   NO!!!  NO!!!  NOT FOR 2D lat/lon<br></div><span>;;p!0   = "lat2d" ; No error message at this and following line.<br>;;p!1   = "lon2d"</span><span></span></div><div><br><span></span></div><div><span>;;;NO!  By netCDF rule coordinate arrays [<b>&</b> syntax] must be <b>1-dimensional</b></span></div><div><span><br></span></div><div><span>;; The following are not legal<br></span></div><div><span>;  p&lat2d = lat2d ; fatal:No coordinate variable exists for dimension (lat2d) in variable (p).<br> ; p&lat2d = lat ; fatal:Variable (lat) is undefined.<br><br></span></div><div><span>The are several reserved *attributes* recognized bt NCL for graphics pirposes<br></span></div><div><span>Note the <b>@</b> syntax<br></span></div><div><span><br></span></div><div><span>  p<b>@</b>lat2d = lat2d<br></span></div><div><span>  p<b>@</b>lon2d = lon2d<br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019 at 9:31 AM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu">brownrig@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"><div>HI Zilore,</div><div><br></div><div>For whatever reason, your posts to this group often end up in our spam boxes; its not just you but others whose mail originates from a <a href="http://yahoo.com" target="_blank">yahoo.com</a> address. I will inquire as to why that's the case, but I don't administer the listservs. <br></div><div><br></div><div>As to your specific question, off hand your script looks right in terms of creating/attaching a coordinate variable. Are you able to send me your data file (you can send it directly to me)?</div><div><br></div><div>Rick<br></div><div>  <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019 at 1:11 AM zilore mumba <<a href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</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><div class="gmail-m_-8902954614953475504gmail-m_-7252966673325487683yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div><div><span>Hello,</span></div><div><span>Though I rarely get assistance on this forum (which may be a signal that my posts are either unreasonable or unclear or both), I will still request for assistance.</span></div><div><span>I have data on a curvilinear grid. I am able to display my data ok. However I would like to mask out data outside my area of interest. For the masking to work (mask_.4.ncl) I think I need to attach coordinates to my variable, otherwise I get a blank plot.</span></div><div><span>Part if my script is given below, and it works up to the line "<span><span>lon2d    = f->lon" for th</span></span>e case of no masking.</span></div><div><span><br></span></div><div><span>I have been fidgeting with the lines that follow the above line, to effect the masking. The errors I get are indicated against the trials I made.</span></div><div><span>Assistance will be appreciated.<br></span></div><div><span><br></span></div><div><span>begin</span></div><div><span></span><br></div><span>  diri="/home/zmumba/CORDEX/CDO_Out/"<br>  filename = "<a>month01.nc</a>"<br>  f = addfile(diri+filename,"r")<br><br>  p = f->pr*86400<br><br>  lat2d    = f->lat             ; (y,x)<br>  lon2d    = f->lon             ; (y,x)<br></span><span></span><div><br></div><div>; Lines below added to effect masking<br></div><span>  p!0   = "lat2d" ; No error message at this and following line.<br>  p!1   = "lon2d"<br></span><span><br>;  p&lat2d = lat2d ; fatal:No coordinate variable exists for dimension (lat2d) in variable (p).<br>  p&lat2d = lat ; fatal:Variable (lat) is undefined.<br><br>  p&lon2d = lon2d ; will obviously give errors as above<br><br>; How to formulate the following?<br>;-------------------------------<br>  p&lat2d@units = "degrees_north"<br>  p&lon2d@units = "degrees_east"<br>  lat2d@long_name = "latitude"<br>  lon2d@long_name = "longitude"<br><br><br></span><br></div></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a>ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a rel="noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
_______________________________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>