Page 1 of 1
Error using ocssw calibration on VIIRS
Posted: Mon Oct 21, 2024 4:30 pm America/New_York
by slsmit34
Hello,
I know I have asked many l2gen questions in the past week, so thank you in advance for your patience.
I am currently trying to run l2gen on L1A VIIRS-SNPP data (scene:
SNPP_VIIRS.20230712T180000.L1A.nc). I am starting by running
calibrate_viirs on the L1A scene to generate L1B. To do this, I did
Code: Select all
install_ocssw -t V2024.6 --viirsn --viirs_l1 --install_dir /path/l2gen/ocssw
which installed folders
viirsj1 and
viirsn files to
/ocssw/var,
viirs to
/ocssw/share, and
viirs_l1_benchmark to
/ocssw. It also output the following:

- downloaded_ocssw.PNG (34.42 KiB) Not viewed yet
However, I get this error when running calibrate_viirs:

- calibrate_viirs_error.PNG (81.24 KiB) Not viewed yet
By the way,
polar_wander.ascii does exist in my directory
/ocssw/var/viirsn and has a size of 2.2MB.
Thank you!
Best,
Sami
Re: Error using ocssw calibration on VIIRS
Posted: Mon Oct 21, 2024 9:58 pm America/New_York
by OB ODPS - towens
Are you setting the correct environment?
export OCSSWROOT=path_to_your_ocssw_directory
export OCVARROOT=$OCSSWROOT/var
We stage the operational GEO files so you don't have to make them.
Replace "L1A" with "GEO" in the filename.
Tommy
Re: Error using ocssw calibration on VIIRS
Posted: Tue Oct 22, 2024 12:52 pm America/New_York
by slsmit34
Hi Tommy,
Thanks. So if I am understanding correctly, I can download the GEO file and use that as a parameter for l2gen? Do I still need to generate L1B with calibrate_viirs then? Can I just generate an l2 directly from l1a with a command like this:
Code: Select all
"l2gen ifile={l1a_file} ofile={output_name} geofile={geo_file}"
Is there a need to use getanc or calibrate_viirs then?
Best,
Sami
Re: Error using ocssw calibration on VIIRS
Posted: Tue Oct 22, 2024 1:25 pm America/New_York
by OB ODPS - towens
Yes, to make an L2 file you should provide the ancillary data. We make an L1B file from the L1A and GEO and then pass the L1B to l2gen.
I think l2gen has the code to make L2 directly from L1A and GEO but I will defer to one of our SeaDAS experts on running that...
Tommy
Re: Error using ocssw calibration on VIIRS
Posted: Tue Oct 22, 2024 1:41 pm America/New_York
by OB.DAAC-EDL - SeanBailey
Yes, l2gen can take a VIIRS L1A file as input (performing the calibration on-the-fly), but the VIIRS geolocation and calibration programs share code, so if you are unable to process the geoocation, you will likely have issues calibrating - either with calibrate_viirs or l2gen.
Sean
Re: Error using ocssw calibration on VIIRS
Posted: Tue Oct 22, 2024 2:00 pm America/New_York
by slsmit34
Thanks all for the support.
So the process to go from L1A to L2 includes two steps, each with ifile, ofile, and geofile:
Is this correct? I'm not sure where getanc goes in this process.
Re: Error using ocssw calibration on VIIRS
Posted: Wed Oct 23, 2024 6:59 am America/New_York
by OB.DAAC-EDL - SeanBailey
Yes, that is the process. The getanc call goes before l2gen to identify (and download) the ancillary inputs to the l2gen process. BTW, calibrate_viirs can output three different files, thus in place of ofile it uses l1bfile_[img,mod,dnb].
BTW, the calibrate_viirs code includes the bits of the geolocation code necessary to do the calibration, so a geofile is not required as input...which is why I said in my previous post that if geolocate_viirs fails due to an incorrect configuration or missing LUTs, calibrate_viirs is also likely to fail.
Sean