Re: MJO Phase diagram

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 16 2012 - 09:11:12 MDT

Abhik,

Gibies is correct that you need to move the initial plot call outside the loop, because you are clobbering it for every iteration on "n". Also, you put the call to open the workstation inside the do loop, which means that's going to get clobbered every time too.

This code is hard to debug without being able to run it. I can't tell why you have the "do n=0,9" loop. Is there a dependency on "n" somewhere inside the loop? You have a bunch of code inside this loop that I think should be outside of it. For example, you have:

  do n=0,9
  ymdStrt = year+"1016" ; start yyyymmdd
  ymdLast = year+"0415" ; last

  pltDir = "./" ; plot directory
  pltType = "eps"
  pltName = "mjoclivar" ; yrStrt+"_"+yrLast

  pltMovie= False ; animation
  pltTitle= "MJO Phase: 15S-15N: "

All of these variables don't change inside the loop, so there's no reason for them to be there. Do loops can be expensive time-wise, so you want to keep them as minimal as possible.

Do you want a separate plot for each value of "n", or are you trying to draw things on the same plot for each value of "n"?

--Mary

On Aug 16, 2012, at 3:57 AM, Abhik Santra wrote:

>
> Hello,
>
> Earlier I have tried that also and it was giving similar result. However, I have realized that the variable "plot" must be stored inside the loop and should be drawn by overlapping. I need some help to do so.
> Thank you for your suggestion.
>
> Regards,
> Abhik
>
>
> ----- Original Message -----
> From: "gibies george" <gibies@tropmet.res.in>
> To: "Abhik Santra" <abhiksantra@tropmet.res.in>
> Cc: "ncl-talk" <ncl-talk@ucar.edu>
> Sent: Thursday, August 16, 2012 3:14:52 PM
> Subject: Re: MJO Phase diagram
>
> Abhik,
>
> You can use year loop to read data, but you have to take the plotting part outside it, because otherwise it will overwrite on the same plot.
>
> Regads
>
> Gibies George
>
>
> On 16 August 2012 12:45, Abhik Santra < abhiksantra@tropmet.res.in > wrote:
>
>
> Hi,
>
> I am trying to plot the MJO Phase Diagram for 10 years (2000-2009) in a single panel following the example mjoclivar_15.ncl. So I have introduced a do loop to read the multiple years data in the original script. However, it is reading all the years successfully but plotting only the last year. I am attaching the modified script. Please suggest me what to do?
>
> With regards,
> --
> Abhik Santra
> CSIR Research Fellow,
> Indian Institute of Tropical Meteorology,
> Pune - 411008.
> India
>
> _______________________________________________
> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 16 09:11:22 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT