[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #JLQ-522131]: udunits2 and utScan, utIsTime

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [UDUNITS #JLQ-522131]: udunits2 and utScan, utIsTime
  • Date: Thu, 18 Oct 2007 14:45:38 -0600

Sue,

> Hi there,
> Are utIsTime a part of the UDUNITS-2 package?

Not explicitly.

> If not is there an equivalent?
> I need some funtion to test whether a netCDF coordinate
> var is a time var.

Try converting the unit with a second, e.g.,

    if (ut_are_convertible(unit, ut_get_unit_by_name(system, "second")) {
        ...
    }

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: JLQ-522131
Department: Support UDUNITS
Priority: Normal
Status: Closed