<div dir="ltr"><div>It would be easier for us to help you if you were more specific about what you want to do, as I'm finding your description so far ambiguous, and therefore have not offered help yet. I suspect this is a simple fix, but you need to be specific.<br><br></div>Jeff Duda<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 16, 2017 at 2:28 AM, Davide Sacchetti <span dir="ltr"><<a href="mailto:davide.sacchetti@arpal.gov.it" target="_blank">davide.sacchetti@arpal.gov.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Jennifer,<br>
my problem is actually harder than that<br>
my ctl files do not have the "e" dimension: I'd like to define a<br>
variable with a varying "e".<br>
I'd like to obtain something like this:<br>
<br>
# ctl files with temp have no "e" dim<br>
'set e 1 10'<br>
'define tempdef=anything'<br>
assign tempdef(e=1) -> temp.1<br>
assign tempdef(e=2) -> temp.2<br>
assign tempdef(e=3) -> temp.3<br>
...<br>
<br>
Bye<br>
Thanks<br>
Davide<br>
<br>
Il giorno mer, 15/03/2017 alle 18.44 +0000, Jennifer M Adams ha<br>
scritto:<br>
> Ciao, Davide — <br>
> From the doc page on variables: <br>
><br>
> "An important note: When you specify a dimension in grid units, GrADS<br>
> always converts it to world coordinates. In general, this conversion<br>
> is done using the scaling of the default file. The only exception to<br>
> this rule is when a grid coordinate (x, y, z, t, or e) is supplied<br>
> within a dimexpr as part of a variable specification. In the case of<br>
> this special exception, the conversion is done using the scaling for<br>
> the file that variable is to be taken from (i.e., file number<br>
> file#)."<br>
><br>
> So, an expression like <br>
> ‘set dfile 1’<br>
> ‘set e 1'<br>
> ‘d temp.1-temp.2(e=2)’<br>
> should work if file #2 is the one with ensembles and file #1 has no E<br>
> dimension. <br>
><br>
> Bye Bye ;-)<br>
> -Jennifer<br>
><br>
><br>
> On Mar 15, 2017, at 1:57 PM, Davide Sacchetti <davide.sacchetti@arpal<br>
> .<a href="http://gov.it" rel="noreferrer" target="_blank">gov.it</a>> wrote:<br>
><br>
> > Dears, I'd like to define a variable from more than one expression,<br>
> > but<br>
> > I don't know how.<br>
> ><br>
> > I mean: I have different files with temperature (on the same grid),<br>
> > I<br>
> > could compare temp.1 vs temp.2 but I'd like to compare something<br>
> > like<br>
> > temp(e=1) vs temp(e=2) without writing a new ctl with ens<br>
> > dimension: <br>
> > I'd prefere to do it on the fly, as defining a variable, let's say<br>
> > tempdef that links to temp.1 for e=1 and temp.2 for e=2, but I<br>
> > don't<br>
> > know how to do it.<br>
> > Any ideas?<br>
> ><br>
> > Bye<br>
> > Davide<br>
> ><br>
> > ______________________________<wbr>_________________<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/<wbr>listinfo/gradsusr</a><br>
><br>
> --<br>
> Jennifer Miletta Adams<br>
> Center for Ocean-Land-Atmosphere Studies (COLA)<br>
> George Mason University<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<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/<wbr>listinfo/gradsusr</a><br>
<br>
______________________________<wbr>_________________<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/<wbr>listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<br></div></div></div></div></div>
</div>