Page 1 of 1
Using IOP models with simulated water reflectances
Posted: Fri Oct 18, 2019 8:47 am America/New_York
by erehm
I would like to use l2gen to create IOP estimates (from GIOP, GSM, QAA algorithms) using my own (simulated) normalized water-leaving reflectances ?^N_w= pi*Rrs, not TOA values.
How can I do this? I see that I can turn off atmospheric correction (atmocor = 0), but I believe Rayleigh correction is still enabled.
Instead, will I have to write my own C-wrapper around the IOP algorithm code?
Thanks,
/eric
Using IOP models with simulated water reflectances
Posted: Fri Oct 18, 2019 10:11 am America/New_York
by gnwiii
The current maintainers of l2gen
should be able to tell you how practical it would be to adapt l2gen
to your needs. If you can find a way to adapt l2gen
in a way that could be included in the OCSSW code, that might encourage people developing IOP algorithms to implement and test them using l2gen
, and could open the door to other projects -- things like sensitivity studies of existing products.
Using IOP models with simulated water reflectances
Posted: Fri Oct 18, 2019 10:56 am America/New_York
by OB.DAAC-EDL - SeanBailey
Eric,
The l2gen code in the latest version of SeaDAS includes the ability to process a "SeaBASS-formatted" ASCII file with Rrs values.
There are some limitations, in that it requires the "sensor" to be defined and be one of the sensors supported by l2gen.
e.g.:
l2gen ifile=seawifs.sb ofile=seawifs.nc suite=IOP
$ cat seawifs.sb
/begin_header
/sensor=SEAWIFS
/delimiter=comma
/fields=lat,lon,rrs_412,Rrs_443,rrs490,rrs510,rrs555,rrs670,rrs765,rrs865
/end_header
0,0,0.006438,0.005564,0.004904,0.0044,0.003881,0.000687,0.0004,0.0003
0,0,0.006438,0.005564,0.004904,0.0044,0.003881,0.000687,0.0004,0.0003
0,0,0.006438,0.005564,0.004904,0.0044,0.003881,0.000687,0.0004,0.0003
...
Hope this helps,
Sean
Using IOP models with simulated water reflectances
Posted: Mon Oct 21, 2019 12:07 pm America/New_York
by erehm
Thanks Sean. Updated my occsw data processors (MacOS 10.14.5 / Mojave) to latest release, but
l2gen is throwing an error somewhere...
(Note that I am not specifiying rrs_469, rrs_555, rrs_645 in my SeaBASS file. Is that the problem?)
My input file is hyperlinked to Google Drive so you can try it.
$ head 2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.sb
/begin_header
/sensor=MODISA
/delimiter=comma
/fields=lat,lon,rrs_412,rrs_443,rrs_488,rrs_531,rrs_547,rrs_667,rrs_678,rrs_748,rrs_869
/end_header
70,0,0.00237494733963876,0.001802678576363,0.00305618178078461,0.00274473108361568,0.00282988522200625,0.00061756705068773,0.00054362050715546,2.12463647013988e-05,-1.31791231999896e-05
...
$ l2gen ifile=2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.sb ofile=2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.iop.nc suite=IOP
Input file 2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.sb is a SeaBASS text file.
Loading default parameters from /Applications/seadas-7.5.1/ocssw/share/common/msl12_defaults.par
Loading default parameters for MODISA from /Applications/seadas-7.5.1/ocssw/share/modis/msl12_defaults.par
Loading default sub-sensor parameters for MODISA from /Applications/seadas-7.5.1/ocssw/share/modis/aqua/msl12_defaults.par
Loading parameters for suite IOP from /Applications/seadas-7.5.1/ocssw/share/modis/msl12_defaults_IOP.par
Loading command line parameters
Loading user parameters for MODISA
...
Reading Thuillier_F0.dat
terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'
Abort trap: 6
Using IOP models with simulated water reflectances
Posted: Thu Oct 24, 2019 10:06 am America/New_York
by OB.DAAC-EDL - SeanBailey
Eric,
Seems there are a couple of issues. One is that the "seabass" reader wasn't updated with knowledge of the mission/sensor reorganization of the OCSSW data tree. The other is that it doesn't have logic to handle sensors with an IR band set (like MODIS).
...so, for now it'll work for "SeaWiFS" like inputs. We'll eventually release an update to fix the above issues. One idea we've considered is defining a "generic" sensor with a variable wavelength set to remove the restriction of matching an existing sensor's wavelength set. ...that may take more time to implement, so no promises :wink:
Sean
Using IOP models with simulated water reflectances
Posted: Thu Oct 24, 2019 10:53 am America/New_York
by erehm
Thanks, Sean. One question:
"...for now it'll work for "SeaWiFS" like inputs."
Just to clarify, does that mean I must specify only SeaWiFS rrs_XXX wavelengths in my SeaBASS input file?
Best,
/eric
Using IOP models with simulated water reflectances
Posted: Thu Oct 24, 2019 1:11 pm America/New_York
by OB.DAAC-EDL - SeanBailey
well, my seawifs wvl example worked :grin:
OCTS or MERIS might also work
Sean
Using IOP models with simulated water reflectances
Posted: Thu Oct 24, 2019 11:59 pm America/New_York
by erehm
Thanks. FYI, MERIS appears to work:
/begin_header
/sensor=MERIS
/delimiter=comma
/fields=lat,lon,rrs_413,rrs_443,rrs_490,rrs_510,rrs_560,rrs_620,rrs_665,rrs_681,rrs_709
/end_header
70,0,0.00237494733963876,0.001802678576363,0.00305618178078461,0.00274473108361568,0.00282988522200625,0.00061756705068773,0.00054362050715546,2.12463647013988e-05,-1.31791231999896e-05
70,0,0.00289074801791505,0.00178790918163039,0.00313129814984807,0.00272298031062988,0.00259184749689683,0.000616008950839469,0.000543586711948629,-0.000134371067116515,-2.98023443686986e-05
...
$ l2gen ifile=2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.sb ofile=2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.iop.nc suite=GSM
Input file 2601pix_tgt_sim3_thv30_dphi90_for_polymer.csv.polymer.sb is a SeaBASS text file.
Loading default parameters from /Applications/seadas-7.5.1/ocssw/share/common/msl12_defaults.par
Loading default parameters for MERIS from /Applications/seadas-7.5.1/ocssw/share/meris/msl12_defaults.par
Loading parameters for suite GSM from /Applications/seadas-7.5.1/ocssw/share/meris/msl12_defaults_GSM.par
Loading command line parameters
Loading user parameters for MERIS
Loading characteristics for MERIS
Opening sensor information file /Applications/seadas-7.5.1/ocssw/share/meris/msl12_sensor_info.dat
...
Processing Completed
Re: Using IOP models with simulated water reflectances
Posted: Thu Jul 13, 2023 12:29 pm America/New_York
by aewindle110
Hi Sean,
I'm interested in running my own in situ Rrs formatted as .sb file into l2gen, similar to what Eric did. I was wondering if you ever got around to defining a "generic sensor" with a variable wavelength set? If not, do you know when this process will work with OCI wavelengths?
Thanks,
Anna
Re: Using IOP models with simulated water reflectances
Posted: Mon Aug 26, 2024 12:27 pm America/New_York
by krbosse
I'm also wondering if there are any updates on this front. I would like to use this approach to generate IOP products for a selection of VIIRS-SNPP reflectance spectra generated by the NESDIS MSL12 atmospheric correction. I tried running the following l2gen command on the command line, but unlike Eric's issue, I get a segmentation fault error (see terminal output below). I tested this on machines using Seadas version 8.2.0 and 9.0.0 and got the same result. I'm not sure if the issue is a software version problem, an input problem, or that the l2gen code doesn't work for VIIRS data.
Thanks,
Karl
l2gen ifile=rrs_sub2.sb ofile=rrs_sub2.csv suite=IOP
Loading default parameters from $HOME/SeaDAS/ocssw/share/common/msl12_defaults.par
Input file rrs_sub2.sb is a SeaBASS text file.
Loading characteristics for (null)
Segmentation fault (core dumped)
My sb file looks like the following:
$ cat rrs_sub2.sb
/begin_header
/sensor=VIIRSN
/delimiter=comma
/fields=lat,lon,Rrs_410,Rrs_443,Rrs_486,Rrs_551,Rrs_671
/end_header
46.9769,-89.3498,0.001228757,0.001919586,0.00301041,0.002499228,3.72e-05
46.8894,-89.3182,7.61e-05,0.001676645,0.003524996,0.005403434,0.000441996
47.4894,-87.6765,0.000844379,0.001513711,0.002342734,0.001913019,7.46e-05
46.9123,-91.8043,0.002242353,0.003247004,0.004460861,0.005199287,0.000792602
46.8292,-91.755,0.002800014,0.003249486,0.00443893,0.006052064,0.001216319