<div dir="ltr"><div>Hi,</div><div><br></div><div>Offhand, it looks like you are constructing the coordinate arrays properly. I notice you calculate the lat coordinate array with this statement:</div><div><br></div><div>    lat=fspan(-67,67,268)</div><div><br></div><div>Are you certain the length of this array lines up with the corresponding dimension of the variable QR?</div><div><br></div><div>HTH...Rick</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 7, 2020 at 10:58 AM Ipsita Putatunda via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</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 dir="ltr"><div>Dear NCL users,</div><div>Getting warning message while trying to plot the variable.</div><div><br></div><div>"Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all."</div><div>My script is as follows:</div><div>load "/usr/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "/usr/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br> begin<br>   netCDF=True<br>   plot=True<br> diri="./"<br>;==============================================================<br> fn1="3A-DAY.20161231.V06A.HDF5"<br> printVarSummary(fn1)<br> lev=fspan(0.25,20,80)<br> lon=fspan(-180,180,720)<br> lat=fspan(-67,67,268)<br> lat@long_name = "latitude"<br> lon@long_name = "longitude"<br> lat@units = "degrees_north"<br> lon@units = "degrees_east"<br>;-------------------------------------------------------------------<br> f= addfile(fn1, "r")<br> ;g=f->Grid<br> QR1 = "/Grid/LHCndMean"<br> QR=f->$QR1$<br> QR!0="nlayer"<br> QR!1="nlon"<br> QR!2="nlat"<br> QR&nlayer=lev<br> QR&nlon=lon<br> QR&nlat=lat<br> QR&nlat@units="degrees_north"<br> QR&nlon@units="degrees_east"<br> printVarSummary(QR&nlat)<br> printVarSummary(QR&nlon)<br>;-------------------------------------------------------------------<br> wks   = gsn_open_wks ("png","QR")<br> gsn_define_colormap(wks,"rainbow")<br><br>res                  = True<br>res@gsnMaximize      = True<br>res@cnFillOn         = True<br>res@cnLinesOn        = False<br>res@cnLineLabelsOn   = False<br>res@gsnSpreadColors  = True<br>res@gsnAddCyclic     = False<br>  res@mpMinLatF = min(QR&nlat)<br>  res@mpMaxLatF = max(QR&nlat)<br>  res@mpMinLonF = min(QR&nlon)<br>  res@mpMaxLonF = max(QR&nlon)<br>plot = gsn_csm_contour_map(wks,QR(0,:,:),res)<br> end</div><div><br></div><div><br></div><div>Any help in this issue will be appreciated.</div><div>Thanks in advance,</div><div>Ipsita<br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>