<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I had a similar artifact in grib output
from lats4d.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>My scripts -<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>1<sup>st</sup> script downloads <st1:place
w:st="on"><st1:country-region w:st="on">NAM</st1:country-region></st1:place>
from Nomads HA and writes flat files with .ctl file<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>2<sup>nd</sup> script makes a grib of the
flat file.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The resulting grib, when re-viewed in
grads or commercial programs, had missing points on the diagonal from lower
left row #2 toward the upper right. Hence, each row was progressively
shifted toward the right.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The problem was in the lat & lon
increments in the .ctl file. I was using 6 decimal
places.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>
Changing the lat & lon increments to 4 decimal places eliminated the
problem, so far.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>grads-1.9.0-rc1.win32-r3.win32_superpack <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Windows <st1:place w:st="on">Vista</st1:place><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thank you,</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Herb Philbrick</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> voice
219-787-3321</span></font><font color=navy><span style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> fax
219-787-2690</span></font><font color=navy><span style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font><font
color=navy><span style='color:navy'><a
href="mailto:Herb.Philbrick@arcelormittal.com"><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Herb.Philbrick@arcelormittal.com</span></font></a></span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
gradsusr-bounces@gradsusr.org [mailto:gradsusr-bounces@gradsusr.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Arlindo da Silva<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, August 04, 2010
9:45 PM<br>
<b><span style='font-weight:bold'>To:</span></b> GrADS Users Forum<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [gradsusr] lats4d
issues</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Mon, Aug 2, 2010 at 1:59 PM, Matt Brewer <<a
href="mailto:mcbrewer83@yahoo.com">mcbrewer83@yahoo.com</a>> wrote:<o:p></o:p></span></font></p>
<div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>Folks,<br>
I am using lats4d to convert NCEP's NARR data (grib) to netCDF. It only kind of
worked. This is what I type into the command line: <br>
<br>
lats4d -i narr-a_221_19790101_0000_000.sub -o <a href="http://narr2009.nc"
target="_blank">narr2009.nc</a> -ftype ctl -lon -160 -90 -lat 25 65 -time
0z1jan2009 21z31dec2009 -mxtimes 2920 -levs 925mb -xvars ugrdprs vgrdprs
ugrd10m vgrd10m msletmsl prmslmsl<br>
<br>
This works fine except for one issue. It seems to be totally messing up the
axis dimensions, causing data to be in incorrect lat/lon locations.Notice how I
asked for data from 160W to 90W and 25N to 65N, so with the longitude, that is
a span of 70 degrees, and for latitude, it is 40 degrees. So I should get back
a geopot. height matrix of 121x211 (there are data points every 1/3rd degree).
It seems, in matlab at least, that I get an array of 122x212. And so what
happens is the first point on the second array actually gets saved in the 212th
place in the first array, so the second line starts out with what is supose to
be the second point in the array. Make sense? When I put the nc file into
grads, it has similar issues as well....so something wierd is going on when I
run the lats4d script....I just don't know what. So if anyone has any ideas of
what is goin on, please help!!!<o:p></o:p></span></font></p>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>The first step is to make sure GrADS is reading your GRIB file
correctly. Go ahead, start GrADS, open your GRIB file, plot it and see if it is
doing it correctly:<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>ga-> open </span></font><span class=apple-style-span><font
size=2 face=Arial><span style='font-size:10.5pt;font-family:Arial'>narr-a_221_19790101_0000_000.sub</span></font></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><font size=2 face=Arial><span
style='font-size:10.5pt;font-family:Arial'>ga-> d something</span></font></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><font size=2 face=Arial><span
style='font-size:10.5pt;font-family:Arial'>If this is pre-projected data, make
sure your PDEF is correct. Once you sort this out, the netcdf version should
produce the same results. (Our regression tests do just that: reads a GRIB
file, converts to netcdf, then reads the netcdf file back and checks if it gets
exactly the same values.)</span></font></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><font size=2 face=Arial><span
style='font-size:10.5pt;font-family:Arial'>One important detail: when asking
for help, you need to let us know the particular version of grads, lats4d, and
your operating system; basically, the otput of "q config".</span></font></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><font size=2 face=Arial><span
style='font-size:10.5pt;font-family:Arial'> Arlindo</span></font></span><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<div>
<div>
<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:black'>Matt<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></span></font></p>
</blockquote>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
Arlindo da Silva<br>
<a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><o:p></o:p></span></font></p>
</div>
</body>
</html>