NCL Website header

NCL > What's New | previous releases | current release

What's coming in the next release of NCL

The next release of NCL will likely 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 may be announcing another new major feature soon. Stay tuned!

We're hoping for a release date of mid summer 2017.


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


New resources

  • gsnShadeFillDotSizeF - allows you to set the dot size if you are using stippling fill when calling gsn_contour_shade.

  • gsnShadeFillScaleF / gsnShadeFillScales - allows you to set the fill scales for pattern fill when calling gsn_contour_shade.

    See example "wavelet_3.ncl" on the Contour effects page.

Functions and procedures 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 issue.


Graphics bugs fixed

  • Fixed a bug that caused the cnLineLabelFormat resource to not be recognized by the gsn_csm contouring routines.

  • Fixed a bug where if you are adding a different number of X and Y reference lines to a plot via the gsnYRefLine and gsnXRefLine resources, then you may have gotten a fatal error:

    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.

  • 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.


Other bugs fixed