This is part of the labels / documentation for <a href='http://jcm.chooseclimate.org'>Java Climate Model</a><hr/>

#viewparams		§£^apptag This lists all the @param registered in JCM, showing the parameter name and value in the chosen language. Those you have changed are shown first, with their default value in brackets. The values should change, as you make adjustments elsewhere.

 This list includes all @menu, @option, @control on currently visible panels, but also any other  parameters defining the current model setup, including some used only for scripting (see @scripting). Parameters which <i>only</i> affect setup of panels not currently visible will not be shown. The ?owner? (shown with an asterix) is the name of the object whose java code defines the direct effect of this parameter.

²°adju You can cut and paste the text to another application if you like. ²
   £§panelinfo

#viewdata		§£^apptag This panel enables you to see the data underlying any of the graphs - choose which plot from the menu (the graph must be visible elsewhere).

²°adju You can cut and paste from the table in the usual way. You can also choose the separator, in case you want it in a particular format for pasting into another application. ²

²°adju The data now refreshes when you move a parameter, beware that updating the text is rather slow on some computers/browsers. ²

²°adju Note, for a few data columns a scaling factor (e.g. x1000) has been applied on the visible graph. ²
   £§panelinfo

You can also save the table as a file-see @captab

#notepad		§£^apptag Multipurpose Text Panel for debugging, writing/running scripts (see @scripting), updating doc, etc.
  You might want to open two notepads (one for input, one for output) 
  £§panelinfo

#debug		§Receive debugging info (erros and calculation info from the model) in this notepad. You can also get performance info -see @loop, and query state and interactions

#script		§Run the script in this notepad. You can use this both for sophisticated batch calculations, and for checking/adjusting one parameter at a time, in conjunction with debug. See @scripting

#stop		§Stop the script!

#clear		§Clear this panel (and any script it contains)

#autodoc		§Makes JCM documentation.<li>see @labdoc

#labinf		§This class provides labels, pop-up info and documentation, interpreting a text file loaded for the specified @languagemenu.<li>see @labdoc

#labdoc		§££labdocintro ££labdoctrans  ££labdocmodel ££names  ££labdocfiles

#labdocintro		§All of JCM's plot labels, pop up information, and documentation are now stored in the same plain-text format,
  There are currently about 50,000 words of labels+documentation  (in english ), covering about 700 seperate items.
  Sections of text can be re-used in several different contexts, and hyperlinks are easy to write and check (there are about 1500).
  <hr>
  °cogs The java code which handles labels and documentation can be found from @autodoc, @labinf, @txt, @showwebpage (all within @tls package).
  °adju The system can also be used without a web browser - see @startjcmswing
  °adju The documentation can be easily searched or indexed (see @docsearch, @doclist)

#labdoctrans		§JCM's @labdoc system is designed to be easy to translate into any language.
  The graphical interface (plot labels and pop-up info) already has translations in 10 languages (change from @languagemenu).
  The documentation incorporates some translated items from the graphical interface (this avoids duplication), although the rest has not yet been translated.
  When a translation is not found the default (english) is used, so it's not necessary to translate everything, only key items and pages.
  Hyperlinks and subsections automatically use translations of other items, when found.  <li>Many people helped with translations - see @acknowtranslate.  <li>Why do this? See @dialogue, @concept, @teaching  <li>Only the @labdocfiles are translated, it's not necessary to compile java code.  <li>Please get in touch (@contact) if you can help translate to your language.
  ²(note, Java works with unicode so it can handle any language).²

#labdocmodel		§The documentation for specific panels, modules, controls, menus, curves etc. is enhanced with information reflecting the current state of the model.
  The HTML menus, value-input boxes and checkboxes (to which the model responds via @scripting) are generated automatically.
  Which curves and controls are included within panel documentation also depends upon the current complexity level (see @complexitymenu), plot setup  (see @whatper, @emit&or&conc&or&rf) and model interactions (see  @flowchart).  <li>See code in @iob, @param, @jcmpanel, @graph
  ££usehelpmode

#names		§JCM has a unique item-code name for each @iob (which includes panels, modules, curves, controls, menus, etc.).
  These item-code names are used to look up translatable @labdoc, and also for reference in @scripting.
  There are several ways to find the item-code name of an object or parameter:  <li>First, choose £`script-codes from the @languagemenu. Now item-codes are shown within the model interface and documentation, instead of the usual labels.  <li>Then view the @doclist webpage for a complete list of items with labels or documentation (including documentation sections without model objects).  <li>Or open the @viewparams panel (from a @plotmenu) to see a list of  all adjustable parameters (this includes a few @scriptparams)  <li>You can also look in the @labdocfiles : each hash symbol identifies a new item-code.
  Notes:
  ²Item-codes may not include spaces or other punctuation (numbers are ok).²
  ²Some names (particularly plot titles and axis units) are composed of multiple parts separated by '&' whose labels are looked up separately and joined together by @labinf   (see also @scale) ²
  ²°cogs In scripting, in case of ambiguity, the name of the object's <i>owner</i> (see @iob) should be prepended with a dot (e.g.  glotempplot.ymin, because every graph has a ymin parameter) ²

#labdocfiles		§The labels/documentation are split into many separate files so that they are only loaded on demand, depending on the chosen language and topic. <hr>  All labels which may be used within the graphical interface, plus titles of documentation sections, are stored in files lab_XX.txt  (where XX is a language code).  Links to these files are below.

  <a href="../labdoc/lab_en.txt" target="txt">lab_en.txt</a> 
  <a href="../labdoc/lab_fr.txt" target="txt">lab_fr.txt</a> (French) 
  <a href="../labdoc/lab_nl.txt" target="txt">lab_nl.txt</a> (Dutch) 
  <a href="../labdoc/lab_de.txt" target="txt">lab_de.txt</a> (German) 
  <a href="../labdoc/lab_es.txt" target="txt">lab_es.txt</a> (Spanish)
  <a href="../labdoc/lab_es.txt" target="txt">lab_pt.txt</a> (Portuguese) 
  <a href="../labdoc/lab_dk.txt" target="txt">lab_dk.txt</a> (Danish) 
  <a href="../labdoc/lab_no.txt" target="txt">lab_no.txt</a> (Norwegian) 
  <a href="../labdoc/lab_ru.txt" target="txt">lab_ru.txt</a> (Russian) 
  <a href="../labdoc/lab_zh.txt" target="txt">lab_zh.txt</a> (Chinese)<hr>  The main text of documentation sections are further separated by topic, as well as language(currently there are only only a few pages translated, into French). <hr>All these files are  found in the jcm/labdoc directory in the recent JCM package (see @download).  <hr>  <li> Note that all files are in UTF-8 character format. <li>The <a href="../labdoc/syntax.txt" target="txt">syntax.txt</a> file explains the file format and rules for text-parsing (carried out by @autodoc)   <hr> The current syntax may soon be replaced by XML/HTML markup which would be easier to edit using a HTML composer -tell me if you would prefer this. <hr>  There is also a file containing all the labels and documentation as one big table (one row for each topic, one column for label/popup/documentation in each language). This is convenient for rearranging items and updating translations. It can be imported into a spreadsheet such as Excel, as if it were a ".csv" file, noting that the items are separated by TAB (not by comma), and the character format is UTF-8. A standalone routine built into @labinf converts between this form and the separate files as above. <li> <a href="../labdoc/jcmlabdoctab.txt" target="txt">jcmlabdoctab.txt</a> <hr>See also:   <li>@names  <li>@acknowtranslate   <!--<li>The raw text (source) for the currently visible webpage can be viewed and adjusted using @getdoc and @changedoc in a @notepad, but to save the changes you must use @startjcmswing
 -->

#scripting		§££scriptintro ££scriptlang ££scriptrun ££scriptcode ££names ££scriptparam ££scriptlist <hr> Note also @probwccc

#scriptintro		§JCM scripting code is designed to serve several functions.   <li>set the value of any paremeter you can adjust the mouse, and also many other public variables within JCM. This is useful for quick ad-hoc experiments and debugging, using a @notepad or System.input (see @scriptrun)  <li>run automatic demonstrations from web pages -explaining how to use JCM (see @howto), or illustrating specific points about the policy options or scientific uncertainties  <li>perform loops, mathematical operations etc., including creation of variables, like any simple computer language. This enables batch calculations and iterations in problem-solving frameworks, to be run without having to compile java or even to restart the model. For example, see @stabtemp2cscript  <li>connect multiple users to share the same model world across the web. The potential has already been demonstrated in earlier versions, but it is not yet implemented in the current version (see @remotecontrol).   <li>some other functions: make a new plot (see @blankplot), create and display a web page (see @showwebpage), load and save data, etc.  (under development).  <li>if you envisage another useful function, please tell me (see @contact)

#scriptlang		§<li>Interpreted scripting languages, like Javascript, Perl, Basic, or Python, are usually easier to write, read, and adjust quickly  <li>Compiled languages like Java (see @aboutjava), C++, or Fortran usually run much faster, and are more reliable since the compilation process checks for errors.

  It makes sense, therefore, to use compiled Java for the computationally intensive, frequently used, core scientific modules and graph-plotting routines, while using an interpreted text script to direct specific applications such as batch-calculations or automatic demonstrations.

  Bridges between Java and several existing scripting-languages have already been built, however adding such packages to JCM would make it too large to load rapidly on the web. So a simple custom script interpreter (as described below) was developed for JCM.

  However parsing a script is not a trivial task, even with only a small set of functions, so for more complex applications it might be better to adapt an existing interpreter. Javascript might be a good choice as it is already built into most web browsers and has a (deceptively) similar syntax to Java. On the other hand, the script should also work when JCM is run as a standalone application: this is important because security restrictions prevent data files of model results from being saved from a web browser! 'Rhino' (www.mozilla.org/rhino) project may provide a solution to this, which will be investigated later. Another option could be 'Jython' (www.jython.org), which has also been demonstrated to work efficiently within applets.

#scriptrun		§<li>You can test a simple JCM script using a @notepad (choose from any @plotmenu). Write the script there, or paste it in from a text file (examples are in jcm/script directory), and press the @script button. It may help to open another notepad and press the @debug button, to show any output from the script, as well as any routine progress info or error messages.  <li>JCM Scripts can also be called from webpages, using javascript instructions <script>jcm.playfile('script/scriptname.txt');</script> (to load an existing script file) or <script>jcm.playi('scriptstring');</script> to run a short script defined within the string.
  ²note, the wepage header must also include <script src=jcmjs.js></script>²  <li>Scripts can be included in documentation items using a simple tag (see <a href="../labels/syntax.txt" target="txt">syntax.txt</a> file) - this also puts buttons in the web page as follows £!dummy .  <li>It is envisaged that a method to run JCM with a script from the command-line will be developed (together with a method to save the resulting data)  <li>(for java experts!) It is also possible to send a short script to JCM using Java System.input, if you start  JCM from a tool  (e.g. a command-prompt console) which has a text input facility

#scriptcode		§The documentation page explaining the syntax of JCM scripting code can now be found in the jcm/script directory of the package (see @download). <a target='_new' href='../script/scriptcodesyntax.html'>Here is a link to scriptcodesyntax.html</a>

#scriptparam		§Some adjustable parameters in JCM may be used in scripting, which do not have graphical controls:  <li>backred, backgreen, backblue : set background color components (range 0-255) (in @mainapp)  <li>loopinfo : adds performance info to standard output (time spent calculating each module) (in @loop)  <li>scriptmode : sets one of three modes for response to adjustment of parameters (in @param)
  - demo : for automatic demonstrations, in which menus and control info pops up, as if the user passed a mouse over them
  - direct : model recalculates immediately, but no popup info (this is the default)
  - delay : no recalculation or replotting until next "run" instruction: this could be used to change several parameters at once more efficiently, or to recreate a snapshot of the model.

#player	¨dem		§Runs a script  code: See @scripting

#recorder		§This records JCM scripts, complementing @player. Recorder and Player may run in parallel threads for live connection between two JCMs across the web. Thsi feature was working in 2001, but has not yet been reinstated with new scripting code.

#scriptlist	¨dem		§£!timescalescript
  £!emitdeclinescript
  £!backcoltempscript
  Stabilisation under Uncertainty
  £!stabtemp2cscript
  £!stabconc500script
  £!stabuncert25script
  Probabalistic Scripts (slow!)
  £!carbonprobscript
  £!carbonprobscriptinv
  How Use Demos
  £!howuco2tempdemo
  £!howuemitseademo
  £!howulabelsdemo
  £!howuscalesdemo
  Experimental
  £!testscript
  £!testscriptjs

#emitdeclinescript	¨dem		§This script demonstrates how array values within JCM java code can be queried and reset dynamically
  However as you can see, the interpreter is rather slow (partly due to java reflection being slow)
  £!emitdeclinescript
  See also @scripting

#remotecontrol	¨fut		§At Grid-Arendal in 2001 a system was developed whereby several users may share the same model by "remote control" across the internet, with a view towards developing JCM for @dialogue. This system worked very efficiently, because only the changing model @param needed to be sent across the internet, the model itself and the graphics are calculated locally. However synchronisation between people was found to be a challenge - how do you explain to a user who may be the other side of the world, why you are moving specific arrow-controls about on their screen? So an alternative approach was explored- to record a  demonstration or snapshot  of model events to illustrate a point, accompanied by textual explanation, which could be posted on the website for viewing by others later. This may have applications in organised group dialogues or @teaching.

It is hoped to revive the record/playback feature: see @scripting

#doclistinfo		§²Doclist is generated automatically using currently selected language. It includes labels and popup-info as well as documentation pages.²
  ²°cogs (see @labdoc, @labinf for method)²

#searchresults		§²Search uses currently selected language. It may take a little time.²
  ²°cogs panel documentation pages only include curves and controls which are currently visible ²   

    ²°cogs (see @labdoc, @labinf for method)²

#searchawot	¨old		§

  ²°adju try £`anywords to get more results, £`onlytitles to get less. ²  

 

#txt		§This class contains some methods for parsing text strings -it is mainly used by @labinf, @autodoc, @player

#sysin		§To capture script instructions from System.input (for experts!)

#fileio		§This class contains some methods for loading and saving text files (loading either from the web or locally).

#showwebpage		§This class makes a web page appear in a certain frame, and stores a text string ("info") which may then be collected by javascript within that page. It is used by @autodoc and @player. See also @helpmode.

#sort		§Quicksort tool - sorting the labels/doc sections makes the lookup faster. Also used for search-doc and list-doc