Ocean Color Forum - Not logged in
Forum Ocean Color Home Help Search Login
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / l2 flags command mode? (locked) (1829 hits)
By antonio Date 2012-03-15 12:43
Hello,

My question is easy, exist some possibility to apply l2 flags to a image display using the command mode of SeaDAS?

Thank you.
Regards, Antonio.
By @sean Date 2012-03-15 19:41
http://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?pid=8516#pid8516
By antonio Date 2012-03-20 11:27
Now I have 2 new questions.

1) How I can change dimensions of l2_flags product to be equal to dimensions of map projection and apply the mask in the projection?

2) How do should be this action in command mode? I mean to apply the mask of l2_flags product to the projection obtain in the previous step.

This is my case:

f = findfile('*L2_LAC_OC*')
n = n_elements( f )
lat = 28
lon = -16
tierra = 255
escala = 3500000

paleta_chl = '/Users/Tony/seadas6.3/config/color_luts/standard/02-standard_chl.lut'
paleta_calcita = '/Users/Tony/seadas6.3/config/color_luts/standard/10-standard_calcite.lut'

load, f[n-1], FTYPE='MODIS', PROD_NAME=['chlor_a',¿'l2_flags'?] & $
mapimg, bands=[1],iproj=8,xsize=800,ysize=800,p0lat=lat,p0lon=lon,scale=escala,ISOTROPIC=1
loadpal, paleta_chl, /file_idl
loadgp, color=5, red=tierra, green=tierra, blue=tierra
display, BAND_NO=2, FBUF=1, smax=65.00, smin=0.01, STYPE='LOG'; LIN o LOG
landmask, FBUF=1, COLOR=5; overlay landmask
cbar, FBUF=1, orient='v', fonttype=-1, charsize=2
out, 'chlo.tiff', FTYPE='tiff', FBUF=1, /CBAR, bk_cbar=0 ; black background
out, 'chlo.png' , FTYPE='png' , FBUF=1, /CBAR, bk_cbar=0 ; black background
out, 'clo.hdf' , fbuf=1, /DATA, ftype='hdf', dfmt=1, win=1


Thank you
Regards
Antonio
By @sean Date 2012-03-20 12:09
The l2_flags are meaningless if you map them.  They have to be applied to the data prior to mapping.
You would have to use the flags to create a mask and then create a new band with the masked data
set to a missing value, then map the new band. 

Or you could use l2bin, which will do this for you.  Then smigen to create a map of the binned data.

Sean
By antonio Date 2012-03-21 12:41 Edited 2012-03-21 12:49
Hello again, Sean

Sorry to ask again for the same subject, but I haven't clear some things. When I apply the mask to a data display, I can't save the image with the mask applied. How can I save this image without lost the mask applied? Now I work with display mode of seadas and when I have the way to make this, I will try to do it with the command mode.

Moreover, can you explain a little more the last sentence "Or you could use l2bin, which will do this for you.  Then smigen to create a map of the binned data"? I say to that all process should be in level_2 and l2bin is related with level_3.

Thanks
Antonio
By @sean Date 2012-03-21 12:50
See: http://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?pid=8516#pid8516

The binner will exclude pixels from binning that are flagged by a set of l2_flags defined in the flaguse parameter.
If you are only interested in creating a mapped image with certain flags masked, l2bin may not be the desired
approach.  However, if you intend to use the data - creating spatial/temporal composites, l2bin may suite your
needs better.  The forum has pletny of posts explaining mapping and binning...

Sean
Previous Next Up Topic SeaDAS / SeaDAS 6.x - General Questions / l2 flags command mode? (locked) (1829 hits)



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