olivierhagolle / Start_maja

To process a Sentinel-2 time series with MAJA cloud detection and atmospheric correction processor
Other
51 stars 15 forks source link

NameError: name 'nomL2' is not defined #22

Closed bim2010 closed 5 years ago

bim2010 commented 5 years ago

Hi Olivier, Here is command I'm typing in: python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t T36UVG -s T36UVG -d 20180503 GIPP_MAJA_1_0_S2AS2B_NATIF maja output:

root@localhost Start_maja]# python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t T36UVG -s T36UVG -d 20180503
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180531T091031_N0206_R050_T36UVG_20180531T111240.SAFE
S2A_MSIL1C_20180531T091031_N0206_R050_T36UVG_20180531T111240.SAFE
20180531
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180528T085641_N0206_R007_T36UVG_20180528T103122.SAFE
S2A_MSIL1C_20180528T085641_N0206_R007_T36UVG_20180528T103122.SAFE
20180528
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE
S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE
20180503
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180521T090601_N0206_R050_T36UVG_20180521T104113.SAFE
S2A_MSIL1C_20180521T090601_N0206_R050_T36UVG_20180521T104113.SAFE
20180521
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180511T090601_N0206_R050_T36UVG_20180511T103619.SAFE
S2A_MSIL1C_20180511T090601_N0206_R050_T36UVG_20180511T103619.SAFE
20180511
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180526T091019_N0206_R050_T36UVG_20180526T125255.SAFE
S2B_MSIL1C_20180526T091019_N0206_R050_T36UVG_20180526T125255.SAFE
20180526
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180508T085601_N0206_R007_T36UVG_20180508T141842.SAFE
S2A_MSIL1C_20180508T085601_N0206_R007_T36UVG_20180508T141842.SAFE
20180508
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180513T085559_N0206_R007_T36UVG_20180513T110715.SAFE
S2B_MSIL1C_20180513T085559_N0206_R007_T36UVG_20180513T110715.SAFE
20180513
20180503T085559 2
20180503 /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE
20180508T085601 6
20180508 /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180508T085601_N0206_R007_T36UVG_20180508T141842.SAFE
20180511T090601 4
20180511 /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180511T090601_N0206_R050_T36UVG_20180511T103619.SAFE
20180513T085559 7
20180513 /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180513T085559_N0206_R007_T36UVG_20180513T110715.SAFE
20180521T090601 3
20180521 /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180521T090601_N0206_R050_T36UVG_20180521T104113.SAFE
20180526T091019 5
20180526 /opt/maja/repL1/T36UVG/S2B_MSIL1C_20180526T091019_N0206_R050_T36UVG_20180526T125255.SAFE
20180528T085641 1
20180528 /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180528T085641_N0206_R007_T36UVG_20180528T103122.SAFE
20180531T091031 0
20180531 /opt/maja/repL1/T36UVG/S2A_MSIL1C_20180531T091031_N0206_R050_T36UVG_20180531T111240.SAFE

#### dates à traiter 20180503
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE
#### dates à traiter 20180508
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180508T085601_N0206_R007_T36UVG_20180508T141842.SAFE
#### dates à traiter 20180511
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180511T090601_N0206_R050_T36UVG_20180511T103619.SAFE
#### dates à traiter 20180513
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180513T085559_N0206_R007_T36UVG_20180513T110715.SAFE
#### dates à traiter 20180521
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180521T090601_N0206_R050_T36UVG_20180521T104113.SAFE
#### dates à traiter 20180526
/opt/maja/repL1/T36UVG/S2B_MSIL1C_20180526T091019_N0206_R050_T36UVG_20180526T125255.SAFE
#### dates à traiter 20180528
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180528T085641_N0206_R007_T36UVG_20180528T103122.SAFE
#### dates à traiter 20180531
/opt/maja/repL1/T36UVG/S2A_MSIL1C_20180531T091031_N0206_R050_T36UVG_20180531T111240.SAFE
/opt/maja/Start_maja/DTM/*T36UVG*/*
#################################
#################################
/opt/maja/core/1.0/bin/maja -i /opt/maja/work/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//in -o /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF/ -m L2BACKWARD -ucs /opt/maja/work/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//userconf --TileId T36UVG &> /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE.log
#################################
Initialisation mode with backward is longer
MAJA logfile: /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE.log
#################################
/opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2?_OPER_SSC_L2VALD_T36UVG____20180503.DBL.DIR
pas de L2 pour : /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2?_OPER_SSC_L2VALD_T36UVG____20180503.DBL.DIR
previous L2 : 
Traceback (most recent call last):
  File "start_maja.py", line 277, in <module>
    print "previous L2 : ", nomL2
NameError: name 'nomL2' is not defined
[root@localhost Start_maja]# 

Best regards, Igor S2B_MSIL1C_20180503T085559_N0206_R007_T36UVG_20180503T115055.SAFE.log

olivierhagolle commented 5 years ago

So that's the next one, sorry for that. But you have made progress. From the logfile It seems that a L2 product was issued, but Start_maja crashed when processing the next L1C product. Could you please have a look to the content of the the L2 directory output directory /opt/maja/repL2/T36UVG/T36UVG ?

It seems to be /opt/maja/repL2/T36UVG/T36UVG. There should be a name such as /opt/maja/repL2/T36UVG/T36UVG/MAJA_1_0_S2AS2B_NATIF//S2?_OPER_SSC_L2VALD_T36UVG____20180503.DBL.DIR

Best regards, Olivier

bim2010 commented 5 years ago

output directory repL2: https://cloud.mail.ru/public/H5NY/gq6kB6yFY

bim2010 commented 5 years ago

I used GIPP_MAJA_1_0_S2AS2B_NATIF from here http://tully.ups-tlse.fr/olivier/gipp/tree/master/GIPP_MAJA_1_0_S2AS2B_NATIF and it differs in size and number of files from https://github.com/olivierhagolle/Start_maja/tree/Start_maja_V1/GIPP_MAJA_1_0_S2AS2B_NATIF Perhaps the problem is this.

olivierhagolle commented 5 years ago

Thanks Igor, I was just asking for a listing of the directory. I can't download easily zip files at CNES. You used the most up to date parameters, and the fact that one backward processing was successful, proved that its not the problem.

bim2010 commented 5 years ago

Posted repL2 unpacked here: https://cloud.mail.ru/public/JPSV/HCgTSkMeS Copy of the opt folder: https://cloud.mail.ru/public/CK3Q/tYzTBk1zQ

olivierhagolle commented 5 years ago

Thanks ! Thanks, I think I found out. A first L2 was generated S2B_OPER_SSC_L2VALD_36UVG....

For the second L2 processing, which needs as input the previous L2A, it seems that Start_maja was searching for S2B_OPER_SSC_L2VALD_T36UVG...with a T in the tile name.

So in fact, the initial command line (wWhich I could have seen in the first place, sorry), should have been python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t 36UVG -s T36UVG -d 20180503

Usually, I work like that, as several tiles could appear in the same site (I don't know if 36UVG corresponds to Smolensk). python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t 36UVG -s Smolensk -d 20180503

I should add a test to remove the T in the command line if the user provides it.

bim2010 commented 5 years ago

Thanks for your help. It works! My logs and work result Maja: https://cloud.mail.ru/public/JPSV/HCgTSkMeS May I ask here questions on MAJA 3_1? download_CAMS_daily.py works for me, but there are still questions. Best regards, Igor

olivierhagolle commented 5 years ago

Good news, I'll close the issue. The CAMS option in MAJA 3.1 does not work yet, there was a bug. We are currently validating the correction. Olivier