CopernicusData.jl

Documentation for CopernicusData.jl

CopernicusData is a framework to be used for Earth Observation satellite data processing from the EU Copernicus program, especially the Sentinels Missions. It defines a data structure for managing, storing EO data and a light orchestration framework to implement and chain processing steps.

Example block output

The Data structure

The data structure used in CopernicusData.jl is mostly focused on zarr format, using Zarr.jl package. The data representation is based on YAXArrays.jl. Though it is designed to handle the Sentinels new EOPF product format, it remains fully generic and can represent any kind of hierarchical data tree structure. Please visit https://eopf.copernicus.eu/eopf/ to have further details about the EOPF data format.

YAXTrees module

The YAXTrees module provide a hierarchical tree structure of YAXArrays or Datasets.

Below is a basic usage to construct a tree structure

root = YAXTree()
root.childA = YAXTree("childA")
root.childB = YAXTree("childB")
root.childA.grandchild = YAXTree("grandchild")
root
๐Ÿ“‚ root
โ”œโ”€ ๐Ÿ“‚ childA
โ”œโ”€ โ””โ”€ ๐Ÿ“‚ grandchild
โ””โ”€ ๐Ÿ“‚ childB

Using Zarr backend, a recursive zarr structure representing Copernicus product can be accessed with the open_datatree function. Using the feature from YAXArrays.jl, based on DiskArrays.jl, the data is lazy loaded.

tree = open_datatree(local_path)
๐Ÿ“‚ root
โ”œโ”€ ๐Ÿ“‚ conditions
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ auxiliary
โ”œโ”€ โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ geometry
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ meteorology
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ processing
โ”œโ”€ โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ”œโ”€ โ””โ”€ ๐Ÿ“‚ time
โ”œโ”€ ๐Ÿ“‚ measurements
โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ””โ”€ ๐Ÿ“‚ quality
โ””โ”€ โ””โ”€ ๐Ÿ“‚ orphan

A more detailed view can be displayed

YAXTrees.show_tree(tree; details=true)
๐Ÿ“‚ root
โ”œโ”€ ๐Ÿ“‚ conditions
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ auxiliary
โ”œโ”€ โ”œโ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ”œโ”€ โ”œโ”€ โ””โ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ geometry
โ”œโ”€ โ”œโ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ meteorology
โ”œโ”€ โ”œโ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ”œโ”€ ๐Ÿ“‚ processing
โ”œโ”€ โ”œโ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ”œโ”€ โ”œโ”€ โ””โ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ””โ”€ ๐Ÿ“‚ time
โ”œโ”€ โ””โ”€   ๐Ÿ“Š Dataset
โ”œโ”€ ๐Ÿ“‚ measurements
โ”œโ”€   ๐Ÿ“Š Dataset
โ”œโ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ”œโ”€ โ””โ”€   ๐Ÿ“Š Dataset
โ””โ”€ ๐Ÿ“‚ quality
โ””โ”€   ๐Ÿ“Š Dataset
โ””โ”€ โ””โ”€ ๐Ÿ“‚ orphan
โ””โ”€ โ””โ”€   ๐Ÿ“Š Dataset

You can use dictionary or the traditional dot indexing to access any node of the tree structure

tree["measurements"].data
YAXArray Dataset
Shared Axes: 
  (โ†“ columns Sampled{Int64} 1:1500 ForwardOrdered Regular Points,
  โ†’ rows Sampled{Int64} 1:1200 ForwardOrdered Regular Points)

Variables: 
latitude, longitude, lst, x, y

tree.conditions.geometry.solar_zenith_tn
โ”Œ 130ร—1200 YAXArray{Union{Missing, Float64}, 2} โ”
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ dims โ”
  โ†“ columns Sampled{Int64} 1:130 ForwardOrdered Regular Points,
  โ†’ rows Sampled{Int64} 1:1200 ForwardOrdered Regular Points
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ metadata โ”ค
  Dict{String, Any} with 8 entries:
  "units"         => "degrees"
  "coordinates"   => "x y"
  "short_name"    => "solar_zenith_tn"
  "missing_value" => NaN
  "name"          => "solar_zenith_tn"
  "long_name"     => "solar zenith angle"
  "standard_name" => "solar_zenith_angle"
  "_FillValue"    => NaN
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ loaded lazily โ”ค
  data size: 1.19 MB
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

EOProduct module

***deprecated***

Orchestration

A light orchestration is providing by the ฬ€EOTriggering module.

[parallel_context]
cluster_type = "local"
processes = 3

[logging]
level = "Info"

["I/O"]
modification_mode = "newproduct"

    ["I/O".output_product]
    store_type = "zarr"
    id = "output"
    path = "output.zarr"

    [["I/O".inputs_products]]
    store_type = "zarr"
    id = "dummy"
    path = "../resources/yax.zarr"

[[workflow]]
name = "dummy2"
processing_unit = "dummy_processing_unit"
module = "EOTriggering"
inputs = ["dummy1"]

    [workflow.parameters]

[[breakpoints]]
break_mode = "s"
storage = "dummy1.zarr"
related_unit = "dummy1"

    [breakpoints.store_params]
nothing
payload_file_path="../resources/payload.toml"
EOTriggering.run(payload_file_path)
[ Info: List of inputs:
[ Info:  - input: dummy
[ Info: Running dummy2(EOTriggering.dummy_processing_unit)
[ Info: Hello !