glmtools
glmtools copied to clipboard
`average_flash_area` is smaller than `minimum_flash_area`
I checked the difference between average_flash_area and minimum_flash_area:
import xarray as xr
from glob import glob
ds_glm_test = xr.open_dataset('../data/GOES-16/GLM_L2_Grid/2km/OR_GLM-L2-GLMC-M3_G16_s20201530000000_e20201530005000_c20211480438470.nc')
(ds_glm_test['average_flash_area'] - ds_glm_test['minimum_flash_area']).plot(vmin=-1e3, vmax=1e3, cmap='RdBu_r')
Some negative values are shown in the figure:

If I understand correctly, the difference should be positive, right?
Your expectation makes total sense. I think the difference here is because the average is an antialiased version of the values weighted by the 2km GLM sub pixel coverage fraction, while the minimum is not. Can you zoom in and check to see if the appearance is consistent with that idea?
Here are the enlarged figures. It looks like the large difference only exists in the edges.


