l2gen bug in setting subsetting options
-
- Posts: 2
- Joined: Wed Feb 22, 2023 4:31 pm America/New_York
l2gen bug in setting subsetting options
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.
Tags:
-
- Subject Matter Expert
- Posts: 509
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 1 time
Re: l2gen bug in setting subsetting options
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
Here is a post that might be helpful -- viewtopic.php?p=11063&hilit=l2gen#p11029
-
- Posts: 2
- Joined: Wed Feb 22, 2023 4:31 pm America/New_York
Re: l2gen bug in setting subsetting options
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.
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.