Re: Segmentation fault with dtrend_msg (fwd)

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Oct 2006 14:37:33 -0600 (MDT)

[Note: I tried to post this email about 2.5 hours ago, but our mailman
system had a hiccup in it and it bounced my message. If you tried to
post something to ncl-talk and got a bounced message, please try
posting again. It seems to be working.]

On Wed, 11 Oct 2006, Barry Baker wrote:

> Hello,
>
> I'm new to NCL and having a problem with dtrend_msg. When I set return_info
> to True I get a segmentation fault. I can't figure out why and was
> wondering if anyone else may have run into this problem? I'm running NCL on
> Powerbook G4 with Mac OS X 10.4.7 I've included my script is below which was
> borrowed from Michael Notaro's web page. Thanks in advance, Barry

Hi Barry,

You've discovered a bug in dtrend_msg that occurs under a certain set
of circumstances: when return_info is True, and the second input
variable to "dtrend_msg" is type double and multi-dimensional.

This bug was fixed, and I can give you a new "ncl" executable with the
fix. Just email me with your machine type (uname -a) and I'll put
something on ftp.

Meanwhile, Dennis pointed out that a work-around is to convert your
input to float. This will probably work, but it would be better to get
a new version so you don't need to do this.

Thanks for reporting this problem.

--Mary

> ;******************************
> load "/usr/local/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "/usr/local/lib/ncarg/nclscripts/csm/shea_util.ncl"
> load "/usr/local/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
> diri = "/Users/bbaker/data/Vulnerability/"
> fili = "co_tmax1895-1997.nc"
>
> a = addfile(diri+fili, "r")
> yrs = fspan(1.,103.,103)
> lat = a->lat ; get lat
> lon = a->lon ; get lon
> ta1 = a->tmax(:,:,:)/100.0 ; get data
> print(yrs)
> ta1!0 = "time"
> ta1!1 = "lat"
> ta1!2 = "lon"
> ta1&time=yrs
> ta1&lat=lat
> ta1&lon=lon
>
> ta2 = ta1(lat|:,lon|:,time|:)
> times = ispan(1,103,1)
> yDtrend = dtrend_msg(times,ta2,False,True) ; Calculate the trend
>
> end
> ;*********************************
> _________________________
> Barry Baker, Ph.D.
> Global Climate Change Initiative
> The Nature Conservancy
> 2424 Spruce St., Suite 100
> Boulder, CO 80302
>
> Tel: (303)-541-0322
> Fax: (303)-449-4328
>
> http://nature.org/tncscience/scientists/misc/baker.html
>
>
>
> _______________________________________________
> 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 Thu Oct 12 2006 - 14:37:33 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 13 2006 - 10:37:11 MDT