[Thread Prev][Thread Next][Index]

Re: [ferret_users] vertical weighted averagng



Hi Ansley,

Thanks for these handy tips. It seems very easy now to get at the area for each grid cell as well as the total area, such as with

  use levitus_climatology
! Area of each cell (unmasked)
  let area = temp[x=@wgt,k=1] * temp[y=@wgt,k=1]

! Area of each ocean cell (masked)
  let areaw = if temp[k=1] then temp[x=@wgt,k=1] * temp[y=@wgt,k=1]
! Total ocean area:
  list areaw[x=@sum,y=@sum]

Much appreciated,

Jim

On Fri, 24 Mar 2017, Ansley C. Manke wrote:


Hi all,

Here are some related resources:

The @AVE transformation. Note that the @WGT transformation returns the weights used by the equivalent @AVE
transform.

A section on General Information on transformations.

FAQ on averages computed on the surface of the earth

Here's a Users List archive message about calculating the area of grid cells on the Earth's surface - which
is a technique that works in general - it's equivalent to @WGT in fact.
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2004/msg00026.html


Ansley

On 3/23/2017 10:12 PM, Abhishek Savita wrote:
      Hi... all
         I have also faced same problem earlier. I have checked  it analytically as well as with the
matlab also. Actully ferret gives the weighted average if we give like var[x=@ave,y=@ave,z=@ave,.....].
But If anybody interested to compute normal average then in place of giving X, Y etc we should give
corresponding index number as var[i=@ave,j=@ave,.....]. Where i and j are the index number
corresponding Lon and lat.
Please check it I hope it will work.

with regards
Abhishek

On Fri, Mar 24, 2017 at 9:55 AM, Ryo Furue <furue@xxxxxxxxxx> wrote:
      Hi Robert and Martin,

            yes? list/k=1 temp[x=@ave,y=@ave]
...
      -1.788
but I'd like to have area weighed averaged value. How should I told ferret that x and y is
long and lat for averaging computations,


With temp[x=@ave,y=@ave], Ferret does compute the area weighted average if the horizontal axes
are longitude and latitude.  If the axes aren't longitude and latitude, Ferret computes x=@ave
and y=@ave separately (I think), which may not coincide with the correct area-weighted average.

I don't know if it's possible to compute the area of each gridbox within Ferret. You may have to
supply that information from outside. Then,

  let area_temp = temp * boxarea
  let area_average_temp = area_temp[x=@sum,y=@sum] / boxarea[x=@sum,y=@sum]

Ryo




--
Regards
Abhishek Savita

Research Scholar (Earth System Science Technology)
Center For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute of Technology, Kharagpur
+91-8609704619
 





--
LSCE/IPSL, Laboratoire des Sciences du Climat et de l'Environnement
CEA-CNRS-UVSQ

LSCE/IPSL, CEA Saclay           http://www.ipsl.jussieu.fr/~jomce
Bat. 712 - Orme                 mailto:  James.Orr@xxxxxxxxxxxx
Point courrier 132
F-91191 Gif-sur-Yvette Cedex    Phone:   (33) (0)1 69 08 39 73
FRANCE                          Fax:     (33) (0)1 69 08 30 73

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement