Closed lmar76 closed 3 years ago
The problem is that the Validity start/stop times are not known. I reworked the error message to be more precise here. ‘Normally’ the validity times are copied from some input product, but I understand you want to generate Sx_RAWP product from scratch. However, the SxRAWP product generator is not responsible for slicing, so it needs the validity times.
I see a few solutions for this:
We add parameters to set/override the validity times as well. Seems the most straightforward solution, but requires you to add these to the scenario as well.
We could calculate validity times, if not available. This could be done using the slicing mechanism as currently used in the RAWSxxx10 generator. However, I'm not sure it makes sense that the S1 product generator performs slicing?
We can first generate a (dummy) RAWSxxx_10 product and use that as input for this generator. The RAWSxxx generator has the slicer logic on board and requires only begin/end_positions. In the current version, it is not possible to directly generate RAWSxxx products, due to missing begin/end_position parameters for these products. However, these can be added simply and I'll do that anyway. However, another issue is that the ‘metadata_source’ currently must be one of the input files, in the job order, and I assume you don't want to create a job order! This could be solved by just trying all matching files in the output directory, if no matching input file is specified, or if no job order exists.
Why the validity start/stop times are not known? The scenario includes the "begin_position" and "end_position" which should specify the validity start/stop times...
Perhaps there is a misunderstanding about these times? The current implementation is as follows:
The scenario parameters begin_position
and end_position
are used to set the Main Product Header fields ‘bio:EarthObservation/om:phenomenonTime/gml:TimePeriod/gml:beginPosition’ and ‘bio:EarthObservation/om:phenomenonTime/gml:TimePeriod/gml:endPosition’, respective. They also map to the ‘UTC start date and time’ and ‘UTC stop date and time’ parts of the product name.
The ‘validity times’ in Main Product Header fields bio:EarthObservation/om:validTime/gml:TimePeriod/gml:beginPosition and bio:EarthObservation/om:validTime/gml:TimePeriod/gml:endPosition are equal to the begin/end position for most product types.
However, for RAWSmetadata_source
parameter.
My apologies, I have misunderstood your explanation.
In my opinion:
om:phenomenonTime begin/end should be set according to begin_position/end_position parameters in the scenario or read from Job Order TOI or from MPH of the input product(s).
om:validTime begin/end should be evaluated starting from om:phenomenonTime begin/end. Slicing/framing calculation, products merging and products splitting applies depending on the product being generated.
Can you identify any issue on this approach? Do you agree?
Regarding the ability to read metadata from MPH of input product(s), this could cause some issues if, for a given product type, there are more input products (e.g. level 0 step 2). In this case, it seems that Procsim reads the MPH of only one input product and this could cause issues. Maybe, in this case we should disable this procedure and use only the information provided via begin_position/end_position in the scenario file or Job Order TOI. Do you agree?
I thought that it is always (i.e. for each file type) possible to generate products "from scratch", i.e. without providing a JobOrder and input files, but providing the needed parameters in the scenario file. If not, which are the products that can be generated in this way?
Ah, you're completely right. The idea was, and is, to generate products from scratch, without (the need of) reading any input product.
So, I fully agree, and see no issues. I modified the code to copy the phenomenon times to the validity times, if not known. These times are then input to the product generator.
To test this, I added a test script (test/biomass/test_generate_all.sh
) to generate every Biomass product type, without any input file. They are all generated, although the L1 SCS/DGM generator is a bit critical, as it requires the slice length to be 5 times the frame length (also taking the start/end durations into account).
I tried to generate S1_RAWP_0M ptoducts, using the following scenario:
I have executed procsim:
The execution terminates with the following error messages: