<div dir="ltr"><div class="gmail_default" style="font-size:small">Dave,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The gsn_csm_hov script is meant to only be for rectilinear grids, and you are trying to use it on a curvilinear grid (i.e., one represented by 2D lat/lon grids). The documentation is not clear about this unfortunately.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">My suggestion is to just use gsn_csm_contour, and pass in the time and longitude arrays via the sfYArray and sfXArray resources:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">new_time = conform(new_lon(:,0,:),time,0)</div><div class="gmail_default" style="font-size:small">res@sfYArray = new_time</div><div class="gmail_default" style="font-size:small">res@sfXArray = new_lon</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 9, 2014 at 8:28 PM, David Adams <span dir="ltr"><<a href="mailto:dave.k.adams@gmail.com" target="_blank">dave.k.adams@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>HI NCLers,<br></div>I am trying to make a hovmoller plot but it does appear that my coordinates are correct.<br><br>warning:ContourPlotInitialize: Y coordinates out of data range: defaulting<br>warning:ContourPlotInitialize: Zero Y coordinate span: defaulting:[errno=1104]<br><br></div>and then a blank plot. The code is from the NCL website with slight modification<br><br>--------------------------------------------------------------------------------<br>begin<br>;=============================================<br>; data processing<br>;===========================================<br> fili = "<a href="http://test.nc" target="_blank">test.nc</a>" ; filename<br> f = addfile (fili , "r") ; add file<br> new_temp = f->new_temp ; get chi<br> new_lat = f->new_lat<br> new_lon = f->new_lon<br>;==============================================<br>; creat plot: Reverse time axis; contour labels horizontal<br>; Dash negative contours; double width of Zero<br>;==============================================<br> wks = gsn_open_wks ("pdf", "hov")<br> res = True ; plot mods desired<br> res@gsnContourZeroLineThicknessF = 2. ; doubles thickness of zero contour<br> res@gsnContourNegLineDashPattern = 1 ; sets negative contours to dash pattern 1<br> res@trYReverse = True ; reverse y axis<br> res@tiMainString = "Reverse Time" ; title<br> res@cnLineLabelAngleF = 0.0 ; [cn] label horizontal<br><br>;new_temp@lat2d = new_lat(0,:,:)<br>;new_temp@lon2d = new_lon(0,:,:)<br><br> plot = gsn_csm_hov(wks, new_temp(:,0,:), res ) ; default hovmueller<br>end<br>--------------------------------------------------------------------------------------------<br></div>Here is an ncdump -h on the data file<br><div><br>netcdf test {<br>dimensions:<br> yc = 221 ;<br> xc = 141 ;<br> time = UNLIMITED ; // (130 currently)<br>variables:<br> float new_temp(time, yc, xc) ;<br> new_temp:time = 1372896900 ;<br> new_temp:units = "K" ;<br> new_temp:coordinates = "lon lat" ;<br> new_temp:type = "GVAR" ;<br> new_temp:long_name = "Temperature" ;<br> float new_lat(time, yc, xc) ;<br> new_lat:units = "degrees_north" ;<br> new_lat:long_name = "lat" ;<br> float new_lon(time, yc, xc) ;<br> new_lon:units = "degrees_east" ;<br> new_lon:long_name = "lon" ;<br> int time(time) ;<br> time:units = "seconds since 2013-185 00:15" ;<br><br><br></div><div>any obvious errors?<br><br></div><div>thanks in advance,<br>Dave<br></div><div><br><br><br><br><br><br><br><br><br></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>