L2gen L1 Landsat 8 Processing for Inland Lake

Please enter here to ask a question about any NASA Science related topics!
Post Reply
arumsey
Posts: 1
Joined: Tue Mar 05, 2019 2:17 pm America/New_York

L2gen L1 Landsat 8 Processing for Inland Lake

by arumsey » Mon May 20, 2019 12:54 pm America/New_York

Hello,
I am attempting to use the l2gen tool through SEADAS to process a Landsat 8 image and extract remote sensing reflectances (Rrs) and chlorophyl-a values (chlor_a) for a small lake in New York. I realized that the current land mask is very coarse and when applied covers small lakes. I looked through previous posts and found that assigning a null land mask (land=$OCDATAROOT/common/landmask_null.dat) and setting the maskland values to 'on' when running l2gen will allow for the calculation of Rrs values and chlor_a for small lakes. However, I noticed that these outputs are not geolocated.

1. Is there away to geolocate these outputs through SEADAS?
2. Is there another way to get the same output, but have it be georeferenced?
3. Is this land mask issue in the process of being resolved in the form of a software update?

I ask these questions because I want to extract the chlor_a values around an in-situ sampling point in ArcMap. When I load the layer into Arc, it is not georeferenced.

Thank you,
Amanda

Tags:

OB WebDev - norman
Subject Matter Expert
Subject Matter Expert
Posts: 136
Joined: Tue Feb 09, 2021 8:19 am America/New_York

L2gen L1 Landsat 8 Processing for Inland Lake

by OB WebDev - norman » Mon May 20, 2019 4:18 pm America/New_York

Hi Amanda,

The l2gen program does not change the projection of the Landsat 8 scenes during
processing.  The output pixels have the same universal transverse Mercator
coordinates as the corresponding input pixels.  In addition, l2gen stores the
latitudes and longitudes of each pixel in separate datasets within the file.

I grabbed a recent Landsat 8 scene over New York and ran the following.

l2gen ifile=LC08_L1TP_015030_20190508_20190508_01_RT_MTL.txt  \
          ofile=LC08_L1TP_015030_20190508_20190508_01_RT.L2.nc \
          l2prod=rhos_443,rhos_561,rhos_655,rhos_865,chlor_a,Rrs_nnn \
          land=$OCDATAROOT/common/landmask_null.dat \
          maskland=0

(Note that I use "maskland=0" in my invocation.)
Here are the resulting contents of the output file.

h5dump -n LC08_L1TP_015030_20190508_20190508_01_RT.L2.nc
HDF5 "LC08_L1TP_015030_20190508_20190508_01_RT.L2.nc" {
FILE_CONTENTS {
group      /
dataset    /bands_per_pixel
group      /geophysical_data
dataset    /geophysical_data/Rrs_1609
dataset    /geophysical_data/Rrs_2201
dataset    /geophysical_data/Rrs_443
dataset    /geophysical_data/Rrs_482
dataset    /geophysical_data/Rrs_561
dataset    /geophysical_data/Rrs_655
dataset    /geophysical_data/Rrs_865
dataset    /geophysical_data/chlor_a
dataset    /geophysical_data/l2_flags
dataset    /geophysical_data/rhos_443
dataset    /geophysical_data/rhos_561
dataset    /geophysical_data/rhos_655
dataset    /geophysical_data/rhos_865
group      /navigation_data
dataset    /navigation_data/cntl_pt_cols
dataset    /navigation_data/cntl_pt_rows
dataset    /navigation_data/latitude
dataset    /navigation_data/longitude
dataset    /navigation_data/tilt
dataset    /number_of_bands
dataset    /number_of_lines
dataset    /number_of_reflective_bands
dataset    /pixel_control_points
dataset    /pixels_per_line
group      /processing_control
group      /processing_control/flag_percentages
group      /processing_control/input_parameters
group      /scan_line_attributes
dataset    /scan_line_attributes/clat
dataset    /scan_line_attributes/clon
dataset    /scan_line_attributes/csol_z
dataset    /scan_line_attributes/day
dataset    /scan_line_attributes/detnum
dataset    /scan_line_attributes/elat
dataset    /scan_line_attributes/elon
dataset    /scan_line_attributes/msec
dataset    /scan_line_attributes/mside
dataset    /scan_line_attributes/slat
dataset    /scan_line_attributes/slon
dataset    /scan_line_attributes/year
group      /sensor_band_parameters
dataset    /sensor_band_parameters/F0
dataset    /sensor_band_parameters/Tau_r
dataset    /sensor_band_parameters/aw
dataset    /sensor_band_parameters/bbw
dataset    /sensor_band_parameters/k_no2
dataset    /sensor_band_parameters/k_oz
dataset    /sensor_band_parameters/vcal_gain
dataset    /sensor_band_parameters/vcal_offset
dataset    /sensor_band_parameters/wavelength
}
}


Does your ArcMap not recognize the UTM projection, or is it unable to read
the latitude and longitude datasets?  (I have no experience with ArcMap.)

Regards,
Norman

P.S. Note that l2gen is not yet able to handle high latitude scenes that are mapped
to a polar stereographic projection (it's on the list of things to be fixed), but that
would not affect images of New York.

P.P.S.  I don't know what the status of the land mask used by l2gen is.  I leave that for
someone else in the group to answer.

OB WebDev - norman
Subject Matter Expert
Subject Matter Expert
Posts: 136
Joined: Tue Feb 09, 2021 8:19 am America/New_York

L2gen L1 Landsat 8 Processing for Inland Lake

by OB WebDev - norman » Tue May 21, 2019 12:19 pm America/New_York

One more short post script:

When working with Landsat 8 data, I have found that I can often make
a decent radiometric land mask for the scene in question by fiddling
with the contrast of the rhos_865 product from l2gen.

Norman

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 221
Joined: Mon Apr 07, 2008 4:40 pm America/New_York

L2gen L1 Landsat 8 Processing for Inland Lake

by OB SeaDAS - knowles » Wed May 22, 2019 9:00 am America/New_York

Hi Amanda,

The land mask data of SeaDAS is around 1km resolution.  You can turn off the land masking by just adding proc_ocean=2 as one of your l2gen arguments.  This will force all pixels to be treated as ocean and there will be no land mask.  Alternatively you can do what you mentioned regarding assigning the null land mask.  It's the same effect.

The output is in fact georeferenced.  If you open the output level2 file in the SeaDAS GUI you can see the latitude and longitude bands and the fact that SeaDAS recognizes the geocoding.  Although the Landsat 8 data is actually mapped data, the fact that is it "mapped" is not recognized in the level2 output file.  l2gen treats all pixels as unmapped and provides the latitude and longitude individually for each pixel.

Regarding creating a high resolution land mask, the SeaDAS GUI does provide a 50m land mask so you could apply the higher resolution mask within the SeaDAS GUI.  This will create a land mask along with a band called "water_fraction".  You can then export the file (File > Export > NetCDF4-CF).   Note that the mask won't be exported but the water_fraction band will (0=water and 100=land).   If ArcMap requires a boolean band for masking, then within SeaDAS there is the Math Band Tool and you can create a land mask band with the expression "LandMask ? 1 : 0" making sure to deselect "Virtual" in the Math Band GUI.  This will create a band called something like "new_band_1" which you can rename to "landmask" if you wish via the Mask Manager GUI.

Also note that you could additionally crop/extract the file within SeaDAS GUI.

If ArcMap cannot recognize latitude and longitude bands and requires mapped data, then one option is that the SeaDAS GUI also provide a Reprojection Tool for mapping the data.

Note: if the GUI steps are useful to you and you need to do this on many files there are command line options using SeaDAS GPT (see Help > Cookbooks > GPT Cookbook)

Danny

Post Reply