Cropping .L3m Images Through Command Line

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

Cropping .L3m Images Through Command Line

by beiral » Tue Jun 02, 2020 2:43 pm America/New_York

Hi,

I'd like to know if there's a way to crop multiple .L3m images, already processed, setting latitude and longitude limits, through linux command lines or some kind of shell script...how can I get started with these commands or scripts to make the cropping non manual...I'm really stuck at this.

Thank you,
Beiral.

Tags:

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 276
Joined: Mon Apr 07, 2008 4:40 pm America/New_York
Answers: 0

Cropping .L3m Images Through Command Line

by OB SeaDAS - knowles » Tue Jun 02, 2020 4:13 pm America/New_York

Since your input file is a mapped file then with SeaDAS the best option for geographically cropping a file at the command line would be to use the gpt Subset operator.  See the GPT Cookbook within the SeaDAS 7.5.x GUI (Menu > Help > Cookbooks > GPT Cookbook).  Go to the section on the "Subset" operator and see Example 1.  This example will do what you want for a single file at the command line.

Note: you should also look at the "General Configuration and Options" section of the GPT Cookbook in order to set up the gpt alias to your respective gpt executable (platform dependent).

SeaDAS doesn't provide a multi-file crop/subset looping script specific to what you are trying to do, so you would need to write your own script.  In general that means putting a list of files in a text file, then using a scripting language such as python to read in that text file which contains the list of files, and executing the command line operation on each file, as the script loops through the list files.

Danny

Post Reply