[ncl-talk] Mean with same lat and lon

Vanúcia Schumacher vanucia-schumacher at hotmail.com
Sat Jun 27 18:01:09 MDT 2020


Hi users,

I need some help to figure out how I could get the average of the variable when there is more than 1 value for the same pixel (lat and lon values that are within the same pixel).

In this data example (attached), 3 values of lat and lon are very close, so in my script (attached) I get the sum of these values, but I would like to change it to get the average value when this happens (lat and lon close).

Variable: var
Type: float
Total Size: 48 bytes
            12 values
Number of Dimensions: 1
Dimensions and sizes: [12]
Coordinates:
(0) -64.611
(1) -23.999
(2) 12.76
(3) -22.784
(4) -16.24
.....

Variable: xvalid
Type: float
Total Size: 40 bytes
            10 values
Number of Dimensions: 1
Dimensions and sizes: [10]
Coordinates:
Number Of Attributes: 1
  _FillValue : -999
(0) -75.85      ======>>>>> sum of  -64.611, -23.999, 12.76 values
(1) -22.784
.......

I appreciate some help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200628/7ac61a2c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ncl
Type: application/octet-stream
Size: 1872 bytes
Desc: test.ncl
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200628/7ac61a2c/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2015-01-01.txt
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200628/7ac61a2c/attachment.txt>


More information about the ncl-talk mailing list