[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Support #ARV-969650]: IDV formulas
- Subject: [Support #ARV-969650]: IDV formulas
- Date: Sat, 01 May 2010 07:25:06 -0600
Hey Jim-
> FYI that "ADD" is not recognized either:
>
> Traceback (innermost last):
> File "<string>", line 1, in ?
> NameError: ADD
Sorry, it's case sensitive. It should be add, not ADD
Do you want all layers in the model between 850-500, or just specific layers?
If they are contiguous layers, then you could create a jython procedure that is:
def lavg(grid):
return GridMath.applyFunctionOverLevels(grid, GridMath.FUNC_AVERAGE)
and then in formulas, select Grids->Define a grid diagnostic and type in
lavg(grid). When you are prompted for the grid, you can select a range of
levels in the field selector (click on the first level and then shift click on
the upper level).
For some reason, you can't just create a formula, you have to create the Jython
function first. I'll look into that and adding lavg as a system function on
Monday.
If they are non-contiguous layers (e.g. 850,700,500), then you would have to do
the add instead.
> I can't wait until we can just say "Computer, plot the mean RH in
> the 850-500 mb layer in panel 2." Captain Kirk can do that.
I think you'll have to wait for the voice activated commands a little longer.
Captain Kirk didn't live until the 23rd century. ;-)
Don
> Unidata IDV Support wrote:
> > Jim-
> >
> > Please send these to support-idv (and include the python error). dmurray
> > won't work much longer. ;-)
> >
> >
> >> For the life of me I can't get IDV formulas to work. I get a python
> >> error every time. Here I'm just trying to average 3 variables. Why
> >> won't this work? If this isn't enough info, let me know.
> >>
> >
> > I assume you are using slices at different levels and getting an error
> > about manifold dimension or some such thing. The problem is that the
> > resampling from one level to another is going to fail. Although we tout
> > the compatibility of Jython and VisAD, in reality if you are trying to do
> > simple math functions (+,-,/,*) on different types of grids, you are better
> > off using the GEMPAK syntax:
> >
> > ADD(ADD(A,B),C)/3
> >
> > I need to make functions like:
> >
> > AVG(A,B,C,...)
> >
> > These functions will remove the extra dimension which is causing you
> > problems with the simple +, etc functions.
> >
> > I'll look into this more tomorrow.
> >
> > Don
> >
> > Ticket Details
> > ===================
> > Ticket ID: ARV-969650
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
> >
>
>
Ticket Details
===================
Ticket ID: ARV-969650
Department: Support IDV
Priority: Normal
Status: Open