Page 1 of 1

l2gen bug in setting subsetting options

Posted: Wed Feb 22, 2023 4:38 pm America/New_York
by jjnnan1100
When processing MODIS using l2gen, the subset process works well on coordinates (north, south, east, west) with resolution=1000. However, when setting resolution=500 or 250, the subset results shifted and scaled. I supposed the algorithm transferred the (north, south, east, west) to pixel coordinates to subset the image-array, but missed scaling the pixel coordinates if the resolution is not 1000.

Re: l2gen bug in setting subsetting options

Posted: Thu Feb 23, 2023 11:08 am America/New_York
by OB SeaDAS - xuanyang02
Yes, it's a known bug. For resolution=250, 500, the work around is to do l1aextrract_modis first and the do l2gen without subset.

Here is a post that might be helpful -- viewtopic.php?p=11063&hilit=l2gen#p11029

Re: l2gen bug in setting subsetting options

Posted: Thu Feb 23, 2023 11:22 am America/New_York
by jjnnan1100
Hi,

Thanks for providing this information.

I guess it may because that the [lat, lon] array has the same size of 1KM data, when input [north, south, east, west] parameters, they were transferred to pixel locations which is related to the 1KM-image array. Then, if using this pixel locations to subset HKM or QKM images, the results would shift and be scaled with 1/2 or 1/4.