-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resampling GOES mesoscale data to my area gives blank data #587
Comments
Please provide the size and extent you used. |
centerpt = np.array([6068126.51, 566285.63])
cellsize = scn['C07'].resolution
x_size = 100
y_size = 100
area_extent = ((centerpt[0]-(x_size/2.)*cellsize),(centerpt[1]-(y_size/2.)*cellsize),(centerpt[0]+(x_size/2.)*cellsize),(centerpt[1]+(y_size/2.)*cellsize))
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) |
I am using this file: OR_ABI-L1b-RadM1-M6C07_G17_s20200080815309_e20200080815378_c20200080815417.nc which is a date where the mesoscale 1 overlaps with my area. |
Try passing Side note: There should be no need to use |
Thank you! I passed |
I typed all of the below and then realized you said in your original post that the G17 radiance case was working for you? I'm confused now at what wasn't working. Anyway... I tested a version of your original code with GOES-17 2022 data, but I used full disk because I had it on my machine already and I wanted to prove it wasn't some other part of the processing causing your issue. So with full disk G17 data I see a proper image with: centerpt = np.array([6068126.51, 566285.63])
cellsize = scn['C07'].resolution
x_size = 100
y_size = 100
area_extent = ((centerpt[0]-(x_size/2.)*cellsize),(centerpt[1]-(y_size/2.)*cellsize),(centerpt[0]+(x_size/2.)*cellsize),(centerpt[1]+(y_size/2.)*cellsize))
area_def = geometry.AreaDefinition("", "", "", projection, x_size, y_size, area_extent)
scn = Scene(reader="abi_l1b", filenames=glob("/data/satellite/abi/g17_2022061/OR_ABI-L1b-RadF-M6C07_G17_s20220611940321_e20220611949398_c20220611949428.nc"))
scn.load(["C07"])
cropscn = scn.resample(area_def)
cropscn["C07"].plot.imshow().figure.show() I had looked up your file and I think you're right that that mesoscale on that date is in the location you specified (I think). My other guesses:
|
The G17 radiance full disk works for me, it is just with the mesoscale that I run into this problem. I removed the If instead of using my defined area, I use |
If you use pyproj and transform the input mesoscale extents to your target area definition's CRS you see the coordinates are way different than the extents you've specified:
If I change the center point to something near the middle of these coordinates I get output when I do:
|
Let me know if this reveals something for you. I'm going to close this in the mean time. |
Thank you so much!! This was incredibly helpful! |
I am trying to resample GOES 17 mesoscale data. When I resample it to an area I defined with geometry.AreaDefinition, it crops but the data is all NaN. I tried the same code but with GOES 17 L1b Radiance data and that resamples to the area and outputs the correct data.
The text was updated successfully, but these errors were encountered: