Re: Plot producing same contour rather than looping to produce different contour for each step

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 05 2012 - 11:27:19 MDT

Hi Dominique,

I'm not sure what you are trying to do here. It looks like there's an inner loop that iterates 8 times: on the line

plot = gsn_csm_contour_map(wks,spell_tot(0,{spell(nr)},:,:),res1)

should that perhaps be:

plot(i) = gsn_csm_contour_map(wks,spell_tot(0,{spell(nr)},:,:),res1)

And the index "inr" vs. "nr"?

If this is what you are trying to do, I suspect you'll also have a problem with the size of the plot array, as the inner loop of 8 iterations is encompassed by the outer loop of indeterminable iterations (i.e, the "do nr =0,(spell(0)-1), 5")

Hope that helps…

Rick

On Jul 5, 2012, at 11:16 AM, Cannavina, Dominique wrote:

> Hi NCL-Talk
>
> First of thank to for all the help so far with my script particularly Dennis and Adam.
>
> I would like to ask another NCL-Talk question please plotting the output for the number of consecutive days below the critical temp zero degC.
>
> The following loop, gives 8 plots but of the same contour and the res1@tiMainString=.... shows that that I am outputting the same data rather then going to the next value of 'spell_tot'
>
> I have also attached the whole script (this also contains some of my attempts) and a file with the main variables.
>
> Any advice would be greatly appreciated.
>
> Kind regards
>
> Dominique
>
> plot = new(8, graphic)
> do nr =0,(spell(0)-1), 5
> istart = nr + 1
> iend = istart +7
> iplot = 0
> do inr = istart,iend
>  
> res1@tiMainString = ("DEMETER_ENSEMBLES -run length =" + (nr+1)+"days"); add a title
> res1@tiMainFontHeightF = .018 ; font height
>
> plot = gsn_csm_contour_map(wks,spell_tot(0,{spell(nr)},:,:),res1)
> end do
> end do
> <demeter_v1_plots.ncl><Variables.o1827871>_______________________________________________
> 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
Received on Thu Jul 5 11:27:29 2012

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