[gradsusr] define spanning over multiple expressions

Davide Sacchetti davide.sacchetti at arpal.gov.it
Thu Mar 16 03:28:38 EDT 2017


Thanks Jennifer,
my problem is actually harder than that
my ctl files do not have the "e" dimension: I'd like to define a
variable with a varying "e".
I'd like to obtain something like this:

# ctl files with temp have no "e" dim
'set e 1 10'
'define tempdef=anything'
assign tempdef(e=1) -> temp.1
assign tempdef(e=2) -> temp.2
assign tempdef(e=3) -> temp.3
...

Bye
Thanks
Davide

Il giorno mer, 15/03/2017 alle 18.44 +0000, Jennifer M Adams ha
scritto:
> Ciao, Davide — 
> From the doc page on variables: 
> 
> "An important note: When you specify a dimension in grid units, GrADS
> always converts it to world coordinates. In general, this conversion
> is done using the scaling of the default file. The only exception to
> this rule is when a grid coordinate (x, y, z, t, or e) is supplied
> within a dimexpr as part of a variable specification. In the case of
> this special exception, the conversion is done using the scaling for
> the file that variable is to be taken from (i.e., file number
> file#)."
> 
> So, an expression like 
>    ‘set dfile 1’
>    ‘set e 1'
>    ‘d temp.1-temp.2(e=2)’
> should work if file #2 is the one with ensembles and file #1 has no E
> dimension. 
> 
> Bye Bye ;-)
> -Jennifer
> 
> 
> On Mar 15, 2017, at 1:57 PM, Davide Sacchetti <davide.sacchetti at arpal
> .gov.it> wrote:
> 
> > Dears, I'd like to define a variable from more than one expression,
> > but
> >    I don't know how.
> > 
> > I mean: I have different files with temperature (on the same grid),
> > I
> > could compare temp.1 vs temp.2 but I'd like to compare something
> > like
> > temp(e=1) vs temp(e=2) without writing a new ctl with ens
> > dimension: 
> > I'd prefere to do it on the fly, as defining a variable, let's say
> > tempdef that links to temp.1 for e=1 and temp.2 for e=2, but I
> > don't
> > know how to do it.
> > Any ideas?
> > 
> > Bye
> > Davide
> > 
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> 
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
> 
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list