Re: a question about wgt_areaave_Wrap (wgt_areaave)

From: Saji N Hameed <saji_at_nyahnyahspammersnyahnyah>
Date: Mon, 28 Jul 2008 06:11:59 +0900

Hi Song Feng,

First, you need to know what scheme GrADs uses - I mean what kind
of weighted average it does ... probably, it is weighted with cosine of
latitude???

It is possible that you need to do a weighted average of some
sort to compare with the values produced by GrADs.

If you see example 1 in
http://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_areaave.shtml
you can find ways to do various kinds of weighted averages. One of them
should provide similar values to the GrADs produced values..

saji

* Song Feng <sfeng2_at_unlnotes.unl.edu> [2008-07-27 10:41:55 -0500]:

> Hi All:
>
> I am computing the regional average using wgt_areaave_Wrap with no
> weighting. The following are part of the code I used:
>
> begin
> ;*******************************************
> ; open file and read in data
> ;*******************************************
> f = addfile ("out_2.5x2.5.nc", "r") ; the data are in
> standard 2.5 lon by 2.5 lat gridpoint.
> t = f->pr(:,:,:) ! read the precipitation
>
> ; Compute the regional average over (30-50N, 90-110W). No weighting was
> applied.
> ; tclidiv01 = wgt_areaave_Wrap(t(:,{30:50},{250:270}),1.0,1.0, 0)
> tclidiv01 = wgt_areaave_Wrap(t(:,48:56,100:108),1.0,1.0, 0)
> asciiwrite ("Great.Plains.txt" , sprintf("%9.3f", tclidiv01*86400 ))
>
> However the regional average computed by NCL and the GrADS (using
> ave(ave(pr,x=101,x=109),y=49,y=57)) are different. See the following for
> an example:
>
> Month, Pr (output by NCL), Pr(output by GrADS).
> 1 1.535 1.748
> 2 1.718 1.905
> 3 1.762 1.740
> 4 1.873 1.732
> 5 2.307 2.249
> 6 2.753 2.773
> 7 2.108 2.032
> 8 0.961 1.094
> 9 1.064 1.279
> 10 1.446 1.560
> 11 1.738 1.869
> 12 1.465 1.685
>
> I used the GrADS many times, so I am pretty sure the regional average
> output by GrADS are correct. So, what method the NCL used to compute the
> regional average? Is he NCL compute the regional average using certain
> kind of weighting (even I specified no weighting)?
>
> Best regards!
>
> Song Feng
>

> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
Saji N. Hameed
APEC Climate Center          				+82 51 668 7470
National Pension Corporation Busan Building 12F         
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705			saji_at_apcc21.net
KOREA
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 27 2008 - 15:11:59 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 28 2008 - 09:07:16 MDT