Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / SeaDAS General Questions / l2mapgen apply_pal parameter (1149 hits)
By Andrew L. Date 2008-04-16 23:39
I want to echo the earlier other user's thanks for the l2mapgen facility.  It will allow us to easily see what the L2 files being cranked out by our batch driven processes look like.

What are the possible values for the apply_pal paramater?  I would like to get psuedocolor images, preferably in some relatively simple way.
By Andrew L. Date 2008-04-17 16:09
Humm, looks like I broke my new toy...  I have a particular L2 file which consistantly causes l2mapgen to seg fault:

[a@otter l2mapgen-crash]$ l2mapgen ifile=S2008096002004.L2_GAC ofile=S2008096002004.L2_GAC.ppm prod=chlor_a
Single HDF input
Segmentation fault

Other files work fine when processed with similar command line options

[a@otter l2mapgen-crash]$ l2mapgen ifile=S2008096033726.L2_GAC ofile=S2008096033726.L2_GAC.ppm prod=chlor_a
Single HDF input
Mapping data to:
N: 86.18645
S: -77.60188
W: 80.93169
E: -137.35741
Scale Type      : LOG
Data Min (abs)  :   0.0100
Data Max (abs)  :  64.5654
Scale Slope     :   0.0152
Scale Intercept :  -2.0000
Opening HDF file, S2008096033726.L2_GAC ...
pix: 248 scan: 3930
Mapping swath pixels to Plate Carree projection...
.............................................................................
Finished Plate Carree projection mapping
Computing means...
Number of output pixels (15745 of a possible 740000) < threshold (5.00%). Output image not generated.
[alaroy@otter l2mapgen-crash]$

If it helps the SeaDAS team debug this I can post the offending L2 file to an anonymous ftp site.
By @mike Date 2008-04-17 20:27
Andrew we just fixed a boundary coordinates bug in the l2mapgen code that I'm guessing you may want regardless of whether it fixes your segfault problem. If so, what operating system(s) do you use for SeaDAS? Can you also put the offending L2 file on an ftp site so I can ensure there isn't a separate problem?

And regarding your palette question, our apply_pal expert may be able to look into this tomorrow.
By @mike Date 2008-04-17 21:22
I grabbed S2008096002004.L2_GAC directly from our site and your l2mapgen command works for me on both Fedora Core 6 and Mac OS X with the original SeaDAS 5.2 l2mapgen binary. Could you please download the file again to make sure it isn't corrupt. If it's not, can you tell me your operating system and also your kernel version (uname -r)?
By Andrew L. Date 2008-04-17 21:35
Mike,

I'll contact you via e-mail.
By Andrew L. Date 2008-04-18 17:35
I'll post this just in case others experience the seg fault problem.  The problem was a currupt L2 input file.  I regenerated the L2 file from the L1A and the problem went away.
By Andrew L. Date 2008-04-18 17:37
Back to the apply_pal question, I guessed at apply_pal=1 and got some very "garish" looking psuedo color images.  Is there a standard list of possible palettes somewhere?
By @sean Date 2008-04-18 19:53
Andrew,

Yes, the arguments available to apply_pal binary (0 or 1).
A good option to use with apply_pal is mask (also binary).

Here's your scene with and without  the mask option using the following commands:
l2mapgen ifile=S2008096002004.L2_GAC ofile=S2008096002004.L2_GAC.chl.mskd prod=chlor_a apply_pal=1 threshold=0.1 mask=1 width=400
l2mapgen ifile=S2008096002004.L2_GAC ofile=S2008096002004.L2_GAC.chl  prod=chlor_a apply_pal=1 threshold=0.1 width=400

You can also change the color palette used:
l2mapgen ifile=S2008096002004.L2_GAC ofile=S2008096002004.L2_GAC.chl.mskd.sstpal prod=chlor_a palfile=$SEADAS/data/common/palette/sst.pal threshold=0.1 mask=1 width=400

Any 256 element RGB triplet palette can be used.

Regards,
Sean

By Andrew L. Date 2008-04-22 17:36
Sean,

Thanks for the pointers!  I was able to make psuedocolor browse images that meet our needs.  The output definitly looks a lot less "gaudy" without the reddish-purple background.
Previous Next Up Topic SeaDAS / SeaDAS General Questions / l2mapgen apply_pal parameter (1149 hits)



Responsible NASA Official: Gene C. Feldman
Webmaster: Norman A. Kuring
Authorized by: Gene C. Feldman
Updated: 27 November 2007
Privacy Policy and Important Notices NASA logo