[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #PGQ-180287]: computing means of a variable

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [IDV #PGQ-180287]: computing means of a variable
  • Date: Tue, 10 Feb 2009 14:27:44 -0700

,
> 
> I have a netcdf file with a single parameter but 1000's of timesteps.
> What is the easiest way to compute the mean of the variable over all
> timesteps. Can you provide an example.
> 

There is a jython procedure: averageOverTime that averages the fields.
I have created a formula (attached as a plugin, load it through the File menu
in the  Plugin Manager (Tools->Plugin Manager menu)) that does this.

Just select the "Average time steps" formula under "Grids" once you load the 
plugin (and restart
the IDV). 

When you load in the data source you should also turn on cache to disk.
Bring up the Properties dialog for the data source and turn on "Always cache to 
disk"
This way only one time step at a time is read in so you don't blow memory. 

-Jeff


Ticket Details
===================
Ticket ID: PGQ-180287
Department: Support IDV
Priority: Normal
Status: Closed

Attachment: averagetimestep.jar
Description: application/java-archive