[ncl-talk] gsn_csm_streamline_scalar_map segmentation fault

Meina Wang mnawang at ucdavis.edu
Thu Jul 6 12:05:54 MDT 2017

Dear Mary,

Thank you very much for your reply, and for running the test case! The
variable is not a very large one, and I also tried to do the vector plot
using "vcres at vcGlyphStyle = "CurlyVector"" but also got the "Segmentation
fault". The only option that works is the vcres at vcGlyphStyle =
"WindBarb". Please
see below for the printVarSummary info and the resources setting.  Thank
you very much again for your help, and please let me know if you spot
anything suspicious.

Output from printVarSummary(Uwavghist):

Variable: Uwavghist

Type: float

Total Size: 76800 bytes

            19200 values

Number of Dimensions: 2

Dimensions and sizes: [lat | 120] x [lon | 160]


            lat: [30.0625..44.9375]

            lon: [-132.9375..-113.0625]

Number Of Attributes: 1

  _FillValue : 9.96921e+36

My resources setting:

  mpres                       = True

  mpres at gsnMaximize           = True

  mpres at mpOutlineOn           = True

  mpres at mpDataBaseVersion     = "MediumRes"   ; slightly better outlines

  mpres at mpLandFillColor = "gray91"

;---Data is regional

  mpres at gsnAddCyclic          = False

;---Change the streamline levels

  mpres at stLevelSpacingF       = 30.

  mpres at stLevelPalette        = "ncl_default" ; "MPL_Spectral"

  mpres at stLineThicknessF      = 5.0         ; default is 1.0

  mpres at stLevelSelectionMode  = "ManualLevels"

  mpres at stMinLevelValF        = 1

  mpres at stMaxLevelValF        = 15.

  mpres at stLevelSpacingF       = 1.

  mpres at mpMinLonF            =  min(lon)               ; select a subregion

  mpres at mpMaxLonF            =  max(lon)

  mpres at mpMinLatF            =   min(lat)

  mpres at mpMaxLatF            =  max(lat)

  mpres at pmTickMarkDisplayMode = "Always"    ; more detailed tickmarks


  plot4 = gsn_csm_vector_scalar_map_ce(wks,

Best regards,


On Thu, Jul 6, 2017 at 8:58 AM, Mary Haley <haley at ucar.edu> wrote:

> Hi Meina,
> One thing that might cause gsn_csm_streamline_scalar_map to seg fault is
> if you are trying to plot really large data arrays.
> It's always important to look at your data when NCL isn't plotting it
> correctly, and we recommend using "printVarSummary" for this.
> How big are U and V? Please insert a "printVarSummary" command and let us
> know what it reports:
> printVarSummary(U)
> Also, it would help to see how you are calling
> gsn_csm_streamline_scalar_map, and what resources you're setting.
> I verified that a small test code works just fine, which I've attached
> here, along with the data file.
> --Mary
> On Wed, Jul 5, 2017 at 6:14 PM, Meina Wang <mnawang at ucdavis.edu> wrote:
>> Dear All,
>> I wanted to use the function "gsn_csm_streamline_scalar_map" to plot
>> wind streamline using U and V, with color-coded scaler field sqrt(U^2+V^2),
>> but got "segmentation fault".  I then switched to function "gsn_csm
>> _vector_scalar_map_ce" to do wind barb plot instead using the same data
>> and it worked well.  I have previously used the streamline function and had
>> no problem at all, so I'm wondering if any of you recently ran into the
>> same "segmentation fault" issue as I did.  Is it the internal code of
>> the function crashed?  Thank you.
>> P.S. I'm using the NCL version 6.4.0. and ran on Linux machine with gcc (
>> Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
>> Best,
>> Meina
>> --
>> Meina Wang
>> PhD candidate in Atmospheric Science
>> Department of Land, Air and Water Resources
>> University of California, Davis
>> Davis, CA 95616
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Meina Wang
PhD candidate in Atmospheric Science
Department of Land, Air and Water Resources
University of California, Davis
Davis, CA 95616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170706/c495310f/attachment.html 

More information about the ncl-talk mailing list