Welcome to the Earthdata Forum! Here, the scientific user community and subject matter experts from NASA Distributed Active Archive Centers (DAACs), and other contributors, discuss research needs, data, and data applications.
by r.fernandes » Tue Nov 06, 2018 1:00 pm America/New_York
Hi, I need to reproject a huge amount of L2 MODIS images, i've been reading about how to use the gpt.command (im running seadas in a mac) and i understand (i believe) how it works. I was able to run the script and get the desired output, although i had to specify the file in the command line. This is the command im trying to run. while read day do ls -1 /Users/Mogli/Desktop/images/A2017$day* > /Users/Mogli/Desktop/2017/Reprojected/input.txt gpt.command -e /Users/Mogli/Desktop/2017/Reproject.xml -Ssource=/Users/Mogli/Desktop/2017/Reprojected/input.txt done < /Users/Mogli/Desktop/2017/2017filelist.txt
its gives me the error Error: No product reader found for file /Users/Mogli/Desktop/2017/Reprojected/input.txt
I've been using the same type of loop with the multi_processor.py for L2bin/l3mapgen and has been working. I know that most likely its a basic question, but how do i make it run for all the files(individually) in a specific folder?
by gnwiii » Tue Nov 06, 2018 8:05 pm America/New_York
I'm not quite sure what you want to do. There may be a more efficient workflow using binning followed by mapping using the OCSSW programs which are generally much faster than gpt.command.
The gpt.command Reproject operator needs a single source filename and target filename. ESA SNAP also provides gpt and has a Bulk Processing with GPT document that includes a fairly generic example script that seems close to what you describe.
by r.fernandes » Wed Nov 07, 2018 5:48 am America/New_York
I already have an efficient workflow using l2bin and l3mapgen with the multi_processor.py. For this work i need to work with L2 and not L3 images so i need to reproject/orthorectify each L2 image in one folder. There would be only one source input for the gpt at a time. I was asking for help with the loop because I haven't figured out how to make it run for each file in the folder.
I tried ESA SNPA bulk processing with GPT but i'm also having issues.
The following gpt command will not work: ls -1 /Users/Mogli/Desktop/images/A2017$day* > /Users/Mogli/Desktop/2017/Reprojected/input.txt gpt.command -e /Users/Mogli/Desktop/2017/Reproject.xml -Ssource=/Users/Mogli/Desktop/2017/Reprojected/input.txt
GPT is one file at a time. You cannot give a text file (which is a list of files) as input to gpt. That functionality does not exist. To do bulk processing, you will need to write your own script which loops through the files and calls gpt one file at a time.