CliMA / CliMA/ClimaAnalysis.jl
Possible replacement for Unitful
- Dominant language
- Julia
- Stars
- 12
- Forks
- 5
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 3
Description
A possible replacement for [Unitful.jl](https://github.com/PainterQubits/Unitful.jl) is [UDUnits.jl](https://github.com/Alexander-Barth/UDUnits.jl).
Compared to Unitful.jl, the pros for using UDUnits.jl are
1. In place conversion via `Converter` function.
2. Support expressions like `W m^2` (although, it doesn't support `W * m^2`, but this can easily be fixed by parsing the expression beforehand and I don't think any of the diagnostics write units like this)
3. Should be compatible with NetCDF files outside of CliMA since "the values of the units attributes [of NetCDF files] are character strings that are recognized by UNIDATA’s UDUNITS package..." in section 3.1 of the CF Conventions. Note that the UNIDATA’s UDUNITS package is a C library and UDUnits.jl is a Julia interface for the package.
4. Support units that we care about like `degree_east` and is generally more flexible with what units it can parse. For example, `s`, `sec`, `secs`, `second`, and `seconds` are all recognizable by UDUnits.jl and only `s` is recognizable by Unitful.jl. For another example, `m**2` (Python syntax) is parseable by UDUnits.jl, but is not by Unitful.jl.
5. Less dependencies. See Project.toml of [Unitful.jl](https://github.com/PainterQubits/Unitful.jl/blob/master/Project.toml) and [UDUnits.jl](https://github.com/Alexander-Barth/UDUnits.jl/blob/master/Project.toml) respectively.
The cons for using UDUnits.jl are
1. Not as popular as Unitful.jl, so there may be potential bugs that have not been discovered.
2. Doesn't support conversion of non-Float64 numbers (probably a bug).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the Unitful.jl and UDUnits.jl links in the issue, focusing on conversion behavior, supported unit syntax, numeric types, dependencies, and NetCDF compatibility. Done would require a project decision and an agreed implementation scope for replacing Unitful.jl; no repository files or tests are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100