Re: missing values with month_to_seasonN

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 06 Sep 2007 15:57:30 -0600

Hi Will,

I just created a test script looking into this and you're correct,
month_to_seasonN is labeling missing data as -999 but leaves the
_FillValue attribute the same as whatever it was when it was passed in
to the function... This is of course wrong, and will be fixed upon the
next release of NCL.. If anyone needs a corrected version of this
function let me know...

Thanks for pointing this out.
Adam

Will Hobbs wrote:
> Hi all
>
> This is just a comment on a problem that I'm having with the
> month_to_seasonN function. It may affect other functions but this is the
> first time I've come across it.
>
> I'm using SST from the hadisst dataset, which uses a _FillValue of 1e+20,
> including land surface areas. See the following snippet, with comments....
>
> x = f1->sst
>
> print(x@_FillValue) ;correctly returns 1+e20
> print(num(ismissing(x))) ; if the data includes land surface, this
> must be non-zero
>
> xSeas = month_to_seasonN(x, season)
>
> print(xSeas@_FillValue) ;returns 1+e20. fine
>
> print(num(ismissing(xSeas))) ;returns 0, wrong!
>
> print(num(xSeas.eq.xSeas@_FillValue)) ;again, incorrectly returns 0
>
> print(num(xSeas.eq.-999.)) ;returns a sensible answer
>
> Of course it's easy enough to fix a workaround for this..
>
> xSeas@_FillValue = -999.
>
> ...but if you're not aware of this it can cause some unusual results
> further down the line.
>
> Will
>
>
>
> ============================
> Will Hobbs
> PhD Candidate
> Room A113
> UCLA Department of Geography
> 1255 Bunche Hall
> Los Angeles CA 90095-1524
> Tel: 310 663 2631
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 06 2007 - 15:57:30 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 07 2007 - 11:00:32 MDT