Skip to content

Commit

Permalink
Merge pull request #103 from NCAR/skewt_params
Browse files Browse the repository at this point in the history
Unpin pint and update get_skewt_vars
  • Loading branch information
Heather Craker authored Mar 27, 2023
2 parents 281f3c0 + b37b97f commit bc4aabf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- numpy
- xarray
- metpy
- pint<0.20
- pint
- pip:
- pre-commit
- scikit-learn
8 changes: 4 additions & 4 deletions src/geocat/viz/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from itertools import chain
import matplotlib.axes
import metpy.calc as mpcalc
from pint import Quantity
from metpy.units import units
import numpy as np
import pint.quantity
import typing
import xarray

Expand Down Expand Up @@ -1118,8 +1118,8 @@ def set_vector_density(data: xarray.DataArray,
return ds


def get_skewt_vars(p: pint.Quantity, tc: pint.Quantity, tdc: pint.Quantity,
pro: pint.Quantity) -> str:
def get_skewt_vars(p: Quantity, tc: Quantity, tdc: Quantity,
pro: Quantity) -> str:
"""This function processes the dataset values and returns a string element
which can be used as a subtitle to replicate the styles of NCL Skew-T
Diagrams.
Expand Down Expand Up @@ -1165,7 +1165,7 @@ def get_skewt_vars(p: pint.Quantity, tc: pint.Quantity, tdc: pint.Quantity,
tlcl = lcl[1].magnitude

# Showalter index
shox = showalter_index(p, tc, tdc)
shox = mpcalc.showalter_index(p, tc, tdc)
shox = shox[0].magnitude

# Place calculated values in iterable list
Expand Down

0 comments on commit bc4aabf

Please sign in to comment.