[ncl-talk] check_for_y_lat_coord: Warning: -Zilore Mumba
Rick Brownrigg
brownrig at ucar.edu
Thu Apr 25 20:05:01 MDT 2019
Hi Zilore,
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:
i) 1-dimensional
ii) monotonically increasing/decreasing
iii) have the same variable name as its dimension name
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:
;;;;lat2d = f->lat ; (y,x)
;;;lon2d = f->lon ; (y,x)
nt =1
;;;p!0 = "lat2d" ; No error message at this and following line.
;;;p!1 = "lon2d"
and add:
p at lat2d = f->lat
p at lon2d = f->lon
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.
With regard to the -inf/inf reporting from printMinMax(), there are some
very extreme values in the "pr" variable. For example, try:
print(f->pr(2,14,7:33))
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.
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 yahoo.com
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!
Rick
On Thu, Apr 25, 2019 at 2:18 PM zilore mumba <zmumba at yahoo.com> wrote:
> Rick, <https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl>
> 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 <https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl>
> https://www.ncl.ucar.edu/Applications/Scripts/mask_4.ncl.
> 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.
> printMinMax(p,False) shows min = infinity and max=infinity.
> But "cdo infon filename" shows the min, mean and max are ok.
> Plotting simple contours with this data file works.
> My problem is that when I run the script I get the following errors:
> (0) min=-inf max=inf
> (0) check_for_y_lat_coord: Warning: Data either does not contain
> (0) a valid latitude coordinate array or doesn't contain one at all.
> (0) A valid latitude coordinate array should have a 'units'
> (0) attribute equal to one of the following values:
> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
> (0) check_for_lon_coord: Warning: Data either does not contain
> (0) a valid longitude coordinate array or doesn't contain one at all.
> (0) A valid longitude coordinate array should have a 'units'
> (0) attribute equal to one of the following values:
> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
>
> I hope you can find time to assist.
> Zilore
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/26c57b2f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mask_orig.png
Type: image/png
Size: 73570 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/26c57b2f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mask_mod.png
Type: image/png
Size: 74624 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/26c57b2f/attachment-0001.png>
More information about the ncl-talk
mailing list