OCSSW Processor - MODIS

Please enter here to ask a question about any NASA Science related topics!
gnwiii
Posts: 566
Joined: Fri Jan 29, 2021 5:51 pm America/New_York

Re: OCSSW Processor - MODIS

by gnwiii » Wed Apr 07, 2021 10:42 am America/New_York

vito609 wrote: Wed Apr 07, 2021 8:26 am America/New_York It seems that exporting OCSSWROOT path did not work. I also tried adding OCSSWROOT="/home/torres609/SeaDAS/ocssw" to the /etc/environment and /etc/profile, but it didn't also help with the error.
It did help get past the original error, now you have a new error. Editing the system startup files doesn't take effect immediately -- you may need to log out and back in. Some editors can't be trusted to stick to ASCII characters, so it is also possible that the text looks different to bash than it does on-screen.
vito609 wrote: Wed Apr 07, 2021 8:26 am America/New_York Downloading files into /home/torres609/SeaDAS/ocssw/var/common
OBPG session started
This indicates that the settings from "OCSSW_bash.env" are being used, so
progress has been made.

vito609 wrote: Wed Apr 07, 2021 8:26 am America/New_York Is there additional things I can check or do in order to address this error?
Lets hope someone recognizes
vito609 wrote: Wed Apr 07, 2021 8:26 am America/New_York ocssw/bin/seadasutils/JsonUtils.py", line 165, in get_links
with session.get(url, stream=True, timeout=self.timeout) as response:
AttributeError: _enter_
If not, there are troubleshooting steps you can take, but there is no point duplicating work others have done. It could be useful to post details of your Python3 version ("python3 --version"). Have you added updates to Ubuntu 16.04?

Edit:
I fired up a VM with Ubuntu 16.04, saw the same error using the default
python3.5, then installed Python3.9 from the deadsnakes PPA and still get:

Code: Select all

Installing lut - modisa
Traceback (most recent call last):
  File "/home/seadas/ocssw/bin/update_luts", line 63, in <module>
    luts.get_luts()
  File "/home/seadas/ocssw/bin/seadasutils/LutUtils.py", line 132, in get_luts
    check_times=True)
  File "/home/seadas/ocssw/bin/seadasutils/JsonUtils.py", line 198, in download_allfiles
    all_links = self.get_links(url, regex=regex)
  File "/home/seadas/ocssw/bin/seadasutils/JsonUtils.py", line 165, in get_links
    with session.get(url, stream=True, timeout=self.timeout) as response:
AttributeError: __exit__
Error: return = 1 : trying to run command = /home/seadas/ocssw/bin/ocssw_runner --ocsswroot /home/seadas/ocssw update_luts modisa

Tags:

vito609
Posts: 13
Joined: Mon Apr 05, 2021 2:01 am America/New_York

Re: OCSSW Processor - MODIS

by vito609 » Wed Apr 07, 2021 4:36 pm America/New_York

Hello.

So I researched about the error and it seems that switching to python3 made me need to reinstall 'requests'. I did pip3 install requests, and the update_luts worked!

So in the SeaDAS GUI, I tried modis_L1A GUI and it worked fined giving an output of L1A. However when I tried to used modis_GEO, I got the following error:

Using modis_GEO GUI in SeaDAS error:
///
execution exception: java.io.IOException: modis_GEO failed with exit code 1.
Check log for more details.
Determining required attitude and ephemeris files...
ancillary_data.db
Searching database: /home/torres609/SeaDAS/ocssw/var/ancillary_data.db

Input file: /home/torres609/Downloads/A2009023054500.L1A_LAC
Sensor : modisa
Start time: 2009023054500
End time : 2009023055000

OBPG session started
Downloading A2009023054500.anc.server ( 0.00 MBs)

[==================================================]...Done
Downloading 'PM1ATTNR.P2009023.0400.003' to /home/torres609/SeaDAS/ocssw/var/anc/2009/023
* ERROR: Authentication Failure retrieving:
* oceandata.sci.gsfc.nasa.gov/ob/getfile/PM1ATTNR.P2009023.0400.003
* Please check that your ~/.netrc file is setup correctly and has proper permissions.
*
* see: https://oceancolor.gsfc.nasa.gov/data/download_methods/
*

Failed to identify/retrieve attitude/ephemeris required to geolocate /home/torres609/Downloads/A2009023054500.L1A_LAC; exiting.
///

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

Re: OCSSW Processor - MODIS

by OB.DAAC - SeanBailey » Wed Apr 07, 2021 4:55 pm America/New_York

Well, did you follow the suggestion in that error report?

* ERROR: Authentication Failure retrieving:
* oceandata.sci.gsfc.nasa.gov/ob/getfile/PM1ATTNR.P2009023.0400.003
* Please check that your ~/.netrc file is setup correctly and has proper permissions.
*
* see: https://oceancolor.gsfc.nasa.gov/data/download_methods/
*

vito609
Posts: 13
Joined: Mon Apr 05, 2021 2:01 am America/New_York

Re: OCSSW Processor - MODIS

by vito609 » Wed Apr 07, 2021 6:19 pm America/New_York

Thanks. Creating a ~/.netrc file made the processors work.

Although, I have one last question. How do I select L1C as the output for l2gen processor? When I load the modis L1B as the input, the default ofile resulted to L2 data.

gnwiii
Posts: 566
Joined: Fri Jan 29, 2021 5:51 pm America/New_York

Re: OCSSW Processor - MODIS

by gnwiii » Wed Apr 07, 2021 6:52 pm America/New_York

vito609 wrote: Wed Apr 07, 2021 4:36 pm America/New_York Hello.

So I researched about the error and it seems that switching to python3 made me need to reinstall 'requests'. I did pip3 install requests, and the update_luts worked!
Glad it is working. I came to the same conclusion. You may find that the new "requests" cause problems for the Ubuntu system scripts, in which case you can use pip3 to uninstall the new version and reinstall the distro package. The, for python3.6 you can install for your login with:

Code: Select all

$ python3.6 -m pip install --user requests

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

Re: OCSSW Processor - MODIS

by OB.DAAC - SeanBailey » Thu Apr 08, 2021 8:27 am America/New_York

vito609 wrote: Wed Apr 07, 2021 6:19 pm America/New_York Although, I have one last question. How do I select L1C as the output for l2gen processor? When I load the modis L1B as the input, the default ofile resulted to L2 data.
As the name implies, l2gen generates L2 files. We currently do not have an L1C processor.

BTW, you should start a new thread when you have a new question.

Regards,
Sean

vito609
Posts: 13
Joined: Mon Apr 05, 2021 2:01 am America/New_York

Re: OCSSW Processor - MODIS

by vito609 » Thu Apr 08, 2021 8:52 am America/New_York

Thank you for your help. Will post on a new thread in the future.

Post Reply