Re: Re: [ncl-talk] Question on the correlation pattern plot ?

From: LEO_ARIES <Leo_Aries_at_nyahnyahspammersnyahnyah>
Date: Tue, 23 Jan 2007 02:51:00 +0800

Hi, Dennis, Thank you for the advise you have given to me . (I'm sorry that I've also send this mail directly to you.)

I think that I should give more explaination for my question. :)
My real question is that how to wipe off the ocean grids When I read the CRU precipitation data.
Of course, I can mask the ocean grids when plotting. But the constant missing value of ocean grids
will cause some error when calculation ( I will introduce at the following content).

Here is a little longer explaination:
As we know, there are many functions in NCL, some of them can deal with missing value
(it mean that the input variable could have a attribute of _FillValue), some of them
can not ( so _FillValue was not allowed when using such functions), and there are still
some other cases that error ( warning at some times) was not directly ,but indirectly caused by the _FillValue.

As to CRU precipitation , there are constant missing value for most of the ocean grids. We can mask ocean area
when plotting, but sometimes such grids with constant missing value can not pass calculation ( it will cause error
or warning when using some functions).
Example 1 : for the ocean grid with constant missing value , using "escorc" function will cause a warning message
                which inform you that maybe there are some constant values when calculation. Of course, this does affect the final result.

Example 2 : Just as what I said in the last mail, I pick up 2 key sentence of my codes
               .....
               " Nx1(ilat,ilon) = num(.not.ismissing(ann_cru(ilat,ilon,{1951:2002})))"
               .....
               " prob1 = rtest(ccr1,Nx1,0) "

              These 2 sentences tell me that Nx1 will have a zero value for the ocean grid, and I believe that such zero value
cause the error of rtest function.


Thanks


Lin




LEO_ARIES
2007-01-23



发件人: Dennis Shea
发送时间: 2007-01-23 01:47:39
收件人: Leo_Aries_at_tom.com
抄送:
主题: Re: [ncl-talk] Question on the correlation pattern plot ?

offline ... not sure what the problem is ...


>I have a question when I want to get a correlation field
>between PDO and NH precipitation.

>1. I met an error when dealing with rtest of cross correlation ,
> error info : "SLATEC/NCL: DBETAI: P AND/OR Q IS LE ZERO:
> NERR= 2: LEVEL= 2" and codes were listed below :
>
> ccr1 = escorc(pdo({1951:2002}),ann_cru(:,:,{1951:2002}))
> nlat = dimsizes(ccr1(:,1)) ; nlat= 180 for North Hemisphere
> nlon = dimsizes(ccr1(1,:)) ; nlon = 720
                                                                   ^^^^^^^^^^^^^
                                                                   CRU ... this does not look correct
> print(nlon)
> print(nlat)
> Nx1 = new((/nlat,nlon/),"integer")
> do ilat = 0,nlat-1
> do ilon = 0,nlon-1
> Nx1(ilat,ilon) = num(.not.ismissing(ann_cru(ilat,ilon,{1951:2002})))
> end do
> end do
> prob1 = rtest(ccr1,Nx1,0)

>I believe that it is because Nx1 have many constant
>missing value in ocean area that cause such trouble.
>But I can not find a way to resolve it.
------------------------------------------------------

   ccr1 = escorc(pdo({1951:2002}),ann_cru(:,:,{1951:2002}))
   copy_VarCoords(ann_cru(:,:,0), ccr1)
   ccr1_at_long_name = "r: PDO-CRU"
   printVarSummary(ccr1)
   printMinMax(ccr1, True) ; contributed.ncl
   
   
   Nx = dim_num(.not.ismissing(ann_cru(:,:,{1951:2002})))
   copy_VarCoords(ccr1, Nx) ; contributed.ncl
   Nx_at_long_name = "number of non-missing values"
   printVarSummary(Nx)
   printMinMax(Nx, True)
   
What does it say for the Nx@_FillValue ???

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 22 2007 - 11:51:00 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 05 2007 - 07:15:45 MST