Generate modis/L2 data from L1a on Linux

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
ywystu
Posts: 6
Joined: Sat Oct 29, 2022 12:25 pm America/New_York
Answers: 0

Generate modis/L2 data from L1a on Linux

by ywystu » Thu Sep 21, 2023 5:56 am America/New_York

I processed data with a linux shell script like:
--------------------------------------------------
for .... ;do
modis_GEO command
modis_L1B command
l2gen command
done
---------------------------------------------------
Because I can't get the output file name from the last command, I retrieve the newest file in the output directory as the input file of the next command. And now I find a problem: Sometimes the program will raise errors due to the network connecting, which is reasonable. I will record these bad processing and deal with them later. However, the mismatched geofile sometimes can be used in the l2gen command, and that means l2gen command may use the wrong geofile from the last loop. I can't identify which files have this issues.

How do I solve the problem? or Can I get the default output name in order to check the files?

Tags:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 656
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 2 times

Re: Generate modis/L2 data from L1a on Linux

by OB SeaDAS - xuanyang02 » Thu Sep 21, 2023 10:29 am America/New_York

Here are a few options --
1. You can use get_output_name to get the file name of the command (TARGET_PROGRAM).

Code: Select all

get_output_name INPUT_FILE TARGET_PROGRAM
2. You can also provide the geofile name and/or output file name

Code: Select all

modis_GEO L1AFILE -o GEOFILE

Code: Select all

modis_L1B L1AFILE  GEOFILE -o "Output L1B 1KM filename"

Code: Select all

l2gen ifile="input L1 file name" geofile="input L1 geolocation file name" ofile="output file name"
Here is the help pages --
https://seadas.gsfc.nasa.gov/help-8.3.0/processors/ProcessModis_GEO.html#cl
https://seadas.gsfc.nasa.gov/help-8.3.0/processors/ProcessModis_L1B.html#cl
https://seadas.gsfc.nasa.gov/help-8.3.0/processors/ProcessL2gen.html#COMMAND_LINE_HELP

3. You can also try multilevel_processor --
https://seadas.gsfc.nasa.gov/help-8.3.0/processors/ProcessMultilevel_processor.html#cl

Code: Select all

multilevel_processor par=par_file
# Sample par_file for multilevel_processor.
[main]
ifile=2010345034027.L1A_LAC
[l2gen]
l2prod=chlor_a
# final processing level

Post Reply