Question about OCSSW_bash.env

Please enter here to ask a question about any NASA Science related topics!
Post Reply
roxani2018
Posts: 5
Joined: Fri Jan 29, 2021 11:42 am America/New_York

Question about OCSSW_bash.env

by roxani2018 » Thu May 06, 2021 9:48 pm America/New_York

Hi,

I met a problem when I try to source $OCSSWROOT/OCSSW_bash.env: "/Applications/seadas-7.5.3/ocssw/OCSSW_bash.env:136: = not found". I am not sure what's going on since it worked well before.
How should I solve this problem? THANKS.

Roxani

Tags:

gnwiii
Posts: 605
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

Re: Question about OCSSW_bash.env

by gnwiii » Fri May 07, 2021 8:01 am America/New_York

It looks like you are using macOS (what version?) and SeaDAS 7 but something has changed.

The "= not found" error occurs when a bash-specific script is run with zsh (current default macOS shell, which gives a "%" command prompt). See: "https://www.zsh.org/mla/users/2011/msg00161.html". I think the SeaDAS 8 OCSSW_bash.env works with zsh.

The error suggests something replaced bash in your terminal with zsh. In your terminal, you can try running bash, which should change the command prompt from "%" to "$", and then "source $OCSSWROOT/OCSSW_bash.env". Some Terminal applications have options to specify which shell is used.

See: https://www.howtogeek.com/444596/how-to ... -catalina/ for more detailed explanations with screen captures.

You can edit OCSSW_bash.env to be zsh compatible. It may be useful to learn how to do this as you may encounter other bash-specific scripts.

roxani2018
Posts: 5
Joined: Fri Jan 29, 2021 11:42 am America/New_York

Re: Question about OCSSW_bash.env

by roxani2018 » Sat May 08, 2021 5:29 am America/New_York

Hi!

Thanks a lot for your kindly help.
I use zsh on macOS 10.13.6 and SeaDAS 8 (replace of v7.5.3) works well now.
However a new problem comes up when I use getanc.py to catch ancillary data file: "command not found: getanc.py", it may regards to upgrade of SeaDAS but I am not clear how to solve it. Could you please help me with this new problem?

Best wishes,
Roxani

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

Re: Question about OCSSW_bash.env

by OB.DAAC - SeanBailey » Sat May 08, 2021 8:38 am America/New_York

With SeaDAS 8, most of the python scripts are now 'installed' under $OCSSWROOT/bin and have had the '.py' extension removed. The getanc.py script is one of those, so you can simply drop the .py from the call and it should work.

Sean

roxani2018
Posts: 5
Joined: Fri Jan 29, 2021 11:42 am America/New_York

Re: Question about OCSSW_bash.env

by roxani2018 » Sat May 08, 2021 10:50 am America/New_York

Dear Sean,

I have done as suggested and it works.
Thank you for the quick feedback and it helps a lot.

Best wishes,
Roxani

Post Reply