Export Marker values

Dear Sen4CAP Team,
the ATBD for L4C, capture 2.2.3.4 EXPORTS describes the possibility to export marker values (M1:M5) per parcel for each available week. What do I have to do to get such exports?

Kindly Regards
Angela

Dear Angela,

Indeed, this mode is also supported (although not tested lately) but is a little bit difficult to configure and use it as it was supposed to be used only during the validations of the processor (not in production) and was not exported in the database (such that it can be easily set or reset).
But you can follow the following steps:

  1. Configure the orchestrator to keep the temporary files (and not remove them automatically) by executing the following command in a linux terminal:

psql -U admin sen4cap -c "update config set value = 1 where key = ‘executor.processor.s4c_l4c.keep_job_folders’ "

  1. Execute from the dashboard (or from custom jobs) a new job for L4C.
  2. Once it is finished (if successfully, of course), you can go into the “Monitoring” tab, in the “Output” section of the executed L4C job and search for the “TimeSeriesAnalysis” steps.
  3. Click on the “Copy to clipboard” button for each of the “TimeSeriesAnalysis” step and paste it in a text editor. You will have something like the following command:

TimeSeriesAnalysis -intype csv -debug 0 -allowgaps 1 -plotgraph 1 -rescontprd 0 -country CZE -practice NFC -year 2019 -harvestshp /mnt/archive/agric_practices_files/test_dataset_2/2019/ts_input_tables/NFC/Sen4CAP_L4C_NFC_2019.csv -diramp /mnt/archive/orchestrator_temp/s4c_l4c/18685/57993-amp-data-extraction-merge/CZE_2019_AMP_Extracted_Data.csv -dircohe /mnt/archive/orchestrator_temp/s4c_l4c/18685/57994-cohe-data-extraction-merge/CZE_2019_COHE_Extracted_Data.csv -dirndvi /mnt/archive/orchestrator_temp/s4c_l4c/18685/57992-ndvi-data-extraction-merge/CZE_2019_NDVI_Extracted_Data.csv -outdir /mnt/archive/orchestrator_temp/s4c_l4c/18685/57997-nfc-time-series-analysis/ -minacqs 15 -ampthrbreakden 3 -ampthrmin 0.2 -ampthrvalden 3 -catchperiod 56 -cohthrabs 0.7 -cohthrbase 0.1 -cohthrhigh 0.1 -efaampthr -10000 -efacohchange -10000 -efacohvalue -10000 -efandvidw -10000 -efandvimin -10000 -efandvithr 350 -efandviup -10000 -ndvidw 300 -ndvistep 5 -ndviup 350 -optthrbufden 8 -optthrmin 100 -optthrvegcycle 500 -stddevinampthr 1

  1. In each of such commands, change the parameter “-rescontprd 0” into “-rescontprd 1”
  2. In a linux terminal perform:

sudo su -l sen2agri-service

  1. Execute the modified commands by appending “otbcli” in front of the command. For example, for the above example, will be (see in bold the updates):
    otbcli TimeSeriesAnalysis -intype csv -debug 0 -allowgaps 1 -plotgraph 1 -rescontprd 1 -country CZE -practice NFC -year 2019 -harvestshp /mnt/archive/agric_practices_files/test_dataset_2/2019/ts_input_tables/NFC/Sen4CAP_L4C_NFC_2019.csv -diramp /mnt/archive/orchestrator_temp/s4c_l4c/18685/57993-amp-data-extraction-merge/CZE_2019_AMP_Extracted_Data.csv -dircohe /mnt/archive/orchestrator_temp/s4c_l4c/18685/57994-cohe-data-extraction-merge/CZE_2019_COHE_Extracted_Data.csv -dirndvi /mnt/archive/orchestrator_temp/s4c_l4c/18685/57992-ndvi-data-extraction-merge/CZE_2019_NDVI_Extracted_Data.csv -outdir /mnt/archive/orchestrator_temp/s4c_l4c/18685/57997-nfc-time-series-analysis/ -minacqs 15 -ampthrbreakden 3 -ampthrmin 0.2 -ampthrvalden 3 -catchperiod 56 -cohthrabs 0.7 -cohthrbase 0.1 -cohthrhigh 0.1 -efaampthr -10000 -efacohchange -10000 -efacohvalue -10000 -efandvidw -10000 -efandvimin -10000 -efandvithr 350 -efandviup -10000 -ndvidw 300 -ndvistep 5 -ndviup 350 -optthrbufden 8 -optthrmin 100 -optthrvegcycle 500 -stddevinampthr 1

  2. Once this is finished, you will find the continous product into the following location specified by the -outdir parameter (in my case, it will be in /mnt/archive/orchestrator_temp/s4c_l4c/18685/57997-nfc-time-series-analysis/). The continuos information file will end with “_ContinousProduct.csv”.

  3. At the end, you might consider to reset to 0 the flag to keep temporary files on disk (set value = 0 at point 1.) such that the system can automatically remove these files for further executions otherwise you will have to manually remove the files in /mnt/archive/orchestrator_temp/s4c_l4c when you no longer need them, in order to save disk space.

Hope this helps.

Best regards,
Cosmin

1 Like

Hi all, is there any way to find easily the png plots showing NDVI trends etc. generated by R scripts?

thanks
Enrico

1 Like