pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.04k stars 287 forks source link

[Question] Resample of mesoscale data gives blank data #2749

Closed agp-earth closed 4 months ago

agp-earth commented 4 months ago

Hi! I have a quick question! I am resampling a GOES 17 mesoscale L1B radiance image with an area I defined. I don't get any errors (so it does not have to do with coordinate overlap issues). However, when I check the data of the resampled image I have NaN values and plotting it gives me a blank image. I know it is reading the original file fine as that gives a nice image when plotting (plt.imshow(scn['C07']).

scn = Scene(filenames=glob.glob(myfile), reader='abi_l1b')
scn.load(['C07'],calibration='radiance')
projection = '+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs'
proj_dict = utils.proj4_str_to_dict(projection)
area_def = geometry.AreaDefinition(area_id, description, proj_id, proj_dict, x_size, y_size, area_extent)
cropscn = scn.resample(my_area)
cropdata = cropscn['C07'].data
nan_check = np.isnan(np.array(cropdata.max()))
djhoese commented 4 months ago

While I agree this question should be in the satpy repository, I didn't see this until I had already started responding in https://github.com/pytroll/pyresample/issues/587. Closing as a duplicate of that one.