[Thread Prev][Thread Next][Index]

Re: Averaging/integrating

Hi Bruno,

A general solution to this is to "mask" the variable before integration.

e.g. to integrate only above the 20 degree isotherm

  LET iso20 = my_temperature[Z=@LOC:20]
  LET mask = IF Z[g=my_temperature] .LT. iso20 THEN 1     ! else missing
is implied
  LET masked_temp = mask*my_temperature

Now integrate masked_temp instead of my_temp.

Note that this approach applies an all-or-nothing criterion to each grid
cell, rather than including fractional grid cells in the integration. If
necessary the accuracy of the integration can be improved by first
regridding my_temperature to a finer grid. 

	- steve


Bruno Levier wrote:
> Hi!
> How to integrate a variable within a surface/volume delimitated by an
> isoligne/isosurface?
> Thanks
>         Bruno

Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement