Re: question about dim_variance_Wrap and dim_avg_Wrap

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 02 Jul 2008 22:30:50 -0600

I assure you, the NCL functions calculate
the mean and variance correctly.

You will have to post your NCL code.
You have not posted any information that helps
us determine the problem

Actually, it is hard to tell if the code you posted
is fortran or NCL. Also, the // are not fortran or NCL.

NCL is zero-based so if NCL your do loops should be
do i=0, num_x-1
do j=0, num_y-1

caoyan_at_cma.gov.cn wrote:
> hi,Sir:
> I use NCL build-in function(dim_avg_Wrap and dim_variance_Wrap) to
> calculate the average and spread,I think it should be same result with
> my own procedures, but it is not, the result from NCL and my procedure
> is different, so I want to kown why? which function I should use? The
> following is my procedure, It is simple:
> do i=1, num_x
> do j=1, num_y
> mean(i,j)=0.0 //average
> spd(i,j)=0.0 //spread
> do ienn=1,enn //number of ensemble members
> mean(i,j)=mean(i,j)+var(i,j,ienn)
> enddo
> mean(i,j)=mean(i,j)/(enn*1.0)
> do ienn=1,enn
> spd(i,j)=spd(i,j)+(var(i,j,ienn)-mean(i,j))*(var(i,j,ienn)-mean(i,j))
> enddo
> spd(i,j)=sqrt(spd(i,j)/(enn*1.0))
> enddo
> enddo
> look forward your reply!
> thanks!
> sincerely
> Cao Yan
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 02 2008 - 22:30:50 MDT

This archive was generated by hypermail 2.2.0 : Sun Jul 06 2008 - 17:04:16 MDT