Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Claude Dicaire
@eliteuser26
@dopplershift Thank you for this new version 1.0 of Metpy. This will help a lot in clarifying what each parameter that needs to be used in different functions. I know for a fact in the weather world for which I worked in it was never how each parameter were calculated. From site to site they use their own set of variables which make it difficult the different equations being used. As a retired weather forecaster I always said that there is a need for a standard in the weather world for the literature. So I will make the changes to my script to adjust to the new parameters. Great work.
Claude Dicaire
@eliteuser26
@dopplershift I appreciate all the work you done on the web site. Very well done. I noticed that you are using today's web framework to build the Metpy site. However when accessing the website through a mobile device I noticed a few issues. Not very much. Where should I put my comments? Maybe that was the intention to build that way.
Ryan May
@dopplershift
@eliteuser26 Thanks for the kind words. Opening an issue about the issues with the docs on mobile would be fine. What do you mean by "today's web framework"?
Claude Dicaire
@eliteuser26
@dopplershift The web design looks similar to Bootstrap which I use on my website. The current Metpy website is well designed and easily accessible through the expandable top menu. I like that design. I thought you upgraded your web framework. Isn't it?
Ryan May
@dopplershift
@eliteuser26 Absolutely, just "today's web framework" didn't mean "Bootstrap" to me necessarily. But yes, it's using pydata-sphinx-theme, which uses some bootstrap.
Gustavo Aponte
@tropicalblognet_twitter
Hi guys
Gustavo Aponte
@tropicalblognet_twitter
If a create a meteorological map. Like live radar. How i can transfer that image to my web page and update auto?
Gustavo Aponte
@tropicalblognet_twitter
@dopplershift
Gustavo Aponte
@tropicalblognet_twitter
@dopplershift I need help. I try to plot the GFS but is giving me this error alt
gfs python.png
winash12
@winash12
Ryan May
@dopplershift
@winash12 Do you mean the video I recorded?
winash12
@winash12
@dopplershift Yes precisely. After you give the presentation...
Ryan May
@dopplershift
If AMS has a link, I always add them. I'm not sure if it's worth posting that recording to youtube, but I'll consider it. The novel material will certainly go to update our roadmap (#1655) and if you want to know what we're thinking for 1.0.1 and 1.1, see: https://github.com/Unidata/MetPy/milestones
Gustavo Aponte
@tropicalblognet_twitter
Hi @dopplershift i need help with that error
Bryan Kilgore
@bambryan
Does anyone have experience with Grads? I'm looking for the similar function to lterp in metpy if there is one.
Henry Goodwin
@ClariNerd617

Has anyone tried using MetPy in JetBrains Datalore yet?

Apparently you can install the libraries with conda, which should solve most of the problems associated with installing them on Kaggle or Google Colab.

Ryan May
@dopplershift
@bambryan Have you looked at scipy.interpolate.interp2d?
Ryan May
@dopplershift
@tropicalblognet_twitter If I try to open a current dataset from https://nomads.ncep.noaa.gov/dods/gfs_0p25_1hr using netCDF4.Dataset, I don't get an error. Make sure your installation of netcdf4 and libnetcdf are up to date. Since this isn't a MetPy problem, if you have additional problems, they'd be best reported on the netcdf4-python issue tracker so that the right people see the report.
Tyler Youschak
@Craytor
Is it possible to convert x and y values from TVS/Meso from a Level3File (metpy.io.Level3File) to use the correct lat lon projection of the US?
Ben
@ben519
I'm looking for some help on a project identifying and plotting hail across the continental U.S., historically. How would I go about answering a basic question like, was hail present at location X on date Y? I know NEXRAD Level provides a Hail Index product (NHI/59) but I've been unsuccessful comprehending / using this data. Advice appreciated and I'm willing to pay for 1-on-1 support if anyone's willing. Thanks!
Ryan May
@dopplershift
@Craytor MetPy has azimuth_range_to_lat_lon--you only need to convert the x/y values to az/range values.
@Craytor I'd also welcome a feature request on Level3File for us to go ahead and do that behind the scenes for you (as part of our much needed cleanup of NEXRAD stuff #49)
Tyler Youschak
@Craytor
I have one more question regarding the TVS/Meso. I'm using the Level 3 Storm Tracking Information file (DS.58sti). I'm able to get the current position of the storms and their projected track - however it doesn't seem to have any more information besides the storm ID. Are you guys currently parsing more data such as azimuth, range, psh, poh, vil, max_dbz, sknt, etc? So far the only way that I have been able to remotely see this information is to use the tab page - but in the source code it looks like some of this information is already being parsed (https://github.com/Unidata/MetPy/blob/3adfbd81629f0915f8d53e1e7b2509b2628827ca/src/metpy/io/nexrad.py#L2015) - I'm just not sure how to get to it. I'd be willing to write some documentation on the NEXRAD stuff as soon as I can piece it all together.
@dopplershift is there perhaps any documentation on this or examples?
Thomas Horner
@potion-cellar

Hello! I've been using the 500mb vorticity advection example in a jupyter notebook. Using siphon.ncss, I can get the latest NAM 12km model to draw the chart correctly. However, when I switch it over to the GFS, I get an error here:

dx_, dy_ = mpcalc.lat_lon_grid_deltas(lon, lat)

f = mpcalc.coriolis_parameter(np.deg2rad(lat)).to(units('1/sec'))

avor = mpcalc.vorticity(uwnd_500, vwnd_500, dx=dx_, dy=dy_) + f

avor = ndimage.gaussian_filter(avor, sigma=3, order=0) * units('1/s')

vort_adv = mpcalc.advection(avor, u=uwnd_500, v=vwnd_500, dx=dx_, dy=dy_) * 1e9

at mpcalc.vorticity:

ValueError: operands could not be broadcast together with shapes (721,1440) (721,)
Thomas Horner
@potion-cellar
Huh... Actually, I switched to the GFS 20km and the issue went away. Only happening with the GFS 0.25deg.
Jon Thielen
@jthielen

@potion-cellar It looks like your input shapes are not broadcasting together appropriately. Quickest fix without changing your workflow is to insert size one dimensions (... + f[:, None] on that vorticity line should do it) to manually fix the broadcasting. Otherwise, if you're on MetPy v1.0 and using xarray, a lot of this becomes easier:

avor = mpcalc.absolute_vorticity(uwnd_500, vwnd_500)
avor_smoothed = mpcalc.smooth_gaussian(avor, n=19)
vort_adv = mpcalc.advection(avor_smoothed, u=uwnd_500, v=vwnd_500)

since all the grid deltas and coriolis parameter information is determined automatically from the coordinates.

Brian Mapes
@brianmapes
Oh my, you changed the order of arguments in precipitable_water() in MetPy1.0! Is there some theory of the case for why?
And thanks for the effort on clarifying its bounds arguments.
Ryan May
@dopplershift
@brianmapes See #1235 for the issue and #1244 for the PR (though there's not a lot of discussion there). Short answer: Everything else sounding-related has function definitions that put pressure (or the vertical coordinate) first, then all the other data variables, then options. precipitable_water was the outlier by originally being (dewpt, pressure).
As a long term user of the library, I know it seems like an unnecessary and annoying change. I think it's best for the long-term health of the library because it makes it easier for new users (and really all users) by making all the functions generally work the same and have consistent argument ordering. I would hope this would make it slightly easier to teach students.
Ryan May
@dopplershift
@Craytor Anything in those packets should show whatever is decoded under sym_block. If you have a file where you're expecting more information, I'm happy to dig into it to see what's going on.
@Craytor There's not a lot of documentation because that interface is so low-level and needs a nice interface put on top
@Craytor Oh yeah, I see now. Some of the information you're looking for are available in graph_pages and tab_pages attributes in the file. That's because that information is encoded as graphical information or literal text pages. We have not tried to parse those and present that information.
Brian Mapes
@brianmapes
"coordinate first", great, that's a principle I will enjoy knowing, it will save me more time in future than it cost me yesterday.
winash12
@winash12
IS there an API to calculate cyclonic/anticyclonic shear in MetPy ? https://glossary.ametsoc.org/wiki/Cyclonic_shear
Thomas Horner
@potion-cellar

@jthielen Thanks Jon!

I have another question. I have a lot of workflows set up now and everything is looking great, but one thing I haven't been able to figure out is how to get a value of a variable (lets say temperature @ 2m) for a given coordinate. I'm generally just plotting contours of variables like temperature = units.kelvin * raw_dataset.variables['name_of_the_temperature_var'][:, 0, :, :] where raw_dataset is the output from siphon's ncss.get_data().

I know how to access the data (in terms of specific time and level) for anything except a specific lat/lon, since for most variables it appears lat and lon are both 2d arrays due to the projection, so I have no idea how to traverse these arrays to get the actual value that would pertain to a coordinate.

Thomas Horner
@potion-cellar
I think I figured it out. I have numpy add two arrays: absolute value of all latitudes minus the desired latitude, and the absolute value of all longitudes minus the desired longitude. Then I use argmin to find the index of the lowest value and transform it back into a 2d index with numpy unravel_index. I feel like I reinvented the wheel here but it works.
Jon Thielen
@jthielen
To get data at a particular lat/lon point, the process I usually use is projecting that point into the x/y coordinate space of the projection (so, data_crs.transform_point(ccrs.PlateCarree(), lon, lat) with cartopy...can also do with pyproj), and then indexing based on those 1D x and y coordinates. It's been awhile since I haven't used xarray, so I'm not sure what that latter part looks like in a netCDF4 Dataset-based workflow...it's very easy with xarray (ds.sel(x=x, y=y, method='nearest')).
Thomas Horner
@potion-cellar
@jthielen Ah yeah, that's a fairly sensible approach. I did think about xarray with a sel statement, but was wondering if there was something similarly straightforward in netCDF4 Dataset.
Thomas Horner
@potion-cellar
A met colleague of mine has been having trouble with PlotObs, even after following the MetPy Mondays #115 - Declarative Station Plots tutorial 100% (I verified this). When setting obs.time before plotting the obs, pandas throws a KeyError in regards to the datetime. Omitting that statement otherwise causes things to be plotted properly. Not sure if it's a dependency issue since that tutorial is over a year old or we should file an issue through more formal channels.
Ryan May
@dopplershift
@potion-cellar I'd be interested in seeing an issue or question on Discussions with a minimal working example of what's failing.

@winash12 Not currently. According to that definition you linked to:

Horizontal wind shear of such a nature that it contributes to the cyclonic vorticity of the flow, that is, it tends to produce cyclonic rotation of the individual air particles along the line of flow.

So in the use case you're imagining, how are you defining "line of flow"?

Thomas Horner
@potion-cellar
winash12
@winash12
@dopplershift So the line of flow will depend on what is downwind - https://glossary.ametsoc.org/wiki/Downwind
If you know the wind direction and you can define what is left and right then you have the line of flow
winash12
@winash12
Compute the wind direction between two points. If from that the wind speed is increasing "left" to "right" then you have cyclonic shear
So the only question is - how does one define left and right?
winash12
@winash12
https://physics.stackexchange.com/questions/153659/what-does-downshear-mean It is the same issue if one wishes to calculate "upshear" and "downshear"