Frage

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!

War es hilfreich?

Lösung

try to debug your BAT file one step by step.

Don't run the BAT file, but execute every command in the command line

  1. Begin with

    dir *2011009.*.hdf /a /b /s
    

    study the output of the command. Make sure that the dir command is producing the result you expect, returning the files you expected to process.

  2. Redirect the dir command to MOSAICINPUT.TXT file. Make sure that the input files list MOSAICINPUT.TXT does really have the appropiate format for mrtmosaic. Make sure that mrtmosaic accepts 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 ...

  3. Execute

    d:/mrt/bin/mrtmosaic.exe -i MOSAICINPUT.TXT -s "0 1 0 0 0 0" -o MOSAIC_TMP_2011009.hdf
    

    read carefully the error messages. Correct one problem at a time, run again the command.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top