NOAA / PMEL - Thermal Modeling and Analysis Project

Release Notes for Ferret version 4.3

Official release -- July 1996

Release notes last modified: July 17, 1996

Go to Documentation table of contents

New in version 4.3 of Ferret:

  1. Wildcards "*" and "?" may now be used with SHOW and CANCEL commands
    e.g. SHOW VARIABLE my*var

  2. The number of aliases has been increased

  3. IF-THEN-ELSE can control the execution of Ferret commands
    e.g. IF $answer THEN GO script1 ELSE GO script2 ENDIF

  4. Two, 3, and 4-dimensional transformations can now be performed
    e.g. PLOT/T=1-jan:31-dec my_variable[X=@VAR,Y=@VAR]

  5. The characters yes? are ignored at the start of Ferret commands
    e.g. yes? yes? SHOW DATA


Detailed explanations of new features in version 4.3

  1. Wildcards "*" and "?" may now be used with SHOW and CANCEL commands

    Wildcards "*" and "?" may now be used in these commands

    • SHOW
      SHOW VARIABLE
      SHOW SYMBOL
      SHOW ALIAS
      SHOW VIEW
      SHOW GRID
      SHOW AXIS
    • CANCEL
      CANCEL VARIABLE
      CANCEL SYMBOL
      CANCEL ALIAS
      CANCEL VIEW
    where
    "*" matches zero or more of any characters
    "?" matches exactly one of any character

    For example,

    yes? CANCEL VARIABLE *wind ! matches "zonal_wind" and "wind"
    yes? SHOW SYMBOL tau? ! matches taux and tauy

    Back to Table of Contents

  2. The number of aliases has been increased

    The number of aliases that may be defined has been increased from 30 to 150.

    Back to Table of Contents

  3. IF-THEN-ELSE can control the execution of Ferret commands

    An IF-THEN-ELSE syntax has been added to allow conditional execution of Ferret commands. It may be used in two styles -- single line and multi-line. In both the single and multi-line styles the truth or false of the IF condition is determined case-insensitive recognition of one of these options:

    Examples:

    TRUE condition:

    FALSE condition:

    Grave accent (immediate mode) expressions can easily be used in conjunction with the IF syntax. For example, `3 GT 2` (Is three greater than 2?) evaluates to "1" (TRUE) and `3 LT 2` (Is three less than 2?) evaluates to "0" (FALSE). If the result of a grave accent expression is invalid, for example division by zero as in `1/0`, the string "bad" is, by default, generated. Thus invalid expressions are regarded as FALSE.

    Furthermore, symbol substitution permits IF decisions to be based text-based conditions. Suppose, for example, the symbol ($DATASET) contains either coads or levitus. Then an IF condition could test for coads using ($DATASET%|coads>TRUE|%).

    The single line style allows IF-THEN-ELSE logic to be applied on a single line. For example, to make a plot only when the surface (Z=0) temperature exceeds 22 degrees we might use
    IF `TEMP[X=160W,Y=2N,Z=0] GT 22` THEN PLOT TEMP[X=160W,Y=2N]

    The single line syntax options include

    IF condition THEN clause_1
    IF condition THEN clause_1 ENDIF
    IF condition THEN clause_1 ELSE clause_2
    IF condition THEN clause_1 ELSE clause_2 ENDIF

    Note that both ELSE and ENDIF are optional in the single line syntax. Groups of commands enclosed in parentheses and separated by semicolons can be used as clause_1 or as clause_2. There is no ELIF statement in the single line syntax. However, IF conditions can be nested as in

    IF `i1 GT 5` THEN (IF `j1 LT 4` THEN go option_1 ELSE go option_2)

    The multi-line style expands the IF capabilities by adding the ELIF (pronounced else if) statement. Multi-line IF statement follows the pattern

    IF condition_1 THEN
      clause_1_line_1
      clause_1_line_2
      .
      .
      .
    ELIF condition_2 THEN
      clause_2_line_1
      .
      .
      .
    ELIF condition_3 THEN
      .
      .
      .
    ELSE
      .
      .
      .
    ENDIF

    Note that THEN is optional at the end of IF and ELIF statements but the ENDIF statement ir required to close the entire IF block. Single line IF statements may be included inside of multi-line IF blocks.

    Back to Table of Contents


  4. Two, 3, and 4-dimensional transformations can now be performed

    In previous versions of Ferret transformations which were applied to several axes, e.g. my_variable[X=@VAR,Y=@VAR] were computed as sequential applications of the 1-dimensional transformation. (Special exceptions to this were @AVE and @DIN which, when applied in X and Y simultaneously, computed 2-dimensional transformations). The results of such calculations were not always the desired ones. In the example, my_variable[X=@VAR,Y=@VAR] the result of sequential 1-dimensional transformation would be a variance of a variance.

    In Ferret version 4.3 the transformations @AVE, @DIN, @VAR, @NGD, and @NBD, when applied to multiple axes simultaneously will be computed as true multi-dimensional transformations. Thus my_variable[X=@VAR,Y=@VAR] computes the variance of my_variable over a 2-dimensional XY region. These transformations may similarly be applied to 1, 2, 3, or 4-dimensional regions. The output will document the geometry of the calculation. In the following example @VAR is documented as "XY variance":

    yes? STAT/T=15-JAN:15-DEC SST[X=@VAR,Y=@VAR]

    SEA SURFACE TEMPERATURE
    LONGITUDE: 20E to 20E(380) (XY variance)
    LATITUDE: 90S to 90N (XY variance)
    .
    .
    .

    All other transformations besides those named above are computed as sequential 1-dimensional transformations when specified simultaneously on multiple axes. However, note that all other transformations are either i) unaffected by the sequential calculation (e.g. @MAX); or ii) nonsensical as multi-dimensional transformations (e.g. @DDC); or iii) ambiguous as multi-dimensional transformations (e.g. @SBX).

    Back to Table of Contents


  5. The characters yes? are ignored at the start of commands

    The 4 character string yes? at the start of a Ferret command is ignored. This enables groups of Ferret commands to be copyed and pasted from the screen as Ferret commands.

    Back to Table of Contents