getanc for GOCI from command line
-
- Posts: 4
- Joined: Thu May 13, 2021 4:29 pm America/New_York
getanc for GOCI from command line
I am processing L1 GOCI files to experiment with removing the maskcloud over turbid waters. I have installed Seadas 8.0.0, and I am using macOS Big Sur 11.3.1
I am able to run l2gen in the GUI, with successful download of ancillary files. I am interested in batch processing, however, which is where I have run into trouble.
When I enter, for example:
paul@Pauls-iMac ~ % ./seadas/ocssw/scripts/getanc.py -d /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322001641.he5
I get:
Traceback (most recent call last):
File "/Users/paul/./seadas/ocssw/scripts/getanc.py", line 196, in <module>
sys.exit(main())
File "/Users/paul/./seadas/ocssw/scripts/getanc.py", line 188, in main
g.setup()
File "/Users/paul/seadas/ocssw/scripts/modules/anc_utils.py", line 174, in setup
from modis_utils import modis_timestamp
ModuleNotFoundError: No module named 'modis_utils'
modis_utils.py is found in /Users/paul/seadas/ocssw/scripts/modules/
My searches have not turned up a similar problem among other users, so I am stumped at this point.
I am able to run l2gen from the command line with default ancillary files, and I can wget image specific ancillary files, once they are identified. So the problem is small, but frustrating, because I cannot automatically identify the ancillary files outside of the GUI.
I am able to run l2gen in the GUI, with successful download of ancillary files. I am interested in batch processing, however, which is where I have run into trouble.
When I enter, for example:
paul@Pauls-iMac ~ % ./seadas/ocssw/scripts/getanc.py -d /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322001641.he5
I get:
Traceback (most recent call last):
File "/Users/paul/./seadas/ocssw/scripts/getanc.py", line 196, in <module>
sys.exit(main())
File "/Users/paul/./seadas/ocssw/scripts/getanc.py", line 188, in main
g.setup()
File "/Users/paul/seadas/ocssw/scripts/modules/anc_utils.py", line 174, in setup
from modis_utils import modis_timestamp
ModuleNotFoundError: No module named 'modis_utils'
modis_utils.py is found in /Users/paul/seadas/ocssw/scripts/modules/
My searches have not turned up a similar problem among other users, so I am stumped at this point.
I am able to run l2gen from the command line with default ancillary files, and I can wget image specific ancillary files, once they are identified. So the problem is small, but frustrating, because I cannot automatically identify the ancillary files outside of the GUI.
Filters:
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: getanc for GOCI from command line
Could you do "SeaDAS_OCCSW -> SeaDAS/System Info" and share the output here?
Did you install ocssw through SeaDAS 8.0.0? It seems to me that you are running getanc.py from the old ocssw you installed through SeaDAS-7.5.3.
Can you try to find the ocssw you installed through SeaDAS 8.0.0, getanc.py is now getanc in the ocssw/bin directory.
Did you install ocssw through SeaDAS 8.0.0? It seems to me that you are running getanc.py from the old ocssw you installed through SeaDAS-7.5.3.
Can you try to find the ocssw you installed through SeaDAS 8.0.0, getanc.py is now getanc in the ocssw/bin directory.
-
- Posts: 4
- Joined: Thu May 13, 2021 4:29 pm America/New_York
Re: getanc for GOCI from command line
Thanks for your help.
Here is the output from Seadas/System Information:
******************
Main Application Platform:
Application Version: SeaDAS 8.0.0 (Beta)
Installation Directory: /Users/paul/seadas
Data Directory: /Users/paul/.seadas8
Configuration: /Users/paul/seadas/etc/snap.properties
WARNING!! File '/Users/paul/seadas/etc/snap.properties' does not exist
Configuration2: /Users/paul/.seadas8/etc/snap.properties
VM Configuration: /Users/paul/seadas/bin/pconvert.vmoptions
WARNING!! File '/Users/paul/seadas/bin/pconvert.vmoptions' does not exist
VM Configuration (gpt): /Users/paul/seadas/bin/gpt.vmoptions
WARNING!! File '/Users/paul/seadas/bin/gpt.vmoptions' does not exist
Desktop Specification Version: 8.0.1
Engine Specification Version: 8.0.1
JRE: Java(TM) SE Runtime Environment 1.8.0_201-b09
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Memory: 3641 MiB
OCSSWROOT (Java Env): null
Python3 Directory:
/usr/local/bin/python3
SeaDAS Toolbox:
SeaDAS Toolbox Specification Version: 1.0.0
Configuration: /Users/paul/.seadas8/etc/seadas.properties
OCSSW Root Directory: /Users/paul/seadas/ocssw
OCSSW Log Directory: /
OCSSW Location: local
Environment {$OCSSWROOT} (external): null
WARNING!: An environment variable for OCSSWROOT exists which does not match the GUI configuration. The GUI will use '/Users/paul/seadas/ocssw' as the ocssw root inside the GUI.
-----------------------------------------------
NASA Science Processing (OCSSW):
Environment {$OCSSWROOT}: /Users/paul/seadas/ocssw
Environment {$OCDATAROOT}: /Users/paul/seadas/ocssw/share
l2gen version: msl12 9.5.1-V2021.1 (Jan 27 2021 10:11:03)
l2bin version: 6.2.0
l3bin version: 5.13
l3mapgen version: l3mapgen 2.3.0-V2021.1 (Jan 27 2021 10:10:06)
Installed Missions: ['aquarius', 'avhrr', 'czcs', 'goci', 'hico', 'meris', 'aqua', 'terra', 'mos', 'ocm1', 'ocm2', 'octs', 'oli', 'osmi', 'seawifs', 'viirsn', 'viirsj1']
General System and Software:
Operating system: MacOS 10.16
Python version: 2.7.16
Java version: 16
*******************
My install was recent, and it was Seadas 8.0.0
***************************
I have one getanc.py installed, and it is in $OCSSWROOT/scripts
**************************
There are two modis_utils.py, however. One is $OCSSWROOT/scripts/modules, and the other is in $OCSSWROOT/bin/modis. Not sure if this matters!
*************************
Here is my $PATH, as other posts have indicated that macOS seems to change the path back to system Python3 rather than installed Python3.
*******************
paul@Pauls-iMac ~ % echo $PATH
/usr/local/opt/python/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/paul/seadas/ocssw/opt/bin:/Users/paul/seadas/ocssw/bin:/usr/local/opt/python/libexec/bin
Here is the output from Seadas/System Information:
******************
Main Application Platform:
Application Version: SeaDAS 8.0.0 (Beta)
Installation Directory: /Users/paul/seadas
Data Directory: /Users/paul/.seadas8
Configuration: /Users/paul/seadas/etc/snap.properties
WARNING!! File '/Users/paul/seadas/etc/snap.properties' does not exist
Configuration2: /Users/paul/.seadas8/etc/snap.properties
VM Configuration: /Users/paul/seadas/bin/pconvert.vmoptions
WARNING!! File '/Users/paul/seadas/bin/pconvert.vmoptions' does not exist
VM Configuration (gpt): /Users/paul/seadas/bin/gpt.vmoptions
WARNING!! File '/Users/paul/seadas/bin/gpt.vmoptions' does not exist
Desktop Specification Version: 8.0.1
Engine Specification Version: 8.0.1
JRE: Java(TM) SE Runtime Environment 1.8.0_201-b09
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
Memory: 3641 MiB
OCSSWROOT (Java Env): null
Python3 Directory:
/usr/local/bin/python3
SeaDAS Toolbox:
SeaDAS Toolbox Specification Version: 1.0.0
Configuration: /Users/paul/.seadas8/etc/seadas.properties
OCSSW Root Directory: /Users/paul/seadas/ocssw
OCSSW Log Directory: /
OCSSW Location: local
Environment {$OCSSWROOT} (external): null
WARNING!: An environment variable for OCSSWROOT exists which does not match the GUI configuration. The GUI will use '/Users/paul/seadas/ocssw' as the ocssw root inside the GUI.
-----------------------------------------------
NASA Science Processing (OCSSW):
Environment {$OCSSWROOT}: /Users/paul/seadas/ocssw
Environment {$OCDATAROOT}: /Users/paul/seadas/ocssw/share
l2gen version: msl12 9.5.1-V2021.1 (Jan 27 2021 10:11:03)
l2bin version: 6.2.0
l3bin version: 5.13
l3mapgen version: l3mapgen 2.3.0-V2021.1 (Jan 27 2021 10:10:06)
Installed Missions: ['aquarius', 'avhrr', 'czcs', 'goci', 'hico', 'meris', 'aqua', 'terra', 'mos', 'ocm1', 'ocm2', 'octs', 'oli', 'osmi', 'seawifs', 'viirsn', 'viirsj1']
General System and Software:
Operating system: MacOS 10.16
Python version: 2.7.16
Java version: 16
*******************
My install was recent, and it was Seadas 8.0.0
***************************
I have one getanc.py installed, and it is in $OCSSWROOT/scripts
**************************
There are two modis_utils.py, however. One is $OCSSWROOT/scripts/modules, and the other is in $OCSSWROOT/bin/modis. Not sure if this matters!
*************************
Here is my $PATH, as other posts have indicated that macOS seems to change the path back to system Python3 rather than installed Python3.
*******************
paul@Pauls-iMac ~ % echo $PATH
/usr/local/opt/python/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Users/paul/seadas/ocssw/opt/bin:/Users/paul/seadas/ocssw/bin:/usr/local/opt/python/libexec/bin
-
- Subject Matter Expert
- Posts: 711
- Joined: Tue Feb 09, 2021 5:42 pm America/New_York
- Been thanked: 9 times
Re: getanc for GOCI from command line
It seems to me that you had ocssw installed in /Users/paul/seadas/ocssw from SeaDAS 7.5, and then had it overwritten when you "Install/Update OCSSW" through SeaDAS 8.0. Now you have two versions of ocssw mixed in that /Users/paul/seadas/ocssw directory.
You might want to delete /Users/paul/seadas/ocssw first and "Install/Update OCSSW" again.
And then you can run
./seadas/ocssw/bin/getanc -d /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322001641.he5
You might want to delete /Users/paul/seadas/ocssw first and "Install/Update OCSSW" again.
And then you can run
./seadas/ocssw/bin/getanc -d /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322001641.he5
-
- Posts: 4
- Joined: Thu May 13, 2021 4:29 pm America/New_York
Re: getanc for GOCI from command line
Thank you. directory ocssw has been deleted.
On the re-install, if I only wish to process GOCI now, then should I only check that mission and wait until later if I wish to process other mission products? And, in Other, should I click Clean Install (or any other buttons)? Sorry for the naivete, just want to get it right!
On the re-install, if I only wish to process GOCI now, then should I only check that mission and wait until later if I wish to process other mission products? And, in Other, should I click Clean Install (or any other buttons)? Sorry for the naivete, just want to get it right!
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Re: getanc for GOCI from command line
Paul,
Since you manually deleted the ocssw tree, there is nothing to more to clean
Yes, you can just select GOCI under the mission data section if all you are currently interested in is GOCI. If later you decide to process other sensors, just go back to the install/update gui and select the additional sensors.
Sean
Since you manually deleted the ocssw tree, there is nothing to more to clean

Yes, you can just select GOCI under the mission data section if all you are currently interested in is GOCI. If later you decide to process other sensors, just go back to the install/update gui and select the additional sensors.
Sean
-
- Posts: 4
- Joined: Thu May 13, 2021 4:29 pm America/New_York
Re: getanc for GOCI from command line
Success! GUI works, and command line test yielded:
paul@Pauls-iMac ~ % ./seadas/ocssw/bin/getanc --disable-download /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322071641.he5
ancillary_data.db
Encountered more than 1 Scene Start time tag. Using 1st value.
Encountered more than 1 Scene end time tag. Using 1st value.
icefile=/Users/paul/seadas/ocssw/var/anc/2021/080/N202108000_SEAICE_NSIDC_24h.hdf
met1=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108106_MET_NCEPR2_6h.hdf
met2=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108112_MET_NCEPR2_6h.hdf
met3=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108112_MET_NCEPR2_6h.hdf
ozone1=/Users/paul/seadas/ocssw/var/anc/2021/080/N202108000_O3_AURAOMI_24h.hdf
ozone2=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108100_O3_AURAOMI_24h.hdf
ozone3=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108100_O3_AURAOMI_24h.hdf
sstfile=/Users/paul/seadas/ocssw/var/anc/2021/080/N2021080_SST_OIV2AV_24h.nc
I am puzzled however about the 7.5.3 version stuff. I am working on a relatively new machine on which I had not installed Seadas previously. I downloaded and installed v. 8.0.0. Hmmm...
paul@Pauls-iMac ~ % ./seadas/ocssw/bin/getanc --disable-download /Users/paul/Downloads/COMS_GOCI_L1B_GA_20210322071641.he5
ancillary_data.db
Encountered more than 1 Scene Start time tag. Using 1st value.
Encountered more than 1 Scene end time tag. Using 1st value.
icefile=/Users/paul/seadas/ocssw/var/anc/2021/080/N202108000_SEAICE_NSIDC_24h.hdf
met1=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108106_MET_NCEPR2_6h.hdf
met2=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108112_MET_NCEPR2_6h.hdf
met3=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108112_MET_NCEPR2_6h.hdf
ozone1=/Users/paul/seadas/ocssw/var/anc/2021/080/N202108000_O3_AURAOMI_24h.hdf
ozone2=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108100_O3_AURAOMI_24h.hdf
ozone3=/Users/paul/seadas/ocssw/var/anc/2021/081/N202108100_O3_AURAOMI_24h.hdf
sstfile=/Users/paul/seadas/ocssw/var/anc/2021/080/N2021080_SST_OIV2AV_24h.nc
I am puzzled however about the 7.5.3 version stuff. I am working on a relatively new machine on which I had not installed Seadas previously. I downloaded and installed v. 8.0.0. Hmmm...