[ncl-talk] fatal:No coordinate variable exists for dimension (lat2d) in variable (p)

Rick Brownrigg brownrig at ucar.edu
Thu Apr 25 09:31:09 MDT 2019


HI Zilore,

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 yahoo.com
address. I will inquire as to why that's the case, but I don't administer
the listservs.

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)?

Rick


On Thu, Apr 25, 2019 at 1:11 AM zilore mumba <zmumba at yahoo.com> wrote:

> Hello,
> 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.
> 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.
> Part if my script is given below, and it works up to the line "lon2d    =
> f->lon" for the case of no masking.
>
> 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.
> Assistance will be appreciated.
>
> begin
>
>   diri="/home/zmumba/CORDEX/CDO_Out/"
>   filename = "month01.nc"
>   f = addfile(diri+filename,"r")
>
>   p = f->pr*86400
>
>   lat2d    = f->lat             ; (y,x)
>   lon2d    = f->lon             ; (y,x)
>
> ; Lines below added to effect masking
>   p!0   = "lat2d" ; No error message at this and following line.
>   p!1   = "lon2d"
>
> ;  p&lat2d = lat2d ; fatal:No coordinate variable exists for dimension
> (lat2d) in variable (p).
>   p&lat2d = lat ; fatal:Variable (lat) is undefined.
>
>   p&lon2d = lon2d ; will obviously give errors as above
>
> ; How to formulate the following?
> ;-------------------------------
>   p&lat2d at units = "degrees_north"
>   p&lon2d at units = "degrees_east"
>   lat2d at long_name = "latitude"
>   lon2d at long_name = "longitude"
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/a3bf0214/attachment.html>


More information about the ncl-talk mailing list