New Features:
- The default number of color levels is increased from 10 to 30.
- The default initial amount of memory is increased from 6.4 Mwords to 25.6 Mwords.
- The default precision of grave-accent expressions is increased from 5 to 7
- New symbols for getting timing information in Ferret sessions: CURRENT_DATE, CURRENT_TIME, DELTA_CPU, CLOCK_SECS.
- A new option on color keys: label with the minimum and maximum values of the data field.
- A new symbol LAST_GO_FILE is automatically defined containing the name of the last GO script which was run.
- Concatenation, Sort and Sample functions now operate on string-type arguments.
- The transforms @NGD and @NBD may be applied to string variables.
- Other new functions: SAMPLEXYT, SAMPLEXY_CURV_AVG, SAMPLEXY_CURV_NRST, TEST_OPENDAP, SCAT2GRID_BIN_XYT, SCAT2GRID_NBIN_XYT.
- New "median" smoothing transform @MED:n smooths the data using the median of each n points.
- New options for controlling NO VALID DATA labels.
- The calendar attribute for a time axis in a netCDF file may have the value "PROLEPTIC_GREGORIAN".
- A new mode upcase_output gives control over whether variable names are converted to upper case on output to netCDF.
- A new qualifier SAVE/KEEP_AXISNAMES command prevents axis names from being changed on output to netCDF.
- Changes to text of a warning message
Bug fixes:
- SET MEMORY command in the .ferret startup file caused error messages. This is fixed.
- Corrections made to SCAT2GRIDGAUSS functions
- CONTOUR/OVER/COLOR caused movable labels to also change color. This is fixed.
- PPL/RESET should restore plot settings to the original defaults.
- If PPL AXLABP was used to put the labeling of the horizontal axis abovethe plot, then the axis label was not drawn. This is fixed.
- Overlaying a polygon on a plot with "no axes" spuriously added a bounding box tothe plot. This is fixed.
- Fixes were made relating to writing bounds and attributes to netCDF files, particularly when writing user-defined variables, and variables from ASCII data sets.
- EXIT/SCRIPT did not exit if it was inside a nested IF block. This is fixed.
- If a 360-day calendar is being used, previously we were not able to specify 30-feb-yyyy in a DEFINE AXIS command. Now we can.
New Features:
1. The default number of color levels is increased from 10 to 30. This makes for prettier color plots. The value is an approximate number; the levels are chosen based on the range of the data to be plotted.
If you do a lot of line-contour plots, or for other reasons you do not want this change, you can restore the old default value. This can be done by changing the value of MODE nlevels:
SET MODE NLEVELS 10
If you wish to keep this setting in effect for all of your sessions, put it in your .ferret startup file.
2. The default initial amount of memory has been increased from 6.4 Mwords to 25.6 Mwords. SETMEMORY may be used to change this in the Ferret session. As in item 1,customizing the initial amount of memory is a setting that is often putinto the .ferret startup file.
3. The default precision of grave-accent expressions is increased from 5 to 7. This reflects the full precision of single-precision representation of variables and expressions in Ferret:
ves? let a = 123.4567 yes? say `a` !-> MESSAGE/CONTINUE 123.4567 123.4567 ! If you want less precision, say for labels, you can change the ! precision of the values returned: yes? fill var yes? let x1 = x[gx=var,i=45] yes? let y1 = y[gy=var,j=56] yes? label `x1`,`y1`,0,0,0.12,(`x1,prec=3`,`y1,prec=3`) !-> PPL %LABEL 64.5,-34.5,0,0,0.12,(64.5,-34.5)
4. New symbols are defined for timimg. In all Ferret sessions: CURRENT_DATE, CURRENT_TIME, DELTA_CPU, CLOCK_SECS. These allow you to analyze timing in Ferret sessions. They are updatedwhen they are evaluated by Ferret, for instance by a SHOW SYMBOL or anevaluation such as LET secs = ($clock_secs)
- DELTA_CPU.
- When it is evaluated, this calls the intrinsicfunction Dtime and sets the value to the delta-CPU-time since the lastcall. It is called when Ferret initializes, so your first evaluation getsdelta-cpu time since the start of the Ferret session.
- Example: Measure the cpu time to evaluate a variable.
- yes? say ($delta_cpu) ! evaluate the symbol just before the command
yes? plot temp[x=@ave, y=@ave]
yes? let cpu_time = ($delta_cpu) ! The cpu time since the last evaluation of delta_cpu
- CLOCK_SECS.
- This is the seconds in elapsed clock time since theFerret process started. The value is set to zero at the start of the Ferret session. Thiscalls the intrinsic function SYSTEM_CLOCK and therefore it may be system dependent.
- Example: Measure the elapsed time to evaluate a variable.
- yes? let secs_0 = ($system_clock)
yes? plot temp[x=@ave, y=@ave]
yes? let secs = `($system_clock) - secs_0`
- CURRENT_DATE
- Formatted date, updated when the symbol is evaluated, e.g. 13-May-09
- CURRENT_TIME.
- Formatted time, updated when the symbol isevaluated, e.g. 11:10:53
- SESSION_DATE and SESSION_TIME
- (available in previous versions) contain thedate and time that the session was started.
5. A new option on color keys: label with the minimum and maximumvalues of the data field. This is a new argument to the PPLUS SHAKEYcommand. A new Ferret alias, KEYMARK, can be used to set it.
yes? SHOW ALIAS keymark Alias Command ----- ------- KEYMARK PPL SHAKEY 1,,,,,,,,, yes? KEYMARK 1 !Turn on annotating the color key
KEYMARK 1 (equivalent to PPL SHAKEY 1,,,,,,,,,1) turns on the annotation of color keys, and KEYMARK 0 (or PPL SHAKEY 1,,,,,,,,,0) turns it off. The setting persists in the Ferret session until turned off.
The script for this image is below.
! Turn on the annotation of keys yes? KEYMARK 1 yes? USE levitus_climatology yes? SHADE/LEV=(-inf)(4,28,1)(inf) temp[z=20] yes? KEYMARK 0 ! turns off this feature.
6. A new symbol LAST_GO_FILE is automatically defined containing the name, including the path of the last GO script which was run.
yes? go ptest ! Description: create a simple test line plot ! spirograph picture ... PLOT/VS/LINE/I=1:314 i*cos(i/20),i*sin(i/20) yes? show symbol last_go_file LAST_GO_FILE = "/home/porter/tmap/ferret/linux/go/ptest.jnl"
7. String versions of several functions:
- Concatenation
- XCAT, YCAT, TCAT, ZCAT now will take string arguments. (In fact, there are functions, XCAT_STR, etc. and when XCAT is run, and if its args are strings, Ferret actually runs XCAT_STR)
- Sorting
- SORTI, SORTJ, SORTK,SORTL will now take string arguments. (In fact, there are functions, SORTI_STR, etc. and when SORTI is run on a string variable, Ferret runs SORTI_STR).
- Sampling
- SAMPLEI, SAMPLEJ, SAMPLEK, SAMPLEL work with string arguments.
- Functions for finding an element
- Previous functions IS_ELEMENT_OF and ELEMENT_INDEX_OF handle finding an element in a list. New functions IS_ELEMENT_OF_STR andELEMENT_INDEX_STR are the equivalents to these and operate on strings.
8. The transforms @NGD and @NBD may be applied to string variables. For string variables, bad data is taken to be the null string.
yes? let a = {"a","b",,"c",,"d",,,"e","f","g","h"} yes? list a[i=@ngd] *** NOTE: @NGD of string variable, counting null strings as missing VARIABLE : {"a","b",,"c",,"d",,,"e","f","g","h"} (# of points) X : 0.5 to 12.5 (number of valid) 8.000 yes? list a[i=@nbd] *** NOTE: @NBD of string variable, counting null strings as missing VARIABLE : {"a","b",,"c",,"d",,,"e","f","g","h"} (# of points) X : 0.5 to 12.5 (number flagged bad) 4.000
- TEST_OPENDAP
- Returns the success or failure flag fromthe OPeNDAP call to access a remote data URL. Allows a script to checkthe availabilty of the remote dataset. (flag=0 means success)
- SAMPLEXY_CURV_AVG, SAMPLEXY_CURV_NRST
- New methods for sampling points from data on curvilinear grids
- SCAT2GRID_BIN_XYT
- Computes binned averages of scattered data onto a regularly-spaced XYT grid.
- SCAT2GRID_NBIN_XYT
- Counts observations when binning scattered data into XYT grid.
10. New "median" smoothing transform @MED. The transformation @MED:n replaces each point with the median of the n points centered at that location, along the indicated axis. The width of the median is the number of points given as an argument to the transformation, or if no number is specified, 3 is used. The length must be odd for symmetry about each point.
11. New options for controlling NO VALID DATA labels:
The label NO VALID DATA is automatically added to plots if all the data from the plot command is missing. The MODE NODATA_LAB controlls whether this label is added or suppressed. By default MODE NODATA_LAB is set, meaning the NO-VALID-DATA label will be put on plots. Cancel the MODE to supress the label.
If we're doing a 2D plot to set up plot axes, planning to overlay other plot elements, we don't want NO VALID DATA across the middle of the plot. You can now turn that label off by canceling the mode nodata_lab
yes? use coads_climatology yes? CANCEL MODE nodata_lab yes? SHADE/Y=80:90 sst[L=1] yes? SET MODE/LAST nodata_lab yes? PLOT/VS/over my_x, my_y
12. The calendar attribute for a time axis in a netCDF file may have the value "PROLEPTIC_GREGORIAN". Such an axis will be treated as a standard Ferret calendar axis.
13. A new mode UPCASE_OUTPUT, gives control over whether variable names are converted to upper case on output. By default this mode is set (classic Ferret converts names to upper case). CANCEL this mode to keep the original upper- or lower-case spelling of names as they were in the input dataset. This includes names of user-variables defined in a script.
yes? ! open a file, which has variable names in lowercase, and another in uppercase. yes? USE lower_names.nc yes? USE coads_climatology yes? CANCEL mode upcase ! set Ferret so variables are written in original case yes? LET myvar = 3*olr[d=1] yes? LET SST_January = sst[L=1,x=305,d=2] yes? SAVE/FILE=out.nc/CLOBBER myvar, SST_January yes? SAVE/X=180:200/Y=-5:5/l=3/APPEND/FILE=out.nc sst
Then the output netCDF file will contain the coordinate variables in their original case, the user variables myvar and SST_January in the upper and lowercase spelling used in the script. The coordinate variables and data variables from coads_climatology will remain in uppercase.
14. A new qualifier SAVE/KEEP_AXISNAMES command prevents axis names from being changed on output to netCDF. By default, if you save a subset of a variable, the axis name is changed to reflect the range of indices that went into that subset. So if we SAVE/x=300:360/y=20:40 SST, the coordinate axes in the output file are, for instance, named COADSX141_170 and COADSY46_55. Sometimes we might want to just keep the original names.
yes? ! keep the original axis names. yes? USE coads_climatology yes? ! This file will have the original coordinate axis names COADSX, COADSY yes? SAVE/KEEP_AXISNAMES/FILE=my_subset.nc sst[x=300:360,y=20:40]
15. Changes to text of a warning message. The Ferret behavior has not changed, only the message. If you load multiple palettes into Ferret (or even if you load the same palette many times with different plot commands), you will see this message.
PPL+ error: You're attempting to use more colors than are available. Using SHASET RESET to re-use protected colors may help.
has changed to
PPL warning: You're attempting to use more colors than are available. Using PPL SHASET RESET to re-use protected colors may help.
Bug fixes:
- SET MEMORY command in the .ferret startup file caused error messages. This is fixed. When a command to SET MEMORY is present in the .ferret file that Ferret runs upon starting, this previously resulted in multiple messages and an error message on startup.
If the .ferret file contains
SET MEMORY/SIZE=60
Then a Ferret session would start as folows:
>ferret NOAA/PMEL TMAP FERRET v6.2 Linux(g77) 2.4.21-32 - 03/24/08 19-May-09 12:54 Cached data cleared from memory ... Cached data cleared from memory Cached data cleared from memory **ERROR: $HOME/.ferret: Network is unreachable GO "$HOME/.ferret" yes? show memory Current size of FERRET memory cache: 60 MegaWords (1 word = 4 bytes) yes?
The SET MEMORY command did take effect. Now this has been resolved and the error messages do not appear.
- Corrections made to SCAT2GRIDGAUSS functions. The functions use scattered points within a rectangular box around the "influence region" of a particular grid point, determined by the CUTOFF parameter. Previously the functions computed an influence region which was a rectangular box around the location. The functions are changed to reflect what is documented with these functions, that the distance is in a circle or ellipsoid around the destination grid point. The old versions of the functions are made available as SCAT2GRIDGSUSS_XY_V0, etc.
- CONTOUR/OVER/COLOR caused movable labels to also change color. This is fixed.
!Previously the CONTOUR command caused the labels at the top of the plot to turn green! yes? USE levitus_climatology yes? FILL/K=1 temp yes? CONTOUR/OVER/K=1/COLOR=green salt
- PPL/RESET should restore plot settings. Now this restores defaultsettings for AXTYPE, AXLABP, AXLINT, TXLABP, TXLSZE, TICS, CONPRE,CONPST, DFLTFNT, palette, and the number of line colors.
- If we used PPL AXLABP to put the labeling of the horizontal axis abovethe plot, then the axis label was not drawn. This is fixed.
- Overlaying a polygon on a plot with "no axes" spuriously added a bounding box tothe plot. This is fixed.
- We can now define a long, evenly-spaced axis accurately. Previously thelimits of the axis and the NPOINTS argument was read as a real number, so its precision waslimited. Now it is read as an integer, with much more precision:
DEFINE AXIS/X=1:10197502/NPOINTS=10197502 xobs
- Fixes are made relating to writing bounds and attributes tonetCDF files, particularly when writing user-defined variables, andvariables from ASCII data sets. SET VARIABLE/OUTTYPE can be applied touser-defined variables. Previously it could not.
- EXIT/SCRIPT did not exit if it was inside a nested IF block. This is fixed.
- If a 360-day calendar is being used, previously we were not able to specify 30-feb-yyyy in a DEFINE AXIS command. Now we can.