Re: Resampling problems

Dear anyone,

We're having some resample problems here.

Resample works fine for one field but doesn't work for another. This is
the timeset we're trying to sample to and the field,

timeset = -86400, 0, 86400

SampleField: FlatField
    FunctionType (Real): (TAFTIME) -> difference
1.0, 0.687656044960022, 0.472870796918869, 0.32517245411872864,
0.22360679507255554, 0.15376456081867218, 0.1057371273636818,
0.07271077483892441
0.05000000074505806

This is the exception we get:

java.lang.reflect.InvocationTargetException:
java.lang.NullPointerException
        at visad.Irregular1DSet.valueToInterp(Irregular1DSet.java:126)
        at visad.FlatField.resample(FlatField.java:3234)
        at
au.gov.bom.aifs.autotaf.DataRepresentation.FieldManipulation.resampleField(FieldManipulation.java:551)
        at
<snip>

This is how we're calling resample, 

--
MathType domainNameType = 
   MathType.stringToType(domainNameString.toLowerCase());

Irregular1DSet newSet = new Irregular1DSet(domainNameType, time);

sampledField = (FieldImpl)sampledField.resample(newSet, mode,
                                                Data.INDEPENDENT);
--

where mode is WEIGHTED_AVERAGE.

Has anyone any ideas or suggestions why the exception is being thrown? 

Thanks.

Eugene.

   _--_|\     Eugene Tan <E.Tan@xxxxxxxxxx>
  /      \    AutoTAF Project Developer 
  \_.--.*/    Bureau of Meteorology, Melbourne, VIC 3001, Australia
        v     Telephone: +613 9669 4455



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