Page 1 of 1

getanc.py for MSI L1C data

Posted: Tue Jun 26, 2018 2:48 pm America/New_York
by bbbarnes
Any advice on getting getanc.py to run for S2A MSI L1C? I get an error with this command -

seahawk 222 :/tmp/brian_port_miami4766/D2018011T17RNJ/S2A_MSIL1C_20180111T160501_N0206_R054_T17RNJ_20180111T174508.SAFE> getanc.py ./manifest.safe
Traceback (most recent call last):
  File "/optics1/software/seadas/seadas-7.5/ocssw/scripts/getanc.py", line 182, in <module>
    g.setup()
  File "/optics1/software/seadas/seadas-7.5/ocssw/scripts/modules/anc_utils.py", line 224, in setup
    senchk = ProcUtils.check_sensor(self.file)
  File "/optics1/software/seadas/seadas-7.5/ocssw/scripts/modules/ProcUtils.py", line 392, in check_sensor
    fileattr = readMetadata(inp_file)
  File "/optics1/software/seadas/seadas-7.5/ocssw/scripts/modules/MetaUtils.py", line 210, in readMetadata
    (key, value) = str(line).split('=')
ValueError: too many values to unpack

However, l2gen works fine:

seahawk 223 :/tmp/brian_port_miami4766/D2018011T17RNJ/S2A_MSIL1C_20180111T160501_N0206_R054_T17RNJ_20180111T174508.SAFE> l2gen ifile=./manifest.safe ofile=./test.L2
Found Sentinel-2 product: SENTINEL-2 MSI Level-1C User Product
Input file ./manifest.safe is a valid Sentinel 2A MSI file.
...

Obviously, without getanc, l2gen uses default climatologies:
Opening meteorological files.
  met1   = /optics1/software/seadas/seadas-7.5/ocssw/share/common/met_climatology_v2014.hdf
  met2   =
  met3   =
  ozone1 = /optics1/software/seadas/seadas-7.5/ocssw/share/common/ozone_climatology_v2014.hdf
  ozone2 =
  ozone3 =
  no2    = /optics1/software/seadas/seadas-7.5/ocssw/share/common/no2_climatology_v2013.hdf

Any advice appreciated. manifest.safe file attached.
Thanks
-brian
attachment 1

getanc.py for MSI L1C data

Posted: Tue Jun 26, 2018 3:26 pm America/New_York
by OB.DAAC-EDL - SeanBailey
Instead of passing a file, use the --start= option when calling getanc.py
...you'll have to provide the time to YYYYDDDHHMMSS format.

Sean

getanc.py for MSI L1C data

Posted: Tue Jun 26, 2018 3:44 pm America/New_York
by bbbarnes
Perfect! Thanks, Sean.
-brian