Polymer processing MSI images

Post Reply
UanGQ1009
Posts: 3
Joined: Wed Sep 25, 2019 1:44 pm
company / institution: University of Copenhagen
Location: Copenhagen

Polymer processing MSI images

Post by UanGQ1009 »

Hi,

I used Polymer 4.10 to process a MSI image by the following codes:
def Polymer_MSI_EU():

FName = '/mnt/share/data/msi_data/S2A_MSIL1C_20150806T102016_N0204_R065_T33VVE_20150806T102012.SAFE/GRANULE/L1C_T33VVE_A000634_20150806T102012/'
run_atm_corr(
Level1_MSI(FName, resolution='20', landmask=GSW()), # if not provided, use the 60m resolution
Level2_NETCDF() # by default, output in the same folder as input
)

But I got the following message:

File "polymer_msi_EU.py", line 18, in polymer_MSI_EU
Level1_MSI(FName, resolution='20', landmask=GSW()), # if not provided, use the 60m resolution
File "/media/sf_data/polymer-v4.10/polymer-v4.10/polymer/level1_msi.py", line 122, in __init__ assert len(xmlfiles) == 1
AssertionError

What should I do to deal with this error message?
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Polymer processing MSI images

Post by fsteinmetz »

Hi,
Although the message is, I agree, not very explicit, it means that the required xml file is not found, but I see nothing wrong with your script.
Could you check in your directory FName, that there is a single xml file named MTD_TL.xml ?
Cheers,
François
UanGQ1009
Posts: 3
Joined: Wed Sep 25, 2019 1:44 pm
company / institution: University of Copenhagen
Location: Copenhagen

Re: Polymer processing MSI images

Post by UanGQ1009 »

Hi,

Thanks a lot. I made a mistake about FName. But I have another question about landmask. When I input parameter of landmask as GSW. But I got an error message as follows:

'Data directory for GSW data (global surface water) does not exist: mkdir -p {}'

What does it mean? Should I download global surface water masks before or not?
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Polymer processing MSI images

Post by fsteinmetz »

No, you just have to create the directory that appears in the error message with the provided command.
The mask will be downloaded automatically when you run the code again.
UanGQ1009
Posts: 3
Joined: Wed Sep 25, 2019 1:44 pm
company / institution: University of Copenhagen
Location: Copenhagen

Re: Polymer processing MSI images

Post by UanGQ1009 »

Thanks a lot for your helps.
Post Reply