[Thread Prev][Thread Next][Index]

Re: [ferret_users] average values excluding zeroes



Dear All,

Thanks for your feedback.

I am attaching the files with output generated. The issue is when i am listing the are of interest defined to save in txt file it is listing the adjoint grids as ******** in the output file, but I need only the values comes under set polygon/region.

I am attaching my script for reference.

--
Regards,
Nitin Patil

Webpage: https://sites.google.com/site/nitinpatil85/

On Wed, Dec 3, 2014 at 11:46 PM, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:
Hi,
I think what you're doing looks correct.  What are you seeing?

One thing that may be going on is the region specification:

let temp=ci_data[x=65:95@ave,y=5:40@ave]

The context, x=65:95 and y=5:40, is being applied to the pt_in_poly _expression_ and I think the x context is being applied to the arguments xci,yci

Try it with this instead - you have defined ci_data to be missing outside the region of interest, so it should give you the result you want.

  let temp=ci_data[x=@ave,y=@ave]

Another small suggestion, is to make sure your polygon is closed. Repeat the first value in the lists at the end.

See the region,

   yes? shade rf[d=1,l=18050]
   yes? plot/vs/line/over/nolab/thick xci, yci

Ansley


On 12/3/2014 7:13 AM, Nitin Patil wrote:
Dear ferret users,

I am averaging the area of interest and I am getting the mean, standard deviation which counts zero also to get mean. How to exclude the zero in the selected area grids and get the real mean value.

Here is my script:

let xci = {77,79,79,83,83,84,84,83,83,82,82,80,80,79,79,76,76,73,73,72,72,74,74,75,75,77,77}
let yci = {27,27,25,25,24,24,21,20,20,19,18,18,17,17,16,16,15,15,15,18,21,21,23,23,24,24,24}
let ci = pt_in_poly(rf[d=1],xci, yci)
let ci_data = if ci eq 1 then ci*rf[d=1,l=18050:18171]

let temp=ci_data[x=65:95@ave,y=5:40@ave]
let sum=MISSING(temp,0)
let sum_good=IFV temp then 1 else 0
let count=sum_good
let mean=sum/count

stat mean
sh sym stat*
let varmean = ($stat_mean)
let varstd = ($stat_std)
list/norowlab/nohead/append/file=CI.txt varmean, varstd

--------------------------

--
Regards,
Nitin Patil




**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
    53.979
     7.315
     6.467
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
    21.294
     0.000
     2.669
     0.450
     0.716
     0.000
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
    13.045
     0.369
    27.669
     0.374
    10.365
     4.794
     0.000
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     5.976
    15.878
     5.993
    45.026
    33.132
     1.696
     8.650
     0.335
     0.527
    12.713
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     1.968
     0.000
     0.000
    53.858
    16.236
     3.229
     9.340
     6.642
     5.387
     1.939
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     3.202
     0.382
     0.953
    23.506
    10.347
    16.041
     0.309
     2.260
     0.000
     0.392
     3.184
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     0.397
     4.272
     8.624
    12.242
     0.000
     9.276
     0.000
     0.834
     0.000
     6.286
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     0.000
     0.000
    12.003
    16.442
     2.299
     0.000
     1.798
     0.000
     0.000
     2.182
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     0.000
    16.428
    12.848
     5.234
     0.000
     0.000
     0.000
     0.000
     0.000
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     6.115
     0.380
     0.000
     0.000
     0.000
     0.000
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
    17.025
    10.232
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
     7.738
     0.000
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********

Attachment: rain.nc
Description: Cdf file

Attachment: try.jnl
Description: Binary data


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

Privacy Policy | Disclaimer | Accessibility Statement