NCL V6.0.0 announcement: default missing values will be changed

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 05 2011 - 07:50:23 MST

Dear NCL users,

We are gearing up towards a major new release of NCL, V6.0.0, which we
plan to release a beta version of in late January.

We'll send out announcements in the upcoming days about this version
including major changes, new features, and other important


Our first announcement is that the default missing values for all
numeric variable types will be changed.

This is being done to stay in line with the default missing values for
NetCDF. Also, some of the old default values are too small to be well
out of the range of potential calculations.

The default missing values for the variable types that will be changed

Variable type Old missing value New missing value
byte 0xff -127
short -99 -32767
ushort 0 65535
integer -999 -2147483647
uint 0 4294967295
long -9999 -2147483647
ulong 0 4294967295
int64 -99999999 -9223372036854775806
uint64 0 18446744073709551614
float -999 9.96921e+36
double -9999 9.969209968386869e+36
character 0 0x00

Note that the missing values for bytes and characters are rather
different. This is because in V6.0.0, an NCL byte will go from being
an unsigned byte to a signed byte, and an NCL character will go
from being a signed byte to an unsigned byte. This change keeps
us in line with the definition of a NetCDF byte and character as

This change could cause some backwards incompatibility in your NCL
scripts if you are checking for missing data using hard-coded values.

For example, if you have a float variable "x" that was assigned a
default missing value of -999 via some other calculation, *and* you
have code like this:

    if(x(i).eq.-999)) then something...
then your code may no longer work in V6.0.0. You should instead use
functions like "ismissing" to check for missing values:

    if(ismissing(x(i))) then something...

This change could also affect reading in values with ASCII reading
functions (asciiread, readAsciiTable). These functions automatically
assign a _FillValue attribute based on the type of the variable you're
reading in. If you are assuming that the default missing value is
-999 for floats, say, then your code will not work properly.

For example, if you have an ASCII file with float values, and you have
"-999" in the file to represent missing values, then you will need to
explicitly set the _FillValue attribute to -999 after you read it in,
because now the default missing value for a float will be "9.96921e+36":

   data = asciiread("file.txt",-1,"float")
   data@_FillValue = -999 ; Default is 9.96921e+36 in V6.00

You can make these kind of changes *now* to your scripts without
changing their behavior.

We will provide two ways to get at the old default missing values if you are
not ready to change your code. One way will be to call a procedure:

   set_default_fillvalue("all", "ncl_v5")

(The exact names may change.)

The second way will be to use a command line option when you run NCL.

However, we strongly encourage people to clean up their code now
(if necessary), to be ready for the change in V6.0.0.


Stay tuned for more announcements on NCL Version 6.0.0. You can
also see all the latest information on V6.0.0 at:


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Jan 5 07:50:30 2011

This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST