NCL > What's New

What's new in the current release

Version 5.1.1 - June 16, 2009 - [download]


New functions

dim_avg_n, dim_avg_wgt_n, dim_cumsum_n, dim_max_n, dim_median_n, dim_min_n, dim_num_n, dim_pqsort_n, dim_product_n, dim_rmsd_n, dim_rmvmean_n, dim_rmvmed_n, dim_standardize_n, dim_stat4_n, dim_stddev_n, dim_sum_n, dim_sum_wgt_n, dim_variance_n, dim_avg_n_Wrap, dim_avg_wgt_n_Wrap, dim_cumsum_n_Wrap, dim_rmsd_n_Wrap, dim_rmvmean_n_Wrap, dim_rmvmed_n_Wrap, dim_rmvmed_Wrap, dim_standardize_n_Wrap, dim_stddev_n_Wrap, dim_sum_n_Wrap, dim_sum_wgt_n_Wrap, dim_variance_n_Wrap

This suite of functions is an upgrade to the existing dim_xxxx functions which operate only on the rightmost dimension. The dim_xxxx_n and dim_xxxx_n_Wrap functions operate on the input given dimenions, so you don't have to reorder the input array first.

pdfxy
Generates a joint probability density distribution.

plt_pdfxy
Creates a nice plot of the joint probability array created by the pdfxy function.

stat_dispersion
Generates a number of 'dispersion' statistics.

str_capital, str_concat, str_fields_count, str_get_cols, str_get_dq, str_get_field, str_get_nl, str_index_of_substr, str_insert, str_is_blank, str_join, str_left_strip, str_lower, str_right_strip, str_squeeze, str_strip, str_sub_str, str_switch, str_upper

A new suite of string functions to make reading ASCII files and processing NCL strings easier.

yyyyddd_to_yyyymmdd
Given year and day-of-year (yyyyddd) create a one-dimensional array containing concatenated year, month and day-of-month [yyyymmdd] values.

yyyymmdd_to_yyyyddd
Given concatenated year-month-day_of_month (yyyymmdd) creates a one-dimensional array containing concatenated year and day-of-year [yyyyddd] values.

Support for shapefiles and other geospatial data formats

addfile, ncl_filedump and ncl_convert2nc will support the reading of several geospatial vector-data formats, such as shapefiles (.shp), MapInfo interchange files (.mif), Generic Mapping Tools ascii files (.gmt), and pre-2006 edition TIGER/Line files (.rt1). This will be a test version, so use at your own risk. See the shapefiles applications page for some examples.


New resources

gsnStringFontColor / gsnLeftStringFontColor / gsnCenterStringFontColor / gsnRightStringFontColor
Allows you to set the color of the three subtitles at the top of a "gsn_csm" plot.


Change to the procedure for updating GRIB 1 parameter tables

NCL uses abbreviated short names usually found in GRIB 1 parameter tables to form the initial component of NCL file variable names. However, centers such as ECMWF sometimes provide tables that have are have no short names for some or all the parameters in the table. Formerly, the NCL developers made up suitable short names, but this practice has been discontinued. Now, as NCL adds a file, when no abbreviation is found for a parameter the variable will be assigned the name "VAR_" as its initial component. This is the same scheme used when a parameter has no entry in the table at all. The difference is that no warning will be issued if an entry without an abbreviation is found, and the variable will have "long_name" and "units" attributes as usual. Users should expect that in future releases, if the tables are updated with abbreviations, such names might well change.


New and updated ECMWF GRIB 1 parameter tables

The following new ECMWF parameter tables were added:

The following tables were updated:
"addfiles" bugs fixed

  • There were several bugs in the new implementation of the addfiles function that was released with version 5.1.0. They were serious enough that users should not trust the data read into variables using addfiles for version 5.1.0. Anyone that relies on addfiles should upgrade to the new release immediately. The bugs that were fixed include the following:
    • Striding across the leftmost (aggregated) dimension did not work correctly:
        f    = addfiles("file*07*.nc","r")
        xnew = f[:]->x(::5,:,:)
      

    • The second serious bug is that if the data extracted from the first file of an aggregated variable was reduced to a single value, the returned variable was incorrectly internally tagged as a oscalar. When accessed without subscripts, this had the strange effect of returning the proper number of elements but giving them all the value of the first element. Here's an example of the problem:
        fnames = (/ "file01.nc", "file02.nc" /)
        fp = addfiles(fnames, "r")
        days = fp[:]->days
        print(days)
        days = days / sum(days)
        print(days)
      

      Adding a subscript makes it work correctly:

         days(:) = days(:) / sum(days)
      
    • There was also a bug that resulted in files not being closed properly when the when the file list variable was deleted.

    These bugs have been fixed in V5.1.1.
    Bugs fixed

    • vinth2p, vinth2p_ecmwf, vintp2p_ecmwf

      A bug was discovered that affects the top two interpolated levels only. The underlying vinth2p, vinth2p_ecmwf, vintp2p_ecmwf codes were taken directly from the original CCM Processor (http://www.cgd.ucar.edu/cms/processor/subject/vertical.interp.html).

      These subroutines have been used possibly since the late 1980s. Recently, Mark Branson (Colorado State University), was examining interpolated values at the uppermost interpolated levels. He discovered a bug.

      An example will be used to illustrate the bug:

      Consider temperatures [TM (K)] at the following model hybrid levels [PM (hPa)]:

                PM      TM        <=== Raw Data
              3.64    226.77
              7.59    225.53
             14.36    224.89
             24.61    221.39
             38.27    213.97
            [snip]
      
      Let's say that interpolation to the following pressure levels (PI) is desired:
              PI = (/ 5, 7, 10, 20, 30, 50, ...... /)
      
      The following shows the values interpolated by the vinth2p and vinth2p_ecmwf functions before (v5.1.0) and after (v5.1.1) the bug fix:

              PI    v5.1.0    v5.1.1    diff
               5    225.78    226.34   0.564
               7    225.59    225.72   0.129
              10    225.30    225.30   0.000 No differences
              20    222.96    222.96   0.000
          [snip]
      
      The differences could be 'small' or 'large'. It depends upon the vertical distribution of the variable.

    • wrf_user_unstagger had a bug with regard to getting the diagnostics "ua" and "va".

    • There was a bug in reading a character variable that contained a missing value off a NetCDF file. The missing value would not be set correctly.

    • Several functions (like sprinti and sprintf) had a bug that caused an input variable to incorrectly have an extra attribute added upon return.


    "shea_util.ncl" has new dependency

    If you are loading the "shea_util.ncl" script, then you will need to "load "contributed.ncl" before "shea_util.ncl":

    load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
    load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
    

    "shea_util" now depends on some functions in "contributed.ncl".


    Changes to WRAPIT

    For Linux and MacOS systems, the default fortran compiler used has been changed from "g77" to "gfortran". If you need to use the "g77" compiler, then use the new "-g77" option:

      WRAPIT -g77 your_file.f
    

    Deprecated functions

    changeCase/changeCaseChar/replaceSingleChar
    These functions were deprecated. Use built-in functions str_switch, str_lower, str_upper, and str_sub_str.

  •