l2bin error

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
chevyyang
Posts: 2
Joined: Fri Sep 16, 2011 6:03 pm America/New_York
Answers: 0

l2bin error

by chevyyang » Wed May 20, 2020 11:32 am America/New_York

Hi, everyone, help~ :smile:
When I run l2bin, I got error like this:
"line 1479 of /home/seadas/ocssw/src/l2bin/l2bin.c: Permission denied"
my code is:
"l2bin infile=List_s3a.ls ofile=bin_s3a resolve=1 flaguse=LAND,HILT l3bprod=Kd490 prodtype=regional noext=1"
I did not install ocssw in /home/seadas/ocssw/src/l2bin/. I did give the right path to OCSSWROOT by adding
export SEADASPATH={my rootpath}/program/oceancolor
export PATH=$PATH:$SEADASPATH/bin
export OCSSWROOT=$SEADASPATH/ocssw
export OCSSDEBUG=0
source $OCSSWROOT/OCSSW_bash.env
in my ~/.bash_profile. And source ~/.bash_profile
I install ocssw by doing this:
"./install_ocssw.py --install-dir=$OCSSWROOT --direct-broadcast --git-branch=v7.5 "
the error only showed up when i process s3a level2 data (processed by l2gen), however it is ok when i process aqua level 2 data.
another qustion is I can run l2gen successfully when I did not give a value to "iop_opt". the program will be crashed when I set iop_opt=2 (gsm). The error information is  "segmentation fault (core dumped)" . my system is ‘Linux iz0xi38jexm12p93ki3hqmz 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux’.

Another weird thing is I can process some of virrs L1 data downloaded from
https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/5000/VNP01/2016/141/. it works sometimes (mostly not . I am sure all data had been downloaded completely and successfully)
But i can not process viirs l1 data from here:
wget https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/V2017241160000.L1A_SNPP.nc
wget https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/V2017241160000.GEO-M_SNPP.nc
l2gen ifile=V2017241160000.L1A_SNPP.nc geofile=V2017241160000.GEO-M_SNPP.nc ofile=V2017241160000.L2_SNPP_FAI.nc l2prod=rhos_nnn
The error is  “/home/seadas/viirs_l1/src/geolocate_viirs/geolocate_viirs_input.cpp:115 - Could not find sensor directory for the file V2017241160000.L1A_SNPP.nc”.
But again i did not install seadas there. And I do not have any folder named by “src” in my $OCSSWROOT path. I only have “bin  OCSSW_bash.env  ocssw-src  opt  scripts  share  var” in my $OCSSWROOT.

I set my ocssw path in ~/.bashrc.
I am totally lost. What should i do? Thank you very much for your help and time.

Tags:

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 257
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

l2bin error

by OB SeaDAS - dshea » Wed May 20, 2020 11:39 am America/New_York

"line 1479 of /home/seadas/ocssw/src/l2bin/l2bin.c: Permission denied"

is the line of source code that had the problem.  l2bin can not create the output netCDF file.  Make sure you have permission to write in the current directory and that the file you are trying to create does not exist.

don

chevyyang
Posts: 2
Joined: Fri Sep 16, 2011 6:03 pm America/New_York
Answers: 0

l2bin error

by chevyyang » Wed May 20, 2020 11:51 am America/New_York

thanks a lot for your reply
but i did set the right path for the output. and i run it as a root user.
and, i am confused, why i did not have the path in the warning information:
"/home/seadas/ocssw/src/l2bin/l2bin.c  "   I mean I can not find the script "l2bin.c" and the folder "src" in ocssw.
i am afraid the environment or something else is wrong.

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 257
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

l2bin error

by OB SeaDAS - dshea » Wed May 20, 2020 12:15 pm America/New_York

"/home/seadas/ocssw/src/l2bin/l2bin.c" is where the source file is located on the computer at NASA that made the binary.  The normal install of OCSSW does not install the source files.  You can install the source if you would like, but they are not needed to run the binaries.

Running OCSSW programs as root is never a good idea.

send me your exact command line that you are trying to run and what directory you are running in.

don

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 257
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

l2bin error

by OB SeaDAS - dshea » Wed May 20, 2020 12:27 pm America/New_York

"./install_ocssw.py --install-dir=$OCSSWROOT --direct-broadcast --git-branch=v7.5 "

will only install MODIS Aqua and Terra.  If you want to process VIIRS and s3a sensors you need to install the data files for these.

./install_ocssw.py --install-dir=$OCSSWROOT --direct-broadcast --viirsn --viirsj1 --olci --git-branch=v7.5

don

sidsaini445
Posts: 6
Joined: Tue Jan 09, 2024 2:16 am America/New_York
Answers: 0

Re: l2bin error

by sidsaini445 » Tue Jan 09, 2024 2:18 am America/New_York

It looks like there are a few issues going on here:
The "Permission denied" error from l2bin is likely because it does not have write permission to the directory specified in the infile/ofile paths. Make sure the user running l2bin has read/write access.
The segmentation fault with l2gen when setting iop_opt=2 could indicate some compatibility issue between the GSM model and your system/libraries. I would try updating SeaDAS/OCSSW to the latest version to see if that resolves it.
For the VIIRS data specifically:
When downloading from LAADS, sometimes the files can get corrupted/incomplete. I'd try re-downloading to rule that out.
For the files from oceandata.sci.gsfc.nasa.gov, it looks like l2gen is expecting a different directory structure that matches the standard SeaDAS setup. Since you installed OCSSW to a custom location, you may need to set some additional environment variables to point l2gen to the right sensor configs.
Some things to try:
Set OCSSW_VIIRS_SENSOR to the path containing your VIIRS sensor config files
Double check that none of the SeaDAS/OCSSW scripts/bins are still pointing to the default /home/seadas path
Fully uninstall/reinstall OCSSW if issues persist
Let me know if any of those suggestions help resolve the problems!


Sidsaini
Last edited by ASDC - David W. on Tue Jan 09, 2024 2:11 pm America/New_York, edited 1 time in total.
Reason: removing website advertising link

Post Reply