[ncl-talk] Error initializing udunits-2 unit system

Jared Lee jaredlee at ucar.edu
Fri Aug 10 17:15:04 MDT 2018


Hi ncl-talk,

I'm encountering an error I've never seen before, and which doesn't show up
at all in ncl-talk archives. I'm running NCL v6.4.0 on Cheyenne, and I'm
calling a special bug-fix to the ut_string_fix function (it's what is now
default in v6.5.0, I believe). When I call the ut_string_fix function with
at least some specific values (I haven't done exhaustive testing, but I've
done a few tests that yield the same issue), I get the error:

"Error initializing udunits-2 unit system"

Here's a simple script that demonstrates the issue:
==========
load "/glade/u/home/jaredlee/tools/nclscripts/functions/ut_string_fix.ncl"
begin

obs_time = (/113976.d, 114720.d, 115392.d/)
obs_time at units = "hours since 2000-01-01 00:00:00"

mo_nums1 = ut_string_fix(obs_time, "%N")
print(mo_nums1)
mo_nums2 = stringtoint(ut_string_fix(obs_time, "%N"))
print(mo_nums2)

end
==========

And here is the output I get when executing this script:

==========
jaredlee at cheyenne6:~/tools/nclscripts> ncl bug_udunits2.ncl
 Copyright (C) 1995-2017 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.4.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details
Error initializing udunits-2 unit system
jaredlee at cheyenne6:~/tools/nclscripts>
==========

Does anyone have any ideas how to fix this? Is this something that cislhelp
needs to be involved in to fix on cheyenne?

Jared

-- 
===============================
Jared A. Lee, Ph.D.
Project Scientist II
Research Applications Laboratory
National Center for Atmospheric Research
Boulder, Colorado, USA

Member, AMS Planning Commission

Email: jaredlee at ucar.edu (w)
Phone: 303.497.8485 (w)
Web: https://staff.ucar.edu/users/jaredlee
===============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180810/4821ae8c/attachment.html>


More information about the ncl-talk mailing list