comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: array subtraction
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: array subtraction [message #63339 is a reply to message #63338] Wed, 05 November 2008 08:29 Go to previous messageGo to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Wed, 5 Nov 2008 07:25:10 -0800 (PST), julia.walterspiel@gmail.com
wrote:

> hey guys
> SOS call from the newbie:
>
> I've got two data arrays, one of length 134 (=a), the other of length
> 75 (=b) with monthly cloud cover data from modis terra and aqua.
> Data from Terra starts feb 2000, data from Aqua starts july 2002.
>
> I want to calculate and plot the difference in cloud cover for each
> month from Terra and Aqua. so far so good.
>
> the two data arrays are "connected" by two (separate) time arrays c
> (for Terra, feb 2000 - now) and d (for Aqua july 2002 - now).
> that means, my data array "b" starts only somewhere at index so-and-so
> of "a" (not sure where exactly).
> Now, how can I tell IDL to subtract the two arrays at the right point,
> meaning subtract the terra-value on july 2002 from the aqua value on
> the same date?
>
> I'm sure everyone of you can do that with both eyes closed and it
> can't be difficult but I couldn't find any help online.
> thanks!
> juls

So you only need to get i in this:
diff = a[i:*]-b

In general I would say
i=value_locate(c,d[0])
but what format do the time/data arrays have (string, Julian Day
Number,...)?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: On-the-fly compilation of routines
Next Topic: Plot: idl_guide4 UK_NCAS-Meteo-Library

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:50:43 PDT 2025

Total time taken to generate the page: 0.48001 seconds