[ncl-talk] usage of "continue" [SEC=UNOFFICIAL]

Eun-Pa Lim E.Lim at bom.gov.au
Tue Oct 27 05:15:11 MDT 2015


Dear Jack

Thanks for your reply ☺

I was just trying to make very simple do loops looking like this in old fortran

Do i=0,10
   Do j=0,20
      If(a(i).eq.b(j)) then
          X = j
          Go to 333
       End if
   End do
333 continue
End do

But "Go to " is not a statement used in NCL, and there is not much explanation about "continue" in the NCL page.

There must be a way to do this in NCL I reckon!

Cheers

Eunpa

Eun-Pa Lim
Research Scientist
Seasonal Prediction Science Team
Centre for Australian Weather and Climate Research (CAWCR)
Bureau of Meteorology
Tel: +61-3-9669-4636
http://www.cawcr.gov.au/staff/elim/index.php

From: Jack Ogaja [mailto:jack.ogaja at gmail.com]
Sent: Tuesday, 27 October 2015 10:10 PM
To: Eun-Pa Lim
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] usage of "continue" [SEC=UNOFFICIAL]

Really…? I guess it will be easier if you show a piece of ncl script which gives a hint of what you are trying to achieve. In principle if you understand what “continue” means/does in ‘your preferred' language, then I assume you should be able to implement or know whether it is possible to implement a similar algorithm in ncl after reading the ncl-statements documentation and probably going through a few examples.

Or you can just provide a Pseudocode of your intended program to make it easier for somebody to help.

Jack

On 27 Oct 2015, at 11:12, Eun-Pa Lim <E.Lim at bom.gov.au<mailto:E.Lim at bom.gov.au>> wrote:

Hi NCL users,

Could anybody please teach me how to use "continue" in a do loop in NCL? I can't find an example in https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml

Many thanks!

Eunpa


Eun-Pa Lim
Research Scientist
Seasonal Prediction Science Team
Centre for Australian Weather and Climate Research (CAWCR)
Bureau of Meteorology
Tel: +61-3-9669-4636
http://www.cawcr.gov.au/staff/elim/index.php

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto: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/20151027/a4f26e6f/attachment.html 


More information about the ncl-talk mailing list