Possible bug with ut_string function

From: Rife, Daran <Daran.Rife_at_nyahnyahspammersnyahnyah>
Date: Tue Sep 17 2013 - 17:28:48 MDT

Good afternoon NCL team,

First let me thank you for all that you do to support the community. We
rely very heavily on NCL for our day-to-day operations, and are very
grateful to you all.

I am reporting a potential bug with the ut_string function, where there
appears to be round-off issue of sorts.

Some useful background info.

(1) NCL version 6.1.2.
(2) Running on both RHEL 5.8 and Ubuntu 12.04 LTS.
(3) Input file is MERRA surface fields obtained through the NASA Subset
Wizard.
(4) Sample MERRA file and NCL script demonstrating the issue have been
uploaded to the ftp.cdg.ucar.edu site, within the "incoming" directory.
File names are: MERRA.nc and ut_string_issue.ncl

Inspecting the TIME_EOSGRID dimension, you will see that this file
contains 24-hourly output times, centered on 30 min past each hour.
Tools such as Climate Data Operators and netCDF Operators parse the
times perfectly, as does NCL. However, when using the ut_string function
to obtain nicely formatted strings of the TIME_EOSGRID dimension
variable, there occasionally appears a "round-off error" in the times
returned by ut_string. I've attached the output from my sample NCL
script, which shows that for two output times in this file, ut_string
reports "17:29:40" and "20:29:40", when in fact these should read
"17:30:00" and "20:30:00".

Having carefully re-read the ut_string documentation, users are
encouraged to use cd_string, as some of the underlying functions within
ut_string are deprecated. When I use cd_string (see the sample NCL
script), the above issue is apparently resolved.

I realize that this is a relatively minor issue (with an easy
workaround), and may not merit a fix given the "deprecated" status of
ut_string. But I am hoping that my sleuthing might save other users some
time and head scratching.

With best regards,

Daran

Daran Rife
Global Head of Mesoscale Modeling
DNV GL - Energy

9665 Chesapeake Drive, Suite 435, San Diego, CA 92123, USA
Tel: +1 303 271 1450 / Fax: +1 303 271 1450 / Mobile: +1 303 968 6821
www.gl-garradhassan.com

As of 12 September 2013, DNV and GL have merged to DNV GL
The new company DNV GL has started operating as one company with effect
from 12 September 2013. DNV GL forms the world's largest ship and
offshore classification society, a leading technical advisor to the oil
& gas industry and a leading expert for the energy value chain including
renewables. DNV GL also takes the position as one of the top three
certification bodies in the world. Read more here: www.dnv.com/merger

This email is issued on behalf of Garrad Hassan America, Inc. (trading
as GL Garrad Hassan) and is subject to the GL Garrad Hassan email
disclaimer (http://www.gl-garradhassan.com/emaildisclaimer). Garrad
Hassan America, Inc. is registered in America No. 94-3402236 Registered
Office: 45 Main Street, Suite 302, Peterborough, NH 03458, USA

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

Received on Tue Sep 17 17:29:04 2013

This archive was generated by hypermail 2.1.8 : Fri Oct 04 2013 - 16:45:17 MDT