Manuel execution L3B-products

Hi all,

I’m using sen2agri 1.8.1 to retrieve biophysical indicators and there some questions arising. May somewone can help me:)

is there any argument for lai_retrieve_processing.py function to enable the Fcover and Fapar processing when I execute it manually in the commandline?

And do I need to enable the INRA-algorithm for LAI-Modelling using this function somehow or is it the default?

Because everything is enabled in the Sen2agri-config (FAPAR, FCOVOR, INRA) but the function is only calculating NDVI and LAI outputs?

many thanks
Martin

@cudroiu can you answer this?

Hello Martin,

Concerning your failed executions from the IHM of the INRA version algorithm could you please check that the values for the following keys are set to value 1 in the config table?
“processor.l3b.lai.use_inra_version”
“processor.l3b.lai.produce_ndvi”
“processor.l3b.lai.produce_lai”
“processor.l3b.lai.produce_fapar”
“processor.l3b.lai.produce_fcover”
Also, try running LAI monodate for a single product and in the same time log the messages using journalctl:

journalctl -f -u sen2agri-executor

Unfortunately, the old version of LAI is still the default one in the version 1.8.1 and the python script was not yet updated to support also the new version.
Nevertheless, you can find attached a version that supports also the INRA version and can be executed using a command similar to (from the folder where you copy it):
lai_retrieve_processing.zip (7.1 KB)

./lai_retrieve_processing.py --input \
"/mnt/archive/test/Borno_South/S2A_OPER_PRD_MSIL2A_PDMC_20160607T044353_R136_V20160606T094258_20160606T094258.SAFE/S2A_OPER_SSC_L2VALD_32PQT____20160606.HDR" \
--res 10 --outdir /mnt/archive/test/L3B/TEMP --laiBandsCfg /usr/share/sen2agri/Lai_Bands_Cfgs_Belcam.cfg --useinra YES --fcover YES --fapar YES \
--siteid 19

Let me know.
Cosmin

1 Like

Hi Cosmin,

first of all, thanks for providing the function!
I succeded running the script on my local pc. But I’m struggeling to run it inside my VM where sen2agri is installed.

Even if I set the permissions the script is not running:

[root@vm-sen2agri at]# /home/admin/Downloads/lai_retrieve_processing/lai_retrieve_processing.py
-bash: /home/admin/Downloads/lai_retrieve_processing/lai_retrieve_processing.py: Permission denied
[root@vm-sen2agri at]# chmod -R a+rwx /home/admin/Downloads/lai_retrieve_processing/lai_retrieve_processing.py
[root@vm-sen2agri at]# /home/admin/Downloads/lai_retrieve_processing/lai_retrieve_processing.py
: No such file or directory

Even if I change the group to root it’s not executable.
May you have another hint for me!

Martin

Hi Martin,

Try to run

dos2unix lai_retrieve_processing.py

I think I sent it from my Windows git repository and there it was with CR/LF instead LF.
In any case, didn’t you succeeded in creating fAPAR an FCover from the Web interface?
Please note that this script only creates a L3B product but it doesn’t insert it in the database.

Please let me know.

Cosmin

Hi cosmin,

Yes it’s working from Web interface as well. I just sometimes need to pick out one Scene of my large site manually for parameter testing. This is easier with some grep instead of looking for the scene in the Dashboard-tab.

In the end I will run it for the whole site using the web interface!

It’s running now! Thanks a lot again.

Two last questions:
When I start the function all cpu’s jump to 100% usage running the Prosailsimulator. Is there a way to downscale this a bit?

Is there any further documentation or publication of RTM by Inra except the system definition file on Sen2agri webpage?

Martin

Ok I think I already found the publication:

http://www.mdpi.com/2072-4292/7/11/15494

1 Like

Dear Cosmin,

I’m running version 1.8.3 and I understand the LAI algorithm was updated within this version, however I noticed the value 0 in my config table:
use_inra_version 0
I guess it must be 1 so it uses the INRA algorithm, right? If so, how so I change this parameter in order to use the INRA algorithm for LAI?

Hello,

I think what you are looking for could be this:

sudo -u postgres psql sen2agri
update config set value = 1 where key = ‘processor.l3b.lai.use_inra_version’;
update config set value = 1 where key = ‘processor.l3b.lai.produce_fapar’;
update config set value = 1 where key = ‘processor.l3b.lai.produce_fcover’;

update config set value='/usr/share/sen2agri/Lai_Bands_Cfgs_Belcam.cfg' where key = 'processor.l3b.lai.laibandscfgfile';
\q

Find more documentation on the end of this page:
FAQ

Martin

I finally manage to have a try and it worked out, thanks a lot!!
However, now when I launch a custom job for an LAI mono date - it shows me job finished and I can visualize on products, but just NDVI is generated. I couldn’t understan why LAI is not generated as well. Can you please give me a support to solve this issue?
Checking the dashboard, my config table looks fine (printscreen below)
image
Any tip, please!?