Batch processing Landsat with l2gen
Batch processing Landsat with l2gen
Hi All,
I wanted to atmospherically correct a lots of OLI images with the l2gen processor. Any ideas on batch processing please?
I wanted to atmospherically correct a lots of OLI images with the l2gen processor. Any ideas on batch processing please?
Filters:
Batch processing Landsat with l2gen
You can use one programming language(shell or python) to implement a batch processing, for OLI, this task is similar with MODIS. Here is my idea:
(1) to put all files into same folder.
(2) using a loop statement(do,while, for, etc.) to read filename one by one, then you can use this as input to execute l2gen command.
Here is a prototype to show how using shell to batch:
dataPath="/run/media/zhigang/DATA/viirs/"
resultPath="/run/media/zhigang/DATA/viirs/result/"
gpfPath="/home/zhigang/Batch_Codes/seadas/"
cd "$dataPath"
files=`echo "$dataPath"*.L1A_NPP.tar.bz2`
for file in $files
do
l2gen ifile=$file ofile=... par=$ancfile l2prod='Rrs_nnn' north=... south=... west=... earth=... ....
done
And, you can find more information by searching posts in forum.
Regards,
zhigang
(1) to put all files into same folder.
(2) using a loop statement(do,while, for, etc.) to read filename one by one, then you can use this as input to execute l2gen command.
Here is a prototype to show how using shell to batch:
dataPath="/run/media/zhigang/DATA/viirs/"
resultPath="/run/media/zhigang/DATA/viirs/result/"
gpfPath="/home/zhigang/Batch_Codes/seadas/"
cd "$dataPath"
files=`echo "$dataPath"*.L1A_NPP.tar.bz2`
for file in $files
do
l2gen ifile=$file ofile=... par=$ancfile l2prod='Rrs_nnn' north=... south=... west=... earth=... ....
done
And, you can find more information by searching posts in forum.
Regards,
zhigang
-
- Posts: 23
- Joined: Mon Apr 24, 2017 4:08 pm America/New_York
Batch processing Landsat with l2gen
Hello,
I am a new user on SeaDAS. I am a PhD Student, working on MODIS images to study the variability of Suspended Particular Matter (SPM) in the Gironde Estuary (France). I have a lot images to process since I am working on 16 years (2000-2016). First, I have to apply atmospheric corrections using l2gen. I would like to konw if there is a User Guide on l2gen function on the different options. I only found some descriptions on the help.
Then, I have to automate tasks to process all MODIS images using Python, shell or other language. I am a beginner using this. On the forum, I've seen some little parts of script to automate task. Do you have some scripts to help me to begin to use l2gen? What is the difference with multilevel processor (mlp) ?
Thank you in advance,
Cassandra
I am a new user on SeaDAS. I am a PhD Student, working on MODIS images to study the variability of Suspended Particular Matter (SPM) in the Gironde Estuary (France). I have a lot images to process since I am working on 16 years (2000-2016). First, I have to apply atmospheric corrections using l2gen. I would like to konw if there is a User Guide on l2gen function on the different options. I only found some descriptions on the help.
Then, I have to automate tasks to process all MODIS images using Python, shell or other language. I am a beginner using this. On the forum, I've seen some little parts of script to automate task. Do you have some scripts to help me to begin to use l2gen? What is the difference with multilevel processor (mlp) ?
Thank you in advance,
Cassandra
Batch processing Landsat with l2gen
Cassandra,
I'm not exactly sure how to respond to "What is the difference with multilevel processor (mlp)?" The results shouldn't be any different whether you run l2gen via the mlp or the command line, except in how you set it up to run.
Perhaps the easiest way to do what you want with the mlp is to set it up with the options you want and use a text file containing the list of the files you want to process. A quick example of the par file follows:
Then, my_files.txt should look something like:
Once you've done this, you can change the file names in my_files.txt (or whatever you call the file) and re-run the mlp to process a new set of files. Creating a script to handle this shouldn't be too difficult, but more specifics about what you're trying to do are needed.
Hope this helps,
Matt
I'm not exactly sure how to respond to "What is the difference with multilevel processor (mlp)?" The results shouldn't be any different whether you run l2gen via the mlp or the command line, except in how you set it up to run.
Perhaps the easiest way to do what you want with the mlp is to set it up with the options you want and use a text file containing the list of the files you want to process. A quick example of the par file follows:
[main]
ifile=my_files.txt
[l2gen]
(options you want for l2gen)
Then, my_files.txt should look something like:
A2015223172500.L1A_LAC
A2015223190000.L1A_LAC
(and so forth)
Once you've done this, you can change the file names in my_files.txt (or whatever you call the file) and re-run the mlp to process a new set of files. Creating a script to handle this shouldn't be too difficult, but more specifics about what you're trying to do are needed.
Hope this helps,
Matt
-
- Posts: 17
- Joined: Wed Jun 12, 2019 9:47 pm America/New_York
Batch processing Landsat with l2gen
Hi PH.d
I see your work is about the SPM in the estuary, I have the same work with you,
Can I ask you some question about the L2gen process?
I see your work is about the SPM in the estuary, I have the same work with you,
Can I ask you some question about the L2gen process?