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

[UDUNITS #PKD-127901]: the library udunits2 : type(ut_converter), scale/offset(ut_converter)



Abara,

Why not just specify the units of the data in the ncML file? For example, if a 
netCDF file contains temperature data in celsius but doesn't have a unit 
specification, then the ncML file could specify the correct unit ("decC") in 
the appropriate "units" attribute. The program reading the netCDF data would 
then see the correct "units" attribute and work correctly. Doing this does not 
require knowledge of the internal structure of a unit converter.

> Hello,
> 
> Thank you very much for these informations.
> 
> My objectif is to convert the files netcdf which do not respect the CF
> convention to CF netcdf files using the NCML language (cmor do it).
> 
> Do you know of a use-case in which your proposed solution is the only
> 
> possible one?
> 
> I have 2 solutions :
> 
> 1) parsing the result of the udunits2 commande (I didn't start this
> task):
> 
> For example in the conversion of the kelvin unit to the degC unit, we
> can have a mini-program which parse the formula:
> 
> x/degC = (x/K) - 273.15
> to obtain the offset (- 273.15) and the scale value (1.0).
> 
> 2) introduce functions to determine the type of a converter and its
> parameters (I have just realise this task).
> 
> 
> Best Regards, Abdelrezzak BARA.

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: PKD-127901
Department: Support UDUNITS
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.