<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">You should provide clean code when writing to ncl-talk. There are a lot of commented lines in your script and it is hard to understand what you are actually doing. Everyone's time here is valuable ;) <div class=""><br class=""></div><div class="">I suspect that your error is coming from this line </div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><pre class="" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><pre class="" style="background-color: rgb(255, 255, 255); margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><font face="courier" class=""><span class="" style="font-size: 13.3333px;"> prc_all = (prc1 + prc2 + prc3 + prc4 + prc5 + prc6 + prc7 + prc8 + prc9 + prc10 + prc11 + prc12 + prc13 + prc14 + prc15 + prc16 + prc17 + prc18 + prc19 + prc20 + prc21 + prc22 + prc23 + prc24 + prc25 + prc26 + prc27 + prc28 + prc29 + prc30 + prc31 + prc32 + prc33 + prc34 + prc35 + prc36 + prc37 + prc38 + prc39 + prc40 + prc41 + prc42 + prc43 + prc44 + prc45 + prc46 + prc47 + prc48 + prc49)</span></font></pre></pre></div></div></blockquote><div><br class=""></div><div>In this assignment every metadata (including coordinate variables) will be lost. Thus, NCL doesn't know how to interpret the coordinates of the variable that you are trying to plot. It's weird because it appears that in a commented part of your code you were exactly trying to fix this problem </div><div><br class=""></div><div><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><pre class="" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><pre class="" style="background-color: rgb(255, 255, 255); margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent;"><font face="courier" class=""><span class="" style="font-size: 13.3333px;"> ;prc_last := prc_all->precipitation
;prc!0 = "lat" ; 1st ... name the dimensions
;prc!1 = "lon"
;prc&lat = lat ; create coordinate variable
;prc&lon = lon </span></font></pre></pre></div></div></blockquote><div class=""><br class=""></div><div class="">So...few options to fix this.</div><div class=""><br class=""></div><div class="">[1] Re-assign coordinate variables as you did in the aforementioned part of the code which is now commented out. Note that you should use the names lat2d and lon2d if your coordinate variables are 2d instead of 1d. </div><div class=""><br class=""></div><div class="">[2] Directly copy var coordinates (and possibly attributes) using one of the function <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarCoords.shtml:" class="">https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarCoords.shtml:</a> <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarMeta.shtml" class="">https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarMeta.shtml</a>.</div><div class=""><br class=""></div><div class="">Doing copy_VarCoords(prc1,prc_all) should do the trick.</div><div class=""><br class=""></div><div class="">[3] Manually assign the coordinate variables to the plotting routine using the resources sfXarray and sfYArray. (this <a href="https://www.ncl.ucar.edu/Applications/contour1d.shtml" class="">https://www.ncl.ucar.edu/Applications/contour1d.shtml</a> can help).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers </div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 8. Apr 2018, at 13:48, Md. Jalal Uddin <<a href="mailto:dmjalal90@gmail.com" class="">dmjalal90@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear Sir/ Madam,<div class=""><br class=""></div><div class="">I am a new user in NCL. I am getting following error in NCL. I tried to fix it by following NCL guidelines, but don't know why it is not fixing. I used TRMM3B42 3 hourly data. Could you help me, please?</div><div class=""><br class=""></div><div class="">
<pre style="margin: 0px; padding: 0px; font-size: 13.3333px; line-height: 12pt; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; text-indent: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-transform: none; word-spacing: 0px; background-color: rgb(255, 255, 255);" class="">(0) check_for_y_lat_coord: Warning: Data either does
not contain a valid latitude coordinate array or doesn't
contain one at all
(0) check_for_lon_coord: Warning: Data either does
not contain a valid longitude coordinate array or doesn't
contain one at all</pre><pre style="margin:0px;padding:0px;line-height:12pt;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-decoration-style:initial;text-decoration-color:initial" class=""><pre style="background-color: rgb(255, 255, 255); font-family: courier; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-transform: none; word-spacing: 0px; margin: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; text-indent: 0px; text-align: left;" class="">(0) is_valid_lat_ycoord: Warning: The units attribute of
the Y coordinate array is not set to one of the allowable
units values (i.e. 'degrees_north'). Your latitude labels
may not be correct.
(0) is_valid_lat_xcoord: Warning: The units attribute of
the X coordinate array is not set to one of the allowable
units values (i.e. 'degrees_east'). Your longitude labels
may not be correct.</pre><pre style="background-color: rgb(255, 255, 255); font-family: courier; font-size: 13.3333px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-transform: none; word-spacing: 0px; margin: 0px; padding: 0px; line-height: 12pt; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; text-indent: 0px; text-align: left;" class="">;;;;;My script</pre><pre style="background-color:rgb(255,255,255);margin:0px;padding:0px;line-height:12pt;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;text-align:left;text-decoration-style:initial;text-decoration-color:initial" class=""><font face="courier" class=""><span style="font-size:13.3333px" class="">
;***********************************************
;
; These files are loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;************************************************
; Read the file
;************************************************
f1 = addfile("3B42RT.2013051100.7.nc4","r")
prc1 = f1->precipitation ;; prc1 here is two dimensional
f2 = addfile("3B42RT.2013051103.7.nc4","r")
prc2 = f2->precipitation
f3 = addfile("3B42RT.2013051106.7.nc4","r")
prc3 = f3->precipitation
f4 = addfile("3B42RT.2013051109.7.nc4","r")
prc4 = f4->precipitation
f5 = addfile("3B42RT.2013051112.7.nc4","r")
prc5 = f5->precipitation
f6 = addfile("3B42RT.2013051115.7.nc4","r")
prc6 = f6->precipitation
f7 = addfile("3B42RT.2013051118.7.nc4","r")
prc7 = f7->precipitation
f8 = addfile("3B42RT.2013051121.7.nc4","r")
prc8 = f8->precipitation
f9 = addfile("3B42RT.2013051200.7.nc4","r")
prc9 = f9->precipitation
f10 = addfile("3B42RT.2013051203.7.nc4","r")
prc10 = f10->precipitation
f11 = addfile("3B42RT.2013051206.7.nc4","r")
prc11 = f11->precipitation
f12 = addfile("3B42RT.2013051209.7.nc4","r")
prc12 = f12->precipitation
f13 = addfile("3B42RT.2013051212.7.nc4","r")
prc13 = f13->precipitation
f14 = addfile("3B42RT.2013051215.7.nc4","r")
prc14 = f14->precipitation
f15 = addfile("3B42RT.2013051218.7.nc4","r")
prc15 = f15->precipitation
f16 = addfile("3B42RT.2013051221.7.nc4","r")
prc16 = f16->precipitation
f17 = addfile("3B42RT.2013051300.7.nc4","r")
prc17 = f17->precipitation
f18 = addfile("3B42RT.2013051303.7.nc4","r")
prc18 = f18->precipitation
f19 = addfile("3B42RT.2013051306.7.nc4","r")
prc19 = f19->precipitation
f20 = addfile("3B42RT.2013051309.7.nc4","r")
prc20 = f20->precipitation
f21 = addfile("3B42RT.2013051312.7.nc4","r")
prc21 = f21->precipitation
f22 = addfile("3B42RT.2013051315.7.nc4","r")
prc22 = f22->precipitation
f23 = addfile("3B42RT.2013051318.7.nc4","r")
prc23 = f23->precipitation
f24 = addfile("3B42RT.2013051321.7.nc4","r")
prc24 = f24->precipitation
f25 = addfile("3B42RT.2013051400.7.nc4","r")
prc25 = f25->precipitation
f26 = addfile("3B42RT.2013051403.7.nc4","r")
prc26 = f26->precipitation
f27 = addfile("3B42RT.2013051406.7.nc4","r")
prc27 = f27->precipitation
f28 = addfile("3B42RT.2013051409.7.nc4","r")
prc28 = f28->precipitation
f29 = addfile("3B42RT.2013051412.7.nc4","r")
prc29 = f29->precipitation
f30 = addfile("3B42RT.2013051415.7.nc4","r")
prc30 = f30->precipitation
f31 = addfile("3B42RT.2013051418.7.nc4","r")
prc31 = f31->precipitation
f32 = addfile("3B42RT.2013051421.7.nc4","r")
prc32 = f32->precipitation
f33 = addfile("3B42RT.2013051500.7.nc4","r")
prc33 = f33->precipitation
f34 = addfile("3B42RT.2013051503.7.nc4","r")
prc34 = f34->precipitation
f35 = addfile("3B42RT.2013051506.7.nc4","r")
prc35 = f35->precipitation
f36 = addfile("3B42RT.2013051509.7.nc4","r")
prc36 = f36->precipitation
f37 = addfile("3B42RT.2013051512.7.nc4","r")
prc37 = f37->precipitation
f38 = addfile("3B42RT.2013051515.7.nc4","r")
prc38 = f38->precipitation
f39 = addfile("3B42RT.2013051518.7.nc4","r")
prc39 = f39->precipitation
f40 = addfile("3B42RT.2013051521.7.nc4","r")
prc40 = f40->precipitation
f41 = addfile("3B42RT.2013051600.7.nc4","r")
prc41 = f41->precipitation
f42 = addfile("3B42RT.2013051603.7.nc4","r")
prc42 = f42->precipitation
f43 = addfile("3B42RT.2013051606.7.nc4","r")
prc43 = f43->precipitation
f44 = addfile("3B42RT.2013051609.7.nc4","r")
prc44 = f44->precipitation
f45 = addfile("3B42RT.2013051612.7.nc4","r")
prc45 = f45->precipitation
f46 = addfile("3B42RT.2013051615.7.nc4","r")
prc46 = f46->precipitation
f47 = addfile("3B42RT.2013051618.7.nc4","r")
prc47 = f47->precipitation
f48 = addfile("3B42RT.2013051621.7.nc4","r")
prc48 = f48->precipitation
f49 = addfile("3B42RT.2013051700.7.nc4","r")
prc49 = f49->precipitation
prc_all = (prc1 + prc2 + prc3 + prc4 + prc5 + prc6 + prc7 + prc8 + prc9 + prc10 + prc11 + prc12 + prc13 + prc14 + prc15 + prc16 + prc17 + prc18 + prc19 + prc20 + prc21 + prc22 + prc23 + prc24 + prc25 + prc26 + prc27 + prc28 + prc29 + prc30 + prc31 + prc32 + prc33 + prc34 + prc35 + prc36 + prc37 + prc38 + prc39 + prc40 + prc41 + prc42 + prc43 + prc44 + prc45 + prc46 + prc47 + prc48 + prc49)
;prc_last := prc_all->precipitation
;prc!0 = "lat" ; 1st ... name the dimensions
;prc!1 = "lon"
;prc&lat = lat ; create coordinate variable
;prc&lon = lon
;lat_p = (/-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30/)
;lon_p = (/0,10,20,30,40,50,60,70,80,90,100,110,120,130,135/)
;X!0 = "lat"
;Y!1 = "lon"
;X&lat@units = "degrees_north"
;Y&lon@units = "degrees_east"
;grid = new((/14,15),float)
;grid&lat = lat_p
;grid&lon = lon_p
printVarSummary(prc_all)
;************************************************
; create colors
;*************************************************
wks = gsn_open_wks("png","Mahasen") ; open a workstation and send data to eps
colors = (/ (/255,255,255/), (/244,255,244/), \
(/217,255,217/), (/163,255,163/), (/106,255,106/), \
(/43,255,106/), (/0,224,0/), (/0,134,0/),(/255,255,0/),\
(/255,127,0/) /) / 255. ; be sure to make this a float!
;************************************************
; create panel plots
;*************************************************
res = True ; plot options desired
res@cnFillOn = True ; turn on color fill
res@cnLinesOn = False ; turn off contour lines
res@cnFillPalette = colors
res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res@cnLevels = (/5,10,15,20,25,30,35,40,45,50,55/)
;res@cnLevels = (/0.1,0.2,0.4,0.8,1.6,3.2,6.4,12.8,20,25,30/)
res@mpFillOn = True ; turn on gray continents
res@pmTickMarkDisplayMode = "Always"
res@mpLimitMode = "LatLon" ; select subregion
res@mpMinLatF = -35.
res@mpMaxLatF = 30.
res@mpMinLonF = 0.
res@mpMaxLonF = 135.
;res@mpProjection = "Mercator"
res@lbOrientation = "horizontal"
res@trGridType = "TriangularMesh"
;res@trGridType = "curvilinear"
res@tmYROn = False ; turn off right and top tickmarks
res@tmXTOn = False
; add polygon to plot
y = (/10.3, 10.8, 11.4, 11.9, 12.3, 13.1, 13.7, 14.2, 14.7, 15.6, 16.5, 17.5, 18.5, 19.7, 20.7, 22.4, 24.3/)
x = (/87.0, 86.7, 86.5, 86.2, 85.6, 85.4, 85.4, 85.8, 86.2, 86.7, 87.2, 87.6, 88.4, 89.0, 89.9, 91.1, 92.6/)
resp = True ; mods yes
resp@gsLineThicknessF = 3.0 ; line thickness
resp@gsLineColor = "black"
;Add markers to the trajectories.
amres = True ; marker resources for best track
amres@gsMarkerIndex = 14 ; marker style (filled circle)
amres@gsMarkerSizeF = 8.0 ; marker size
amres@gsMarkerColor = "black" ; maker color
plot = gsn_csm_contour_map(wks, prc_all,res) ; create plot
d = gsn_add_polyline(wks,plot,x,y,resp)
d1 = gsn_add_polymarker(wks,plot,x,y,amres)
draw(plot)
frame(wks)
end</span></font></pre>Best Wishes<br class="">Jalal</pre>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><font size="2" class=""><b class="">Md. Jalal Uddin</b></font></div><div dir="ltr" class="">MSc in Applied Meteorology (English Language)<br class="">Nanjing University of Information, Science and Technology, China</div><div dir="ltr" class="">Jasmine Jiangsu Government Scholar<br class="">Cell: +8613260859092</div><div class="">Office: Beichen Building, School of Geography and Remote Sensing, Room No. 406</div><div dir="ltr" class=""><font style="background-color:rgb(255,255,255)" class=""><b class=""><br class=""></b></font></div><div dir="ltr" class=""><font style="background-color:rgb(255,255,255)" class=""><b class="">AND </b></font></div><div dir="ltr" class="">B.Sc. in Disaster Management (Hons.) </div><div dir="ltr" class="">Patuakhali Science and Technology University, Bangladesh.<br class="">Cell: +8801792052662, +8801838613203 </div><div dir="ltr" class=""><font size="2" class="">Email:<b class=""> </b><a href="mailto:dmjalal90@gmail.com" class="">dmjalal90@gmail.com</a><br class="">Web: <a href="http://www.dmjalal90.weebly.com/" class="">www.dmjalal90.weebly.com</a> <br class="">Facebook: jalal.hossen.39 <br class="">LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" class="">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> <br class="">Twitter: dmjalal90 <br class="">Skype: dmjalal90</font><br class=""></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista" class="">http://guidocioni.altervista</a>.org</div>
</div>
<br class=""></div></body></html>