Segmentation fault when using gsn_open_wks

From: Sophie HE <sophie.hejie_at_nyahnyahspammersnyahnyah>
Date: Sun Jul 08 2012 - 21:37:39 MDT

Hi there,

Whenever I would love to open an workstation using gsn_open_wks, even with
the simplest command, say
*load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"*
*wks = gsn_open_wks("x11","gsun01n")*
cygwin reports *Segmentation fault (core dumped)* error.

Could you give me any advice, as I really have no idea of what's going on?

Thanks.

Regards,
Sophie

On Sun, Jul 8, 2012 at 2:00 AM, <ncl-talk-request@ucar.edu> wrote:

> Send ncl-talk mailing list submissions to
> ncl-talk@ucar.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> or, via email, send a message with subject or body 'help' to
> ncl-talk-request@ucar.edu
>
> You can reach the person managing the list at
> ncl-talk-owner@ucar.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ncl-talk digest..."
>
>
> Today's Topics:
>
> 1. Re: Stripping white space at the edges (Paul Scorer)
> 2. Re: Problem with spacing between plots in a panel plot
> (Adam Phillips)
> 3. eof function (163)
> 4. Re: Stripping white space at the edges (Brandon Capasso)
> 5. Dimension mismatch on dim_sum_n the dimension relating to
> file input (Cannavina, Dominique)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 06 Jul 2012 23:54:26 +0100
> From: Paul Scorer <paul.scorer01@gmail.com>
> Subject: Re: Stripping white space at the edges
> To: Dennis Shea <shea@ucar.edu>
> Cc: NCL Talk <ncl-talk@ucar.edu>
> Message-ID: <1341615266.4491.7.camel@hp-compaq.home>
> Content-Type: text/plain; charset="UTF-8"
>
> On recent-ish Linux systems, there is available a fork of ImageMagick
> known as GraphicsMagick which is significantly faster, particularly on
> multi-core h/w.
>
> Use thus:
> $ gm convert ...
> etc
>
> Options, etc are (essentially) the same.
>
> HTH
>
> PaulS
>
>
> On Fri, 2012-07-06 at 10:39 -0600, Dennis Shea wrote:
> > the following may be overkill but
> >
> > convert -flatten -trim +repage -background white
> > pr_zonalAvg_clim7100.png pr_zonalAvg_clim7100.trim.png
> >
> >
> > On 07/06/2012 10:34 AM, Noel Aloysius wrote:
> > > Hello NCL,
> > >
> > > I created a panel plot with 14 figures. I want to maximize the plot
> area
> > > by stripping the white space at the edges. I am not sure which plot
> > > resources do this.
> > > The section of the code and the plot is attached.
> > >
> > > Thank you in advance for your help,
> > > Noel
> > >
> > >
> ;***********************************************************************************************
> > > wks = gsn_open_wks("png", diro + "pr_zonalAvg")
> > > plot = new(14, graphic)
> > > gsn_define_colormap(wks, "precip3_16lev")
> > >
> > > res1 = True ; plot mods desired
> > > res1@gsnDraw = False
> > > res1@gsnFrame = False
> > > res1@gsnMaximize = True
> > > res1@gsnRightStringFontHeightF = 0.04
> > > res1@cnFillOn = True ; turn on color
> > > res1@gsnSpreadColors = True ; use full color
> table
> > > res1@cnLinesOn = False ; no contour lines
> > > res1@cnInfoLabelOn = False
> > > res1@pmTickMarkDisplayMode = "Always" ; turn on fancy
> tickmarks
> > >
> > > res1@tmXBMode = "Explicit" ; label
> independently
> > > res1@tmXBValues = ispan(0,11,1)
> > > res1@tmXBLabels =
> > > (/"J","F","M","A","M","J","J","A","S","O","N","D"/)
> > >
> > > res1@lbLabelBarOn = False
> > > res1@cnLevelSelectionMode = "ManualLevels"
> > > res1@cnLevelSpacingF = 20.
> > > res1@cnMinLevelValF = 20.
> > > res1@cnMaxLevelValF = 300.
> > >
> > > res1@tmYROn = False
> > > res1@tmXBLabelFontHeightF = 0.025
> > > res1@tmYLLabelFontHeightF = 0.025
> > >
> > > do i=0,11
> > > res1@gsnRightString = gcm_names(i)
> > > plot(i) = gsn_csm_lat_time(wks,
> > > PzoneLat_7100(raw_bc|0,GCM|i,lat|:,month|:), res1)
> > > end do
> > >
> > > res1@gsnRightString = "Obs"
> > > plot(12) = gsn_csm_lat_time(wks, PzoneLat_7100obs(lat|:,month|:),
> res1)
> > >
> > > res1@gsnRightString = "bias corr. GCM avg."
> > > plot(13) = gsn_csm_lat_time(wks, PzoneLat_7100_BCavg(lat|:,month|:),
> > > res1)
> > >
> > > pres1 = True
> > > pres1@gsnPanelLabelBar = True
> > > pres1@gsnFrame = False
> > > pres1@lbLabelFontHeightF = 0.01
> > > pres1@lbOrientation = "horizontal"
> > > pres1@lbLabelAutoStride = True
> > > pres1@gsnPanelYWhiteSpacePercent = 1.5
> > > pres1@gsnBoxMargin = 0.0
> > > pres1@gsnPanelRowSpec = True ; tell panel what
> order
> > > to plot
> > > pres1@gsnPanelCenter = True ; centered plot
> > > pres1@gsnMaximize = True
> > >
> > > gsn_panel(wks,plot,(/6,6,2/),pres1)
> > > frame(wks)
> > >
> ;****************************************************************************************************
> > >
> > >
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 6 Jul 2012 18:41:19 -0600
> From: Adam Phillips <asphilli@ucar.edu>
> Subject: Re: Problem with spacing between plots in a panel
> plot
> To: Soumik Basu <sbasu@iarc.uaf.edu>
> Cc: Ncl Talk <ncl-talk@ucar.edu>
> Message-ID: <CCB59B1E-4C9D-40E9-A79C-4B02574960E1@ucar.edu>
> Content-Type: text/plain; charset=us-ascii
>
> Hi Soumik,
> When you are paneling plots, it is recommended that you do not set
> gsnMaximize = True in your individual plot resource lists. (res and sres in
> your case) It is of course fine to set gsnMaximize in the panel resource
> list. Try removing gsnMaximize from your res and sres resource lists and
> see if that helps... Adam
>
>
>
> On Jul 6, 2012, at 3:58 PM, Soumik Basu <sbasu@iarc.uaf.edu> wrote:
>
> > Hi Adam,
> >
> > Thanks for the reply.I made those changes but I am still getting the
> similar plots. Can you please suggest what else can cause it. here is the
> complete plotting resources:
> >
> >
> > ;*******************************************************
> > ;Plot resources for eady growth first set (non shaded)
> > ;******************************************************
> >
> > wks =
> gsn_open_wks("png","eady_eke_var_diff_spring_winter")
> > gsn_define_colormap(wks,"BlAqGrYeOrReVi200")
> >
> >
> > res = True
> > res@cnLinesOn = True
> >
> > res@tmLabelAutoStride = True
> >
> > res@tmXTOn = False
> > res@tmYROn = False
> >
> > res@cnLevelSelectionMode = "ManualLevels"
> > res@cnMinLevelValF = 0
> > res@cnMaxLevelValF = 2.0
> > res@cnLevelSpacingF = 0.2
> > res@cnLineLabelFontHeightF= 0.015
> > res@cnInfoLabelOn = False ; turn off cn
> info label
> > res@cnLineLabelsOn = False
> >
> > res@lbLabelBarOn = False
> >
> > res@gsnDraw = False
> > res@gsnFrame = False
> > res@gsnMaximize = True
> >
> > res@pmLabelBarDisplayMode = "Never"
> >
> > ;*************************************************
> > ; Plot resources for eke first set (shaded)
> > ;*************************************************
> > plot = new(4,graphic) ; create a plot array
> >
> > sres = True
> >
> > sres@gsnDraw = False
> > sres@gsnFrame = False
> > sres@gsnMaximize = True
> > sres@gsnSpreadColors = True
> >
> > sres@cnFillOn = True
> > sres@cnLinesOn = False
> > sres@cnLevelSelectionMode = "ManualLevels"
> > sres@cnMinLevelValF = 0
> > sres@cnMaxLevelValF = 250
> > sres@cnLevelSpacingF = 5
> > sres@cnInfoLabelOn = False ; turn
> off cn info label
> > sres@cnLineLabelsOn = False
> >
> > sres@tmLabelAutoStride = True
> > sres@tmXTOn = False
> > sres@tmYROn = False
> >
> > sres@mpLimitMode = "LatLon"
> > sres@mpMinLatF = 10.
> > sres@mpMaxLatF = 80.
> > sres@mpMinLonF = 130.
> > sres@mpMaxLonF = 330.
> > sres@mpGeophysicalLineThicknessF = 1.75
> > sres@mpCenterLonF = 210
> > sres@mpShapeMode = "FreeAspect"
> > sres@lbOrientation = "vertical" ;vertical label bar
> > sres@lbLabelBarOn = False
> > sres@lbLabelAutoStride = True
> >
> >
> > ;*********************************
> > ; Plot first set (four means)
> > ;*********************************
> >
> > plot_eke1 = gsn_csm_contour_map(wks,eke_var(:,:),sres)
> > plot_eady1 = gsn_csm_contour(wks,eady_var(:,:),res)
> > overlay(plot_eke1,plot_eady1)
> > plot(0) = plot_eke1
> >
> > plot_eke2 = gsn_csm_contour_map(wks,eke_var_ens(:,:),sres)
> > plot_eady2 = gsn_csm_contour(wks,eady_var_ens(:,:),res)
> > overlay(plot_eke2,plot_eady2)
> > plot(1) = plot_eke2
> >
> > res@gsnLeftString = " "
> >
> > plot_eke3 = gsn_csm_contour_map(wks,eke_var1(:,:),sres)
> > plot_eady3 = gsn_csm_contour(wks,eady_var1(:,:),res)
> > overlay(plot_eke3,plot_eady3)
> > plot(2) = plot_eke3
> >
> > plot_eke4 = gsn_csm_contour_map(wks,eke_var_ens1(:,:),sres)
> > plot_eady4 = gsn_csm_contour(wks,eady_var_ens1(:,:),res)
> > overlay(plot_eke4,plot_eady4)
> > plot(3) = plot_eke4
> >
> > ;************************************************
> > ; create first set panel plot(four means)
> > ;************************************************
> > resPanel = True
> >
> > resPanel@gsnFrame = False
> >
> > resPanel@gsnSpreadColors = True
> > resPanel@gsnPanelLabelBar = True ;
> add color bar
> > resPanel@gsnPanelFigureStrings = (/"a","b","c","d"/)
> > resPanel@gsnPanelFigureStringsFontHeightF = 0.02
> > resPanel@gsnPanelFigureStringsPerimOn = True
> > resPanel@gsnPanelDebug = True
> > resPanel@gsnPanelTop = 0.9
> > resPanel@gsnPanelBottom = 0.3 ;move bottom
> up from 0 to 0.4
> > resPanel@gsnPanelLeft = 0.0
> > resPanel@gsnPanelRight = 0.9
> > resPanel@gsnPanelDebug = True
> >
> > resPanel@lbOrientation = "Vertical"
> > resPanel@lbLabelAutoStride = False
> > resPanel@lbLabelStride = 5
> >
> > gsn_panel(wks,plot,(/2,2/),resPanel)
> >
> > ;*****************************************************************
> > ; create plot resources eady growth diff next set of plots(non shaded)
> > ;*****************************************************************
> > plot1 = new(2,graphic) ; create a plot array
> >
> > dres = True
> >
> > dres@gsnMaximize = True
> >
> >
> > dres@cnLinesOn = True
> > dres@cnLevelSelectionMode = "ManualLevels"
> > dres@cnMinLevelValF = 0
> > dres@cnMaxLevelValF = 3
> > dres@cnLevelSpacingF = 0.2
> > dres@cnInfoLabelOn = False
> > dres@cnLineLabelsOn = False
> > dres@cnLineLabelDensityF = 1.
> > dres@cnLineLabelFontHeightF = 0.015
> > dres@cnLineLabelInterval = 3
> >
> > dres@tmLabelAutoStride = True
> > dres@tmXTOn = False
> > dres@tmYROn = False
> >
> > dres@lbLabelBarOn = False
> >
> > dres@gsnDraw = False
> > dres@gsnFrame = False
> > dres@gsnMaximize = True
> >
> >
> > ;*****************************************************
> > ; create plot resources eke next set of plots(shaded)
> > ;******************************************************
> >
> > dbres = True
> >
> > dbres@gsnMaximize = True
> > dbres@gsnSpreadColors = True
> > dbres@gsnDraw = False
> > dbres@gsnFrame = False
> >
> > dbres@cnFillOn = True
> > dbres@cnLinesOn = False
> > dbres@cnLevelSelectionMode = "ManualLevels"
> > dbres@cnMinLevelValF = -40
> > dbres@cnMaxLevelValF = 40
> > dbres@cnLevelSpacingF = 0.5
> > dbres@cnInfoLabelOn = False
> > dbres@cnLineLabelsOn = False
> >
> >
> > dbres@tmLabelAutoStride = True
> > dbres@tmXTOn = False
> > dbres@tmYROn = False
> >
> > dbres@lbOrientation = "Vertical"
> > dbres@lbLabelBarOn = False
> > dbres@lbLabelStride = 20.
> > dbres@lbLabelAutoStride = False
> >
> > dbres@mpLimitMode = "LatLon"
> > dbres@mpMinLatF = 10.
> > dbres@mpMaxLatF = 80.
> > dbres@mpMinLonF = 130.
> > dbres@mpMaxLonF = 330.
> > dbres@mpCenterLonF = 210
> > dbres@mpGeophysicalLineThicknessF= 1.75
> >
> > getvalues plot(3)
> > "vpWidthF" : vpw
> > "vpHeightF" : vph
> > end getvalues
> >
> >
> > ; By default, you can't skew the width/height of a map plot.
> > ; You must also set mpShapeMode to "FreeAspect" to indicate
> > ; that you really want to skew the map.
> >
> > dbres@mpShapeMode = "FreeAspect"
> > dbres@vpWidthF = vpw
> > dbres@vpHeightF = vph
> >
> >
> > ; ## SHADED
> >
> > plot1_eke1 = gsn_csm_contour_map(wks,eke_diff,dbres)
> > plot1_eke2 = gsn_csm_contour_map(wks,eke_diff1,dbres)
> >
> > ; ## NON-SHADED
> >
> > plot1_eady1 = gsn_csm_contour(wks,eady_diff,dres)
> > plot1_eady2 = gsn_csm_contour(wks,eady_diff1,dres)
> >
> > overlay(plot1_eke1,plot1_eady1)
> > overlay(plot1_eke2,plot1_eady2)
> >
> > plot1(0) = plot1_eke1
> > plot1(1) = plot1_eke2
> >
> >
> >
> > ;************************************************
> > ; create next set panel plot
> > ;************************************************
> > dresPanel = True
> >
> > dresPanel@gsnFrame = False
> > dresPanel@gsnSpreadColors = True
> > dresPanel@gsnMaximize = True ;
> use full page
> > dresPanel@gsnPanelLabelBar = True ;
> add color bar
> > dresPanel@gsnPanelTop = 0.45
> > dresPanel@gsnPanelBottom = 0.1
> > dresPanel@gsnPanelLeft = 0.0
> > dresPanel@gsnPanelRight = 0.9
> > dresPanel@gsnPanelFigureStrings = (/"e","f"/)
> > dresPanel@gsnPanelFigureStringsFontHeightF = 0.02
> > dresPanel@gsnPanelFigureStringsPerimOn = True
> > dresPanel@gsnPanelDebug = True
> >
> > dresPanel@lbOrientation = "Vertical"
> > dresPanel@lbLabelAutoStride = False
> > dresPanel@lbLabelStride = 10
> >
> > gsn_panel (wks,plot1,(/1,2/),dresPanel)
> >
> > frame(wks)
> >
> >
> >
> > Thanks,
> > Soumik
> >
> >
> > On 2012-07-05 19:20, Adam Phillips wrote:
> >> Hi Soumik,
> >> Your top 4 plots are not taking up all of the space you are allotting
> >> to them. They are maxed out on the page horizontally, and they are
> >> only taking up roughly 0.5-0.9 of vertical NDC space. To take up more
> >> space, NCL would need to alter the aspect ratio of the plot(s),
> >> something it won't do unless you tell it to. (Setting res@mpShapeMode=
> >> "FreeAspect" would do that. )
> >>
> >> Try setting gsnPanelTop for your bottom 2 plots to 0.45 (instead of
> 0.3)..
> >> Hope that helps.. Adam
> >>
> >>
> >> On Jul 5, 2012, at 6:21 PM, Soumik Basu <sbasu@iarc.uaf.edu> wrote:
> >>
> >>> Hi,
> >>>
> >>> I am trying to create a panel plot containing 6 plots. But I am having
> >>> problem with the space between the plots.I am plotting the first four
> >>> plots with a particular colorbar and the last two with another
> colorbar.
> >>> Can anybody please suggest me what is going wrong.
> >>>
> >>> The panel plot resources (I am sending only the two separate resource
> >>> parts of my script) I am using are as follows:
> >>>
> >>> ;************************************************
> >>> ; create first set panel plot(top four of the panel)
> >>> ;************************************************
> >>> resPanel = True
> >>>
> >>> resPanel@gsnFrame = False
> >>>
> >>> resPanel@gsnSpreadColors = True
> >>> resPanel@gsnPanelLabelBar = True ;
> add
> >>> color bar
> >>> resPanel@gsnPanelFigureStrings = (/"a","b","c","d"/)
> >>> resPanel@gsnPanelFigureStringsFontHeightF = 0.02
> >>> resPanel@gsnPanelFigureStringsPerimOn = True
> >>> resPanel@gsnPanelDebug = True
> >>> resPanel@gsnPanelTop = 0.9
> >>> resPanel@gsnPanelBottom = 0.3 ;move bottom
> up
> >>> from 0 to 0.4
> >>> resPanel@gsnPanelLeft = 0.0
> >>> resPanel@gsnPanelRight = 0.9
> >>> resPanel@gsnPanelDebug = True
> >>>
> >>> resPanel@lbOrientation = "Vertical"
> >>> resPanel@lbLabelAutoStride = False
> >>> resPanel@lbLabelStride = 5
> >>>
> >>> gsn_panel(wks,plot,(/2,2/),resPanel)
> >>>
> >>> ;************************************************
> >>> ; create last 2 of panel plot
> >>> ;************************************************
> >>> dresPanel = True
> >>>
> >>> dresPanel@gsnFrame = False
> >>> dresPanel@gsnSpreadColors = True
> >>> dresPanel@gsnMaximize = True ;
> use full
> >>> page
> >>> dresPanel@gsnPanelLabelBar = True ;
> add
> >>> color bar
> >>> dresPanel@gsnPanelTop = 0.3
> >>> dresPanel@gsnPanelBottom = 0.1
> >>> dresPanel@gsnPanelLeft = 0.0
> >>> dresPanel@gsnPanelRight = 0.9
> >>> dresPanel@gsnPanelFigureStrings = (/"e","f"/)
> >>> dresPanel@gsnPanelFigureStringsFontHeightF = 0.02
> >>> dresPanel@gsnPanelFigureStringsPerimOn = True
> >>> dresPanel@gsnPanelDebug = True
> >>>
> >>> dresPanel@lbOrientation = "Vertical"
> >>> dresPanel@lbLabelAutoStride = False
> >>> dresPanel@lbLabelStride = 10
> >>>
> >>> gsn_panel (wks,plot1,(/1,2/),dresPanel)
> >>> frame(wks)
> >>>
> >>>
> >>> Thanks,
> >>> Soumik
> >>>
> >>>
> >>> --
> >>> "Numbing the pain for a while will make it worse when you finally feel
> it.
> >>> ~J.K. Rowling"
> >>> *****************************************
> >>> Soumik Basu
> >>> Graduate Student, Research Assistant
> >>> International Arctic Research Center
> >>> University of Alaska Fairbanks
> >>> Fairbanks,Alaska,USA
> >>> *****************************************
> >>> <eady_eke_var_diff_spring_winter.000001.png>
> >>> _______________________________________________
> >>> ncl-talk mailing list
> >>> List instructions, subscriber options, unsubscribe:
> >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> > --
> > "Numbing the pain for a while will make it worse when you finally feel
> it.
> > ~J.K. Rowling"
> > *****************************************
> > Soumik Basu
> > Graduate Student, Research Assistant
> > International Arctic Research Center
> > University of Alaska Fairbanks
> > Fairbanks,Alaska,USA
> > *****************************************
> > <eady_eke_var_diff_spring_winter.000001.png>
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 7 Jul 2012 10:53:13 +0800
> From: 163 <guoyipeng163@163.com>
> Subject: eof function
> To: ncl-talk <ncl-talk@ucar.edu>
> Message-ID: <201207071053134695861@163.com>
> Content-Type: text/plain; charset="gb2312"
>
> Hi all
> When using NCL EOF functions, I find that all functions use the
> anomalies. It
> means that I have no option to use the original data or the
> standardized data
> and can only use the anomalies. If there are some options in the
> function that
> I don't know, would you please tell me?
>
> Best Regards
> Guo Yipeng
>
>
>
>
> 163
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20120707/c130f6d0/attachment.html
>
> ------------------------------
>
> Message: 4
> Date: Sat, 7 Jul 2012 04:12:54 +0000
> From: Brandon Capasso <sblueknigt@gmail.com>
> Subject: Re: Stripping white space at the edges
> To: Noel Aloysius <noel.aloysius@gmail.com>
> Cc: NCL Talk <ncl-talk@ucar.edu>
> Message-ID:
> <CAFrH9e1Fp1k_Cih=
> mVOhbWwazE58Bwo7EEVYLeCq7f_hrX7BGw@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> If you're using Linux, you can use imagemagick for this if need be:
>
> > convert infile -trim outfile
>
> you can then use -border to create a border of as much white space as you
> need. hope this helps .
>
> Brandon
> On Jul 6, 2012 12:34 PM, "Noel Aloysius" <noel.aloysius@gmail.com> wrote:
>
> > Hello NCL,
> >
> > I created a panel plot with 14 figures. I want to maximize the plot area
> > by stripping the white space at the edges. I am not sure which plot
> > resources do this.
> > The section of the code and the plot is attached.
> >
> > Thank you in advance for your help,
> > Noel
> >
> >
> >
> ;***********************************************************************************************
> > wks = gsn_open_wks("png", diro + "pr_zonalAvg")
> > plot = new(14, graphic)
> > gsn_define_colormap(wks, "precip3_16lev")
> >
> > res1 = True ; plot mods desired
> > res1@gsnDraw = False
> > res1@gsnFrame = False
> > res1@gsnMaximize = True
> > res1@gsnRightStringFontHeightF = 0.04
> > res1@cnFillOn = True ; turn on color
> > res1@gsnSpreadColors = True ; use full color
> table
> > res1@cnLinesOn = False ; no contour lines
> > res1@cnInfoLabelOn = False
> > res1@pmTickMarkDisplayMode = "Always" ; turn on fancy
> tickmarks
> >
> > res1@tmXBMode = "Explicit" ; label independently
> > res1@tmXBValues = ispan(0,11,1)
> > res1@tmXBLabels =
> > (/"J","F","M","A","M","J","J","A","S","O","N","D"/)
> >
> > res1@lbLabelBarOn = False
> > res1@cnLevelSelectionMode = "ManualLevels"
> > res1@cnLevelSpacingF = 20.
> > res1@cnMinLevelValF = 20.
> > res1@cnMaxLevelValF = 300.
> >
> > res1@tmYROn = False
> > res1@tmXBLabelFontHeightF = 0.025
> > res1@tmYLLabelFontHeightF = 0.025
> >
> > do i=0,11
> > res1@gsnRightString = gcm_names(i)
> > plot(i) = gsn_csm_lat_time(wks,
> > PzoneLat_7100(raw_bc|0,GCM|i,lat|:,month|:), res1)
> > end do
> >
> > res1@gsnRightString = "Obs"
> > plot(12) = gsn_csm_lat_time(wks, PzoneLat_7100obs(lat|:,month|:), res1)
> >
> > res1@gsnRightString = "bias corr. GCM avg."
> > plot(13) = gsn_csm_lat_time(wks, PzoneLat_7100_BCavg(lat|:,month|:),
> > res1)
> >
> > pres1 = True
> > pres1@gsnPanelLabelBar = True
> > pres1@gsnFrame = False
> > pres1@lbLabelFontHeightF = 0.01
> > pres1@lbOrientation = "horizontal"
> > pres1@lbLabelAutoStride = True
> > pres1@gsnPanelYWhiteSpacePercent = 1.5
> > pres1@gsnBoxMargin = 0.0
> > pres1@gsnPanelRowSpec = True ; tell panel what order
> > to plot
> > pres1@gsnPanelCenter = True ; centered plot
> > pres1@gsnMaximize = True
> >
> > gsn_panel(wks,plot,(/6,6,2/),pres1)
> > frame(wks)
> >
> >
> ;****************************************************************************************************
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20120707/7c89885d/attachment.html
>
> ------------------------------
>
> Message: 5
> Date: Sat, 7 Jul 2012 09:00:19 +0000
> From: "Cannavina, Dominique" <d.cannavina11@imperial.ac.uk>
> Subject: Dimension mismatch on dim_sum_n the dimension
> relating to file input
> To: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
> Message-ID:
> <D7809B440AA90D499FD431B2E7289C551F338C7A@icexch-m1.ic.ac.uk>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi it seems that I was premature in my celebrations yesterday. The file I
> sent for runs of trcit below zero degress work okay .........except picking
> up the files. When I ran the script for various numbers of years (year per
> file) it was clear that my values were around the same regardless of how
> many years (or files) that I inputted.
>
>
>
> Then I remembered that I had changed the following;
>
>
>
> spell_tot_uk(:,nr,:,:) = dim_sum_n(cold_uk1(:,{spell(nr)},:,:,:),0)
>
>
>
> spell_tot_uk(0,nr,:,:) = dim_sum_n(cold_uk1(0,{spell(nr)},:,:,:),0) as I
> was trying to get around a dimension #0 mis-match. This is the variable
> that relates to file that has been inputted.
>
>
>
> So can I ask another NCL-Talk question on how to get around this please?
>
>
>
> The portion of the script it relates to is below and a copy of the full
> script and summary of the key variables are attached (join relates to
> number of files, spell the length of the cold run taking the tcrit from all
> ensembles at all times/steps)
>
>
>
> n1 = 1
>
> n2 = 60 ; ispan to specify all spells
>
> spell = ispan(n1,n2,1) ; eg n1=1, n2=20
>
> ;;spell = (/1, 1, 10/) ; manually specify
>
> nspell = dimsizes(spell)
>
> spell_tot_uk = new( (/njoin,nspell,nlat,mlon/), "float") ; preallocate
>
> dimspell = dimsizes(spell_tot_uk)
>
> njoin = dimspell(0)
>
> nspell = dimspell(1) ; same as "run_length"
>
> nlat = dimspell(2)
>
> mlon = dimspell(3)
>
> do nr=0,nspell-1
>
> spell_tot_uk(:,nr,:,:) = dim_sum_n(cold_uk1(:,{spell(nr)},:,:,:),0)
>
> end do
>
> spell_tot_uk!1 = "spell"
>
> spell_tot_uk&spell = spell
>
> copy_VarCoords(cold_uk1(0,0,0,:,:), spell_tot_uk(0,0,:,:)) ; trick for
> coords
>
> printVarSummary(spell_tot_uk)
>
>
>
> Any help greatly appreciated
>
>
>
> kind regards
>
>
>
> Dominique
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20120707/2d461e1f/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: demeter_v1_models_check.ncl
> Type: application/octet-stream
> Size: 12992 bytes
> Desc: demeter_v1_models_check.ncl
> Url :
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20120707/2d461e1f/attachment.obj
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: Variables.o1827871
> Url:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20120707/2d461e1f/attachment.pl
>
> ------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> End of ncl-talk Digest, Vol 104, Issue 17
> *****************************************
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 8 21:38:13 2012

This archive was generated by hypermail 2.1.8 : Mon Jul 09 2012 - 10:45:32 MDT