<div dir="ltr">Hi Thomas,<div>Two quick notes:</div><div>1 - You can overlay fields that are on different grids using the overlay function as it would not matter that your psl field has an extra latitude line. I would recommend calling gsn_csm_vector_map and then gsn_csm_contour:</div><div><br></div><div>vres = True</div><div>vres@gsnDraw = False</div><div>vres@gsnFrame = False</div><div>.....</div><div><br></div><div>res = True</div><div>res@gsnDraw = False</div><div>res@gsnFrame = False</div><div>...</div><div><br></div><div>vmap = gsn_csm_vector_map(wks,ud,vd,vres)</div><div>omap = gsn_csm_contour(wks,psl,res)</div><div>overlay(vmap,omap)</div><div>draw(vmap)</div><div>frame(wks)</div><div><br></div><div>You may be able to use gsn_csm_vector_scalar_map as you are not coloring the vectors by your scalar field so it shouldn't matter that the scalar grid is different from your u/v grids, but I have never done that before.</div><div><br></div><div>2 - Dennis correctly pointed out that the output from printVarSummary shows that there are no spatial coordinate variables (latitude/longitude) associated with your 3 data arrays. Unless coordinate variable information is provided NCL will not know how to plot the data. Both Dennis (for 1D lats/lons) and Mary (for 2D lats/lons) provided suggestions on how to add the necessary coordinate information to your data. Please read over their emails if you have not attached your coordinate information to the data directly (for 1D lats/lons) or through the resource lists (for 2D lats/lons).</div><div><br></div><div>Hope that helps. If not, please respond to the ncl-talk email list.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 4:22 PM, tms_l <span dir="ltr"><<a href="mailto:littithomas@gmail.com" target="_blank">littithomas@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,<br><br> variable with dimension of lat=145 .the number of lat points is 145 in one variable..its not a typo.<br></div>however, the other two variables (ud & vd) having number of points , lat =144..<br><br></div>but the number of longitude points are same..I think this will also make an error..can i get any suggestion to deal with the data sets of different number of latitude points???ultimately , i would like to plot these three data sets together..<br><br></div>thank you so much<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 19, 2014 at 1:19 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<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><div><div>There are no coordinate variables associated with your variables.<br></div>How would NCL know where to plot values??<br><br></div>For example<br><br>printVarSummary(u)<br><br>Variable: u<br>Type: float<br>Number of Dimensions: 2<br>Dimensions and sizes: [lat | 96] x [lon | 144]<br>Coordinates: <br> lat: [ -90..90] <===== These tell ncl where to ploat<br> lon: [ 0..357.5] <=====<br>Number Of Attributes: 3<br> units : m/s<br> long_name : Zonal wind<br><br>=================<br></div>Are there lat/lon values available? If so, one approach would be<br><br></div>u!0 = "lat"<br></div>u!1 = "lon"<br></div>u&lat = lat<br></div>u&lon = lon<br></div>printVarSummary(u)<br><br>--<br></div>Also, the variable with dimension of lon=145 ... Does that have the cyclic point<br></div>contained or was that a typo? <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, Dec 17, 2014 at 5:17 PM, tms_l <span dir="ltr"><<a href="mailto:littithomas@gmail.com" target="_blank">littithomas@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, <br><br></div>I am plotting ud,vd & psl_clim using the following plot function .<br><div><div><div><br><b>plot=gsn_csm_vector_scalar_map(wks,ud,vd,psl_clim,res)</b><br><br>Variable: <b>ud</b><br>Type: float<br>Total Size: 110592 bytes<br> 27648 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [144] x [192]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : -1.073742e+09<br><br><br>Variable: <b>vd</b><br>Type: float<br>Total Size: 110592 bytes<br> 27648 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [144] x [192]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : -1.073742e+09<br><br><br>Variable: <b>psl_clim</b><br>Type: float<br>Total Size: 111360 bytes<br> 27840 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [145] x [192]<br>Coordinates: <br>Number Of Attributes: 3<br> long_name : MSLP(hPa)& wind-850hPa (a)<br> _FillValue : 9.96921e+36<br><br><br><br></div><div>Thanks in advance,<br><br></div><div>Thomas<br></div><div><br><br></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 6:26 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<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">Hi Thomas,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In order to plot data over a map, either as vectors or contours, you have to provide latitude and longitude locations for your data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you have a rectilinear grid, where the lat / lon are attached directly to the data as 1-dimensional coordinate variables, then the plotting routines will use these automatically.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you have 2-dimensional lat / lon coordinate points, then you either need to attach these to your data as special "lat2d" / "lon2d" attributes, or set the sfYArray / sfXArray resources.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">From your description, it sounds like you have a rectilinear grid, but your data variable may not be constructed properly. The error message is saying that it can't determine if you have valid lat / lon coordinate variables, which can happen if your "units" attribute is not one of the recognized values, like "degrees_north" or "degrees_east", and/or the coordinate variables somehow got stripped off your data variable. This can happen if you do a calculation on your data and put it in a new array, causing the metadata to be stripped off.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please do a "printVarSummary" on the data variables you are trying to plot, and send it back to ncl-talk so we can see what it looks like.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</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 Tue, Dec 16, 2014 at 8:23 PM, tms_l <span dir="ltr"><<a href="mailto:littithomas@gmail.com" target="_blank">littithomas@gmail.com</a>></span> wrote:</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>Dear ncl users<br><br>I would like to plot u & v components of wind along with mean sea level pressure data.The wind data (time,level,lat_1,lon_1) is 4 dimensional and mean sea level pressure data (time,lat,lon) 3 dimensional.<br><br>Also the number of grids points are arranged differently in each data sets.<br><br>For wind data latitude , lat_1 = 144 points<br> longitude , lon_1 =192 points<br><br>For mean sea level pressure latitude , lat =145<br> longitude, lon =192<br><br>I am getting the error message as follows and the mean sea level pressure data seems to plotted reversely..Is there any function to deal with data sets of different grid points or how can solve this issue? Any help will be appreciated.<br><br><br>error message :::::::<br>(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br>(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.<br>(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br>(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br>(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.<br>(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br><br><br><br></div>Regards<br><br></div>Thomas<br></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></div>
</blockquote></div></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></div>
</div></div></blockquote></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Division, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div>
</div>