Page 1 of 1

Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 2:24 am
by Mengmeng
Hello!

When I ran this code "./make_L1C.py A2004102000000.L1A_LAC" to convert MODIS L1A file to L1C, I got an error that "modis_L1B.py: not found".

How to fix this problem? Thank you in advance!

Kind regards,
Mengmeng.

Re: Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 6:22 am
by Mengmeng
Hello!

Finally I converted MODISA data from L1A to L1C using l2gen in seadas. Then I ran the polymer algorithm for the L1C data with this code: ./polymer_cli.py A2004102000000.L1C_LAC A2004102000000.polymer.hdf
But I got this error:
assert isdir(directory), 'Directory {} does not exist. Please create it, by default it will be automatically populated with ancillary data. Please see help for class Ancillary_NASA for more details.'.format(directory)
AssertionError: Directory ANCILLARY/METEO/ does not exist. Please create it, by default it will be automatically populated with ancillary data. Please see help for class Ancillary_NASA for more details.

I wonder how to fix this error? Thank you in advance!

Kind regards,
Mengmeng.

Re: Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 7:30 am
by fsteinmetz
Hello Mengmeng,
You have to just create this directory, as written in the error message.

Code: Select all

mkdir -p ANCILLARY/METEO/

Re: Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 7:59 am
by Mengmeng
Hello François,

Thank you! I have made that directory. Then I got another error: KeyError: 'solz'

The variable 'solz' is in 'level1_nasa.py', but I wonder how to fix this error?

Thank you in advance!

Kind regards,
Mengmeng.

Re: Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 8:52 am
by fsteinmetz
Hi,
How did you generate your L1C ?
If you used make_L1C.py, your file should not end with '.L1C_LAC', and it should contain solz.
Cheers

Re: Converting MODISA L1A file to L1C

Posted: Thu Apr 15, 2021 9:52 am
by Mengmeng
Hi François,

I got the L1C_LAC file from l2gen in seadas and I just used make_L1C.py to convert L1A to L1C. Then I ran the polymer algorithm again, it worked. So you are right about the L1C file. Thank you very much for your help!

Kind regards,
Mengmeng.