Re: MathModel question

Hi John,

> I am debating between using the following MathModels for my data:
> ((lat,lon) -> (val1, val2, ... , elevation) )
> or
> ( ((lat, lon) -> (val1, val2, ...)) , ((lat, lon) -> elevation))
> where (val1, val2...) are some data value such as temperature or
> precipitation.
> The reason I am having this debate is that I frequently will need to
> perform operations on just the val1 and val2 without changing
> elevation.  In the first case, this necessitates doing extract's and
> combine's each time I perform an op, whereas in the second case it is
> only necessary to do a getComponent() on the Tuple, followed by
> constructing a new Tuple after performing the operation(s).  It seems
> clear that the second choice would be more efficient, but i'm still
> inclined to go with the first, as it's more "standard" insofar as file
> storage goes.
> So, I guess my question is, in the long run, am i going to take a big
> hit, efficiency-wise, if i go with the first MathModel and do all those
> extract's and combine's, or would a comparable number of those
> operations be performed anyway by the code that performs the ops ?

Yes, the time for extract and combine should be comparable
to the time for adding Fields, so its not going to be a lot
slower.  On the other hand, if your Fields are large so that
the time to add is large (do you notice delays?) then doing
extracts and combines may multiply delays by two or more.

Also, if you want to "color" an elevation surface with
val1 or val2, then you'll need the MathType:

  ((lat,lon) -> (val1, val2, ... , elevation) )

whereas if you want to see independent surfaces of val1 and
elevation, you'll need the MathType:

  ( ((lat, lon) -> (val1, val2, ...)) , ((lat, lon) -> elevation))

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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