<div dir="ltr"><div>Perry, <br><br></div><div>There is an example on how to generate a climatology<br><br><a href="http://www.iges.org/grads/gadoc/gradcomdmodify.html">http://www.iges.org/grads/gadoc/gradcomdmodify.html</a><br><br> 'set t 1 12'<br>
'define sstclim = ave(sst, t+0, t=600, 12)'<br><br></div><div>The fwrite command can write big/little endian ieee data files.<br></div><div><br></div><div><div><div class="gmail_extra"> <a href="http://www.iges.org/grads/gadoc/gradcomdsetfwrite.html">http://www.iges.org/grads/gadoc/gradcomdsetfwrite.html</a><br><br></div><div class="gmail_extra">After you have used fwrite to save the climo, you can then<br></div><div class="gmail_extra">write a GrADS ctl file for it. (google and you shall find)<br><br></div><div class="gmail_extra">Welsye<br></div><div class="gmail_extra"><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 2:20 PM, Perry, Aaron <span dir="ltr"><<a href="mailto:Aaron.Perry@lsc.vsc.edu" target="_blank">Aaron.Perry@lsc.vsc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Good Afternoon Users,</p>
<p><br>
</p>
<p>I have a grib1 file that contains 500mb heights from 1985 to 2014, using the NCEP/NCAR Reanalysis Dataset. I am trying to create an averaged climatology file to create monthly anomalies with. I've written a small GrADS script to try and create this climo
file but, I'm not having much luck with it. The script outputs a .grib1 file but, no control file, as advertised.</p>
<p><br>
</p>
<p>What am I doing wrong?</p>
<p><br>
</p>
<p>Script Code:</p>
<p><br>
</p>
<p>function pull (args)<br>
<br>
'reinit'<br>
<br>
rc = gsfallow('on')<br>
<br>
currdate = subwrd(args,1)<br>
curr_run = subwrd(args,2)<br>
regions = subwrd(args,3)<br>
month = subwrd(args,4)<br>
date = sublin(currdate,1)<br>
mon = substr(date,5,2)<br>
day = substr(date,7,2)<br>
yr = substr(date,1,4)<br>
<br>
path1 = '/mnt/homes/perrya/'<br>
path2 = 'new.climate.atlas/'<br>
model = ncep_reanal<br>
<br>
var = hgt500<br>
<br>
'open 'path1''path2'hgt500.mon.1985.2014.grib.ctl'<br>
<br>
count = 0<br>
rec = 360<br>
incr = 1; t = 0<br>
fhr = 0<br>
inc = 1<br>
<br>
'set gxout fwrite'<br>
'set fwrite 'path1''path2'hgt500.1985.2014.mean.grib'<br>
<br>
while(count<=rec)<br>
<br>
'set t 't<br>
<br>
say t<br>
<br>
'set lon -320 40' <br>
'set lat -30 90'<br>
<br>
'define hgt500 = (hgt500mb.1/100)'<br>
<br>
'define climo=ave(hgt500,t=0,t='t',1mo)'<br>
<br>
'd climo'<br>
<br>
count = count + incr<br>
t = t + incr<br>
fhr = fhr + inc<br>
<br>
endwhile<br>
<br>
'quit'<br>
<br>
</p>
<p><br>
</p>
<div>
<div style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<div name="divtagdefaultwrapper">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma">
<div style="font-size:13px;font-family:Tahoma"><span style="font-family:Calibri,Arial,Helvetica,sans-serif"><font size="3"><font face="Arial"><font face="Tahoma" size="2"><font size="2"></font></font></font></font>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)"><br>
Aaron D. Perry</span></font><font style="color:rgb(0,111,201)"><br>
<span style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)">Class of 2016</span><span style="color:rgb(0,111,201)"></span></font><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)"></span></font></span></span><br style="color:rgb(0,111,201)">
<span style="color:rgb(0,111,201)">Lyndon State College</span><br>
Lyndonville, VT<span style="color:rgb(0,111,201)"></span></font><font style="color:rgb(0,111,201)"><br style="color:rgb(0,111,201)">
<span style="color:rgb(0,111,201)">Twitter: </span><a href="https://twitter.com/AaronPerryLSC" target="_blank"><span style="color:rgb(0,111,201);text-decoration:underline"></span></a><a href="https://www.twitter.com/AaronPerryLSC" target="_blank"></a><a href="https://twitter.com/AaronPerryLSC" target="_blank"><span style="color:rgb(0,111,201);text-decoration:underline">@AaronPerryLSC</span></a><span style="color:rgb(0,111,201)"></span><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)"></span></font><br style="color:rgb(0,111,201)">
<span style="color:rgb(0,111,201)"></span></font></span></div>
<span style="font-size:11pt;color:rgb(0,111,201)"></span><span style="font-size:11pt;color:rgb(0,111,201)"></span><span style="font-size:11pt;color:rgb(0,111,201)"></span>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)">Mobile: <a href="tel:617-780-4312" value="+16177804312" target="_blank">617-780-4312</a><br>
<span style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)">Web:
</span><span style="color:rgb(0,111,201)"></span></font></font></span></span><a href="http://shearanalytics.net/" target="_blank"><span style="font-family:Calibri,Arial,Helvetica,sans-serif"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:11pt;color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><font style="color:rgb(0,111,201)"><span style="color:rgb(0,111,201)">shearanalytics.net</span></font></font></span></span></a><br>
Email: <a href="http://Aaron.Perry@lyndonstate.edu" target="_blank">Aaron.Perry@lyndonstate.edu</a><br>
</span></font></span></div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br></div></div></div></div>