getanc for GOCI from command line

Please enter here to ask a question about any NASA Science related topics!
Post Reply
paul.hill.dal.ca
Posts: 4
Joined: Thu May 13, 2021 4:29 pm America/New_York

getanc for GOCI from command line

by paul.hill.dal.ca » Thu May 13, 2021 4:41 pm America/New_York

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.

Tags:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 64
Joined: Tue Feb 09, 2021 5:42 pm America/New_York

Re: getanc for GOCI from command line

by OB SeaDAS - xuanyang02 » Thu May 13, 2021 5:29 pm America/New_York

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.

paul.hill.dal.ca
Posts: 4
Joined: Thu May 13, 2021 4:29 pm America/New_York

Re: getanc for GOCI from command line

by paul.hill.dal.ca » Fri May 14, 2021 5:44 am America/New_York

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

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 64
Joined: Tue Feb 09, 2021 5:42 pm America/New_York

Re: getanc for GOCI from command line

by OB SeaDAS - xuanyang02 » Fri May 14, 2021 10:39 am America/New_York

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

paul.hill.dal.ca
Posts: 4
Joined: Thu May 13, 2021 4:29 pm America/New_York

Re: getanc for GOCI from command line

by paul.hill.dal.ca » Fri May 14, 2021 11:12 am America/New_York

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!

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1147
Joined: Wed Sep 18, 2019 6:15 pm America/New_York

Re: getanc for GOCI from command line

by OB.DAAC - SeanBailey » Fri May 14, 2021 11:19 am America/New_York

Paul,

Since you manually deleted the ocssw tree, there is nothing to more to clean :D
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

paul.hill.dal.ca
Posts: 4
Joined: Thu May 13, 2021 4:29 pm America/New_York

Re: getanc for GOCI from command line

by paul.hill.dal.ca » Fri May 14, 2021 11:55 am America/New_York

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...

Post Reply