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?
Generate modis/L2 data from L1a on Linux
-
- Subject Matter Expert
- Posts: 626
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 1 time
Re: Generate modis/L2 data from L1a on Linux
Here are a few options --
1. You can use get_output_name to get the file name of the command (TARGET_PROGRAM).
2. You can also provide the geofile name and/or 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
# Sample par_file for multilevel_processor.
[main]
ifile=2010345034027.L1A_LAC
[l2gen]
l2prod=chlor_a
# final processing level
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
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"
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
[main]
ifile=2010345034027.L1A_LAC
[l2gen]
l2prod=chlor_a
# final processing level