L2gen error - file A2017072165000.L1A_LAC

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

L2gen error - file A2017072165000.L1A_LAC

by beiral » Wed Feb 19, 2020 11:58 am America/New_York

Hello.
I have got to generate a L2 file from the "A2017072165000.L1A_LAC.bz2" file. I use a .shell script to run it from Debian terminal. But only in this single file that
I highlighted above, my script generates a .L2 file corrupted, whith only some kbytes of size, and consequently the L3 is not generated. I've already runned the shell script on other files and the processing works properly.
I've just attached the error which my terminal code shows. I've already tried processing this file manually on SeaDas GUI, but it doesn't work either....again, this happens only with this file.

Thanks for any help.
Paulo Eduardo Beiral - Student of Oceanography - UFES - Brazil.
attachment 1

Tags:

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 258
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

L2gen error - file A2017072165000.L1A_LAC

by OB SeaDAS - dshea » Wed Feb 19, 2020 12:29 pm America/New_York

This file works fine for me with l2gen version 9.5.0-V2019.3.  Looks like l2gen is only allocating 3 L1 buffers when it needs 5.  Can you give me the exact command line you are using to run l2gen.  A smaller filter kernel can cause this problem.

don

beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

L2gen error - file A2017072165000.L1A_LAC

by beiral » Wed Feb 19, 2020 12:48 pm America/New_York

# Script to process files L1A -> GEO -> L1B -> L2 -> L3b -> L3m to one directory.

for FILE in *L1A_LAC*
#for FILE in *L3b*
do

  # The line below assumes an extension, and creates a base name without that extension
  BASE=`echo $FILE |awk -F. '{ print $1 }'`
  GEOFILE=${BASE}.GEO
  L1BFILE1KM=${BASE}.L1B_LAC
  L1BFILEHKM=${BASE}.L1B_HKM
  L1BFILEQKM=${BASE}.L1B_QKM
  L2FILE=${BASE}.L2
  L3bFILE=${BASE}.L3b
  L3mFILE=${BASE}.L3m

  # process the L1A file to GEO
  modis_GEO.py -v $FILE -o $GEOFILE

  # process the L1A/GEO subscene files to L1B
  modis_L1B.py -v $FILE $GEOFILE -o $L1BFILE1KM -k $L1BFILEHKM -q $L1BFILEQKM

  # process the L1B subscene to L2
#  645 e 859 nm
  l2gen ifile=$L1BFILE1KM geofile=$GEOFILE ofile=$L2FILE l2prod='Rrs_645,Rrs_859' aer_opt=-1 aer_wave_short=1240 aer_wave_long=2130 filter_file=/usr/local/seadas-7.5.3/ocssw/share/modis/msl12_filter_custom_turb.dat resolution=250 cloud_thresh=0.018 cloud_wave=2130.0 maskhilt=off maskstlight=on north=-17.4 south=-20.7 east=-38.2 west=-40.6
  
  # process the L2 subscene to L2bin to generate the L3 grid files
  l2bin ifile=$L2FILE ofile=$L3bFILE resolution='Q' flaguse='NONE'

  # process the L3 grid files
  l3mapgen ifile=$L3bFILE ofile=$L3mFILE resolution='qkm' interp='area' fudge=2 north=-17.4 south=-20.7 east=-38.2 west=-40.6

done
attachment 1

beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

L2gen error - file A2017072165000.L1A_LAC

by beiral » Wed Feb 19, 2020 12:59 pm America/New_York

Edit: This is the msl12_filter.dat file which I edit some parameters, and as I said, it works properly with other files.
attachment 1

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

L2gen error - file A2017072165000.L1A_LAC

by OB.DAAC - SeanBailey » Wed Feb 19, 2020 3:34 pm America/New_York

By defining a filter kernel with less than 5 lines, you have overridden the default kernel.  The SST code requires a (minimum) 5 line kernel.
Since you are not outputting SST products, you can set proc_sst=0 and l2gen will be happy to run with a 3 line kernel.

Sean

beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

L2gen error - file A2017072165000.L1A_LAC

by beiral » Thu Feb 20, 2020 7:39 am America/New_York

Thank you very much Sean, by adding this proc_sst=0 parameter in my script, it worked perfectly!
Again, thank's very much!:grin:

beiral
Posts: 14
Joined: Mon Feb 11, 2019 3:12 pm America/New_York
Answers: 0

L2gen error - file A2017072165000.L1A_LAC

by beiral » Thu Feb 20, 2020 11:29 am America/New_York

Hi Sean, sorry to bother you, but I still got some doubts....
I've processed a whole database of many years using my script and ms12_filter.dat as I sent here, and It just worked perfectly to all files.
Do you got any ideia why it happens only with this file?
And what is exactly this filter kernel? I searched for it on SeaDas help, and on Google, but I couldn't undersant well....
Thanks for any help!

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

L2gen error - file A2017072165000.L1A_LAC

by OB.DAAC - SeanBailey » Fri Feb 21, 2020 10:27 am America/New_York

Without more details, no, I cannot explain. 
The previous version of l2gen had different requirements for the SST code, so if you processed the other data with that version, that might explain it.

But, for the offending file,  the output from l2gen you provided is quite specific as to the problem:

-E- /home/seadas/ocssw/src/l2gen/sst.c line 3024: L1 queue size of 3 is too small for 3 line Bt40 average around line 0.

This is should not be unique to this file.
That L1 queue size it refers to is the number of L1 lines read into memory during processing.  The filter file can alter this number based on the kernel size defined.
Your filter file required 3.  The SST code requires 5.  By default proc_sst=1, so by default ( whether you ask for sst or not), l2gen will call the sst code to compute sst.

Sean

Post Reply