Recreating OCBG Quasi True Color VIIRS Images from Command Line

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York
Answers: 0

Recreating OCBG Quasi True Color VIIRS Images from Command Line

by simkins » Thu Oct 19, 2017 11:30 am America/New_York

I'm currently unable to recreate the quasi true color image located on the Ocean Color Browse website. l1brsgen allows me to get pretty close, but the bowtie effect ruins the image. l1mapgen removes most of the bowtie effect, but the image isn't as clear as I would like and I can't seem to find the right projection. I'll provide a reproducible workflow and would really appreciate any help on this matter. I apologize if something similar had been posted before, I was unable to find anything.

*** Example ***
Goal: Recreate OCBG.png
Data found here:
https://oceancolor.gsfc.nasa.gov/cgi/browse.pl?sub=level1or2&per=8D&day=17447&prm=CHL&set=10&mon=17410&sen=v0&rad=0&frc=0&n=42.5390625&w=-70.6640625&id=1508264774.30949&cn=43.43&cs=41.69&cw=-71.57&ce=-69.72&dnm=D&file=V2017286183600.L2_SNPP_OC_CHLOR_A_BRS&ndx=4&wid=400&hgt=404

Command Line Syntax:
#Using l1brsgen and then R to convert l1brsgen_example.hdf to l1brsgen_example.png
l1brsgen ifile=V2017286183600.L1A_SNPP.nc geofile=V2017286183600.GEO-M_SNPP.nc ofile=l1brsgen_example.hdf subsamp=1 atmocor=1 resolution=1000 oformat=1 oformat_depth=24bit par=pars.txt

#Using l1mapgen
l1mapgen  ifile=V2017286183600.L1A_SNPP.nc geofile=V2017286183600.GEO-M_SNPP.nc ofile=l1mapgen_example.png

***End Example Syntax***

Do I need to use l1brsgen in conjunction with l1mapgen? Does anyone have an example to follow for this?



Tags:

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Recreating OCBG Quasi True Color VIIRS Images from Command Line

by gnwiii » Thu Oct 19, 2017 7:43 pm America/New_York

Try holding your screen upside down with:

$ l2brsgen ifile=V2017286183600.L2_SNPP_OC.nc ofile=V2017286183600.L2_SNPP_OC_BRS.png oformat=PNG apply_pal=true
Loading default parameters from /home/seadas/ocssw/run/data/common/l2brsgen_defaults.par
Loading default parameters for VIIRSN from /home/seadas/ocssw/run/data/viirsn/l2brsgen_defaults.par
ifile=V2017286183600.L2_SNPP_OC.nc
ofile=V2017286183600.L2_SNPP_OC_BRS.png
prod=chlor_a
oformat=PNG


OB.DAAC - SeanBailey
User Services
User Services
Posts: 1469
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 5 times

Recreating OCBG Quasi True Color VIIRS Images from Command Line

by OB.DAAC - SeanBailey » Thu Oct 19, 2017 9:01 pm America/New_York

The TC browse images on the L1/2 browser are indeed created using l1brsgen.  For VIIRS, the defaults for l1brsgen are the full image with no atmospheric correction applied (well, no Rayliegh correction), however, the images on the browser are subsampled and apply a Rayleigh correction...there's an added bit of voodoo, in that to make sure the subsampling skips the bowtie deleted pixels, we start on the third line :wink:
Add these two parameters to your l1brsgen call:

subsamp=8
sline=3
atmocor=1


Regards,
Sean

Post Reply