NCL > What's New

# What's new in the current release

[*previous releases | next release*]

## Version 6.3.0 - March 18, 2015 - [download]

- New functions
- Updated functions
- Potential backwards-incompatible changes
- Improvements
- New color table
- Bugs fixed
- Known bugs

**New functions**

**advect_var**- Advect a variable horizontally:**U*(dQ/dlon) + V*(dQ/dlat)**. This function was inadvertently advertised as**advect_variable**. The 6.3.1 release will support**advect_variable**name as an alias.**bw_bandpass_filter**- Applies a butterworth bandpass filter optimized for narrow bandwidths to time series.**count_unique_values**- Counts the number of unique values in the given array.**determinant**- Calculates the determinant of a square real matrix.**ezfftf_n**- Performs a Fourier analysis on a real periodic sequence on the given dimension.This is identical to

**ezfftf**, except it allows you to specify the dimension of which to do the analysis on.**ezfftb_n**- Performs a Fourier synthesis from real and imaginary coefficients on the given dimension.This is identical to

**ezfftb**, except it allows you to specify the dimension of which to do the synthesis on.**draw_color_palette**- Draws the given colors or color map as a series of filled boxes.**eofunc_north**- Use North et al (MWR, 1982) equation 24 to evaluate eigenvalue separation.**fftshift**- Rearranges an array in a manner similar to Matlab's**fftshift**function.**generate_sample_indices**- Generate indices (subscripts) for resampling: with and without replacement.**get_unique_values**- Returns the unique values of the given array.- New "gsm_csm_streamline_scalar
*_xxxx*" routines were added

(thanks to Alan Brammer of UAlbany for the contribution)**gsn_csm_streamline_scalar****gsn_csm_streamline_scalar_map****gsn_csm_streamline_scalar_map_ce****gsn_csm_streamline_scalar_map_polar**

**kmeans_as136**- Perform k-means clustering via the Hartigan and Wong AS-136 algorithm.**ListIndexFromName**- Returns the index of a variable in a list given its name.**pot_temp**- Computes potential temperatures.**pot_vort_hybrid**- Computes potential vorticity on hybrid levels and a global grid.**pot_vort_isobaric**- Computes potential vorticity on isobaric levels and a global grid.**str_match_ic_regex**- Matches the given string against a list of strings using regular expression syntax (case insensitve).**str_match_ind_regex**- Matches the given string against a list of strings using regular expression syntax (case sensitve) and returns index values.**str_match_ind_ic_regex**- Matches the given string against a list of strings using regular expression syntax (case insensitve) and returns index values.**str_match_regex**- Matches the given string against a list of strings using regular expression syntax (case sensitve).**static_stability**- Computes static stability.**thornthwaite**- Estimates the potential evapotranspiration (PET) via the Thornthwaite method.**trend_manken**- Mann-Kendall non-parametric test for monotonic trend plus the Theil-Sen robust estimate of linear trend.**weibull**- Derives the shape and scale parameters for the Weibull distribution via maximum likelihood estimates.**wrf_user_vert_interp**- Vertically interpolates ARW WRF variables given the type of surface and a set of new levels.

**Updated functions**

**dim_spi_n**- Added second method for calculating SPI, by applying a type III Pearson distribution.**gsn_panel**- Updated to recognize streamline plots, so you can panel multi-color streamline plots with a common labelbar.**wrf_user_getvar**- a new "cloud top temperature" diagonistic was added ("ctt").

**Potential backwards-incompatible changes**

- Change to
*gsnAddCyclic*behavior - When plotting lat/lon data, a longitude cyclic point will not be added if you have a longitude coordinate array whose range is greater than 360. Previously, you would get a warning and potentially incorrect results:gsn_add_cyclic: Warning: The range of your longitude coordinate array is at least 360. You may want to set gsnAddCyclic to False to avoid a warning message from the spline function.

- The behavior of polylines and polygons drawn over maps was
modified slightly in order to avoid ambiguity concerning cyclic
longitude values. Now map polylines and polygons always use the
shortest path around the globe between any two points. (This is a
possible backwards incompatibility for anyone who formerly drew a
continuous circle around the globe using only 2 points (0 and 360).
Now you must use 4 points to accomplish the same thing, e.g.: (0 120
240 0).

**Improvements**

**File I/O improvements**

- HDF5 reader - a number of improvements have been made to NCL's
HDF5 reader to better handle:
- dimension names
- coordinate variables (if any)
- the _FillValue attribute (which sometimes comes in as a string called "MissingCode")

- Added a new
**setfileoption**option called "KeepOpen" for**fbinrecread**to improve the efficiency of reading records in sequential order. This option is logically-valued and available for the "bin" format only. When finished reading the file the user must call**fbinrecread**once with "KeepOpen" set False in order to close the file. - Updated the existing ECMWF GRIB 1 tables and added 6 new ones:
213,214,215,217,218,219,220, and 221. (these are not yet documented in
our docs). Also updated the NCEP GRIB1 tables and the NCEP GRIB2 code
tables.
- NCL now looks all the way through a file if necessary to find a
valid GRIB record.
- Fixed several memory management issues both for GRIB 1 and GRIB 2.
- File list variable assignment from
**addfiles**is now more tolerant of cases where one or more of the input files do not contain the variable specified. It no longer crashes, and instead gives an error like:A valid instance of variable HGT_P0_L100_GLL0 was not found in one or more elements of the file list.

If no files contain an instance of the variable, a fatal error is returned; otherwise it's a warning.

**readAsciiTable**has been made 'thread-safe' with the addition of code suggested by Kyle S. Griffin (University of Wisconsin - Madison). Daniel Leuenberger (Federal Office of Meteorology and Climatology MeteoSwiss) contributed to the discussion.

**Computational function improvements**

**MJO CLIVAR:**Diagnostic**mjoclivar_14.ncl**- Will automatically determine the appropriate sign of the EOFs
using an approach suggested by (Eun-Pa Lim, Centre for Australian
Weather and Climate Research [CAWCR]). This was added on 20 October
2014.
- Calculates the percent variance for each component in the multivariate EOF. The code segment was provided by Marcus N. Morgan (Florida Institute of Technology). This was added on 4 March 2015.

- Will automatically determine the appropriate sign of the EOFs
using an approach suggested by (Eun-Pa Lim, Centre for Australian
Weather and Climate Research [CAWCR]). This was added on 20 October
2014.

**Graphical improvements**

- You can now set
*trLineInterpolation*False for map plots in order to draw straight-edged polylines or polygons. This means there now are three options:- res@
*trLineInterpolation*= True (the default)Lines will be interpreted in the lat/lon coordinate space.

- res@
*mpGreatCircleLinesOn*= True and res@*trLineInterpolation*= TrueLines will follow a great circle path.

- res@
*trLineInterpolation*= FalseLines between points will appear straight in the projected space.

- res@
- Large triangular meshes (greater than approximately 40,000,000
triangles) no longer fail due to limits implicit in the Shewchuck
Triangle code. Now when meshes exceeding this limit are encounterd,
the mesh is decomposed into 2 or more tiles which are triangulated
separately. Along with this were some major performance enhancements.
- Support for OpenMP raster graphics has been improved, such that
this capability is at better than beta level reliability. Note that
support for OpenMP relies on the same tiling mechanism used to handle
large meshes. OpenMP now can be used with any map projection, and the
artifacts, including visible lines between the tiles, have been
eliminated. See the entry in
the 6.2.0 release notes for
notes on how to use the OpenMP capability.

**Miscellaneous improvements**

- Any numeric type can now be used for coordinate subscripting;
subscripts no longer need to be the same type as the coordinate variable.

**New color table**

A small color table was added with two whites in the middle: BlAqGrWh2YeOrReVi22.

**Bugs fixed**

**MJO CLIVAR:**Diagnostic**mjoclivar_16.ncl**phase composites were off by half a cycle. This has been corrected. This is immediately available for download as of 20 October 2014.**bin_avg**/**bin_sum**- fixed a bug where the binning was done incorrectly if the observation locations were outside the region spanned by the user provided grid. These functions weren't explicitly checking for this situation.**delete**- fixed a problem with deleting coordinate arrays in a list-type argument.**dewtemp_trh**- fixed a bug where if*rh*was < 0.0, then a NaN (not-a-number) was returned. The function now returns a missing value.**dim_avg_wgt_n**/**dim_sum_wgt_n**- fixed a bug where the return value had no dimensionality (0 bytes) if "x" was a 1D array.**dim_sum_wgt**/**dim_sum_wgt_n**- fixed a bug where if "opt" was 0 and there were missing values in the input array, then a non-missing value was being returned. According to the documentation, a missing value should have been returned instead.**ESMF_regrid**- fixed a bug where if the "neareststod" or "nearestdtos" interpolation methods were used, the "remap" attribute attached to the regridded variable still said "bilinear".The "remap" attribute now uses the "ESMF_regrid_method" attribute attached to the weights file, and hence will be more verbose than it previously was.

Old:

remap : remapped via ESMF_regrid_with_weights: patch remap : remapped via ESMF_regrid_with_weights: conserve

New:

remap : remapped via ESMF_regrid_with_weights: Higher-order Patch remap : remapped via ESMF_regrid_with_weights: First-order Conservative

**gsn_merge_colormaps**- this function gives you a warning if you try to merge two colormaps.Warning: namedcolor2rgb: 'gsdtol' is not a valid named color. Will return missing values for this color.

Despite this warning, the function still works as advertised. This warning has been removed in V6.3.0.

**stat_dispersion**- The second returned element returned was the sample variance and not the sample standard deviation as is documented. In 6.3.0, the sample standard deviation will be returned.-
**svd_lapack**- Fixed a memory leak. Results were not affected. **ListPop**- fixed a bug when pop an unnamed variable (or value) from a list.- Fixed a problem with CellFill plotting when using
the
*mpFreeAspect*parameter. Cells that were specially drawn to fill in the edges of the plot were not appearing in the correct location. Now it works as expected and most of the special handling was able to be removed. - Fixed a problem with HDFEOS5 attributes where they were all being
processed as string types whether or not they really were.
- Fixed a problem where non-geographic 2D plots were not being drawn
correctly. The "Spherical" transformation was incorrectly being used
for all types of 2D coordinate overlays, when the more general
"Curvilinear" transformation should have been employed.
- Fixed a problem with tickmark formatting where numbers that should
have become zero, given the number of significant digits, were instead
set to small decimal values with lots of zeros,

**Known bugs**

- If you try to execute NCL on a system where there are no user home
directories, then you may run into an issue where it's looking for a
"~/.hluresfile" file.
As a work-around, a system administrator can create a blank file called "hluresfile", put it wherever he/she wants (for example, $NCARG_ROOT/lib/ncarg), and then have every user set the NCARG_USRRESFILE environment variable to point this dummy file:

export NCARG_USRRESFILE=$NCARG_ROOT/lib/ncarg/hluresfile

**cd_calendar**- there is a potential rounding bug in this routine if you have a units of "minutes since" or "seconds since". It sometimes causes the minutes/seconds to be returned as something like "0/60" (0 minutes/60 seconds) rather than "1/0" (1 minute/0 seconds). We have an email in to the developers of this code, but until we get a fix, you can use**ut_calendar**as a work-around, if you are using a "standard" calendar.**kolsm2_n**- Fixed bug in which using multiple dimensions (for example, in the time dimension) would cause the results to be wrong. Please visit the documentation for this function for more details and a work-around. This has been fixed for NCL Version 6.3.1.- For HDF5 files with variables within "groups", the use
of
**addfiles**with**ListSetType**(f, "join") does not work. The default mode where**ListSetType**(f, "cat") does work.