Re: [idvusers] formula

Thanks Tom but since am using grads to print images and netcdf files I get one 
file every 24hr so am using 32 files. Any idea of how can I solve this.

thanks

-----Original Message-----
From: Tom Whittaker [mailto:whittaker@xxxxxxxx] 
Sent: martes, 29 de marzo de 2011 10:19 a.m.
To: Luis Del Castillo
Cc: idvusers@xxxxxxxxxxxxxxxx
Subject: Re: [idvusers] formula

Luis --

On Mon, Mar 28, 2011 at 4:41 PM, Luis Del Castillo
<luis.delcastillo@xxxxxxxxxxxx> wrote:
> Hi every one am writing because I'm trying to create a formula with 32 
> variables in this case is an average so I need to create a formula that adds 
> 32 variables and then divide by 32 so how could I create a formula that does 
> this.
>
> The main idea is that this is done with the last 32 days every day.

If your source data is a single "data object" that has 32 times (days)
of data, then you would simply write a Jython function to do the
summing and divide, and then create a formula that calls this function
with the data object.  There is a built-in formula and function to do
this for grids, which might work with image data (if that is what you
have) -- take a look in the Dashboard -> Field Selector.  Click
"Formulas" under the "Data Sources" column, and then in the Fields
column, click "Grids -> Time steps"  You can then right-click on the
"Average time steps" to see the formula.  You will find that it calls
the function "averageOverTime(field)".  You can see what
"averageOverTime()" looks like by looking in the Jython Library, under
"System" and the "Grid routines".

If you are not using grids or images, the process may be more involved
and  you would likely have to write your own function to do the
averaging...but I hope that helps...

tom




>
> Thanks
>
>
>
> Luis Alejandro Del Castillo Riley
>
> luis.delcastillo@xxxxxxxxxxxx
>
> Soporte de Tecnología / IT Support
>
> CATHALAC
>
> www.cathalac.org
>
> Tel: (507)317-3235 (directo)
>
> Tel: (507)317-3200 (Central Telefónica)
>
> Fax: (507)317-3299
>
> 111 Ciudad del Saber, Clayton, Panamá
>
> Apartado 0843-03102, Panamá
>
>
>
> _______________________________________________
> idvusers mailing list
> idvusers@xxxxxxxxxxxxxxxx
> For list information, to unsubscribe, visit: 
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759



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