Re: Segmentation fault with dtrend_msg

From: Barry Baker <bbaker_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Oct 2006 14:23:45 -0600

Hi Mary,

Thank you for responding to this issue. I did convert the double to float
and was able to use dtrend_msg. Dennis also supplied the attached script
which works.

Here is my machine type (uname -a)
Darwin Irvis.local 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53
PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc with
OS X 10.4.7

Thanks to you, Dennis Shea, and Michael Notaro for all your help.
Best regards,
Barry

  

On 10/12/06 11:49 AM, "Mary Haley" <haley_at_ucar.edu> wrote:

>
> 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
>
>
> 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
>>
>> ;******************************
>> 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
>>

_________________________
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

Received on Thu Oct 12 2006 - 14:23:45 MDT

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