[ncl-talk] check_for_y_lat_coord: Warning: -Zilore Mumba

zilore mumba zmumba at yahoo.com
Thu Apr 25 23:57:00 MDT 2019


 Rick ,Thank you very much for the explanation on coordinate variables, and for resolving my problem. There is definitely something wrong with my data. All the values are completely unrealistic. The plot with contour in the west of my area is closer to the data I have. I will have to work on that.
Sorry I thought my posts were asking things which were very obvious, hence ignored, which was wrong. I will re-register with ncl-talk with my gmail account.Thank you very much

    On Friday, April 26, 2019, 4:07:16 AM GMT+2, Rick Brownrigg <brownrig at ucar.edu> wrote:  
 
 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-dimensionalii) monotonically increasing/decreasingiii) 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,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.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/20190426/4c7ad9bd/attachment.html>


More information about the ncl-talk mailing list