NCL > What's New | previous releases | current release
What's coming in the next release of NCL
The next release of NCL will be version 6.5.0, as we are going to include the much requested "elseif" construct to go with NCL's "if" and "end if" statements.
We will be announcing another new major feature soon. Stay tuned!
We're hoping for a release date of summer 2017.
- New functions
- New "elseif" statement added
- New resources
- New color table added
- Graphics enhancements
- Function and procedure bugs fixed
- Graphics bugs fixed
- Other bugs fixed
- exponential_curve_fit -
Calculates the coefficients for a simple exponential curve fit of the form
' y = A*exp(B*x)' using least squares.
- keyword_values -
Read a text file that contains keywords and associated values (similar to fortran NAMELIST).
- regline_weight -
Calculates the linear regression coefficient between two series where
the dependent (y) variable's values are weighted by some measure of
uncertainty (typically, standard deviations) such that the
Chi-square goodness-of-fit is minimized.
- refevt_hamon - Use the Hamon formulation to derive reference evapotranspiration.
New "elseif" statement added
This version will have the long-requested "elseif" statement!
The old way of using "else if" required you to have an "end if" for every "else if" statement:
a = 5 if (a.eq.1) then a = a + 1 else if (a.eq.2) then a = a + 2 else if (a.eq.3) then a = a + 3 else if (a.eq.5) then a = a + 5 else a = -1 end if end if end if end if print("a = " + a)
The new way, with the use of "elseif" (no spaces) looks like this:
a = 5 if (a.eq.1) then a = a + 1 elseif (a.eq.2) then a = a + 2 elseif (a.eq.3) then a = a + 3 elseif (a.eq.5) then a = a + 5 else a = -1 end if print("a = " + a)
The old way will still work, and both codes above should return:
a = 10
- gsnShadeFillDotSizeF - allows you to
set the dot size if you are using stippling fill when
- gsnShadeFillScaleF / gsnShadeFillScales - allows you to set
the fill scales for pattern fill when
See example "wavelet_3.ncl" on the Contour effects page.
- tmGridDrawOrder - Allows you to
control the draw order for the tick mark grid lines.
See example "leg_650_10.ncl" on the Legends page.
New color table added
The group carefully selected colors so that groups of reanalyses worked well and so colorblind people could use it. The idea is that papers will have these colors for time-series comparisons. Thanks to Cathy Smith (NOAA/ESRL PSD and CU CIRES) for bringing it to our attention.
- get_color_index / get_color_rgba - these
functions were enhanced to allow the 3rd argument to be an array of values. This can
signficantly speed up the routines if you have a lot of calls to these functions.
See example table_8.ncl.
Function and procedure bugs fixed
- bin_avg - This function expects equal grid
spacing for the destination grid. The internal test required exact
spacing. However, some grid spacing led to round-off errors which
caused the test to fail. More robust testing was used to address this
- calculate_daily_values / calculate_monthly_values / calculate_segment_values - The documentation for each function has been updated to clarify the supported data structures. The calculate_daily_values / calculate_monthly_values now support 5-dimensional structures of the form: (ncase,time,level,lat,lon) and (time,ncase,level,lat,lon).
- get_isolines - This function was not correctly
checking for out-of-bounds conditions and sometimes returned
- natgrid_Wrap - This function
was not correctly attaching the coordinate arrays to the return variable
(it had the rightmost two dimensions swapped).
- product - This function now allows types
int64, uint, and uint64 to be input.
Graphics bugs fixed
- cnLineLabelFormat - Fixed a
bug that caused this resource to not be recognized by the gsn_csm
- gsnYRefLine / gsnXRefLine
- Fixed a bug where if you are adding a different number of X and Y
reference lines to a plot via these two resources, then you may get a
fatal:Number of dimensions on right hand side do not match number of dimension in left hand side fatal:["Execute.c":8640]:Execute: Error occurred at or near line 6014 in file /usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl
If you need a fix for this problem, download this gsn_csm_640_fix.ncl file and load it from your own script after any other load commands.
- gsn_add_polyline / gsn_polyline
- Fixed a bug in which NCL was not always drawing the shortest path
between two points on a map.
- Fixed a bug in which the lines wouldn't be drawn correctly if the
precision exceeded that which could be represented by a float.
- Fixed a bug in which NCL was not always drawing the shortest path between two points on a map.
- gsn_panel / gsnPanelLabelBar
Fixed a bug where if you are running a script that calls
gsn_panel to panel XY
plots and setting gsnPanelLabelBar
to True, then you would get a fatal error:
fatal:Variable (mono_fill_scl) is undefined fatal:["Execute.c":8640]:Execute: Error occurred at or near line 6100 \ in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
The gsnPanelLabelBar resource cannot be applied to XY plots anyway, so the solution is to simply not set this resource. In the next release, NCL will produce a warning instead of exiting with an error.
- Fix an internal bug in which if you have the NCARG_COLORMAPS environment variable
set to a directory that contains files without a "." in them, you would get the following
fatal:Subscript out of range, error in subscript #0 fatal:An error occurred reading tmp_names fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1251 in file /xxx/yyy/lib/ncarg/nclscripts/utilities.ncl fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1275 in file /xxx/yyy/lib/ncarg/nclscripts/utilities.ncl
A work-around is to either not set NCARG_COLORMAPS, or to make sure it points to a directory that has files with a "." in the name. In general, we recommend creating a clean directory that contains only the color maps you want NCL to load, because if you put a bunch of other files in this directory, NCL is going to try to read all of them.
Other bugs fixed
- Fixed a bug where this script would not work properly if you give it
more than two files. This bug has been fixed. If you need the fix
now, you can download this
new version of ncl_convert2nc.
- gsnShadeFillDotSizeF - allows you to set the dot size if you are using stippling fill when calling gsn_contour_shade.