This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Greetings! I think, based on the warning, that the `cape` variable you're trying to plot has more than a single time dimension, which is creating a little bit of havok--in either xarray or metpy. Can you send the code you're using to read in `ds`, as well as the full error traceback you're seeing? What you included so far, while helpful, only includes a *warning*, not the actual error. Then we can get you sorted out. Cheers! Ryan > Hi there, > > I'm trying to plot an xarray dataset using metpy. I'm using data directly > from NOMADS. I've successfully gotten the day as an xarray dataset, but > when I try to plot it, I get the following error message: > > UserWarning: More than one time coordinate present for variable "cape". > warnings.warn('More than one ' + axis + ' coordinate present for variable' > > > If it's helpful, here's the code I'm using to plot it: > > > img = ImagePlot() > img.data = ds > img.field = 'cape' > img.colormap = 'coolwarm' > > panel = MapPanel() > panel.area = 'us' > panel.layers = ['states'] > panel.title = 'GFS temp forecast' > panel.plots = [img] > > pc = PanelContainer() > pc.size = (10, 8) > pc.panels = [panel] > pc.show() > > > Is there any chance you could help me out? Thank you so much for your help! > > Ticket Details =================== Ticket ID: AEC-201933 Department: Support Python Priority: Low Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.