[ncl-talk] Segmentation fault

Mary Haley haley at ucar.edu
Wed May 27 22:02:28 MDT 2015


I don't know what the power&Time0 values look like, but you likely want to
format these so you are not plotting them as direct values, but rather
along a "linear" axis with nice time labels.

Do a "printVarSummary" on this variable to see if it has a "units"
attribute and to see what it looks like:

printVarSummary(power&Time0)

If you have a units attribute with a value like "hours since January
1991-01-01", then you should be able to use the handy
"time_axis_labels"procedure to set up some nice tickmark labels on the X
axis.

For a start, see example "time_labels_2.ncl" at:

http://www.ncl.ucar.edu/Applications/time_labels.shtml

I think in your case, all you will need to do is set the special "ttmAxis"
resource to the desired format you want for the X axis, since the default
behavior of this procedure is to operate on the bottom X axis.

To see more about how to set "ttmAxis", go to:

http://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml

--Mary



On Wed, May 27, 2015 at 7:04 PM, Amadou Coulibaly <mpapin24 at gmail.com>
wrote:

> Hi Mary,
>
> Yes my X axis values are too irregularly, and that were problem. Because
> if I comment that one, the warring messages are disappeared.
>
> But I want to use "fspan" to represent my X axis, which is very irregular.
> Is there any way to do it?
>
> Objective: I have 6 months of hourly data (from January to June), which
> represents 4368 hours, but containing some missing values. When I
> cancelled those missing values from my data, I got a new one representing 4242
> hours. How can I span these new values over 6 months (from January to
> June)?
>
> Please, find attached my script and plot.
>
> Best
>
> On 26 May 2015 at 15:53, Mary Haley <haley at ucar.edu> wrote:
>
>> This is an FYI that we have an FAQ that includes various NCL error
>> messages and how to fix them.  You can go to:
>>
>> http://www.ncl.ucar.edu/FAQ/
>>
>> and search for the word "spline" and you will see this question and
>> response that might apply here:
>>
>> http://www.ncl.ucar.edu/FAQ/#err_msgs_028
>>
>> You need to look at the values being used for the X axis. If they are
>> "too irregularly-spaced", then that can cause a spline warning.
>>
>> --Mary
>>
>> On Mon, May 25, 2015 at 2:22 PM, Amadou Coulibaly <mpapin24 at gmail.com>
>> wrote:
>>
>>> Hi Alexander,
>>>
>>> Thank you, this has worked. The problem was like you said the prefix of
>>> "cool". When I removed that. It has worked. Just some warring messages such
>>> as:
>>>
>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>> approximation for X axis failed: consider adjusting trXTensionF value
>>> warning:IrTransInitialize: error creating spline approximation for
>>> trXCoordPoints; defaulting to linear
>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>> approximation for X axis failed: consider adjusting trXTensionF value
>>> warning:IrTransInitialize: error creating spline approximation for
>>> trXCoordPoints; defaulting to linear
>>> warning:XyPlotSetValues:xyYStyle is NhlLOG:trYMinF can't be <=
>>> 0.0:Setting xyComputeYMin to True
>>>
>>> Best
>>>
>>>
>>>
>>> On 25 May 2015 at 19:37, Alexander Schaefer <
>>> alexander.schaefer at mines.sdsmt.edu> wrote:
>>>
>>>> Amadou,
>>>>
>>>> NCL might not be finding the .hluresfile since it should be
>>>> specifically looking for ".hluresfile" so you having the prefix of "cool"
>>>> might be messing things up.  If you do a "ls -al" in your home directory
>>>> you will likely see a bunch of files starting with a ".". Try moving the
>>>> hluresfile to specifically ".hluresfile" and see if that helps.  Otherwise
>>>> you can also adjust the workspace size in your NCL script.  See below:
>>>>
>>>>   wks = gsn_open_wks(type,"my_output_file_title")
>>>>   setvalues NhlGetWorkspaceObjectId()
>>>>     "wsMaximumSize" : 200000000
>>>>   end setvalues
>>>>
>>>>
>>>> Hope that helps,-Alex
>>>>
>>>> On Mon, May 25, 2015 at 8:36 AM, Amadou Coulibaly <mpapin24 at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Karin,
>>>>>
>>>>> Of course, I have comment out *wsMaximumSize : 500000000 inside my
>>>>> ~/.hluresfile, which I called "cool.hluresfile" and it's in my home
>>>>> directory. But I till have the same error message. Please find attached my
>>>>> .hluresfile.
>>>>>
>>>>> Best
>>>>>
>>>>>
>>>>>
>>>>> On 25 May 2015 at 07:51, Karin Meier-Fleischer <
>>>>> meier-fleischer at dkrz.de> wrote:
>>>>>
>>>>>> Please take a look at the following .hlures web page:
>>>>>>
>>>>>> http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
>>>>>>
>>>>>> Bye,
>>>>>> Karin
>>>>>>
>>>>>>
>>>>>> Am 25.05.2015 um 07:23 schrieb Amadou Coulibaly <mpapin24 at gmail.com>:
>>>>>>
>>>>>> Hi Dennis and Rick,
>>>>>>
>>>>>> I have been able to plot one my wavelet spectrum using 5 years of
>>>>>> hourly data, instead of all the 30 years, which were bringing the following
>>>>>> error message: Segmentation fault (core dumped).
>>>>>>
>>>>>> But I till have some warring and errors messages such as:
>>>>>>
>>>>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>>>>> approximation for X axis failed: consider adjusting trXTensionF value
>>>>>> warning:IrTransInitialize: error creating spline approximation for
>>>>>> trXCoordPoints; defaulting to linear
>>>>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>>>>> approximation for X axis failed: consider adjusting trXTensionF value
>>>>>> warning:IrTransInitialize: error creating spline approximation for
>>>>>> trXCoordPoints; defaulting to linear
>>>>>> warning:XyPlotSetValues:xyYStyle is NhlLOG:trYMinF can't be <=
>>>>>> 0.0:Setting xyComputeYMin to True
>>>>>> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum
>>>>>> size 100000000
>>>>>> fatal:ContourPlotDraw: draw error
>>>>>> fatal:ContourPlotDraw: draw error
>>>>>> fatal:PlotManagerDraw: error in plot draw
>>>>>> fatal:_NhlPlotManagerDraw: Draw error
>>>>>>
>>>>>> I saw somewhere that to solve the first fatal (fatal:ContourPlotDraw:
>>>>>> Workspace reallocation would exceed maximum size 100000000), I must
>>>>>> change that maximum size 100000000 to  *wsMaximumSize : 500000000 in
>>>>>> the file:.hluresfile and put it in my home directory. I don't understand
>>>>>> how to put it in my home directory?
>>>>>>
>>>>>> How to solve the issues of those errors?
>>>>>>
>>>>>> Best
>>>>>>
>>>>>> On 23 May 2015 at 19:09, Dennis Shea <shea at ucar.edu> wrote:
>>>>>>
>>>>>>> [1] If your data has missing values, you can not use either
>>>>>>> specx_anal or the wavelet tool.
>>>>>>>
>>>>>>> [2] http://www.ncl.ucar.edu/Document/Functions/Built-in/dtrend.shtml
>>>>>>>
>>>>>>>      states: "Missing values (_FillValue) are not allowed."
>>>>>>>
>>>>>>> [3] If there are **isolated** missing values you could likely do a
>>>>>>> simple linear interpolation
>>>>>>>      to fill them. However, **any** interpolation will affect the
>>>>>>> spectra.
>>>>>>>
>>>>>>>      If you have many _FillValue .... I would not even try to fill
>>>>>>> them in.
>>>>>>>      The resulting spectra will reflect the effects of the
>>>>>>> interpolation as much as the 'rea;' data.
>>>>>>>
>>>>>>> ---
>>>>>>> Punch line: I don't think you can get what you want ... given your
>>>>>>> data.
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Your statement:
>>>>>>>
>>>>>>> "My script is from this link:
>>>>>>> http://paos.colorado.edu/research/wavelets/
>>>>>>>
>>>>>>> There is no NCL script at that web site.
>>>>>>>
>>>>>>> In fact, NCL call the fortran code presented at the website.
>>>>>>>
>>>>>>> ---
>>>>>>> The interactive code there is IDL ... not NCL
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sat, May 23, 2015 at 9:54 AM, Amadou Coulibaly <
>>>>>>> mpapin24 at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Dennis,
>>>>>>>>
>>>>>>>> My script is from this link:
>>>>>>>> http://paos.colorado.edu/research/wavelets/
>>>>>>>>
>>>>>>>> My Temp look like this:
>>>>>>>>
>>>>>>>> Variable: Temp
>>>>>>>> Type: float
>>>>>>>> Total Size: 1051968 bytes
>>>>>>>>             262992 values
>>>>>>>> Number of Dimensions: 1
>>>>>>>> Dimensions and sizes:    [time | 262992]
>>>>>>>> Coordinates:
>>>>>>>>             time: [410227200..1356994800]
>>>>>>>> Number Of Attributes: 7
>>>>>>>>   coordinates :    lon lat
>>>>>>>>   grid_type :    unstructured
>>>>>>>>   comment :    Air temperature is the bulk temperature of the air,
>>>>>>>> not the surf
>>>>>>>> ace (skin) temperature.
>>>>>>>>   shortname :    ta
>>>>>>>>   code :      11
>>>>>>>>   units :    K
>>>>>>>>   _FillValue :    9.96921e+36
>>>>>>>> (0)    299.15
>>>>>>>> (1)    9.96921e+36
>>>>>>>> (2)    9.96921e+36
>>>>>>>> (3)    296.35
>>>>>>>>
>>>>>>>> It contains a lot of missing data. That's why I used the following
>>>>>>>> command:
>>>>>>>> ; Remove mean and linear trend (recommended, not required)
>>>>>>>> ; Missing values are not allowed.
>>>>>>>> ;************************************
>>>>>>>>  Temp = dtrend(Temp,False)
>>>>>>>>
>>>>>>>> After that I printed Temp, but look stange for me with negative
>>>>>>>> values:
>>>>>>>>
>>>>>>>> Variable: Temp
>>>>>>>> Type: float
>>>>>>>> Total Size: 1051968 bytes
>>>>>>>>             262992 values
>>>>>>>> Number of Dimensions: 1
>>>>>>>> Dimensions and sizes:    [time | 262992]
>>>>>>>> Coordinates:
>>>>>>>>             time: [410227200..1356994800]
>>>>>>>> Number Of Attributes: 7
>>>>>>>>   coordinates :    lon lat
>>>>>>>>   grid_type :    unstructured
>>>>>>>>   comment :    Air temperature is the bulk temperature of the air,
>>>>>>>> not the surf
>>>>>>>> ace (skin) temperature.
>>>>>>>>   shortname :    ta
>>>>>>>>   code :      11
>>>>>>>>   units :    K
>>>>>>>>   _FillValue :    9.96921e+36
>>>>>>>> (0)    -8.256236e+36
>>>>>>>> (1)    1.713005e+36
>>>>>>>> (2)    1.713035e+36
>>>>>>>> (3)    -8.256145e+36
>>>>>>>>
>>>>>>>> I think the problem is from that command trying to remove mean and
>>>>>>>> linear trend. Because without that I can get the wavelet function (w), but
>>>>>>>> it contains only zero as values.
>>>>>>>>
>>>>>>>> How to handle this issue?
>>>>>>>>
>>>>>>>> Best
>>>>>>>>
>>>>>>>>
>>>>>>>> On 23 May 2015 at 14:17, Dennis Shea <shea at ucar.edu> wrote:
>>>>>>>>
>>>>>>>>> [1] I have no idea why the script should seg fault. Maybe your
>>>>>>>>> parameter settings are not appropriate for the input data.
>>>>>>>>>
>>>>>>>>> [2] What does "Temp" look like? printVarSummary(Temp)
>>>>>>>>>
>>>>>>>>> [3] Are there missing values?
>>>>>>>>>
>>>>>>>>> [4] If you want the "power spectrum", why not look at
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://www.ncl.ucar.edu/Document/Functions/Built-in/specx_anal.shtml
>>>>>>>>> http://www.ncl.ucar.edu/Applications/spec.shtml
>>>>>>>>>
>>>>>>>>> Good luck
>>>>>>>>>
>>>>>>>>> On Sat, May 23, 2015 at 8:00 AM, Amadou Coulibaly <
>>>>>>>>> mpapin24 at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Dear ncl users,
>>>>>>>>>>
>>>>>>>>>> When I tried ti run my script (wavelet1.ncl), I am getting a
>>>>>>>>>> strange error which is:
>>>>>>>>>> Segmentation fault (core dumped)
>>>>>>>>>>
>>>>>>>>>> I am using ncl.6.2.1 and my system is: Linux
>>>>>>>>>> amadou-Satellite-C855 3.19.0-16-generic #16-Ubuntu SMP Thu Apr 30 16:09:58
>>>>>>>>>> UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>>>>>>>>>>
>>>>>>>>>> My dataset contains hourly data (1983-2012) of
>>>>>>>>>> wind(speed/direction), air_temperature, ... for 46 sites. I just wanted to
>>>>>>>>>> plot the power spectrum of only one site and for the all 30 years. I think
>>>>>>>>>> the error comes from line 45 when I tried to compute the wavelet function
>>>>>>>>>> (w). Please find attached my script.
>>>>>>>>>>
>>>>>>>>>> How can I solve this issue?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> * COULIBALY   AMADOU   *
>>>>>>>>>> PhD  Student  on  West  African  Climate  System (WACS)
>>>>>>>>>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>>>>>>>>>
>>>>>>>>>> *Visiting Student - *
>>>>>>>>>> *University of Cologne, Germany**Institute of Geophysics and
>>>>>>>>>> Meteorology*
>>>>>>>>>> Pohligstr. 3 / Office 3.102
>>>>>>>>>> D-50969 Köln
>>>>>>>>>>
>>>>>>>>>> *Project*: WASCAL (West African Science Service Centre on Climate
>>>>>>>>>> Change and Adapted Land Use)
>>>>>>>>>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27
>>>>>>>>>> /+49 15218352574
>>>>>>>>>>
>>>>>>>>>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>>>>>>>>>
>>>>>>>>>> "*The time is always right to do right": Nelson Mandela*
>>>>>>>>>>
>>>>>>>>>> *"Character is like a tree and reputation like a shadow.  The
>>>>>>>>>> shadow is what we think of it; the tree is the real thing" : Abraham
>>>>>>>>>> Lincoln*
>>>>>>>>>>
>>>>>>>>>> *"Do what you can, with what you have, where you are" Theodore
>>>>>>>>>> Roosevelt*
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> ncl-talk mailing list
>>>>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> * COULIBALY   AMADOU   *
>>>>>>>> PhD  Student  on  West  African  Climate  System (WACS)
>>>>>>>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>>>>>>>
>>>>>>>> *Visiting Student - *
>>>>>>>> *University of Cologne, Germany**Institute of Geophysics and
>>>>>>>> Meteorology*
>>>>>>>> Pohligstr. 3 / Office 3.102
>>>>>>>> D-50969 Köln
>>>>>>>>
>>>>>>>> *Project*: WASCAL (West African Science Service Centre on Climate Change
>>>>>>>> and Adapted Land Use)
>>>>>>>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
>>>>>>>> 15218352574
>>>>>>>>
>>>>>>>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>>>>>>>
>>>>>>>> "*The time is always right to do right": Nelson Mandela*
>>>>>>>>
>>>>>>>> *"Character is like a tree and reputation like a shadow.  The
>>>>>>>> shadow is what we think of it; the tree is the real thing" : Abraham
>>>>>>>> Lincoln*
>>>>>>>>
>>>>>>>> *"Do what you can, with what you have, where you are" Theodore
>>>>>>>> Roosevelt*
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> * COULIBALY   AMADOU   *
>>>>>> PhD  Student  on  West  African  Climate  System (WACS)
>>>>>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>>>>>
>>>>>> *Visiting Student - *
>>>>>> *University of Cologne, Germany**Institute of Geophysics and
>>>>>> Meteorology*
>>>>>> Pohligstr. 3 / Office 3.102
>>>>>> D-50969 Köln
>>>>>>
>>>>>> *Project*: WASCAL (West African Science Service Centre on Climate Change
>>>>>> and Adapted Land Use)
>>>>>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
>>>>>> 15218352574
>>>>>>
>>>>>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>>>>>
>>>>>> "*The time is always right to do right": Nelson Mandela*
>>>>>>
>>>>>> *"Character is like a tree and reputation like a shadow.  The shadow
>>>>>> is what we think of it; the tree is the real thing" : Abraham Lincoln*
>>>>>>
>>>>>> *"Do what you can, with what you have, where you are" Theodore
>>>>>> Roosevelt*
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <wavelet2.ncl>
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> * COULIBALY   AMADOU   *
>>>>> PhD  Student  on  West  African  Climate  System (WACS)
>>>>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>>>>
>>>>> *Visiting Student - *
>>>>> *University of Cologne, Germany**Institute of Geophysics and
>>>>> Meteorology*
>>>>> Pohligstr. 3 / Office 3.102
>>>>> D-50969 Köln
>>>>>
>>>>> *Project*: WASCAL (West African Science Service Centre on Climate Change
>>>>> and Adapted Land Use)
>>>>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
>>>>> 15218352574
>>>>>
>>>>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>>>>
>>>>> "*The time is always right to do right": Nelson Mandela*
>>>>>
>>>>> *"Character is like a tree and reputation like a shadow.  The shadow
>>>>> is what we think of it; the tree is the real thing" : Abraham Lincoln*
>>>>>
>>>>> *"Do what you can, with what you have, where you are" Theodore
>>>>> Roosevelt*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> * COULIBALY   AMADOU   *
>>> PhD  Student  on  West  African  Climate  System (WACS)
>>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>>
>>> *Visiting Student - *
>>> *University of Cologne, Germany**Institute of Geophysics and
>>> Meteorology*
>>> Pohligstr. 3 / Office 3.102
>>> D-50969 Köln
>>>
>>> *Project*: WASCAL (West African Science Service Centre on Climate Change
>>> and Adapted Land Use)
>>> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
>>> 15218352574
>>>
>>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>>
>>> "*The time is always right to do right": Nelson Mandela*
>>>
>>> *"Character is like a tree and reputation like a shadow.  The shadow is
>>> what we think of it; the tree is the real thing" : Abraham Lincoln*
>>>
>>> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> * COULIBALY   AMADOU   *
> PhD  Student  on  West  African  Climate  System (WACS)
> FUTA - Federal  University  of  Technology of Akure, Nigeria
>
> *Visiting Student - *
> *University of Cologne, Germany**Institute of Geophysics and Meteorology*
> Pohligstr. 3 / Office 3.102
> D-50969 Köln
>
> *Project*: WASCAL (West African Science Service Centre on Climate Change
> and Adapted Land Use)
> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
> 15218352574
>
> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>
> "*The time is always right to do right": Nelson Mandela*
>
> *"Character is like a tree and reputation like a shadow.  The shadow is
> what we think of it; the tree is the real thing" : Abraham Lincoln*
>
> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150527/4332d917/attachment.html 


More information about the ncl-talk mailing list