how to run the polymer

dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

how to run the polymer

Post by dingky »

I use IDLE to run polyme_cli.py to no avail.Excuse me, how to use polymer
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: how to run the polymer

Post by fsteinmetz »

Hi,
I can not provide help about IDLE, but if you provide me with more information about your issue with polymer_cli.py, I would be happy to help.
Cheers,
François
dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

Re: how to run the polymer

Post by dingky »

I had created an environment and installed required dependencies.however,I was trying to run polymer on sentinel-2 images,there was error message.
runing code: python ./polymer_cli.py S2A_MSIL1C_20170402T024541_N0204_E132_T50RNV_20200727T095734.SAFE

I got the following information:
Traceback (most recent calll last):

File "/home/dingky/ . local/lib/python3.8/site- packages/polymer-v4.13/polymer_ cli.py", line 11, in <module>
from polymer .main import run_ atm_ corr , Level1, Level2
File " /home/dingky/ . local/lib/ python3.8/site packages/polymer-v4.13/polymer /main.py", line 18, in <module>
from polymer . polymer_ main import PolymerMinimizer
ModuleNotFoundError: NO module namedpolymer . polymer_ main .
think you

kind regards

ding
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: how to run the polymer

Post by fsteinmetz »

Dear Ding,
You need to compile the program first, using the command "make".
More information can be found in the file README.md.
Cheers,
François
dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

Re: how to run the polymer

Post by dingky »

Dear François,

Thank you very much for your reply.I've completed to compile the program by
$ make ./polymer4.13/
.Unfortunately, this error still occurs. My Ubuntu system has two versions of python, is it related to this? Thanks for the answers and patience.



kind regards,
ding
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: how to run the polymer

Post by fsteinmetz »

I doubt your command has succeeded, because the command should be "make", in the directory containing the makefile, not "make ./polymer4.13/".
dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

Re: how to run the polymer

Post by dingky »

Dear François,

Thanks for your reply.
I think i get it.Thank you very much for your help!
kind regards
ding
dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

Re: how to run the polymer

Post by dingky »

Hi François,

When I run command

Code: Select all

$ make auxdata_all
the error code is as follows:

Code: Select all

auxdata/common/no2_clmatology.hdf:FAILED
md5sum:WARNING:1 computed checksum did NOT match
make:*** [makefile:47: auxdata_common] Error 1
After that, I executed the code:

Code: Select all

$ ./polymer_cli.py /home/ding/LC08_L1TP_121038_20160115_20170405_01_T1_MTL.txt  /home/ding/outfile.hdf
and I received the following prompt:

Code: Select all

Traceback (most recent call last):
  File "./polymer_cli.py", line 34, in <module>
    run_atm_corr(Level1(args.input_file),
  File "/home/ding/polymer-v4.13/polymer/level1.py", line 36, in __init__
    self.autodetect()
  File "/home/ding/polymer-v4.13/polymer/level1.py", line 61, in autodetect
    raise Exception('Unable to detect sensor for file "{}"'.format(b))
Exception: Unable to detect sensor for file "LC08_L1TP_121038_20160115_20170405_01_T1_MTL.txt
what should I do and how do I deal with landsat-OLI data?
Thanks!
kind regards
ding
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: how to run the polymer

Post by fsteinmetz »

Hi,

It seems that the download of "auxdata/common/no2_climatology.hdf" has failed, could you try to remove this file and try again ?
By the way, there was a letter "i" missing in the filename you mentioned.

Concerning the processing of Landsat8 files :
* You need to provide a directory name, not a txt file. e.g. "LC80140282017275LGN00/"
* The autodetection of Landsat8 files is currently not implemented. I have made a quick modification of level1.py so that it should work. Please see the file level1.py, zipped and attached here.

Cheers,
François
You do not have the required permissions to view the files attached to this post.
dingky
Posts: 23
Joined: Tue Jun 30, 2020 3:56 am
company / institution: China University of Geosciences
Location: China

Re: how to run the polymer

Post by dingky »

Dear François,

Thank you very much for your help, I am trying it
kind regards
ding
Post Reply