Skip to content

Commit

Permalink
Merge pull request #234 from UW-Hydro/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
arbennett authored Jul 31, 2020
2 parents 9411752 + 26d76c1 commit d805d05
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ to the default after issuing a warning):
- ``C`` (default)
- ``K``
* vapor_pressure
- ``kPa`` (default)
- ``Pa`` (default)
- ``hPa``
- ``Pa``
- ``KPa``
* air_pressure
- ``kPa`` (default)
- ``hPa``
Expand Down
4 changes: 2 additions & 2 deletions docs/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ step:
* ``t_min`` : Minimum temperature (also a required input value) (C)
* ``t_max`` : Maximum temperature (also a required input value) (C)
* ``prec`` : Precipitation (also a required input value) (mm/day)
* ``vapor_pressure`` : Vapor pressure (kPa)
* ``vapor_pressure`` : Vapor pressure (Pa)
* ``shortwave`` : Shortwave radiation (W/m^2)
* ``tskc`` : Cloud cover fraction
* ``pet`` : Potential evapotranpiration (mm/day)
Expand Down Expand Up @@ -125,7 +125,7 @@ The following variables (and name conventions) are allowed to be specified for s
* ``temp`` : Temperature (C)
* ``prec`` : Precipitation (mm/timestep)
* ``shortwave`` : Shortwave radiation (W/m^2)
* ``vapor_pressure`` : Vapor pressure (kPa)
* ``vapor_pressure`` : Vapor pressure (Pa)
* ``air_pressure`` : Air pressure (kPa)
* ``rel_humid`` : Relative humidity
* ``spec_humid`` : Specific humidity
Expand Down
8 changes: 8 additions & 0 deletions docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ What's New

.. _whats-new.2.3.0:

v2.3.1
------

Bug fixes
~~~~~~~~~
- Fixed an error in unit conversions for vapor pressure
- Fixed documentation on vapor pressure units

v2.3.0
------
Enchancements
Expand Down
4 changes: 2 additions & 2 deletions metsim/disaggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ def specific_humidity(vapor_pressure: np.array,
Parameters
----------
vapor_pressure:
A sub-daily timeseries of vapor pressure (kPa)
A sub-daily timeseries of vapor pressure (Pa)
air_pressure:
A sub-daily timeseries of air pressure (kPa)
A sub-daily timeseries of air pressure (Pa)
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion metsim/metsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
'temp': {'units': 'C', 'long_name': 'air temperature',
'standard_name': 'air_temperature',
'missing_value': np.nan, 'fill_value': np.nan},
'vapor_pressure': {'units': 'kPa', 'long_name': 'vapor pressure',
'vapor_pressure': {'units': 'Pa', 'long_name': 'vapor pressure',
'standard_name': 'vapor_pressure',
'missing_value': np.nan, 'fill_value': np.nan},
'air_pressure': {'units': 'kPa', 'long_name': 'air pressure',
Expand Down
6 changes: 3 additions & 3 deletions metsim/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
'K': lambda x, ts: x + 273.15,
},
'vapor_pressure': {
'kPa': lambda x, ts: x,
'hPa': lambda x, ts: x * 100.,
'Pa': lambda x, ts: x * 1000.,
'Pa': lambda x, ts: x,
'hPa': lambda x, ts: x / 100.,
'kPa': lambda x, ts: x / 1000.,
},
'air_pressure': {
'kPa': lambda x, ts: x,
Expand Down

0 comments on commit d805d05

Please sign in to comment.