SeaDAS OCSSW Command line/Batch processing
SeaDAS OCSSW Command line/Batch processing
Hello.
I tried to run an ocssw command in the terminal, however I got this error:
[code]
torres609@torres609:~/SeaDAS/ocssw/bin$ ./modis_GEO /home/torres609/Downloads/A2009023054500.L1A_LAC -v
Neither the L2GEN_ANC nor USER_L2GEN_ANC environment variables are set.
...using the current working directory for ancillary file download.
Error! Unable to locate LIB3_BIN environment variable. You may need to run
[/code]
What path should I set for L2GEN_ANC or LIB3_BIN?
Moreover, is there a way to batch process images with ocssw in the SeaDAS GUI or is it just through the command line?
Thank you.
I tried to run an ocssw command in the terminal, however I got this error:
[code]
torres609@torres609:~/SeaDAS/ocssw/bin$ ./modis_GEO /home/torres609/Downloads/A2009023054500.L1A_LAC -v
Neither the L2GEN_ANC nor USER_L2GEN_ANC environment variables are set.
...using the current working directory for ancillary file download.
Error! Unable to locate LIB3_BIN environment variable. You may need to run
[/code]
What path should I set for L2GEN_ANC or LIB3_BIN?
Moreover, is there a way to batch process images with ocssw in the SeaDAS GUI or is it just through the command line?
Thank you.
Filters:
Re: SeaDAS OCSSW Command line/Batch processing
Hello.
So I tried to use the multilevel_processor in order to batch process with l2gen to produce L1C MODIS. However the parameters defaulted to this when loaded:
[code]
Main of multi_level processor:
[main]
ifile=/home/torres609/Downloads/batch/_inputFiles.lst
odir=/home/torres609/Downloads/batch
[l2gen]
gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
l2prod="latitude longitude polcor_nnn rhot_nnn sena senz sola solz
[/code]
I tried to run the multi_level processor with above parameters but I got this error:
[code]
Error:
execution exception: java.io.IOException: multilevel_processor failed with exit code 1.
Check log for more details.
Error! Section name "gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]" is not recognized.
[/code]
For your reference, this is the parameters I use when I process with l2gen GUI one by one.
[code]
Paramaters:
# PRIMARY INPUT OUTPUT FIELDS
ifile=/home/torres609/Downloads/2003/A2003337044000.L1B_LAC
geofile=/home/torres609/Downloads/2003/A2003337044000.GEO
ofile=/home/torres609/Downloads/2003/A2003337044000.L1C.nc
# SUITE
suite=OC
# PRODUCTS
l2prod=latitude longitude polcor_1240 polcor_1640 polcor_2130 polcor_748 polcor_859 polcor_869 polcor_vvv rhot_1240 rhot_1640 rhot_2130 rhot_748 rhot_859 rhot_869 rhot_vvv sena senz sola solz
# PROCESSING OPTIONS
gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
# ANCILLARY INPUTS Default = climatology (select 'Get Ancillary' to download ancillary files)
[/code]
So I tried to use the multilevel_processor in order to batch process with l2gen to produce L1C MODIS. However the parameters defaulted to this when loaded:
[code]
Main of multi_level processor:
[main]
ifile=/home/torres609/Downloads/batch/_inputFiles.lst
odir=/home/torres609/Downloads/batch
[l2gen]
gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
l2prod="latitude longitude polcor_nnn rhot_nnn sena senz sola solz
[/code]
I tried to run the multi_level processor with above parameters but I got this error:
[code]
Error:
execution exception: java.io.IOException: multilevel_processor failed with exit code 1.
Check log for more details.
Error! Section name "gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]" is not recognized.
[/code]
For your reference, this is the parameters I use when I process with l2gen GUI one by one.
[code]
Paramaters:
# PRIMARY INPUT OUTPUT FIELDS
ifile=/home/torres609/Downloads/2003/A2003337044000.L1B_LAC
geofile=/home/torres609/Downloads/2003/A2003337044000.GEO
ofile=/home/torres609/Downloads/2003/A2003337044000.L1C.nc
# SUITE
suite=OC
# PRODUCTS
l2prod=latitude longitude polcor_1240 polcor_1640 polcor_2130 polcor_748 polcor_859 polcor_869 polcor_vvv rhot_1240 rhot_1640 rhot_2130 rhot_748 rhot_859 rhot_869 rhot_vvv sena senz sola solz
# PROCESSING OPTIONS
gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
# ANCILLARY INPUTS Default = climatology (select 'Get Ancillary' to download ancillary files)
[/code]
Re: SeaDAS OCSSW Command line/Batch processing
This might mean the square brackets in the gain option are being mistaken for the square brackets used for section names. Maybe it is necessary to use a parameter file.Error! Section name "gain=[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]" is not recognized.
Re: SeaDAS OCSSW Command line/Batch processing
With a few experiments I found that entering gain with quotes instead of square brackets and spaces instead of commas works:
Note that the output files will need renaming to replace L2 with L1C.
Code: Select all
[main]
ifile=...
odir=...
[l2gen]
suite=OC
l2prod=latitude longitude polcor_nnn rhot_nnn sena senz sola solz
gain="1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0"
atmocor=off
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: SeaDAS OCSSW Command line/Batch processing
To answer the original question about the missing environment variables, before running OCSSW programs from the command line you should source the $OCSSWROOT/OCSSW_bash.env file:
...and yes, the MLP wrapper doesn't like keyword=value pairs with brackets, but luckily, the OCSSW program input parser allows some flexibility as George discovered.
Sean
Code: Select all
$ export OCSSWROOT=<path to ocssw>
$ source $OCSSWROOT/OCSSW_bash.env
Sean