<div dir="ltr">The is a 'generic' comment. <br><br> <a href="http://www.ncl.ucar.edu/Applications/">http://www.ncl.ucar.edu/Applications/</a><div><br>Under 'Datasets' Click 'NARR'<br><br></div><div>These do not include overlays but if you are dealing with NARR, you should be aware of this link<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 3:00 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">Hi Kerwyn,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the future, it would help if you could provide the output of doing:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">printVarSummary(temp)</div><div class="gmail_default" style="font-size:small">printVarSummary(hgt)</div><div class="gmail_default" style="font-size:small">etc.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">so we know what your variables look like.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">1. If "temp" is a 3D array with pressure level as its leftmost dimension, and if the "level" dimension of "temp" is represented by a level coordinate array that's already in hPA units, <span style="font-size:12.8px">then you should be able to use coordinate subscripting to get the level you want:</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default"><div class="gmail_default" style="font-size:small">temp = a->TMP_221_ISBL({600},:,:) ; The use of { and } specifies that you want to subset based on coordinate values, rather than index values</div><div class="gmail_default" style="font-size:small">u_wind = a->U_GRD_221_ISBL({600},:,:) </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">2. To zoom in on the map, you don't want to tell NCL that you are using the native projection. This means you do NOT want to set tfDoNDCOverlay to True. Just remove this or comment it out, because it is False by default.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">For a better understanding of plotting data in a native projection and a non-native projection, see example dataonmap_native_4.ncl at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex4native" target="_blank">http://www.ncl.ucar.edu/Applications/plot_data_on_map.shtml#ex4native</a><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><span style="font-size:12.8px">3. I think the fatal error is occurring because you were trying to plot a 3D array. Once you do #1 and subscript temp, u, and v as described, then you should end up with 2D arrays that you can create contour and vector plots from.</span></div><div class="gmail_default"><span style="font-size:12.8px"><br></span></div><div class="gmail_default"><span style="font-size:12.8px">If you continue to have problems, please post back to ncl-talk. It would also help if we could have your data and the latest version of your script.</span></div><div class="gmail_default"><span style="font-size:12.8px"><br></span></div><div class="gmail_default"><span style="font-size:12.8px">Thanks,</span></div><div class="gmail_default"><span style="font-size:12.8px"><br></span></div><div class="gmail_default"><span style="font-size:12.8px">--Mary</span></div><div class="gmail_default"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div><div class="gmail_default" style="font-size:small"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sat, Jul 30, 2016 at 10:13 PM, Kerwyn Texeira <span dir="ltr"><<a href="mailto:ktish86@gmail.com" target="_blank">ktish86@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 class="h5"><div dir="ltr"><div><div><div><div><div><div><div><div>Hi ncl-talk,<br><br></div>I'm trying to plot and overlay of (NARR) North American Regional Reanalysis temperature, geopotential height contours, and wind barbs at 600mb but I'm running into some problems.<br><br></div>1. Where on the script should I mention the pressure level eg 600hpa so that both the temperature, wind barbs and geopotential heights can be plotted at this level that level?<br><br></div>2. How do I zoom into an area? I specified the min lat, lon and max lat, lon but it seems not to zoom into the area of interest?<br><br></div>3. I do not understand why I'm getting the following error:<br><br> (0) gsn_csm_contour_map_ce: Fatal: the input data array must be 1D or 2D<br>fatal:Illegal right-hand side type for assignment<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 113 in file narr_temp.ncl<br><br></div>My script:<br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br><br>begin<br>a = addfile("./narr-a_221_20140128_0000_000.grb", "r")<br><br>wks_type = "png"<br>wks_type@wkWidth = 2500<br>wks_type@wkHeight = 2500<br><br>wks= gsn_open_wks(wks_type, "temp_narr")<br>gsn_define_colormap(wks,"matlab_jet")<br><br>lat2d = a->gridlat_221<br>lon2d = a->gridlon_221<br>hgt = a->HGT_221_ISBL<br>temp = a->TMP_221_ISBL<br>pres = a->PRES_221_HYBL<br>u_wind = a->U_GRD_221_ISBL<br>v_wind = a->V_GRD_221_ISBL<br>lev = a->lv_ISBL3 ; 29 levels<br><br>spd = (u_wind*u_wind + v_wind*v_wind)^(0.5) ; m/s<br><br>pres = pres*0.01 ; converts to hpa<br><br>u_wind = u_wind*1.94384449<br>v_wind = v_wind*1.94384449<br><br>temp = temp - 273<br><br>temp@lat2d = lat2d<br>temp@lon2d = lon2d<br><br>hgt@lat2d = lat2d<br>hgt@lon2d = lon2d<br><br>pres@lon2d = lon2d<br>pres@lat2d = lat2d<br><br>u_wind@lon2d = lon2d<br>u_wind@lat2d = lat2d<br><br>spd = spd*1.94384449<br><br>spd@lon2d = lon2d<br>spd@lat2d = lat2d<br><br>v_wind@lat2d = lat2d<br>v_wind@lon2d = lon2d<br><br><br>res = True<br>res@gsnDraw = False<br>res@gsnFrame = False<br>res@cnLineLabelsOn = False<br>res@cnFillOn = True<br>res@tiMainString = "Temperature (C) at 700hpa on Jan 28 at 00:00UTC"<br>res@tiMainFont = "helvetica"<br>res@tiMainFontHeightF = 0.02<br>res@pmTickMarkDisplayMode = "Always"<br>res@mpProjection = "CylindricalEquidistant"<br>res@mpOutlineOn = "True"<br>res@lbOrientation = "Vertical"<br>res@tiMainOffsetYF = -0.03<br>res@mpFillOn = False<br>res@tfDoNDCOverlay = True<br>res@mpMinLatF = 37.85<br>res@mpMaxLatF = 38.50<br>res@mpMinLonF = -120.0<br>res@mpMaxLonF = -119.0<br>res@gsnLeftString = "Geopotential Height (m) and Winds (kts)"<br>res@gsnStringFontHeightF = 0.020<br>res@gsnRightString = ""<br>res@gsnMaximize = True<br>res@mpShapeMode = "FreeAspect"<br>res@lbTitleString = "Temperature (C)"<br>res@lbTitlePosition = "Right"<br>res@lbTitleFontHeightF = 0.020<br>res@gsnAddCyclic = False<br>;res@cnLevelSelectionMode = "ManualLevels"<br>;res@cnMinLevelValF = <br>;res@cnMaxLevelValF =<br>;res@cnLevelSpacingF =<br><br>res1 = True<br>res1@gsnDraw = False<br>res1@gsnFrame = False<br>res1@vcWindBarbLineThicknessF = 7.0<br>res1@vcRefLengthF = 0.018<br>res1@vcRefMagnitudeF = 10<br>res1@vcMinDistanceF = 0.05<br>res1@vcGLyphStyle = "WindBarb"<br>res1@gsnRightString =""<br>res1@vcRefAnnoOn = False<br>res1@gsnAddCyclic = False<br><br>res2 = True<br>res2@gsnDraw = False<br>res2@gsnFrame = False<br>res2@cnLineColor = "Black"<br>res2@gsnContourLineThicknessesScale = 5.0<br>res2@gsnAddCyclic = False<br>res2@tfDoNDCOverlay = True<br>res2@gsnLeftString = ""<br>res2@gsnRightString = ""<br>res2@cnInfoLabelOn = False<br>;res2@cnLevelSpacingF = 2<br>res2@cnLineLabelBackgroundColor = "white"<br>res2@cnLineLabelDensityF = 1<br><br>geo = gsn_csm_contour(wks, hgt, res2)<br><br>temp = gsn_csm_contour_map(wks, temp, res)<br><br>vector = gsn_csm_vector(wks, u_wind, v_wind, res1)<br><br>overlay(temp, geo)<br>overlay(temp, vector)<br><br>draw(temp)<br>frame(wks)<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br> <br>end<br><br></div>Whatever help anyone can give to me will be greatly appreciated. I thank you very much in advance!!!.<br></div></div></div>
<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><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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><br>
<br></blockquote></div><br></div>