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

From: wxtofly <wxtofly_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 10 2011 - 09:29:50 MST
Will you provide a function to prescan existing ncl code for incompatiblity?  

On 01/05/2011 06:50 AM, Mary Haley wrote:
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
information.

-------------------------------------------------------------------

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
are:

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

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
...do 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
...do 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:

http://www.ncl.ucar.edu/future_release.shtml


--Mary


_______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talk


--

TJ's Blanchard Page    My Wx Widget  Ft Ebey (Whidbey) NWS Seattle ASP  
: MAPS/RUC2 | Lo Alt | MM5 Bham Obs Fire Winds Rasp Soundings
Winds Aloft   R♥sp    Visible Satellite  Fcst Discussion   Fraser Valley  Windgrams text
Blanchard Digital | ♥Meteogram ♦UW Satellite   | Loop ♥ Discussion With Images Windcast Blipspots
  Quick Radar NWS Radar 9 Meso-stations   Pressure gradients WA Meso Stations map Time/hght/wind
MesoW GoogleMaps aprs current Personal Wx Stations Wind Map now, sfc winds  |  bl winds


  RASP Regional Atmospheric Soaring Predictions for PNW      || Average BL wind loop Blanchard   
       Surface wind forecast Loops: | Animated Radar   |  | loop Blanchard | loop PNW | loop FtEbey | loop Tiger | loop FraserValley

       Layered by altitude Sea Level to 850mb (approx 5000 ft) looped by time wind forecasts:
Blanchard Pressure Level Loop | Tiger Pressure Level Loop | Fraser Valley Pressure Level Loop
All day hour-by-hour text RUC2/MAPS soundings
These have no graphics and are designed to be printed to take with you to the site.
After sunclipse there will be one run for the next day but it only has MAPS soundings.
  Woodside/Sumas/Bridal     Black Mt     Big Johnson     Stewart same as Blanchard     Ft Ebey     Skagit Valley     Tiger  
Blipsp⊕ts: | Baldy | BJ | Black | BlackLZ | Blanchard | Chelan | Iron | Saddle | Stewart | Tiger | FtEbey | Woodside | Bridal Falls
| Current Rapid Update Soundings for flying sites | Winds aloft Seatac & Vancouver | Visible Satellite zoomed | NWS forecasts |
Abbreviated pages for mobile devices. | Blanchard | Tiger | Ft Ebey | East Side
The Seattle Forecast Discussion "translated" or with maps or original form without maps (available sooner) Learn to read the maps. Soundings Tutorial
Cloud Forecast -- RUC based Meteogram for KBLI Bellingham    |   RUC based Meteogram for CYXX Abbotsford -- Cloud Forecast

TJ Olney Weather: Site Map

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

raspicon16.png llapse1.png fireSky.gif discuss.jpg windgramico.png wbarb3.png
Received on Mon Jan 10 10:37:18 2011

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