NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [idvusers] Adding two different 4d grids

Did you try this:

def simpleAdd(F1,F2):
    return F1 + F2


Ken


________________________________
 From: Paul Graham <meteorpaul@xxxxxxxxx>
To: idvusers@xxxxxxxxxxxxxxxx 
Sent: Tuesday, August 27, 2013 12:26 PM
Subject: Re: [idvusers] Adding two different 4d grids
 

Hi Don,

The first method generates a "visad.UnitException".  The second one (with
noUnit) generates "java.lang.NullPointerException".  Any ideas as to what
can be done?

Thanks,

Paul


On 28 August 2013 08:25, Paul Graham <meteorpaul@xxxxxxxxx> wrote:

> Hi Don,
>
> The first method generates a "visad.UnitException".  The second one (with
> noUnit) generates "java.lang.NullPointerException".  Any ideas as to what
> can be done?
>
> Thanks,
>
> Paul
>
>
> On 27 August 2013 23:19, Don Murray (NOAA Affiliate) 
> <don.murray@xxxxxxxx>wrote:
>
>> I would expect that the second one would work.  What errors do you get?
>>
>> Don
>>
>>
>> On 8/26/13 8:49 PM, Paul Graham wrote:
>>
>>> Dear IDV Users,
>>>
>>> What is the best way to add two different 4d grids (ie. having different
>>> units) in order to create dimensionless field?
>>>
>>> Eg.  Suppose, for whatever reason, you wanted to add convective available
>>> potential energy (CAPE), F1, and rainfall rate, F2.
>>>
>>> I have not been able to get either of the following to work (IDV produces
>>> errors):
>>>
>>> def simpleAdd(F1,F2):
>>>    res = add(F1,F2)
>>>    return res
>>>
>>> def simpleAdd(F1,F2):
>>>    res = add(noUnit(F1),noUnit(F2))
>>>    return res
>>>
>>> What should I do?
>>>
>>> Thanks,
>>>
>>> Paul
>>> ______________________________**_________________
>>> idvusers mailing list
>>> idvusers@xxxxxxxxxxxxxxxx
>>> For list information, to unsubscribe, visit:
>>> http://www.unidata.ucar.edu/**mailing_lists/<http://www.unidata.ucar.edu/mailing_lists/>
>>>
>>>
>> --
>> Don Murray
>> NOAA/ESRL/PSD and CIRES
>> 303-497-3596
>> http://www.esrl.noaa.gov/psd/**people/don.murray/<http://www.esrl.noaa.gov/psd/people/don.murray/>
>>
>> ______________________________**_________________
>> idvusers mailing list
>> idvusers@xxxxxxxxxxxxxxxx
>> For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/
>> **mailing_lists/ <http://www.unidata.ucar.edu/mailing_lists/>
>
>
>
>
> --
>
>
_______________________________________________
idvusers mailing list
idvusers@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/

  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: