Batch process subset, idepix, c2rcc on OLCI

I used CODARep, the EUMETSAT Data Center, and CODA to download these images. This file was downloaded from CODARep since it is from 2016. Would this cause the issue of the .xml file not working correctly?

I have downloaded it and you have only one part of the bay in that scene. Did I misunderstand something?

So I’m wondering why the the subset polygon (picture below) isn’t working on this image? Is it because the entire image isn’t included and therefore, it won’t subset?

I think it is doing the subset, but not on the south because the scene stops in lat 38º 41’ N more or less.

Okay, I see now. I’ve compared more of the original scenes to the subsetted images and it does seem to be subsetting. It didn’t look like it was based on the polygon, but I guess because projections are different, it’s going to look a little different. thanks for your help

I am trying to use the same .xml file as above but have added vicarious calibration gains to the beginning- see attached. When running in on some test files, it gives the error “Error: [NodeId: Idepix.Olci] Selected cloud screening algorithm cannot be used with given input product.” This did not occur before when I ran it without the SVC gains. Do I need to put the SVC somewhere else in the .xml file?

c2rcc_config_with_gains.xml (14.5 KB)

Probably you got the template for the graph from the S3VT forum.
Please check it again. The product where the gains are applied needs to be merged with a subset of the original OLCI product before further passed to another processor.
Otherwise necessary bands are missing.

Hi @marpet. I successfully ran a subset and SVC .xml on 10 files and confirmed that the band values were different from the input data. I am trying now to add on to that .xml with idepix and c2rcc, see attached. subset_SVC_idepix_c2rcc.xml (14.4 KB)
Do I need to apply IdePix and c2rcc to subset, and then merge them with vicarious?

What is important is to add the to merge the source product with the output of the vicarious step.

...    
<node id="subset"> <!-- remove the calibrated bands-->
    <operator>Subset</operator>
    <sources>
        <source>${sourceProduct}</source>
    </sources>
    <parameters>
        <sourceBands>altitude,latitude,longitude,detector_index,FWHM_band_1,FWHM_band_2,FWHM_band_3,FWHM_band_4,FWHM_band_5,FWHM_band_6,FWHM_band_7,FWHM_band_8,FWHM_band_9,FWHM_band_10,FWHM_band_11,FWHM_band_12,FWHM_band_13,FWHM_band_14,FWHM_band_15,FWHM_band_16,FWHM_band_17,FWHM_band_18,FWHM_band_19,FWHM_band_20,FWHM_band_21,frame_offset,lambda0_band_1,lambda0_band_2,lambda0_band_3,lambda0_band_4,lambda0_band_5,lambda0_band_6,lambda0_band_7,lambda0_band_8,lambda0_band_9,lambda0_band_10,lambda0_band_11,lambda0_band_12,lambda0_band_13,lambda0_band_14,lambda0_band_15,lambda0_band_16,lambda0_band_17,lambda0_band_18,lambda0_band_19,lambda0_band_20,lambda0_band_21,solar_flux_band_1,solar_flux_band_2,solar_flux_band_3,solar_flux_band_4,solar_flux_band_5,solar_flux_band_6,solar_flux_band_7,solar_flux_band_8,solar_flux_band_9,solar_flux_band_10,solar_flux_band_11,solar_flux_band_12,solar_flux_band_13,solar_flux_band_14,solar_flux_band_15,solar_flux_band_16,solar_flux_band_17,solar_flux_band_18,solar_flux_band_19,solar_flux_band_20,solar_flux_band_21,quality_flags</sourceBands>
    </parameters>
</node>

<node id="merged"> <!-- remove the calibrated bands-->
    <operator>Merge</operator>
    <sources>
        <masterProduct>subset</masterProduct>
        <vicar>vicarious</vicar>
    </sources>
    <parameters>
        <includes>
            <include>
                <productId>vicar</productId>
                <namePattern>Oa.*radiance</namePattern>
            </include>
        </includes>
    </parameters>
</node>
...

I’ve updated you graph. It should work, but I have not tested it.
subset_SVC_idepix_c2rcc_update.xml (16.2 KB)

Hello,
I am trying a similar gpt batch process using read -> subset -> resample -> c2rcc for Sentinel 2 MSI products.
My graph runs successfully when I have subset -> resample. Resample -> c2rcc also works fine, delivering result for the entire image. If I merge all three steps I get the error:

Error: [NodeId: c2rccNode] Source must be a resampled S2 MSI L1C product

Of course I could run two batch processes, but it would be nice if I could get it with one.
Here’s my graph subset-resample-c2rcc_v2.xml (2.2 KB)
Any advise would be appreciated.
Best,
I

Hi there,

In the c2rccNode, you have to write “Resample” in the source products. That is the name you gave the product in the resample node. Please, let us know if that is the issue.

hey,
yes, I’m referring to “Resample” in the c2rccNode and I still get the same error.
It appears as if c2rcc doesn’t support subsetting in the GPT, could it be?

It does, I send you a graph on how I do it, maybe there is something else wrong that I did not detect. The graph is for MCIi and includes idepix, and a final merge, but the steps are more or less the same. [MSI_idepix_mci_merge.xml|attachment]MSI_idepix_mci_merge.xml (2.5 KB)

You can also review your c2rcc parameters, copy them from SNAP and leave the default (to test it).

Which bands do you specify for subsetting? Maybe this is the problem that you don’t keep all the bands?
Also you have the two variables ${region} and ${polygon}. You should only use one. Probably you do it by setting the other to empty string.

hey, @abruescas, I checked your graph and the resample and subset part were identical to mine. Also the c2rcc parameters are OK, as I have already run the graph only with resample and c2rcc nodes, getting good results.

@marpet, I subset all bands. According the variables region and polygon, I leave region to 0,0,0,0 and it subsets according to the polygon.

As I mentioned, the obscure thing is that I have running graphs for subset -> resample and resample -> c2rcc and both deliver the expected results. Only when I merge the three steps subset -> resample -> c2rcc it doesn’t work.

I’ve used you graph and it worked. I only removed the bands the region parameter.
subset-resample-c2rcc_v2.1.xml (2.2 KB)
That’s the command I used:

> gpt "G:\EOData\_temp\subset-resample-c2rcc_v2.1.xml" -t G:\EOData\_temp\c2rcc.dim -Ppolygon="POLYGON((34.61844368266771 31.8634429454803, 34.61723920476815 31.794406725593483, 34.7039466123858 31.769540817450004, 34.72186085597585 31.850216096630355, 34.78487691867303 32.03706823458345, 34.68175630866747 32.07731852323451, 34.68175630866747 32.07731852323451, 34.61844368266771 31.8634429454803))" -PsourceProduct="G:\EOData\SENTINEL2\S2B_MSIL1C_20190506T081609_N0207_R121_T36SXA_20190506T104054.SAFE\MTD_MSIL1C.xml"

Have you installed the latest updates?

I have removed the bands parameter and it works now. Although I have listed all S2 bands there, something was insufficient for compiling.
Many thanks for your feedback!

1 Like

Dear @aewindle. I also try to apply gains for OLCI sensor. I had a look on your graph, look what I need, thank you!
But before I use it I had one questions regarding the step when you apply the System Vicarious Calibration. Can you please explain to me what exactly this expression does?feq(Oa01_radiance, 913.9812317630276, 1.0e-4) ? NaN : Oa01_radiance / ${Oa01_vic}

When I run the graph with gpt I receive the following error: Error: [NodeId: vicarious] Could not parse expression: 'feq(Oa01_radiance, 913.9812317630276, 1.0e-4) ? NaN : Oa01_radiance / {Oa01_vic}'. Undefined symbol '

Thank you very much!
Best, Ionut.

Hi @serban.ioan,

I made a FAQ entry which explains how to apply SVC gains on OLCI data.
Please take a look here:

Dear @marpet,

I am grateful for your answer. It seems to be exactly what I need!

Best whishes,
Ionut.