I am using gdalwarp in python to extract and re-project reflectance bands from MODIS level 1B (MOD021km). An example of the command that I am using is the following:
gdalwarp -of GTIFF -tps -t_srs EPSG:4326 -tr 0.01 0.01 -r bilinear -overwrite HDF4_EOS:EOS_SWATH:"C: mpMYD021KM.A2007094.0935.006.2012075055042.hdf":MODIS_SWATH_Type_L1B:EV_500_Aggr1km_RefSB C: mpOutput.tif
It converts the hdf subdataset without any problem but the output file seems to have some sort of artifact, specially close to the edges. (See below)
I converted the same data using Modis Conversion Toolkit (MCTK) and it seems to be much better. (Below)
I tried different resampling method and different output projection but still the same results! Is there anyone having this issue with gdalwarp?
P.S. The data can be downloaded from this address: ftp://ladsweb.nascom.nasa.gov/allData/6/MYD021KM/2007/094/MYD021KM.A2007094.0935.006.2012075055042.hdf
So after discussing this problem with other developers in Gdal-Dev mailing list it turned out that MODIS swath data can not be perfectly re-projected by using gdalwarp. It is because of bow-tie effect of the MODIS scanning sensor which gdal can not deal with. The best option is to download associated geolocation datasets (MOD03) and use MRTswath for re-projection of desired sub-datasets.