Journaling (save commands from interactive session) ** Jennifer please note **

Charles Seman Charles.Seman at NOAA.GOV
Tue May 22 10:33:48 EDT 2007


Thanks, Matt!

Chuck

Matthias Munnich wrote:
> Hi Chuck:
>
> OK, so the email I compose in the meantime is relevant.
>
> ... Matt
>
> -----------------8<-----------------------------
>
> Hi Bernd,
>
> seems these part of my local changes to GrADS made it into v1.9, so  the
> following should work:
>
> (i) GrADS session command log:
> ---------------------------------------------------
>
> $ grads -H myhistory.gs
> start grads and log all commands into file myhistory.gs
>
> (ii) Save history to a file:
> --------------------------------------
>
> ga-> history myhis.txt
>
> to save the commands in "myhis.txt". If you use the ".gs" extension
> all commands are (single) quoted, so to replay your old session you can:
>
> ga-> history mycom.gs
> ga-> quit
>
> $ grads
> ga-> mycom.gs
>
>  By default history save commands up to the last "quit" command and tags
> it with the current date.
>
> (iii) Display history:
> -------------------------------
>
> $ga-> history
>
> displays the current history with command numbers
>
> ga-> history 21 37
>
> displays command commands 21 to 37
>
> ga-> history 21 37 myfile.gs
>
> saves commands 21 to 37 to "myfile.gs"
>
> (iv) Re-execute part of command history
> ----------------------------------------------------------------
>
> ga-> repeat 17
>
> re-execute command 17
>
> ga-> repeat 21 37
>
> re-executes most (*) commands 21 through 37
>
> (v) Commands in hardcopy output:
> -------------------------------------------------------
>
> If you use "ga-> print  myplot.eps" to write an eps file myplot.eps, the
> current history will be saved as
>   comment in the EPS output, to help you figure out how you produce a
> particular plot.
>
>
> (vi) Shortcuts;
> ----------------------
> Valid shortcuts are "his" for "history" and "r" for "repeat"
>
>
>
> Jennifer,
>
> note that all this does not seem to be yet documented.
>
> ... Matt
>
> (*) "History" and "repeat" are not repeated to avoid an infinite command
> execution loop.
>
>
>
> ----------------->8-----------------------------
>
>
>
> Charles Seman wrote:
>
>> Matt,
>>
>> With help from Hans Vahlenkamp here at GFDL, a version of "log.gs" was
>> found in a grads.gslib.tar.gz file with owner/timestamp =
>> fiorino/02/17/94... Our current version (attached) is different from the
>> older version, and we don't think that "log.gs" is being distributed
>> anymore...
>>
>> Chuck
>>
>> Matthias Munnich wrote:
>>
>>> Hi Chuck,
>>>
>>> are you sure this isn't a local GrADS extension at your site?  I  once
>>> implemented
>>> a "his" (or "history") command which does much the same (and more).
>>> I just looked and still found my stuff in gauser.c of the 1.9b4 sources
>>> but nothing about a "log".
>>> command.
>>>
>>> ... Matt
>>>
>>>
>>> Charles Seman wrote:
>>>
>>>
>>>> Bernd,
>>>>
>>>> Try typing "log" at the GrADS prompt:
>>>> ---
>>>>
>>>> Grid Analysis and Display System (GrADS) Version 1.9b4
>>>> Copyright (c) 1988-2005 by Brian Doty and IGES
>>>> Center for Ocean-Land-Atmosphere Studies (COLA)
>>>> Institute for Global Environment and Society (IGES)
>>>> GrADS comes with ABSOLUTELY NO WARRANTY
>>>> See file COPYRIGHT for more information
>>>>
>>>> Config: v1.9b4 32-bit little-endian readline sdf/xdf netcdf lats athena
>>>> printim
>>>>
>>>> Issue 'q config' command for more information.
>>>>
>>>> Landscape mode? (no for portrait):
>>>> GX Package Initialization: Size = 11 8.5
>>>> ga-> log
>>>> Save a list of commands to be generated to a file.
>>>> 3 choices for naming the file the grads commands will be saved to:
>>>> WARNING: There is no check if you will be over-writing an existing
>>>> file.
>>>>
>>>> Enter "<cr>"                   to choose the default file name
>>>> grads.log
>>>>
>>>> Enter   "n"   or   "name"      to choose a complete file name.
>>>>
>>>> Enter   "p"   or   "-"         to choose a prefix to the name
>>>> grads.log.
>>>> ---
>>>>
>>>> I hope this helps,
>>>> Chuck
>>>>
>>>>
>>>> bernd.becker at METOFFICE.GOV.UK wrote:
>>>>
>>>>
>>>>> HI!
>>>>>
>>>>> How do you switch on journaling in grads?
>>>>>
>>>>> I would like to save the commands which  I am going to type into a
>>>>> an interactive grads sessions into a txt file, to build a
>>>>> macro-script more easily later.
>>>>>
>>>>> What is the correct syntax to invoke this behaviour  in grads 1.9?
>>>>>
>>>>> Thanks!
>>>>> --
>>>>> Bernd Becker   The Monthly Outlook
>>>>> Met Office  FitzRoy Road  Exeter   Devon EX1 3PB  United Kingdom
>>>>> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
>>>>> E-mail:bernd.becker at metoffice.gov.uk -  http://www.metoffice.gov.uk
>>>>>
>>>>>
>>>>>
>>>> --
>>>>
>>>> Please note that Charles.Seman at noaa.gov should be considered my NOAA
>>>> email address, not cjs at gfdl.noaa.gov.
>>>>
>>>> ********************************************************************
>>>> Charles Seman                                Charles.Seman at noaa.gov
>>>> U.S. Department of Commerce / NOAA / OAR
>>>> Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
>>>> 201 Forrestal Road                              fax: (609) 987-5063
>>>> Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
>>>> ********************************************************************
>>>>
>>>> "The contents of this message are mine personally and do not reflect
>>>> any position of the Government or NOAA."
>>>>
>>>>
>>> --
>>> --------------------------------
>>> Matthias Munnich
>>> Univ. of California, Los Angeles
>>> Dept. of Atmos. and Oceanic Sc. and
>>> Inst. of Geophysics and Planetary Physics
>>> 3845 Slichter Hall
>>> Los Angeles, CA 90095-1567
>>> Phone: +1-310-794 5899
>>> Fax: +1-310-206 3051
>>> Email: munnich at atmos.ucla.edu
>>> --------------------------------
>>>
>>>
>> --
>>
>> Please note that Charles.Seman at noaa.gov should be considered my NOAA
>> email address, not cjs at gfdl.noaa.gov.
>>
>> ********************************************************************
>> Charles Seman                                Charles.Seman at noaa.gov
>> U.S. Department of Commerce / NOAA / OAR
>> Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
>> 201 Forrestal Road                              fax: (609) 987-5063
>> Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
>> ********************************************************************
>>
>> "The contents of this message are mine personally and do not reflect
>> any position of the Government or NOAA."
>>
>>
>
>
> --
> --------------------------------
> Matthias Munnich
> Univ. of California, Los Angeles
> Dept. of Atmos. and Oceanic Sc. and
> Inst. of Geophysics and Planetary Physics
> 3845 Slichter Hall
> Los Angeles, CA 90095-1567
> Phone: +1-310-794 5899
> Fax: +1-310-206 3051
> Email: munnich at atmos.ucla.edu
> --------------------------------
>

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."



More information about the gradsusr mailing list