Re: debug environment for NCL?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 14 2013 - 11:00:28 MDT

Hi Sam,
I think you want to use the exit statement:
http://www.ncl.ucar.edu/Document/Functions/Built-in/exit.shtml

I use this all the time when debugging to stop scripts at a particular
place after I use
print or printVarSummary.

If I'm off on what you are after let me (+ncl-talk) know..
Adam

On 06/14/2013 10:18 AM, Sam McClatchie (NOAA Federal) wrote:
> Colleagues
>
> When working on R scripts, you can set a browser() command to stop
> execution of a script at any point, so you can examine the contents of
> the workspace. For example, I might want to test run a new line using
> temporary variables loaded into the workspace up to the point that I
> halted execution. Or I might want to check the dimensions or the
> attributes of a particular variable that is giving me problems. This
> provides a very useful debugging facility. Matlab has something similar.
>
> Searching through the documentation and the maillist archives, I don't
> see anything similar in NCL, but perhaps I just have not found it? I
> know that I can locate errors using 'ncl -x filename.ncl' from the
> command line, but this is not my problem. I know that I can also copy
> code lines from my script into another interactive NCL session, but
> this gets cumbersome when the script gets a bit longer. I am beginning
> to suspect that the kind of debugging environment I am searching for
> is a facility of the editor being used (I use emacs at present)? Is
> that the case?
>
> Thanks for any comment,
>
> Sam
> --
> Sam McClatchie,
> Supervisory oceanographer, Fisheries oceanography
> Southwest Fisheries Science Center, NOAA,
> 8901 La Jolla Shores Dr.
> La Jolla, CA 92037-1509, U.S.A.
> email<Sam.McClatchie@noaa.gov>
> Office: 858 546 7083, Cellular: 858 752 8495
> Research home page <www.fishocean.info>
>
> /\
> ...>><xX(¡>
> //// \\\\
> <¡)Xx><<
> ///// \\\\\\
> ><(((¡>
> >><(((¡> ...>><xX(¡>O<¡)Xx><<
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 14 11:00:37 2013

This archive was generated by hypermail 2.1.8 : Mon Jun 24 2013 - 11:46:47 MDT