I want to batch mosaic MODIS MCD15A2 data using MRT-MODIS Reprojection Tools, and here is my script:
set MRTDATADIR = D:/mrt/data
set /a DAY=2011009
set /a DEADLINE=2011017
:start
if %DAY% leq %DEADLINE% (goto ORDER) else exit
:ORDER
dir *%DAY%.*.hdf/a/b/s > MOSAICINPUT.TXT
d:/mrt/bin/mrtmosaic.exe -i MOSAICINPUT.TXT -s "0 1 0 0 0 0" -o MOSAIC_TMP_%DAY%.hdf
copy MOSAIC_TMP_%DAY%.hdf Result & del MOSAIC_TMP_%DAY%.hdf
del *%DAY%.*.hdf
set /a DAY= %DAY% + 8
goto start
It didn’t work and I got
“Warning: CheckMosaicArgs : General Processing
: Error processing input_filenames from (MOSAICINPUT.TXT) for the mosaic tool”
How can I fix this? I’m using windows7.Thanks!
try to debug your BAT file one step by step.
Don’t run the BAT file, but execute every command in the command line
Begin with
study the output of the command. Make sure that the
dircommand is producing the result you expect, returning the files you expected to process.Redirect the dir command to
MOSAICINPUT.TXTfile. Make sure that the input files listMOSAICINPUT.TXTdoes really have the appropiate format formrtmosaic. Make sure thatmrtmosaicaccepts a list of files as an input file. Pay special attention in subdirs content and the format of the files names, look for blanks or other special characters that might not be swallowed by mrtmosaic later on. It might be that mrtmosaic does not like backslashes or blanks or …Execute
read carefully the error messages. Correct one problem at a time, run again the command.