<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Is this grad scripting language you reference hear? I am pretty new to GrADS. I am not quite sure if that would accomplish what I want, but it is worth a try. I could be mistaken,
but it looks like you (Jeff Duda) are a new student at OU. I am actually already in the problem, so maybe we could consult on this in person.<br>
<br>
Mason <br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF887088"><font color="#000000" face="Tahoma" size="2"><b>From:</b> gradsusr-bounces@gradsusr.org [gradsusr-bounces@gradsusr.org] on behalf of Jeffrey Duda [jdduda@iastate.edu]<br>
<b>Sent:</b> Sunday, August 28, 2011 8:53 PM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] Advanced Usage of Ave Function<br>
</font><br>
</div>
<div></div>
<div>Mason,<br>
It sounds like you'll have to hard code the lat/lon boxes for each ave command then. Try something like<br>
<br>
lat1.1 = ...<br>
lat1.2 = ...<br>
.<br>
.<br>
.<br>
lat1.n = ...<br>
<br>
---<br>
<br>
lat2.1 = ...<br>
lat2.2 = ...<br>
.<br>
.<br>
.<br>
lat2.n = ...<br>
<br>
---<br>
<br>
lon1.1 = ...<br>
lon1.2 = ...<br>
.<br>
.<br>
.<br>
lon1.n = ...<br>
<br>
---<br>
<br>
lon2.1 = ...<br>
lon2.2 = ...<br>
.<br>
.<br>
.<br>
lon2.n = ...<br>
<br>
where lat1 and lat2 are the start and end latitudes of the box and lon1 and lon2 are th start and end longitudes of the box, and n is the number of files. Then do<br>
<br>
a = 1<br>
sum = 0<br>
while (a <= n)<br>
'd asum(field.'a',lon='lon1.a',lon='lon2.a',lat='lat1.a',lat='lat2.a')'<br>
*insert commands to take the output value into a new variable called summand<br>
sum = sum + summand<br>
a = a +1<br>
endwhile<br>
<br>
average = sum/n<br>
<br>
Is this what you are trying to do?<br>
<br>
Jeff Duda<br>
<br>
<div class="gmail_quote">2011/8/28 Rowell, Mason D. <span dir="ltr"><<a href="mailto:Mason.D.Rowell-1@ou.edu" target="_blank">Mason.D.Rowell-1@ou.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">
Thank you for your response,<br>
<br>
The trouble is, I don't want the domains for each file to match. I have GRIB data that I have made ctl files for with
<a href="http://grib2ctl.pl" target="_blank">grib2ctl.pl</a> but I want to center each file (for a different day) on a different grid point and then average the files. Thus I wouldn't be averaging the same actual grid point in space each time.
<br>
<br>
Mason <br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr>
<div style="direction: ltr;"><font color="#000000" face="Tahoma" size="2"><b>From:</b>
<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] on behalf of James Ciarlo` [<a href="mailto:james.ciarlo@physics.org" target="_blank">james.ciarlo@physics.org</a>]<br>
<b>Sent:</b> Saturday, August 27, 2011 9:02 AM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] Advanced Usage of Ave Function<br>
</font><br>
</div>
<div></div>
<div>try opening them together<br>
<br>
open file.ctl<br>
open file2.ctl<br>
open file3.ctl<br>
.... etc<br>
<br>
then set the domain conditions (so that they all match)<br>
<br>
then just ave. Remember to call the variables with var.1, var.2 depending on the file number.<br>
<br>
if you give us an example of the commands you are trying to use we can probably help better<br>
<br>
Regards,<br>
<br>
James<br>
<br>
<div class="gmail_quote">2011/8/27 zjuyanlibin <span dir="ltr"><<a href="mailto:zjuyanlibin@163.com" target="_blank">zjuyanlibin@163.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>
<div style="margin: 10px; font-family: verdana; font-size: 10pt;">
<div><font color="#000080" face="Verdana" size="2">convert the different domains into a same domain at first step.</font></div>
<div><font color="#000080"></font> </div>
<div> </div>
<div> </div>
<div>
<hr color="#b5c4df" size="1">
</div>
<div><font face="Verdana" size="2"><b>发件人:</b> Rowell, Mason D. </font></div>
<div><font face="Verdana" size="2"><b>发送时间:</b> 2011-08-27 04:42:50 </font></div>
<div><font face="Verdana" size="2"><b>收件人:</b> GrADS Users Forum </font></div>
<div><font face="Verdana" size="2"><b>抄送:</b> </font></div>
<div><font face="Verdana" size="2"><b>主题:</b> [gradsusr] Advanced Usage of Ave Function
</font></div>
<div><font face="Verdana" size="2"></font></div>
<div><font face="Verdana" size="2">
<div>All,</div>
<div></div>
<div>Is there a way to average several different files (presumably the same variable in each file) but with a different domain setting for each file?</div>
<div></div>
<div>Mason </div>
<div>_______________________________________________</div>
<div>gradsusr mailing list</div>
<div><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a></div>
<div><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</font></div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Jeff Duda<br>
Iowa State University<br>
Meteorology Graduate Student<br>
<a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>
</div>
</div>
</div>
</body>
</html>