The forum is locked.

The Ocean Color Forum has transitioned over to the Earthdata Forum (https://forum.earthdata.nasa.gov/). The information existing below will be retained for historical reference. Please sign into the Earthdata Forum for active user support.

- By avmehta Date 2020-07-08 22:10 Edited 2020-07-08 23:25
Hello,
   I am using l2gen to get HICO L2 data.  My question is about 'Derived Geophysical Parameters'. Are all the options valid for HICO?
Also, I see multiple algorithm options for certain parameters -- e.g. Kd 490, sst, Zsd (Sechhi Depth).  Is there any default recommended?
I also  have the same question for OLCI, MSI, and OLI! So far I have calculated cholr_a for all of them but wondering if all the geophysical parameters are derived for these sensors.
Also,
When I try to run l2gen for HICO, I get the following message:
  " Reading geometry limiting angles of ATREM
     ATREM Angle_Limit File=/pathname/atren_angle)limit.nc
     ncopen: filename abscf_gas.nc: No such file or directory"

Thank you.
Amita
- By seanbailey Date 2020-07-09 14:29
Amita,

Most algorithms can be computed with HICO...but not all.  SST for example.  That requires  thermal IR bands that HICO does not have.  If you ask l2gen to create a product that the sensor cannot support, it'll let you know :grin:

There are indeed multiple algorithms for a number of products.  There are a set of algorithms that we deem "default", and if you run l2gen without setting the products to generate, the defaults will be made.  These are listed in the $OCDATAROOT/<sensor>[/platform]/msl12_defaults.par file (or in the suite default file defined in that file, usually OC, so msl12_defaults_OC.par).  For HICO, they are: l2prod=aot_868 angstrom Rrs_vvv chlor_a chl_ocx Kd_490 pic poc

If it's not in that list, the choice is up to the user as to which to produce.

As for the ncopen: filename abscf_gas.nc: No such file or directory" issue.  That file is under $OCDATAROOT/hico/.  Make sure you've installed the HICO data tables.  You can do so via:
install_ocssw.py -b v7.5 --hico

However, it seems the code in current SeaDAS release expects the file to be in the working directory. 
We'll see about fixing that in the next release.

Until then, you can make it work by putting a symbolic link to the file, e.g.:

$ cd <directory where l2gen is to be run>
$ ln -s $OCDATAROOT/hico/abscf_gas.nc .


Sean
- By avmehta Date 2020-07-09 20:29 Edited 2020-07-09 20:51
Thanks much Sean.
I am  running l2gen for HICO  on  SeaDAS GUI. I see the absc_gas.nc file on my Mac in /seadas-7.5.3/ocssw/share/hico directory.
I moved the file to /seadas-7.5.3/ocssw/share/common where atrem_angle_limit.nc is and just got read before I get the 'No such file or directory' message for the absc_gas.nc file. Still l2gen can't find it! Not sure where it is looking for the file.

Thanks again.
Amita
- By seanbailey Date 2020-07-10 11:41
In the working directory...the one from which you launch l2gen.  No need to move it, just use a symbolic link.
- By avmehta Date 2020-09-09 18:24
Hi Sean,
     Getting back to HICO processing on GUI again after weeks! I tried what you suggested -- I found l2g3n in /ocssw/bin/. In this directory I used
      ln -s $OCDATAROOT/hico/abscf_gas.nc .
      Then I opened the GUI and tried to run l2gen with a HICO file. But I still get the same error:
    
      ncopen: filename abscf_gas.nc: No such file or directory

  Not sure how to resolve this!
  Thank you.
  Amita
- By jomoga Date 2020-09-09 19:31
Amita,

I have looked at the code that opens this file and it is looking for it in the $OCDATAROOT/common directory.  Try moving the file there.

Joel
- By avmehta Date 2020-09-09 19:53
Hi Joel,
  That is the first place I had copied this file to (/seadas-7.5.3/ocssw/share/common)! Still I get the same error.
Thanks.
Amita
- By gnwiii Date 2020-09-09 23:44
The "working directory" is generally not the "bin" directory that contains l2gen.  When you run l2gen using the GUI, the environment is set using the $OCSSWROOT/scripts/ocssw_runner.sh.  You can edit this script to add a line such as echo "0 -- working directory is $PWD" > ~/ocssw_runner_pwd.text just before the final line ($*).
- By avmehta Date 2020-09-10 13:21
Thanks  for the info George.
In ocssw/scripts I only see python scripts!  When I grep  ocssw_runner I get the following:

install_ocssw.py:        commandStr = os.path.join(installDir, 'scripts', 'ocssw_runner')
install_ocssw.py:        commandStr = os.path.join(installDir, 'run', 'scripts', 'ocssw_runner')
install_ocssw.py:    commandStr = os.path.join(scriptsDir, 'ocssw_runner')
install_ocssw.py:        commandStr = os.path.join(scriptsDir, 'ocssw_runner')

I do not know python!

Once I am able to run l2gen for HICO to get L1 to L2 on GUI on my Mac and check results, I will do bulk processing on my Linux server.

Also, I downloaded  HICO files (.bz2) using direct ftp and use .ISS file in the GUI. If I go through OC L1&L2 Data Browser I get .nc files which GUI does not recognize it seems!

One more question: is it still true that HICO bands >720 nm are not processed for Rrs? Can we get Rhot (and may be Rhos) for all bands?

Sorry for my ignorance/confusion and so many questions as I have not worked with HICO data before.

Thanks again.
Amita
- By seanbailey Date 2020-09-11 13:38
Amita,
The ocssw_runner script is part of SeaDAS and is a bash wrapper to ensure the environment is properly set up when the programs are called by the GUI.

The GUI does recognize the netCDF version of the HICO files we distribute.  By "direct ftp", I assume you mean our Direct Data Access page - (which BTW, is HTTPS, not FTP).  You should preferentially choose the .nc files, as these have an improved navigation over the older HDF5 files (the ISS.bz2).  A small fraction of the data were not able to be processed as netCDF, so we've left the older files accessible.

The l2gen code will only output Rrs in the 'visible' spectrum, which we define a max wavelength of  720nm (above that we consider it NIR...until it's SWIR... then TIR :grin: ).

In the version of l2gen currently distributed with SeaDAS (9.5.0-V2019.3), the abscf_gas.nc needs to be linked to the working directory - which is the directory you launch l2gen from, not the directory l2gen resides in.

Sean
- By gnwiii Date 2020-09-11 16:02
I think the "current working directory" for users who run l2gen (and other processing programs) from the GUI is a bit of a mystery.  I don't know if there is a simple rule for all use cases, but one way to be sure is to edit the ocssw_runner script to write the $PWD value to a file in the user's home directory.   I'd try that myself, but most of my processing is done on the command line.
- By dshea Date 2020-09-11 16:14
As I recall the working dir that the GUI uses is the directory that the ifile is in.  I believe that was an attempt to keep me sane when SeaDAS was launched by the Finder on a Mac or some linux desktop launcher. I would have to go back and check the Java code that I wrote many years ago to be sure.

running l2gen from the command line is your best bet.  Then you know what the working directory is.

The abscf_gas.nc file bug has already been fixed, so this will not be a problem in the next release.

don