[ncl-talk] fatal:No coordinate variable exists for dimension (lat2d) in variable (p)
zilore mumba
zmumba at yahoo.com
Thu Apr 25 01:10:35 MDT 2019
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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/8045b047/attachment.html>
More information about the ncl-talk
mailing list