<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Zilore,</div><div><br></div><div>Did you see Dennis's reply to this issue from earlier today (Thurs)?  He's of course correct, and I should have know this, but yes, by NetCDF definitions, a coordinate variable must be:</div><div><br></div><div>i) 1-dimensional</div><div>ii) monotonically increasing/decreasing</div><div>iii) have the same variable name as its dimension name</div><div><br></div><div>So to accommodate curvilinear/2D coordinates, NCL recognizes special *attributes* names in its plotting routines. So if I comment out these lines in the script you sent me:</div><div><br></div><div>;;;;lat2d    = f->lat             ; (y,x)<br>;;;lon2d    = f->lon             ; (y,x)<br>  nt       =1<br><br>;;;p!0   = "lat2d" ; No error message at this and following line.<br>;;;p!1   = "lon2d"<br></div><div><br></div><div>and add:</div><div>  p@lat2d = f->lat<br>  p@lon2d = f->lon<br></div><div><br></div><div>then the errors go away. I've attached the plot I get when I run your script as is (mask_orig.png) and the one I get when I make the changes above (mask_mod.png). They are clearly different -- I don't know which one is right.<br></div><div><br></div><div><br></div><div>With regard to the -inf/inf reporting from printMinMax(), there are some very extreme values in the "pr" variable. For example, try:</div><div><br></div><div>  print(f->pr(2,14,7:33))</div><div><br></div><div>and you'll see some extremely large values (compared to the surrounding context).  These, when multiplied by 86400, as in your code, push the values beyond the range of floats.</div><div><br></div><div>So, I hope that helps, but I'm not certain this even addresses the question about masking. I have not been able to resolve the issue of <a href="http://yahoo.com" target="_blank">yahoo.com</a> accounts, whether its the ncl-talk mailer, or my email client, or....?   If you have another email address, perhaps you might register it with ncl-talk. I know its a pain. But as Dennis states, ncl support strives to be first rate -- you were not purposefully ignored, nor are your posts unreasonable!</div><div><br></div><div>Rick</div><div><br></div><div>       <br></div></div></div></div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019 at 2:18 PM 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_-6246060987030295861gmail-m_3011339722882256451gmail-m_6134317963444868282yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div><a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl" rel="nofollow" target="_blank">Rick,</a></div><div>Thank you very much for your prompt reply. I have attached to this mail a sample file am working with. Also attached is my modification of mask_4.ncl from<a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl" rel="nofollow" target="_blank"> </a><a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl." rel="nofollow" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl.</a></div><div>I have commented out the generation of dummy data and made the script to read from file. i have also zoomed on a smaller area.</div><div><span>printMinMax(p,False) shows min = infinity and max=infinity.</span></div><div><span>But "cdo infon filename" shows the min, mean and max are ok.</span></div><div><span>Plotting simple contours with this data file works.<br></span></div><div><span>My problem is that when I run the script I get the following errors:</span></div><div><span></span><span>(0)    min=-inf   max=inf<br>(0)    check_for_y_lat_coord: Warning: Data either does not contain<br>(0)    a valid latitude coordinate array or doesn't contain one at all.<br>(0)    A valid latitude coordinate array should have a 'units'<br>(0)    attribute equal to one of the following values: <br>(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>(0)    check_for_lon_coord: Warning: Data either does not contain<br>(0)    a valid longitude coordinate array or doesn't contain one at all.<br>(0)    A valid longitude coordinate array should have a 'units'<br>(0)    attribute equal to one of the following values: <br>(0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br></span><span></span><div><br></div><div>I hope you can find time to assist.</div><div>Zilore<br></div></div></div></div></blockquote></div>