<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
It looks like you have both issues to deal with. First, you have
one time-step in each file, and one descriptor file per binary
file. Second, you want to sum different times together. For the
template you'd have to modify the ctl file like<br>
<br>
dset ^wrfprs_d01.%h2<br>
options template<br>
<br>
This will substitute the file names based on 2-digit hour (again,
see <a class="moz-txt-link-freetext" href="http://www.iges.org/grads/gadoc/templates.html">http://www.iges.org/grads/gadoc/templates.html</a> for the
details). Your file names don't actually have this, but rather +48,
so I'm not sure how you want to get around this.<br>
<br>
Next you need to change your tdef line (it has an increment of 1
month, and I think you want 3 hours). If you had files with 03, 06,
09... in the name, the above would work with this:<br>
<br>
tdef 3 linear 03Z23oct2015 3hr<br>
<br>
After this you should be able to access different times, and then
proceed with Jennifer's suggestion. Alternately, you could use
multiple descriptor files, but would have to address variables based
on the appropriate ctl file (e.g., var.1, var.2, etc.). Finally,
you could concatenate all your binary files into one, then have a
single descriptor file.<br>
<br>
Jim<br>
<br>
<br>
<div class="moz-cite-prefix">On 10/21/15 10:12 AM, giacomo tricarico
wrote:<br>
</div>
<blockquote cite="mid:DUB117-W503794452B7F80C90069D19A380@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi James, I've used Jennifer's script. Her answer
was:<br>
<span style="color: rgb(68, 68, 68); font-size: 15px;
line-height: 21.3px; background-color: rgb(255, 255, 255);">"It
sounds like what you want to do is change a 3-hourly time
series to a 6-hourly time series. And that you have to do with
brute-force coding by writing out a new file, one time step at
a time, that adds two 3hr accumulations to get the 6hr
accumulation. Something generally like this:"</span><br>
<br>
This is my actual situation:
<div>WRF-NMM gives me 48 hours of forecast, with steps of 3
hours (so 17 files precisely). So I can only have rain
accumulated for 3 hours: what I'm trying to do is having rain
accumulated in 6 hours, or maybe also 12h and 24h.<br>
<br>
WRF's files are processed by unipost and UPP, so that I have
17 files that can be used by grads. An example is</div>
<div>wrfprs_d01_00.ctl, like wrfprs_d01_03.ctl and so on
until wrfprs_d01_48.ctl.</div>
<div><br>
</div>
<div>This is for example wrfprs_d01_48.ctl (+48h):</div>
<div><br>
</div>
<div>
<div>dset ^wrfprs_d01.48</div>
<div>index ^wrfprs_d01.48.idx</div>
<div>undef 9.999E+20</div>
<div>title wrfprs_d01.48</div>
<div>* produced by grib2ctl v0.9.13</div>
<div>* command line options: -verf wrfprs_d01.48</div>
<div>dtype grib 255</div>
<div>pdef 93 87 lccr 40.251000 16.141000 1 1 40.805000
40.805000 16.914000 1391 1430</div>
<div>xdef 93 linear 16.141000 0.0165685317281457</div>
<div>ydef 87 linear 40.251000 0.013</div>
<div>tdef 1 linear 12Z23oct2015 1mo</div>
<div>* z has 26 levels, for prs</div>
<div>zdef 26 levels</div>
<div>1000 975 950 925 900 875 850 825 800 775 750 700 650 600
550 500 450 400 375 350 300 250 200 150 100 50</div>
<div>vars 130</div>
<div>...</div>
<div>...</div>
<div>
<div><b>APCPsfc 0 61,1,0 ** surface Total precipitation
[kg/m^2]</b></div>
</div>
<div>...</div>
<div>...</div>
<div>APCPsfc tough only gives me 3h accumulated precipitation,
as I've said.<br>
<br>
So I'm trying to find the best solution for this :)<br>
<br>
Thanks Again</div>
<div>
<hr id="stopSpelling">To: <a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
From: <a class="moz-txt-link-abbreviated" href="mailto:jimp@hawaii.edu">jimp@hawaii.edu</a><br>
Date: Wed, 21 Oct 2015 09:32:36 -1000<br>
Subject: Re: [gradsusr] How to combine ctl files in grads?<br>
<br>
Giacomo,<br>
<br>
I'm now confused as to what you are trying to do. You
originally wanted to combine two GrADS data descriptor
files, so I presumed you wanted to use the template option
whereby you have one control file for many binary files. It
now appears that you want to do some sort of time
integration (or summing?). It might help if you give more
information on your descriptor files (ctl files) and binary
files, for example how is time defined in the ctl file and
how do you define the data file (DSET)? The message below
suggests you might be trying to access a time that is not
defined.<br>
<br>
Jim<br>
<br>
<div class="ecxmoz-cite-prefix">On 10/21/15 9:10 AM, giacomo
tricarico wrote:<br>
</div>
<blockquote
cite="mid:DUB117-W85BE452CA08B5CD83BB1969A380@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Thanks Jennifer :)<br>
<br>
I've put this:<br>
<div>'clear'</div>
<div>'set gxout fwrite'</div>
<div>'set fwrite -ap 'provafile</div>
<div>t=3</div>
<div>while (t<=tlast)</div>
<div>'set t 't</div>
<div>'d APCPsfc+APCPsfc(t-1)'</div>
<div>t=t+2</div>
<div>endwhile</div>
<div>'disable fwrite'</div>
<div><br>
</div>
<div>but I get:<br>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
<div>Data Request Warning: Request is completely
outside file limits</div>
</div>
<div>....</div>
<br>
<div>
<hr id="ecxstopSpelling">From: <a
moz-do-not-send="true"
class="ecxmoz-txt-link-abbreviated"
href="mailto:jma@cola.iges.org"><a class="moz-txt-link-abbreviated" href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></a><br>
Date: Wed, 21 Oct 2015 11:14:38 -0400<br>
To: <a moz-do-not-send="true"
class="ecxmoz-txt-link-abbreviated"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
Subject: Re: [gradsusr] How to combine ctl files in
grads?<br>
<br>
It sounds like what you want to do is change a
3-hourly time series to a 6-hourly time series. And
that you have to do with brute-force coding by writing
out a new file, one time step at a time, that adds two
3hr accumulations to get the 6hr accumulation.
Something generally like this:
<div><br>
</div>
<div><font face="Courier"><span
style="font-size:14px;">’set gxout fwrite’</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">‘set fwrite -ap
'outfilename</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">* don’t forget to remove
the outfile before you begin, otherwise you’ll
append to an existing file</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">t=3</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">while (t<=tlast)</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;"> ‘set t ‘t</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;"> 'd p+p(t-1)’</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;"> t=t+2</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">endwhile</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;">‘disable fwrite’</span></font></div>
<div><font face="Courier"><span
style="font-size:14px;"><br>
</span></font></div>
<div>—Jennifer</div>
<div><br>
<div><br>
</div>
<div><br>
<div><br>
<div>
<div>On Oct 20, 2015, at 3:46 PM, giacomo
tricarico <<a moz-do-not-send="true"
href="mailto:mino-98@hotmail.it">mino-98@hotmail.it</a>>
wrote:</div>
<br class="ecxApple-interchange-newline">
<blockquote>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div class="ecxhmmessage">
<div dir="ltr">Hi, since in my GRADS's
files (produced by WRF-NMM Unipost) rain
is in 3h steps, I would like to combine
for example 2 ctl files, so that in one
I have 6h rain:
<div>how could I do this?<br>
<br>
Thanks,</div>
<div>Giacomo</div>
</div>
</div>
_______________________________________________<br>
gradsusr mailing list<br>
<a moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
class="ecxmoz-txt-link-freetext"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
</div>
<br>
<div> <span class="ecxApple-style-span"
style="border-collapse:separate;color:rgb(0,
0,
0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"><span
class="ecxApple-style-span"
style="border-collapse:separate;color:rgb(0,
0,
0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;orphans:2;white-space:normal;widows:2;word-spacing:0px;">
<div>--</div>
<div>Jennifer M. Adams<br>
Center for Ocean-Land-Atmosphere Studies
(COLA)<br>
111 Research Hall, Mail Stop 2B3<br>
George Mason University<br>
4400 University Drive<br>
Fairfax, VA 22030 <br>
<br>
</div>
<div><br
class="ecxkhtml-block-placeholder">
</div>
<br class="ecxApple-interchange-newline">
</span></span><br
class="ecxApple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________
gradsusr mailing list <a moz-do-not-send="true"
class="ecxmoz-txt-link-abbreviated"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a moz-do-not-send="true"
class="ecxmoz-txt-link-freetext"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
gradsusr mailing list
<a moz-do-not-send="true" class="ecxmoz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a moz-do-not-send="true" class="ecxmoz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
<br>
_______________________________________________
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></div>
</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>
<br>
</body>
</html>