<div dir="ltr"><div><div><div><div><div><div>Yes. It looks good to me. <br><br></div>If you send a sample GOES file, an of GOES=>rectilinear gris could be added to the ESMF regridding page. Then, you could use<br><br> <a href="http://www.ncl.ucar.edu/Applications/narr.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/narr.shtml</a><br>Example 5<br><br></div>ftp <a href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a><br>anonymous<br>email<br></div>cd incoming<br></div>put ... GOES.. <br></div>quit<br><br></div>Then you could send the name of the file (offline to reduce ncl-talk traffic).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 16, 2014 at 9:11 AM, 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><div>Thanks Mary, Dennis,<br>I made a really big mistake not getting the regular gridded data from the GOES people at Wisconsin.<br><br></div>Looking at the example<br><a href="http://www.ncl.ucar.edu/Applications/narr.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/narr.shtml</a><br>Example 6<br><br></div>to set the x-labels (with actual longitude values), I have to consider both dimensions (x,y) of the longitude dimension, correct?<br></div>I would have to do something like this in the example 6<br><br><pre> ml = 200
resx@tmXBValues := toint( fspan(0,nlat-1,nLabels) )
do i=0,nLabels-1
x = lon2d(resx@tmXBValues(i),ml)
y = lat2d(resx@tmXBValues(i),ml)
resx@tmXBLabels(i) = sprintf("%5.1f", y)+"~C~"+sprintf("%5.1f", x)
end do</pre>where lon2d would be<br> lon2d= new_lon(0,:,:)<br> lat2d= new_lat(0,:,:)<br><br></div>(I made another mistake with ncecat and ncrcat. somehow adding a time dimension to lat and lon)<br><div><div><div><div><div><br></div><div>thanks in advance,<br>Dave<br></div><div><br><br></div></div></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 10:15 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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><div><div><div><div><div>See the following: example of subscripting 2-dimensional array coordinates<br><a href="http://www.ncl.ucar.edu/Applications/narr.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/narr.shtml</a><br></div>Example 6<br><br></div>---<br></div>To get a 'classic' cross section (ie, a vertical profile ata constant latitude or longitude), you must interpolate the curvilinear grid to to a rectilinear grid.<br><br><a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/ESMF.shtml</a><br></div>Example 30<br><br></div>To use the weight file generated by Example 30,<br><br><div><a href="http://www.ncl.ucar.edu/Applications/narr.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/narr.shtml</a><br></div>Example 5<br><br></div>This shows classic cross sections (constant lat ot lon) AND<br></div>an arbitrary slice <br><br></div>Good luck<br><div><div><div><div><div><br></div></div></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 15, 2014 at 9:02 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 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">I think the issue here is simply that "new_temp" is dimensioned time x lat x lon, and since you want a time x lon plot, you need to subscript the "lat" dimension somehow. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">i.e.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"> plot = gsn_csm_contour(wks,new_temp(:,0,:), res)</span><div style="font-family:arial,sans-serif;font-size:12.8000001907349px"></div></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:12.8000001907349px"><br></span></div><div class="gmail_default"><font face="arial, sans-serif">I'm just selecting the first latitude dimension, but you need to set this to whatever you want.</font></div><span><font color="#888888"><div class="gmail_default"><font face="arial, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, sans-serif">--Mary</font></div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 11:41 AM, 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 Mary et al.<br></div>I think I am misunderstanding how<span><br><br> res@sfYArray = new_time<br> res@sfXArray = new_lon<br><br></span></div>work. Do I have to redefine the original variable new_temp in terms of these dimensions? And, if so, how?<br><br></div>I am getting this error.<br><br> gsn_csm_contour: Fatal: the input data array must be 1D or 2D<br>fatal:Illegal right-hand side type for assignment<br>fatal:Execute: Error occurred at or near line 74 in file lon_time_plots.ncl<br><br><div>Here is the code.<br>thanks in advance,<br>Dave<br></div><div><br>;*********************************<br>; read variable<br>;*********************************<br> f = addfile("/home/dadams/Mini_Campaign_NAME/2013_GOES_data/<a href="http://test.nc" target="_blank">test.nc</a>","r")<br> new_temp = f->new_temp ; float new_temp(time, yc, xc) <br>; printVarSummary(new_temp)<br>;*********************************<br>;<br>;*********************************<span><br> new_lat = f->new_lat<br> new_lon = f->new_lon<br></span> time = f->time<span><br> new_time = conform(new_lon(:,0,:),time,0)<br><br></span>;*********************************<br>; create plot<br>;*********************************<br> pltName = "goes"<br> pltType = "pdf" ; "ps", "eps", "pdf", "png"<br> pltDir = "./"<br><br> wks = gsn_open_wks(pltType, pltDir+pltName)<br> gsn_define_colormap(wks,"BlAqGrYeOrReVi200"); choose a color map<br><br> res = True<br> res@cnFillOn = True ; turn on color<br> res@cnFillMode = "RasterFill" ; cell mode<br> res@cnLinesOn = False ; Turn off contour lines<span><br><br> res@sfYArray = new_time<br> res@sfXArray = new_lon<br><br></span> res@gsnSpreadColors = True ; use full colormap<br> res@gsnAddCyclic = False ; data not cyclic<br> res@gsnMaximize = True ; ps, pdf, pdf<br> res@pmTickMarkDisplayMode = "Always" ; use NCL default<br> res@lbLabelAutoStride = True ; let NCL decide spacing<br> res@cnLevelSelectionMode = "ManualLevels" ;"ExplicitLevels"<br> res@cnMinLevelValF = 200. ; set the minimum contour level<br> res@cnMaxLevelValF = 300. ; set the maximum contour level<br> res@cnLevelSpacingF = 5.0 ; set the contour interval<br> res@cnRasterSmoothingOn = True<br> res@lbLabelStride = 5.0 ; every other label bar label<br><br> plot = gsn_csm_contour(wks,new_temp, res)<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 11:29 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 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"><div><div>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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><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></div></div>_______________________________________________<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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>