[ncl-talk] help

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Aug 11 08:15:58 MDT 2015


Hi George,

as Will Hobbs suggested yesterday:

There's en error in your final do loop, where you create the plots; you're using indices of 0 and 1 for the plots, regardless of the loop. Every loop will just overwrite the previous loop.

One possible fix:

   i = 0                                                          ;index to refer to the plot
   do ns=0,dimsizes(season_index)-1
    
    res at gsnCenterString   = season_label(ns)+":"+(ymStrt/100) +"-"+(ymLast/100)
 
    plot(i)    = gsn_csm_contour_map_ce(wks,precSeaClm(ns,:,:), res)  ; create plot, using i NOT 0
    plot(i+1)  = gsn_csm_contour_map_ce(wks,prec1SeaClm(ns,:,:), res)  ; create plot using i+1 NOT 1
    
    i = i+2 ; update i for the next loop
    
   end do
…

You use a variable i now but only i=0 and i=1 which will give only two plots because they’re always be overwritten within the loops.
Why do you use two do loops now? I think that Will’s suggestion is correct and you should have a look on it again and. If you don’t 
know how to use a do loop take a look at  http://www.ncl.ucar.edu/Document/Language/loops.shtml.

Bye,
Karin


> Am 11.08.2015 um 15:56 schrieb george luke <lukejuliet2015 at gmail.com>:
> 
> ​​​​Dear All
> thanks again for support.
> for sure I just need help, still i get 2 plots instead of 6,I have implemented all what i think are needed. Infact all the datasets are being read but plots only 2...I need help here. If u dont mind mind you can try running the script yourself. I am using GPCC and GPCP monthly data available online. i have attached script.. Anyone to show me how to fix it
> <trial1>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20150811/150d641e/attachment.html 


More information about the ncl-talk mailing list