satpy GOES19 and Cartopy

10 views
Skip to first unread message

Jorge Conrado Conforte

unread,
Apr 26, 2026, 3:44:15 PMApr 26
to pyt...@googlegroups.com, jc2co...@gmail.com


Hi,


I read my GOES19 data using satpy. But when I use this to plot my data:


my_channel = 'C13'

import cartopy.crs as ccrs
crs = scn[my_channel].attrs['area'].to_cartopy_crs()
plt.figure()
ax = plt.axes(projection=ccrs.PlateCarree())

my_data = scn[my_channel]
my_data.plot.imshow(transform=crs)
ax.coastlines()
ax.gridlines()
plt.show()


I had this error:

crs = scn[my_channel].attrs['area'].to_cartopy_crs()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StackedAreaDefinition' object has no attribute 'to_cartopy_crs'


I copy to plot my data from 07_cartopy_geoviews.ipynb from:

https://github.com/pytroll/tutorial-satpy-half-day/blob/main/notebooks/07_cartopy_geoviews.ipynb


Could you help me


Thanks,


Conrado






David Hoese

unread,
Apr 26, 2026, 9:22:00 PMApr 26
to pyt...@googlegroups.com
Hello,

A StackedAreaDefinition is usually used for combining separate AreaDefinitions (geographic region definitions) and is typically seen with a reader for "segmented" geostationary data. You don't show your Scene creation, but assuming you're using the "abi_l1b" reader then this result is unexpected. My best guess is that you've provided more than one time step of data to the Scene or more than a single sector (ex. full disk *and* CONUS files). A Satpy Scene is only meant to take a single time step of geostationary data for a single sector. It can handle multiple channels for that same time step though. Double check what files you're passing to your Scene and make sure it is only a single time. If it is and you're still getting this error, please provide me a list of the filenames you are providing to the Scene and I will see if I can debug it further on my side.

Dave

--
You received this message because you are subscribed to the Google Groups "pytroll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/ec7be5b8-407b-4357-b0fb-cea52bfa720b%40gmail.com.
Reply all
Reply to author
Forward
0 new messages