RE: contouring a list of winds ..It Works!!!

Bill,
eureka, it works great! thanks for the help - (i was close - but needed to
know the domain units had to match the locations).

thanks again,
-john

>Hi John,
>
>> well, still having a little trouble understanding the contstructs...
>>
>> how do you define the locations of the wind speeds in an Irregular2DSet?
>> is there an example i can look at?
>
>The examples that construct an Irregular2DSet use
>FlatField.makeField() with irregular == true and
>with a 2-dimensional domain.  The Irregular2DSet
>constructor is:
>
>  Irregular2DSet(MathType dtype, float[][] samples)
>
>where dtype is a RealTupleType with two RealType components,
>and samples is dimensioned float[2][number_of_samples].
>The location of your i-th wind would be
>(samples[0][i], samples[1][i]).
>
>The code might look like this:
>
>  RealType x = new RealType("x");
>  RealType y = new RealType("y");
>  RealType spd = new RealType("spd");
>  RealTupleType domain = new RealTupleType(x, y);
>  FunctionType wind_function = new FunctionType(domain, spd);
>  float[][] wind_locations = new float[2][number_of_winds];
>  float[][] wind_speeds = new float[1][number_of_winds];
>  for (int i=0; i<number_of_winds) {
>    wind_locations[0][i] = x location of wind i
>    wind_locations[1][i] = y location of wind i
>    wind_speeds[0][i] = speed of wind i
>  }
>  Irregular2DSet set = new Irregular2DSet(domain, wind_locations);
>  FlatField wind_field = new FlatField(wind_function, set);
>  wind_field.setSamples(wind_speeds);
>
>Now wind_field contains your winds.
>
>Cheers,
>Bill
>----------------------------------------------------------
>Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
>hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
>http://www.ssec.wisc.edu/~billh/vis.html


John F. Moses
Computer Sciences Corp.
EOSDIS Science Operations, ESDIS Project Code 423
BLD 32, E209I
Goddard Space Flight Center, Greenbelt, Maryland, 20771
Voice @ GSFC:  (301) 614-5308
FAX @ GSFC:    (301) 614-5267
Email:          John.F.Moses@xxxxxxxxxxxxx
Email:          jfmoses@xxxxxxxxxxxxxxxxxxxx



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