New features and bug fixes in Ferret and PyFerret v7.4
This release includes pre-built binaries for Linux and Mac OSX. The details and the tar files are on the GitHub release pages:
Installation information may be found in the Downloads pages on the Ferret web site. If you build Ferret or PyFerret yourself, note that there are minor changes to the file site_specific.mk.in. Use it to update your customized site_specific.mk file.
All of the items below apply to both Ferret and PyFerret, except for item 1 which applies only to PyFerret.
New Features
1. PyFerret, new PLOT symbols
(PyFerret only) New named symbols are defined for use in the PLOT and PLOT/VS commands. These include filled shapes, which may be drawn with an outline. This style is similar to the POLYGON/FILL plots made by the "go polymark" script, but are faster to draw and simpler to set up. The pre-defined symbols are shown here. The user can also define custom symbol shapes.
yes? plot/symbol=arrdown myvar yes? plot/vs/symbol=boxfill/color=red/vs xpts, ypts yes? plot/ribbon/vs/symbol=circfill/palette=rnb2 xpts, ypts, colorvar
The filled shapes are a good substitute for filled polygons.
The classic numbered plot-point symbols are still available for both PyFerret and Ferret.
2. New qualifier LET/LIKE= is added, to inherit attributes from one variable to a new variable being defined.
yes? use ocean_temp_data ! Units and title are inherited from temperature to sst yes? let/like=temperature sst = temperature[z=0:5@MAX] yes? list sst[x=300,y=-20] VARIABLE : Temperature (deg C) ...
If attributes such as units or title are set on the command line those values supersede the inherited attribute.
! Units are inherited but the LET command defines the title to use yes? let/like=temperature/title="Surface T" sst = temperature[z=0:5@MAX] yes? list sst[x=300,y=-20] VARIABLE : Surface T (deg C) ...
The missing-value attribute is not inherited; if for instance a file variable has a missing-value attribute of -9999, and you define a Ferret expression, then the new variable has Ferret's default missing-data flag of -1.E+34, unless a value is specified with /BAD= . Likewise scale_factor and add_offset attributes from netCDF file variables are not inherited.
3. New qualifier DEFINE AXIS/LIKE= to inherit the attributes of an existing axis when defining new axes.
yes? use levitus_climatology ! Units of the coordinate axis (m) is inherited ! as well as the positive=down attribute making this a depth axis yes? define axis/like=`temp,return=zaxis`/z=1:15:1 myz !-> define axis/like=ZAXLEVITR/z=1:15:1 myz yes? show axis myz name axis # pts start end MYZ DEPTH (m) 15 r- 1 15 Axis span (to cell edges) = 15
-The direction of the axis must still be specified using a qualifier such as /X= or /T=. The axis must be in the same direction as the one we're inheriting from.
-The coordinates are not inherited.
-For time axes the units and time-origin are inherited, as well as the calendar definition.
-If attributes such as units or title are set on the command line those values supersede the inherited attribute.
4. Ferret can now handle time axes with resolution of fractions of a second. Listings showing date and time will show fractional seconds. Plots with very short time intervals are labeled with intervals of less than a minute.
5. As requested on the Ferret List, more flexibility is allowed for text listings that include strings.
The format given in a LIST/FORMAT=([Fortran-format]) specifier may include a simple A format, or A with a number for a desired width. It may also include I formats for integer output.
yes? list/nohead/format=(a5, a7, a1, a4) {"Abcde"}, {"Abcdefg"}, {"A"}, {"Abcd"} AbcdeAbcdefgAAbcd yes? list/nohead/format=(a6, a8, a2, a5) {"Abcde"}, {"Abcdefg"}, {"A"}, {"Abcd"} Abcde Abcdefg A Abcd yes? list/nohead/format=(a2, a2, a2, a2) {"Abcde"}, {"Abcdefg"}, {"A"}, {"Abcd"} AbAb AAb
yes? let date_strings = TAX_DATESTRING(t[g=airt],t[g=airt],"month") yes? list/nohead/l=1:5/format=(a,f6.2) date_strings, airt[x=-135,y=0] DEC-2010 25.38 DEC-2010 25.37 DEC-2010 26.83 DEC-2010 26.51 DEC-2010 26.52 yes? let num = L[gx=date_strings] yes? list/nohead/l=1:5/format=(i6, a10,f6.2) num, date_strings, airt[x=-135,y=0] 1 DEC-2010 25.38 2 DEC-2010 25.37 3 DEC-2010 26.83 4 DEC-2010 26.51 5 DEC-2010 26.52
At this time, if there are A or I specifiers, the syntax requires one format specifier per field being listed; it does not allow for groupings or X format for spacing.
6. The behavior of /KEY=CENTERED for colorbars is modified. Previously the behavior of these colorbars was ambiguous depending on the type of palette used and the levels given. Now, the color levels correspond to the labels on the colorbar. For colorbars without the /KEY=CENTERED specification, the levels correspond to the boundary between colors (the lines on a corresponding contour plot). This applies to color keys in the FILL, SHADE, RIBBON and POLYGONc
yes? FILL/KEY=centered/lev=(1,5,1) variable ! colors are labeled 1,2,3,4,5
This is particularly useful when data takes on discrete values, such as a status flag. For instance say a flag only takes on a few values:
yes? plot/vs/ribbon/symbol=19/key=center/lev=(1)(2)(5)(8)/palette=ten_by_levels lon, lat, flag
7. New climatological-axis definitions available with seasonal axis definitions
The following files contributed by Andrew Wittenberg are now included in the fer_dsets tar file, or available from GitHub at https://github.com/NOAA-PMEL/FerretDatasets
clim_axes_gregorian.nc
clim_axes_julian.nc
clim_axes_noleap.nc
These contain definitions for monthly and seasonal climatological axes for each of these calendars. For instance,
yes? use clim_axes_julian *** NOTE: regarding ./data/clim_axes_julian.nc ... *** NOTE: JULIAN climatological axes defined yes? sh axis/all name axis # pts start end ... MON_IRREG_JUL TIME 12mi 16-JAN 12:00 16-DEC 18:00 JFM_IRREG_JUL TIME 4mi 15-FEB 03:00 16-NOV 06:00 DJF_IRREG_JUL TIME 4mi 15-JAN-0002 09:00 17-OCT-0002 00:00 NDJ_IRREG_JUL TIME 4mi 17-DEC 06:00 16-SEP-0002 12:00 MON_REG_JUL TIME 12mr 16-JAN 05:15 17-DEC 00:45 JFM_REG_JUL TIME 4mr 15-FEB 15:45 16-NOV 14:15 DJF_REG_JUL TIME 4mr 16-JAN-0002 11:15 17-OCT-0002 09:45 NDJ_REG_JUL TIME 4mr 17-DEC 00:45 16-SEP-0002 23:15 yes? cancel data clim_axes_julian ! the axes will continue to be defined.
8. A new FAQ is added, Custom Legends for Line plots illustrating a flexible method for drawing a legend with line styles.
Bug Fixes
1.The calendar definition for non-Gregorian calendar time (Julian or NOLEAP or 360_day) was lost when the time axes are in files used in a descriptor-file. This is fixed.
2. A bug was fixed in the computation of weighted standard deviations, e.g. on an unequally-spaced time axis.
3. When plotting data with curvilinear coordinates and the /SET qualifier, information about the coordinate data was corrupted between loading it and executing the final PPL SHADE or PPL FILL command so that the final plot could not be drawn correctly This is fixed.
4. The "box.jnl" script, for drawing a box on a plot is enhanced and modernized. Previously it failed with negative coordinates, and it only took a simple pen color as an argument. Now it works if there are negative coordinates, such as longitudes or latitudes; and a line-plot style may be sent to the script:
! examples ! GO box -180 -120 -45 45 2 ! red box ! GO box 300 345 25 45 black/thick/dash ! black box drawn with thick, dashed lines
5. Corrections are made to the drawing of vectors in an X-X plane. If a vector plot is made in the XY plane, the longitude box size is corrected by the appropriate latitude correction. If it's an X-Z plot, taken from a grid in X-Y-Z then the single-value of latitude should be used to correct the longitude box sizes. This is done.
6. A fix is made to the formatting of labels drawn along contour lines.
7. As reported on the Ferret List, the poly_vectors_demo.jnl script would hang when it got to the map projection scripts. This is fixed.