Questions tagged [metpy]

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.

MetPy is a Python library for reading, visualizing and performing calculations with weather data. It leverages heavily the xarray library for its data model, though it is designed to work on any data that you can get into a numpy array--sometimes needing unit information, which is provided through the Pint library.

Resources

211 questions
0
votes
1 answer

How to fix attribute error for Metpy data from a netcdf file involving xarray

I am getting this error: AttributeError: 'Dataset' object has no attribute 'metpy' when I am running my code. The particular lines in particular are: import Scientific.IO.NetCDF as S import cartopy.crs as ccrs import cartopy.feature as…
0
votes
1 answer

Siphon NCSS returns nan values

I'm trying to plot latest HRRR surface temperature with data from the THREDDS data server. cat = TDSCatalog('https://thredds-test.unidata.ucar.edu/thredds/catalog/' 'grib/NCEP/HRRR/CONUS_2p5km/latest.xml') dataset =…
0
votes
1 answer

Stationplot barbs fails with AttributeError: 'list' object has no attribute 'shape'

When trying to use stationplot.plot_barb to plot wind barbs in a station model plot, I get this AttributeError. I assumed this was happening because the function did not want u and v as lists, so I converted them to numpy arrays before passing thru…
Karl Schneider
  • 466
  • 4
  • 11
0
votes
2 answers

Metpy Interpolate values for the given point

I use this Metpy interpolation methods https://unidata.github.io/MetPy/latest/examples/gridding/Point_Interpolation.html#sphx-glr-examples-gridding-point-interpolation-py. My question is how do I get the interpolated temperature value for the given…
meteorolog
  • 27
  • 6
0
votes
2 answers

MetPy Matching GOES16 Reflectance Brightness

I am having an issue with matching up the color table/brightness on CMI01 through CMI06 when creating GOES16 imagery with MetPy. I've tried using stock color tables and using random vmin/vmax to try and get a match. I've also tried using custom made…
Gwi7d31
  • 1,652
  • 2
  • 12
  • 10
0
votes
2 answers

Read_fwf not reading negative numbers

I'm reading a txt file for calculating the skewT routine in MetPy, however my negative numbers are not read. According to the tutorial I tried to read a txt file, I modified the original command a little bit col_names = ['pressure', 'height',…
Luis
  • 1
  • 2
0
votes
1 answer

opening a radiosonde file

I want to open a sounding data generated by myself I successfully ran the metpy code df = pd.read_fwf(get_test_data('nov11_sounding.txt', as_file_obj=False), skiprows=5, usecols=[0, 1, 2, 3, 6, 7], names=col_names) df['u_wind'], df['v_wind'] =…
Luis
  • 1
  • 2
0
votes
1 answer

How to install MetPy?

I am new to python and my professor would like to me to plot graphs on MetPy for my undergraduate research project. I am confused on how to install this program into python. I haven't used pip before and I've tried using command prompt and the…
Bob
  • 115
  • 10
0
votes
1 answer

Point Interpolation with Metpython and Basemap

I change the script, and try to show it by using basemap. # Copyright (c) 2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """ …
grug
  • 51
  • 1
  • 4
-1
votes
1 answer

calculate the MCS index

I would like to optimize the code to calculate the MCS index for the Southern Hemisphere using the formula ( # SA − MCS index = [Shear (0–6 km) –20.01] ∕7.87 + [ gradiente_horizontal (775 hPa) –4.84 × 10–5] ∕5.65 × 10–5 + { – [ omega (800 hPa) +…
leojim19
  • 29
  • 4
-1
votes
1 answer

Metpy sounding for data just above the surface

I'm using Metpy to create sounding profiles of data I have. The data itself only goes up to about one kilometer above the surface. Is there a way to visualize this on a sounding using Metpy? I'm currently using the SkewT function within Metpy, but…
-1
votes
2 answers

nan values in interpolated result python metpy

I have a data set with (latitude, longitude, temperature) and I'm trying to interpolate the temperature to graph it with contourf. However, the interpolated has nan values in it (I'm sure that my data does not have nan values). df =…
QHoang
  • 45
  • 5
-1
votes
1 answer

MetPy vs Pint package compatibility error

In my Conda environment, when I run pip show MetPy, my first and last two lines are: Name: MetPy Version: 1.0 ... Requires: scipy, matplotlib, pandas, pyproj, pooch, importlib-resources, traitlets, importlib-metadata, numpy, pint,…
Stephen
  • 19
  • 4
-1
votes
1 answer

Pythonic way to compute precipitable water?

I am using ERA5 reanalysis data from the NCAR RDA. I am using metpy dewpoint_from_relative_humidity() to compute dewpoint, then I convert it to a DataArray object and assign coordinates and dimensions that match the Dataset object I have the ERA5…
-1
votes
1 answer

Why does the unit name 'mb' correspond to 'millibarns', not 'millibars'?

millibarns is a unit of cross-section for collisions in particle physics. MetPy caters to meteorologists, who would normally interpret 'mb' to be millibars, a unit of pressure.
GregZ
  • 11
1 2 3
14
15