l2mapgen is not exporting pixel values correctly.
Posted: Tue May 07, 2019 1:31 pm America/New_York
Hi,
I'm using python for processing some L2 images in order to produce AFAI, the result is stored on L2 file and when using SeaDAS 7.5.1 data seems ok as you can see in the imagen below.

But when exporting to tiff using l2mapgen I only get pixels value of 0.0010000000474974513.
l2mapgen ifile=A2019111192000_L2_OC.nc ofile=A2019111192000_L2_OC_afai.tif prod=afai outmode=tiff flaguse=LAND,HILT,CLDICE,LOWLW stype=1
I'm using Python to create a new NetCDF variable as follow:
with nc.Dataset(filename_in, 'a', format='NETCDF4') as src:
geo = src['geophysical_data']
newVar = geo.createVariable('afai', 'f4', ('number_of_lines', 'pixels_per_line'), fill_value=vars[0]._FillValue)
newVar.long_name = 'Alternative floating algae index'
newVar.standard_name = 'afai'
newVar.valid_min = -1.00000
newVar.valid_max = 1.00000
newVar.units = 'mg m^3'
newVar[:] = afai_arr
I'm using python for processing some L2 images in order to produce AFAI, the result is stored on L2 file and when using SeaDAS 7.5.1 data seems ok as you can see in the imagen below.

But when exporting to tiff using l2mapgen I only get pixels value of 0.0010000000474974513.
l2mapgen ifile=A2019111192000_L2_OC.nc ofile=A2019111192000_L2_OC_afai.tif prod=afai outmode=tiff flaguse=LAND,HILT,CLDICE,LOWLW stype=1
I'm using Python to create a new NetCDF variable as follow:
with nc.Dataset(filename_in, 'a', format='NETCDF4') as src:
geo = src['geophysical_data']
newVar = geo.createVariable('afai', 'f4', ('number_of_lines', 'pixels_per_line'), fill_value=vars[0]._FillValue)
newVar.long_name = 'Alternative floating algae index'
newVar.standard_name = 'afai'
newVar.valid_min = -1.00000
newVar.valid_max = 1.00000
newVar.units = 'mg m^3'
newVar[:] = afai_arr