Repository: Ouranosinc/xclim

Issue:
Add support for unit = '1'
### Description
I'm trying to use xclim.indices.relative_humidity and I get the following error when `huss` is among the inputs : 
```
Traceback (most recent call last):
  File "/usr/local/pycharm-community-2017.3.4/helpers/pydev/pydevd.py", line 1668, in <module>
    main()
  File "/usr/local/pycharm-community-2017.3.4/helpers/pydev/pydevd.py", line 1662, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/usr/local/pycharm-community-2017.3.4/helpers/pydev/pydevd.py", line 1072, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/usr/local/pycharm-community-2017.3.4/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/rondeau/python/projets/lake_pulse/main_workflow_lakepulse.py", line 245, in <module>
    main()
  File "/home/rondeau/python/projets/lake_pulse/main_workflow_lakepulse.py", line 124, in main
    data_extraction.extract(save_location=save_location, regions=regions2extract, ensembles=ensembles2extract, rcps=rcps2extract,
  File "/home/rondeau/python/github/scen_workflow/scen_workflow/data_extraction.py", line 94, in extract
    _extract_variable(data_paths=data_paths, variable=v, region=regions[region], years=years, timestep=variables[v],
  File "/home/rondeau/python/github/scen_workflow/scen_workflow/data_extraction.py", line 218, in _extract_variable
    ds["hurs"] = xindices.relative_humidity(tas=var_dict["tas"], dtas=var_dict["tds"], huss=var_dict["huss"], ps=var_dict["ps"],
  File "<boltons.funcutils.FunctionBuilder-4>", line 2, in relative_humidity
  File "/home/rondeau/python/github/xclim/xclim/core/units.py", line 352, in wrapper
    _check_units(val, bound_units.arguments.get(name, None))
  File "/home/rondeau/python/github/xclim/xclim/core/units.py", line 295, in _check_units
    val_dim = units2pint(val).dimensionality
  File "/home/rondeau/python/github/xclim/xclim/core/units.py", line 150, in units2pint
    return units.parse_expression(_transform(unit)).units
AttributeError: 'int' object has no attribute 'units'
```

The problem seems to be an incompatibility between pint and `huss`, which has `'1'` as its unit.
```
<xarray.DataArray 'huss' (time: 53290, rlat: 74, rlon: 116)>
dask.array<getitem, shape=(53290, 74, 116), dtype=float32, chunksize=(1825, 74, 116), chunktype=numpy.ndarray>
Coordinates:
    height   float64 2.0
    lat      (rlat, rlon) float64 dask.array<chunksize=(74, 116), meta=np.ndarray>
    lon      (rlat, rlon) float64 dask.array<chunksize=(74, 116), meta=np.ndarray>
  * rlat     (rlat) float64 -5.08 -4.64 -4.2 -3.76 ... 25.72 26.16 26.6 27.04
  * rlon     (rlon) float64 -21.56 -21.12 -20.68 -20.24 ... 28.16 28.6 29.04
  * time     (time) object 1955-01-01 12:00:00 ... 2100-12-31 12:00:00
Attributes:
    grid_mapping:   rotated_pole
    standard_name:  specific_humidity
    long_name:      Near-Surface Specific Humidity
    units:          1
    cell_methods:   time: mean
```

### Additional information
Having `'1'` as a unit is rather common, since it is CF-Convention. We should add support.
http://cfconventions.org/Data/cf-standard-names/72/build/cf-standard-name-table.html


Discussion:
coveralls: ## Pull Request Test Coverage Report for [Build 1869](https://coveralls.io/builds/30774802)

* **2** of **2**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.01%**) to **76.398%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/30774802/badge)](https://coveralls.io/builds/30774802) |
| :-- | --: |
| Change from base [Build 1865](https://coveralls.io/builds/30768258): |  0.01% |
| Covered Lines: | 2486 |
| Relevant Lines: | 3254 |

---
##### 💛  - [Coveralls](https://coveralls.io)

RondeauG: Seems good.

Patch:
diff --git a/xclim/core/units.py b/xclim/core/units.py
index be0d956f..d186db7e 100644
--- a/xclim/core/units.py
+++ b/xclim/core/units.py
@@ -143,6 +143,9 @@ def units2pint(value: Union[xr.DataArray, str]) -> pint.unit.UnitDefinition:
         raise NotImplementedError(f"Value of type `{type(value)}` not supported.")
 
     unit = unit.replace("%", "pct")
+    if unit == "1":
+        unit = ""
+
     try:  # Pint compatible
         return units.parse_expression(unit).units
     except (


Test patch:
diff --git a/tests/test_units.py b/tests/test_units.py
index eb2d2363..cdd88d71 100644
--- a/tests/test_units.py
+++ b/tests/test_units.py
@@ -105,6 +105,9 @@ class TestUnitConversion:
         u = units2pint("%")
         assert str(u) == "percent"
 
+        u = units2pint("1")
+        assert str(u) == "dimensionless"
+
     def test_pint_multiply(self, pr_series):
         a = pr_series([1, 2, 3])
         out = pint_multiply(a, 1 * units.days)