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

[python #EFZ-818363]: Metpy Mondays 48 & 49 Satellite Data with CLASS



Greetings!

Apologies for the delayed response.

I'm not sure why this wasn't a problem in the original video, but the problem 
is occurring bevause the 179.99998, 2.982 lon/lat point is outside the domain 
for the Geostationary projection with its default central longitude of 0. An 
easy work-around is to set the central longitude to -100:

    map_crs = ccrs.Geostationary(central_longitude=-100)

Hope this helps!

Ryan

> Hi there,
> I normally make maps from GOES imagery in netcdf format, getting them from
> AWS directly.
> 
> Recently I wanted to plot a GOES-11 CH4 satellite data from october 2011,
> so I downloaded it from CLASS.
> 
> I saw that some MetPy Mondays were about CLASS data so I went through it
> and getting through the part o MetPy Mondays #48 near time 1min40s to
> 6min07s I get a NaN value for the latitude point 1, and there after
> obviously it does not work.Tried also the #49 that uses IR data to see if
> there would be a difference.
> 
> Here is the part of the code where things go wrong:
> --------------------------------------------------------------------------
> # define coordinate reference system
> map_crs = ccrs.Geostationary()
> # find indexes from lat lon coordinates with numpy unravel
> ilon_min = np.unravel_index(np.argmin(lon), lon.shape)
> ilon_max = np.unravel_index(np.argmax(lon), lon.shape)
> #
> ilat_min = np.unravel_index(np.argmin(lat), lat.shape)
> ilat_max = np.unravel_index(np.argmax(lat), lat.shape)
> # minimum and maximum longitude value
> Lon_point_0 = map_crs.transform_point(lon[ilon_min], lat[ilon_min],
> ccrs.Geodetic())[0]
> Lon_point_1 = map_crs.transform_point(lon[ilon_max], lat[ilon_max],
> ccrs.Geodetic())[0]
> # minimum and maximum latitude value
> Lat_point_0 = map_crs.transform_point(lon[ilat_min], lat[ilat_min],
> ccrs.Geodetic())[1]
> Lat_point_1 = map_crs.transform_point(lon[ilat_max], lat[ilat_max],
> ccrs.Geodetic())[1]
> ----------------------------------------------------------
> So the Lat_point_1 gives me NaN, and I cannot figure out why.
> 
> Any suggestions
> 
> goes11.2011.285.053015.BAND_04.nc
> <https://drive.google.com/file/d/1NVcqjpG-3pIxGDMLmiuy58jx2ZnVqLyR/view?usp=drive_web>
> ?


Ticket Details
===================
Ticket ID: EFZ-818363
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with NSF 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.