Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
nsuser
Posts: 2
Joined: Sun Jan 27, 2019 1:25 pm America/New_York
Answers: 0

Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)

by nsuser » Fri Apr 05, 2019 6:40 pm America/New_York

I am trying to validate some Harmful Algal Bloom detection algorithms using in situ data. To this end I have had success in using the SeaDAS GUI to bin and map level 2 netCDF4 files to create level 3 mapped netCDF4 data files (which is kind of ideal for me since I can process these files in ArcMap using a preexisting script). I want to script this process for many files but am having trouble. To start with, I tried running the l2bin executable (from seadas-7.5.3/ocssw/bin) from the terminal, and get the following output:
---
l2bin 5.0.0 (Dec 19 2018 12:40:11)
OCDATAROOT environment variable is not defined.
Input listing file: "" not found.
---

I do not know what the OCDATAROOT variable is supposed to be set to (Is it ~/Applications/seadas<version number>?) or why it was unset to begin with. Am I going about this the wrong way? Any help would be appreciated.

From the somewhat similar forum post here (https://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?tid=5106) I would speculate that there may be a conflict with a preexisting installation, but I uninstalled the previous version a while ago and reinstalled the new one and that still did not fix things.

Tags:

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1470
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 5 times

Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)

by OB.DAAC - SeanBailey » Fri Apr 05, 2019 7:30 pm America/New_York

The end of the download page explains how to set the OCSSWROOT environment variable:

export OCSSWROOT=[SeaDAS_install_dir]/ocssw
source $OCSSWROOT/OCSSW_bash.env


Sean

nsuser
Posts: 2
Joined: Sun Jan 27, 2019 1:25 pm America/New_York
Answers: 0

Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)

by nsuser » Mon Apr 08, 2019 10:33 pm America/New_York

Hello Sean, thank you for your reply. I believe I have set up my .bash_profile (the Mac equivalent of .bashrc, as I understand) as it is supposed to be, yet I am still encountering the same issue. Here are the lines I have added for SeaDAS:

---
export OCSSWROOT=/Applications/seadas-7.5.3/ocssw
source $OCSSWROOT/OCSSW_bash.env
export PATH=$PATH:/Applications/seadas-7.5.3/bin:$PATH
---

I am confident that the paths above are correct, so I am still not sure what the issue is. I would presume that the OCDATAROOT variable is different from the OCSSWROOT variable, but is that not correct?

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1470
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 5 times

Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)

by OB.DAAC - SeanBailey » Tue Apr 09, 2019 11:07 am America/New_York

OCDATAROOT gets defined when you source OCSSW_bash.env - it will be $OCSSWROOT/share in a typical installation

You can verify the result of the environment set up using the printenv command, e.g.:

$ printenv |grep OC

Sean

Post Reply