<div dir="ltr"><div><div><div><div>See attached. Please look carefully at the output produced by printVarSummary and printMinMax<br><br></div>Note: <br><br>[1] GRIB is a moving target. 6.3.0 did not have the look-up tabl builtin while NCL 6.4.0 does.<br><br></div>[2] the grib file has 'no report' coded as as -1 ... the script sets those values to _FillValue<br><br></div>[3] The grid is *rectilinear* : <br>In netCDF speak, a one dimensional variable where the variable name is the same as the variable dimension name is a coordinate variable. lat_0(lat_0) and lon_0(lon_0)<br><br></div>Good Luck<br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 10:21 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@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">Tim:<div><br></div><div>If you can wait a day or two, I suggest you write to:</div><div><br></div><div><a href="mailto:Carrie.Langston@noaa.gov" target="_blank">Carrie.Langston@noaa.gov</a><br></div><div><br></div><div>and ask Him/Her what is the format of the gridded data and if they have an NCL program to read it.</div><div><br></div><div>It's looks like very useful data once you "crack the code."</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Barry</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 5:09 PM, Tim Melino <span dir="ltr"><<a href="mailto:melino33@gmail.com" target="_blank">melino33@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">Barry, <div><br></div><div>The source of the data is here: </div><div><br></div><div><a href="http://www.nssl.noaa.gov/projects/mrms/operational/tables.php" target="_blank">http://www.nssl.noaa.gov/proje<wbr>cts/mrms/operational/tables.<wbr>php</a></div><span class="m_4876879840071301140HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Tim </div></font></span><div><div class="m_4876879840071301140h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 10:03 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@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">Tim:<div><br></div><div>If you write out the latitude and longitude information is is rectilinear? </div><div><br></div><div>When trying to sort this out, you should first check if the lat/lon can be plotted by a single coordinate or two. If two, then there is a chance that your grid is not rectilinear, and you will have to account for the distortion in the grid.</div><div><br></div><div>If there is distortion, then you need to account for it (e.g., Lambert, curvilinear.</div><div><br></div><div>I can only offer advice at the moment...</div><div><br></div><div>What is the data source for the data? </div><span class="m_4876879840071301140m_-2002067811460463376HOEnZb"><font color="#888888"><div><br></div><div>Barry</div></font></span></div><div class="m_4876879840071301140m_-2002067811460463376HOEnZb"><div class="m_4876879840071301140m_-2002067811460463376h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 4:52 PM, Tim Melino <span dir="ltr"><<a href="mailto:melino33@gmail.com" target="_blank">melino33@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">Hey Barry, <div><br></div><div>The only information about the projection was: <span style="font-size:12.8px"><b>grid_type : Latitude/Longitude. </b>I attached the file!</span></div><span class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341HOEnZb"><font color="#888888"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Tim </span></div></font></span></div><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341HOEnZb"><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 9:00 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@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">Tim:<div><br></div><div>Please remind me what the name of the file is.</div><div><br></div><div>Also, was there any information at the top of the printing about the projection?</div><div><br></div><div>Yes, the markers would (could) look off.</div></div><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717HOEnZb"><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 3:32 PM, Tim Melino <span dir="ltr"><<a href="mailto:melino33@gmail.com" target="_blank">melino33@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">Hi Barry, <div><br></div><div>Here is the information when printing (a). Would the map projection also cause a marker to be printed in the wrong location?</div><div><br></div><div><div>Variable: a</div><div>Type: file</div><div>filename: test</div><div>path: ./test.grib2</div><div> file global attributes:</div><div> dimensions:</div><div> lat_0 = 30</div><div> lon_0 = 40</div><div> variables:</div><div> float VAR_209_3_34_P0_L102_GLL0 ( lat_0, lon_0 )</div><div> center : US NOAA Office of Oceanic and Atmospheric Research</div><div> production_status : Research products</div><div> long_name : unknown variable name</div><div> units : unknown</div><div> _FillValue : 1e+20</div><div> grid_type : Latitude/longitude</div><div> parameter_discipline_and_cate<wbr>gory : 209, 3</div><div> parameter_template_discipline<wbr>_category_number : ( 0, 209, 3, 34 )</div><div> level_type : Specific altitude above mean sea level (m)</div><div> level : 500</div><div> forecast_time : 0</div><div> forecast_time_units : minutes</div><div> initial_time : 07/09/2016 (04:46)</div><div><br></div><div> float lat_0 ( lat_0 )</div><div> long_name : latitude</div><div> grid_type : Latitude/Longitude</div><div> units : degrees_north</div><div> Dj : 0.01</div><div> Di : 0.009999676</div><div> Lo2 : 280.735</div><div> La2 : 36.695</div><div> Lo1 : 280.345</div><div> La1 : 36.405</div><div><br></div><div> float lon_0 ( lon_0 )</div><div> long_name : longitude</div><div> grid_type : Latitude/Longitude</div><div> units : degrees_east</div><div> Dj : 0.01</div><div> Di : 0.009999676</div><div> Lo2 : 280.735</div><div> La2 : 36.695</div><div> Lo1 : 280.345</div><div> La1 : 36.405</div></div><div><br></div></div><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545HOEnZb"><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 28, 2017 at 12:48 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@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">Hi:<div><br></div><div>When the data is skewed, it is often because the projection you're reading is not the one your plotting.</div><div><br></div><div>Do you know the projection of the data you're using?</div><div><br></div><div>If you print(a) where a is the file you specify from addfile, you can see the variables (and hopefully projection) indicated within.</div><div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545m_-1375217533753848781h5">On Sat, May 27, 2017 at 4:20 PM, Tim Melino <span dir="ltr"><<a href="mailto:melino33@gmail.com" target="_blank">melino33@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="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545m_-1375217533753848781h5"><div dir="ltr">Hi, <div><br></div><div>I am attempting to plot a subset of the MRMS data from NCEP. The latitude and longitude I am plotting is : </div><div><br></div><div>LAT: <span style="color:rgb(0,0,0);font-family:"Times New Roman";font-weight:bold;text-align:-webkit-center">36.5459089</span></div><div>LON: <span style="color:rgb(0,0,0);font-family:"Times New Roman";font-weight:bold;text-align:-webkit-center">-79.4585847</span></div><div><br></div><div>I attached an image of the output along with the grib file I am using for input. I am noticing a couple things first the data appears to be skewed, so I am not sure if it is an issue with the map projection. Second the point which should be plotted in Virginia is actually plotted in North Carolina, the only thing that I have been able to do if offset the marker to compensate for the issue. Does anyone have any ideas on how to fix these issues? Any ideas would be greatly appreciated! </div><div><br></div><div>Thanks! </div><div>Tim </div><div><br></div><div>Code: </div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/wrf/WRFUserARW.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl"</div><div><br></div><div>begin</div><div><br></div><div>lati=LAT</div><div>loni=LON</div><div>date=DATE</div><div>address=ADDRESS</div><div><br></div><div><br></div><div>; Convert the Lat/Lon to a Float</div><div>latc= stringtofloat(lati)</div><div>lonc = stringtofloat(loni)</div><div><br></div><div>; Set the Map Bounds</div><div>minlat = latc - .12</div><div>maxlat = latc + .12</div><div>minlon = lonc - .15</div><div>maxlon = lonc + .15</div><div><br></div><div><br></div><div> ;========================</div><div> ; get list of all files and open as "one big file"</div><div> ;========================</div><div> a = addfile( "./" + lati + "_" + loni + ".grib2","r")</div><div><br></div><div> type = "png"</div><div> wks = gsn_open_wks(type,"./" + lati + "" + loni + ".png")</div><div><br></div><div>; Set some Basic Plot options</div><div> res = True</div><div> res@gsnDraw = False ; do not draw the plot</div><div> res@gsnFrame = False ; do not advance the frame</div><div> pltres = True</div><div> pltres@NoTitles = True</div><div> pltres@CommonTitle = True</div><div> pltres@PlotTitle = ""</div><div> pltres@PanelPlot = True</div><div> pltres@FramePlot = False</div><div><br></div><div>; Set the Colormap</div><div> gsn_define_colormap(wks,"hail"<wbr>)</div><div> lat = a->lat_0</div><div> lon = a->lon_0</div><div> water = a->VAR_209_3_34_P0_L102_GLL0(:<wbr>,:)</div><div> hail = water *0.0393701;</div><div><br></div><div><br></div><div> ; Plotting options for Hail</div><div> res@gsnMaximize = True</div><div> res@mpGeophysicalLineThickness<wbr>F = 4.0</div><div> ;res@mpProjection = "LambertConformal"</div><div> res@mpGridLineThicknessF = 0.5</div><div> res@mpLimbLineThicknessF = 4.0</div><div> res@mpNationalLineThicknessF = 4.0</div><div> res@mpUSStateLineThicknessF = 4.0</div><div> res@mpProvincialLineThicknessF = 4.0</div><div> res@mpOutlineBoundarySets = "AllBoundaries"</div><div> res@mpDataBaseVersion = "Ncarg4_1"</div><div> res@mpDataSetName = "Earth..4"</div><div> res@mpFillOn = False ; fill continents</div><div> res@mpPerimOn = False ; no box around map</div><div> res@tiMainOn = True</div><div> res@tiMainFontColor = "Black"</div><div> res@tiMainString =""</div><div> res@tiXAxisString = ""</div><div> res@tiYAxisString = ""</div><div> res@gsnLeftString = "Date: " + date ; add the gsn titles</div><div> res@gsnRightString = ""</div><div> res@gsnStringFontHeightF = 0.016</div><div> res@cnInfoLabelOrthogonalPosF = 0.07 ; offset second label information</div><div> res@gsnContourLineThicknessesS<wbr>cale = 0.001</div><div> res@cnFillOn = True</div><div> res@lbTitleOn = True ; remove field name from label bar</div><div><br></div><div> ; Set the Map Bounds</div><div> res@sfYArray = lat</div><div> res@sfXArray = lon</div><div> res@mpLimitMode = "LatLon"</div><div> res@mpMinLatF = minlat</div><div> res@mpMaxLatF = maxlat</div><div> res@mpMinLonF = minlon</div><div> res@mpMaxLonF = maxlon</div><div> res@tmXBOn = False</div><div> res@tmYLOn = False</div><div> res@tmXTOn = False</div><div> res@tmYROn = False</div><div> res@gsnAddCyclic = False</div><div> res@tfDoNDCOverlay = False ; do not transform data</div><div> res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels</div><div> res@cnLevels = (/ 0.5,0.75, 1.00, 1.25, 1.50, 1.75, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00/) ; set levels</div><div> res@tiMainFontHeightF = 0.018 ; font height of title</div><div> res@lbAutoManage = False ; we control label bar</div><div> res@pmLabelBarDisplayMode = "Always" ; turns on label bar</div><div> res@lbOrientation = "Horizontal" ; ncl default is vertical</div><div> res@pmLabelBarSide = "Bottom" ; default is right</div><div> res@lbLabelStride = 1 ; skip every other label</div><div> res@pmLabelBarWidthF = 0.7 ; default is shorter</div><div> res@pmLabelBarHeightF = 0.1 ; default is taller</div><div> res@lbLabelFontHeightF = .012 ; default is HUGE</div><div> res@lbPerimOn = False ; default has box</div><div> res@lbTitleString = "Hail Size (Inches)"</div><div> res@lbTitleFontHeightF = 0.012</div><div> plot = gsn_csm_contour_map(wks,hail,r<wbr>es)</div><div><br></div><div>; Setup the point</div><div> mstring1 = "z"</div><div> fontnum1 = 35</div><div> xoffset1 = .4</div><div> yoffset1 = .7</div><div> ratio1 = 0.0</div><div> size1 = 1.0</div><div> angle1 = 0.0</div><div><br></div><div> Tm_index = NhlNewMarker(wks, mstring1, fontnum1, xoffset1, yoffset1, ratio1, size1, angle1)</div><div><br></div><div> ; Plot the sites and label them</div><div> gres = True</div><div> gres@gsMarkerIndex = Tm_index ; 16</div><div> gres@gsMarkerSizeF = 0.015 ; .009</div><div> gres@gsMarkerColor = "black"</div><div> gres@txFont ="helvetica-bold"</div><div> gres@txFontHeightF = "25"</div><div><br></div><div>site = (/address/)</div><div>lats = (/latc/)</div><div>lons = (/lonc/)</div><div><br></div><div>dot = gsn_add_polymarker(wks,plot,lo<wbr>ns,lats,gres)</div><div>tlats =lats + .03</div><div>tlons =lons</div><div>text = gsn_add_text(wks,plot,site,tlo<wbr>ns,tlats ,gres)</div><div><br></div><div>; Draw the graphics</div><div> draw(plot)</div><div> frame(wks)</div><div><br></div><div> end</div></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545m_-1375217533753848781m_-8811547586240194006gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341m_-2955459713035707717m_-620206013470712545gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4876879840071301140m_-2002067811460463376m_5032140186964754341gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4876879840071301140gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</div></div><br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>