<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jennifer...<br>
<br>
I gave it a try, had my reservations with all the lines ...<br>
what I meant by the comment on the dbf was I have never seen<br>
the listing of 'min_value' and 'max_value' , that was a first for
me..<br>
<br>
now to write up my scripting for wgrib2 to pull out a list of
locations<br>
to plot on the map...<br>
<br>
anybody interested ...<br>
<br>
GRIB2 --> <br>
GRaDS shapefile conversion --> <br>
OGR2OGR postgresql GIS database --><br>
custom php scripting for maps<br>
<br>
all total it takes less then 45 seconds for my system to complete<br>
the above ..<br>
<br>
<pre class="moz-signature" cols="72">-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.com</pre>
<br>
On 1/4/2012 6:20 PM, Jennifer Adams wrote:
<blockquote
cite="mid:D8A8F725-A9E9-4977-892D-B2CF1BFBCB5B@cola.iges.org"
type="cite">
<div>Jeff, </div>
<div>
<div><br>
<div>
<div>On Jan 4, 2012, at 12:19 PM, Jeff Lake wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div>This is exactly the problem ...<br>
the dbf is also in a format I nor GDAL has ever seen
before,<br>
</div>
</blockquote>
In GrADS, you can issue the 'q dbf' command and it will spew
the contents of the dbf file. The utility 'dbfdump', which
comes with the shapefile library, also has no trouble
reading the dbf file. There is very little structure to the
dbf file, it's just a list of attributes and the values that
go with them for each element in the file. </div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div>could be this temp, but yet it could be this???<br>
</div>
</blockquote>
I'm sorry, but I don't understand this statement. </div>
<div><br>
<blockquote type="cite">
<div><br>
this is the GRIB file I'm using<br>
<a moz-do-not-send="true"
href="http://weather.noaa.gov/pub/SL.us008001/ST.opnl/DF.gr2/DC.ndgd/GT.rtma/AR.conus/RT.01/ds.temp.bin">http://weather.noaa.gov/pub/SL.us008001/ST.opnl/DF.gr2/DC.ndgd/GT.rtma/AR.conus/RT.01/ds.temp.bin</a><br>
<br>
the RT.01 determines the cycle hour<br>
<br>
GrADS version 2.0.1,<br>
CentOS 5.7 64bit<br>
<br>
<br>
and the script snippet<br>
<br>
'clear shp'<br>
'set lat 20 55'<br>
'set lon -150 -45'<br>
'set gxout shp'<br>
'set mproj latlon'<br>
'set ccols 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22'<br>
'set clevs -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20
25 30 35 40 45 50 <br>
55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130
135'<br>
'set shp -poly rtma_temp'<br>
'd (TMP2m-273.16)*9/5+32'<br>
'quit'<br>
</div>
</blockquote>
<div><br>
</div>
<div>I grabbed the file, used g2ctl, and drew a grfill plot
with GrADS, overlaying a shapefile with the state
boundaries (instead of the default map plotted by GrADS).
Here is the result:</div>
<div><img apple-width="yes" apple-height="yes"
id="cf2c1ee8-8b8f-4553-9d83-4f457ccff079"
src="cid:part1.08000200.09090400@michiganwxsystem.com"
height="670" width="829"></div>
<div>Next I used 'gxout shp' and created a shapfile based on
this data. Then I import the shapefile I created into Qgis
and draw it using no outline and coloring in the polygons
according to the classification field MIN_VALUE and then
overlay the same shapefile (statesp020) and get this: </div>
<div><br>
</div>
<div><img apple-width="yes" apple-height="yes"
id="03290f28-f0ff-4fb7-846c-291dd964a0db"
src="cid:part2.07010306.03040808@michiganwxsystem.com"
height="448" width="839"></div>
<div><br>
</div>
<div>There is no re-projecting going on, the plots are the
same, other than the color scheme -- it's a pain to define
colors in Qgis, so I used this blue/green palette. As far
as I can tell, there is nothing wrong with the shapefile
created by GrADS. </div>
<blockquote type="cite">
<div><br>
<br>
I would let GrADS do my mapping, but I'm some what of a
stickler about <br>
my maps looking the same<br>
I cannot for the life of me get GrADS to match my
projection<br>
<a moz-do-not-send="true"
href="http://contours.michiganwxsystem.com/forecasts/gfs/gfsmos_d1_maxt.png">http://contours.michiganwxsystem.com/forecasts/gfs/gfsmos_d1_maxt.png</a><br>
I got GEMPAK to match (and they say that is harder), but
not GrADS :(<br>
</div>
</blockquote>
<div><br>
</div>
<div>As for the projection in your michiganwxsystem plot, it
doesn't appear to be drawn with GrADS, but it looks like a
polar stereographic projection. In GrADS, use 'set mproj
nps' and then display your temperature plot and it will
look like this: </div>
<div><br>
</div>
<div><img apple-width="yes" apple-height="yes"
id="9c95ab5b-e1f3-414a-9eca-a2f7f081d4f0"
src="cid:part3.08070107.03030206@michiganwxsystem.com"
height="360" width="638"></div>
<div><br>
</div>
<div><br>
</div>
<div>This looks like the projection in the image on your
website. As for getting Qgis to draw in a polar
stereographic projection … I have no idea how to do this.
Perhaps this is another user in the forum who will know. </div>
<div>--Jennifer</div>
<div><br>
</div>
<blockquote type="cite">
<div><br>
-Jeff Lake<br>
<a moz-do-not-send="true"
href="http://MichiganWxSystem.com">MichiganWxSystem.com</a><br>
WeatherMichigan.net<br>
TheWeatherCenter.net<br>
GRLevelXStuff.com<br>
<br>
<br>
On 1/3/2012 7:43 PM, Yaqiang Wang wrote:<br>
<blockquote type="cite">It seems GrADS does not form
real 'polygon' from contour lines by<br>
</blockquote>
<blockquote type="cite">topology analysis. This is the
source of the problem.<br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite">On Wed, Jan 4, 2012 at 7:17 AM,
Jennifer Adams<a class="moz-txt-link-rfc2396E" href="mailto:jma@cola.iges.org"><jma@cola.iges.org></a> wrote:<br>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Jeff,<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">The shapfile interface in
GrADS creates a shapefile that contains polygons<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">that fill out the areas
outlined by the shaded contours. Because of the<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">rules in the shapefile spec
regarding polygon geometry, the area inside a<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">shaded contour is split up
into many pieces so that individual polygons do<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">not overlap and do not contain
holes (no donuts). That is why you are seeing<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">all the vertical lines. If you
color in the polygons and use the same color<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">to draw the outline, you won't
see the vertical lines and the plot will look<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">more normal (like the shaded
contour plot in GrADS).<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Also, before you create the
shapefile, you must be in the latlon projection<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">(set mproj latlon). No other
projection will work. It should be possible to<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">use your GIS tool to
re-project the data in the shapefile using the
metadata<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">in the file provided by GrADS.
From the attachement you sent, it's difficult<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">to tell what the problem is --
better to draw a plot of a variable such a<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">land mask that would clearly
show whether the boundaries in the data are<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">lining up with the political
boundaries (and color them in and use matching<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">outline color). If there is an
issue in the way Qgis is re-projecting the<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">shapefile, then that may or
may not be a GrADS problem.<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">The polygons 'connect to the
outside' because they are filling in the<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">lat/lon block defined by your
dimension environment. You can't mask your<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">shapefile according to
political boundaries, but you can choose to not draw<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">a certain contour level by
using -1 instead of a color number in the 'set<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">ccols' command.<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">I can't help you any further
without more specific information about what<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">version of GrADS you're using,
what the descriptor file looks like for your<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">data, the source of your data
file (so I can grab a sample), what your<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">commands were to generate the
shapefile, and what you did inside Qgis to<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">create the display in your
attachment.<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">--Jennifer<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">On Jan 3, 2012, at 4:22 PM,
Jeff Lake wrote:<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">I believe there is a minor,
okay major, flaw in the conversion to shape file<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">here is the shape file I get
when converting the RTMA GRIB over (see<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">attachment)<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">the resulting polygons all
'connect' to the outside<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">this is a cint set from -30 to
140 by 5 degree's<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">this is a better result then
another piece of software, but still not<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">correct..<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">anybody got suggestions ??<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">--<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">-Jeff Lake<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">MichiganWxSystem.com<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">WeatherMichigan.net<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">TheWeatherCenter.net<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">GRLevelXStuff.com<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><rtma.jpg>_______________________________________________<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">gradsusr mailing list<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">--<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Jennifer M. Adams<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">IGES/COLA<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">4041 Powder Mill Road, Suite
302<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">Calverton, MD 20705<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a class="moz-txt-link-abbreviated" href="mailto:jma@cola.iges.org">jma@cola.iges.org</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">_______________________________________________<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite">gradsusr mailing list<br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
</blockquote>
<blockquote type="cite">
<blockquote type="cite"><br>
</blockquote>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
<blockquote type="cite"><br>
</blockquote>
_______________________________________________<br>
gradsusr mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div>
</blockquote>
</div>
<br>
<div apple-content-edited="true">
<div style="font-size: 12px; ">--</div>
<div style="font-size: 12px; ">Jennifer M. Adams</div>
<div style="font-size: 12px; ">IGES/COLA</div>
<div style="font-size: 12px; ">4041 Powder Mill Road, Suite
302</div>
<div style="font-size: 12px; ">Calverton, MD 20705</div>
<div style="font-size: 12px; "><a moz-do-not-send="true"
href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div>
<div style="font-size: 12px; "><br
class="khtml-block-placeholder">
</div>
<span class="Apple-style-span" style="font-size: 12px; "><br
class="Apple-interchange-newline">
</span>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
</body>
</html>