NCL > What's New
What's new in the current release
Version 5.1.1 - June 16, 2009 - [download]
- New functions
- Support for shapefiles and other geospatial data formats - (beta test version)
- New and updated resources
- Change to the procedure for updating GRIB 1 parameter tables
- New and updated ECMWF GRIB 1 parameter tables
- "addfile" bugs fixed
- Bugs fixed
- "shea_util.ncl" has new dependency
- Changes to WRAPIT
- Deprecated functions
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_"
The following new ECMWF parameter tables were added:
Adding a subscript makes it work correctly:
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)]:
If you are loading the "shea_util.ncl" script, then you will need to
"load "contributed.ncl" before "shea_util.ncl":
"shea_util" now depends on some functions in "contributed.ncl".
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:
New and updated ECMWF GRIB 1 parameter tables
The following tables were updated:
"addfiles" bugs fixed
These bugs have been fixed in V5.1.1.
f = addfiles("file*07*.nc","r")
xnew = f[:]->x(::5,:,:)
fnames = (/ "file01.nc", "file02.nc" /)
fp = addfiles(fnames, "r")
days = fp[:]->days
print(days)
days = days / sum(days)
print(days)
days(:) = days(:) / sum(days)
Bugs fixed
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.
"shea_util.ncl" has new dependency
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
Changes to WRAPIT
WRAPIT -g77 your_file.f
Deprecated functions