Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)
Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)
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.
---
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.
Filters:
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)
The end of the download page explains how to set the OCSSWROOT environment variable:
Sean
export OCSSWROOT=[SeaDAS_install_dir]/ocssw
source $OCSSWROOT/OCSSW_bash.env
Sean
Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)
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?
---
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?
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Trouble Command Line Scripting SeaDAS l2bin/l3map (OCDATAROOT not defined)
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.:
Sean
You can verify the result of the environment set up using the printenv command, e.g.:
$ printenv |grep OC
Sean