[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #NHC-140532]: Satellite reprojections


The following code is able to re-project and runs in less than a minute within 
a notebook on my mac on Python 3.8:

    import cartopy.crs as ccrs
    import cartopy.feature as cfeature
    import matplotlib.pyplot as plt
    import metpy
    import numpy as np
    from siphon.catalog import TDSCatalog

    # Access data using Siphon
    cat = 
    nc = cat.datasets[0].remote_access(use_xarray=True)
    data = nc.metpy.parse_cf('Sectorized_CMI')

    # Set up our target projection
    target = ccrs.LambertConformal(central_longitude=-80, 

    # Create the figure, making sure to set extent before plotting
    fig = plt.figure(figsize=(10, 10))
    ax = fig.add_subplot(1, 1, 1, projection=target)
    ax.set_extent((-85, -75, 35, 45), crs=ccrs.Geodetic())

    # Plot image and add some map features
    ax.imshow(np.sqrt(data), extent=(data.metpy.x[0], data.metpy.x[-1], 
data.metpy.y[0], data.metpy.y[-1]),
              origin='lower', cmap='Greys_r', 
    ax.add_feature(cfeature.COASTLINE.with_scale('10m'), edgecolor='orange')
    ax.add_feature(cfeature.LAKES.with_scale('10m'), edgecolor='cyan', 

Does this work for you? If there's something significantly different that your 
code is doing, can you share it so I can see what's going on?

Hope this helps,


> Hi there-
> I have a question regarding the satellite data found on the threads data 
> server.
> I would like to begin building products for our universtity departmentâs 
> web site, but I have been struggling mightily when trying to take the NEW 
> (not GINI) satellite data and reproject it (for example, taking the CONUS 
> view from GOES-E and placing it into a LambertConformal projection of the 
> Northeast US (using cartopy).
> Any attempt to reproject the data on the unidata threads server is never 
> completing â
> Is there a guide for this? I am developing w/ jupyter, but am open to any 
> ideas to make this work.

Ticket Details
Ticket ID: NHC-140532
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.