Skip to content

Commit a2f2aea

Browse files
committed
add zarr example
1 parent d0d9303 commit a2f2aea

File tree

3 files changed

+14064
-33
lines changed

3 files changed

+14064
-33
lines changed

PRR/example_tccas.ipynb

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"source": [
88
"# ESA Project Results Repository: Generating STAC collections with multiple assets\n",
99
"\n",
10-
"This notebook shows how to generate a valid STAC collection, which is a requirement to upload research outcomes to the [ESA Project Results Repository (PRR)](https://eoresults.esa.int/). It focuses on generating metadata for a project with a multiple data files of different types. \n",
10+
"This notebook shows how to generate a valid STAC collection, which is a requirement to upload research outcomes to the [ESA Project Results Repository (PRR)](https://eoresults.esa.int/). It focuses on generating metadata for a project with multiple data files of different types. \n",
1111
"\n",
1212
"Check the [EarthCODE documentation](https://earthcode.esa.int/), and [PRR STAC introduction example](https://esa-earthcode.github.io/examples/prr-stac-introduction) for a more general introduction to STAC and the ESA PRR.\n",
1313
"\n",
@@ -382,7 +382,7 @@
382382
},
383383
{
384384
"cell_type": "code",
385-
"execution_count": null,
385+
"execution_count": 3,
386386
"id": "60ad7781",
387387
"metadata": {},
388388
"outputs": [],
@@ -406,7 +406,7 @@
406406
},
407407
{
408408
"cell_type": "code",
409-
"execution_count": 6,
409+
"execution_count": 4,
410410
"id": "30dfc770",
411411
"metadata": {},
412412
"outputs": [],
@@ -418,7 +418,7 @@
418418
},
419419
{
420420
"cell_type": "code",
421-
"execution_count": 7,
421+
"execution_count": 5,
422422
"id": "e37e5a77",
423423
"metadata": {},
424424
"outputs": [],
@@ -436,7 +436,7 @@
436436
},
437437
{
438438
"cell_type": "code",
439-
"execution_count": 8,
439+
"execution_count": 6,
440440
"id": "5bedc1dd",
441441
"metadata": {
442442
"scrolled": true
@@ -446,11 +446,11 @@
446446
"name": "stderr",
447447
"output_type": "stream",
448448
"text": [
449-
"/tmp/ipykernel_12458/2301298067.py:9: UserWarning: no explicit representation of timezones available for np.datetime64\n",
449+
"/tmp/ipykernel_47640/2301298067.py:9: UserWarning: no explicit representation of timezones available for np.datetime64\n",
450450
" ts = (start_time - np.datetime64('1970-01-01T00:00:00Z')) / np.timedelta64(1, 's')\n",
451-
"/tmp/ipykernel_12458/2301298067.py:5: FutureWarning: In a future version of xarray decode_timedelta will default to False rather than None. To silence this warning, set decode_timedelta to True, False, or a 'CFTimedeltaCoder' instance.\n",
451+
"/tmp/ipykernel_47640/2301298067.py:5: FutureWarning: In a future version of xarray decode_timedelta will default to False rather than None. To silence this warning, set decode_timedelta to True, False, or a 'CFTimedeltaCoder' instance.\n",
452452
" ds = xr.open_dataset(root_url + dataset_filepath + '#mode=bytes')\n",
453-
"/tmp/ipykernel_12458/2301298067.py:9: UserWarning: no explicit representation of timezones available for np.datetime64\n",
453+
"/tmp/ipykernel_47640/2301298067.py:9: UserWarning: no explicit representation of timezones available for np.datetime64\n",
454454
" ts = (start_time - np.datetime64('1970-01-01T00:00:00Z')) / np.timedelta64(1, 's')\n"
455455
]
456456
}
@@ -519,7 +519,7 @@
519519
},
520520
{
521521
"cell_type": "code",
522-
"execution_count": 9,
522+
"execution_count": 7,
523523
"id": "00e4d3b5",
524524
"metadata": {},
525525
"outputs": [
@@ -597,7 +597,7 @@
597597
"<Link rel=item target=<Item id=tccas-sodankylae-insitu_package>>"
598598
]
599599
},
600-
"execution_count": 9,
600+
"execution_count": 7,
601601
"metadata": {},
602602
"output_type": "execute_result"
603603
}
@@ -639,7 +639,7 @@
639639
},
640640
{
641641
"cell_type": "code",
642-
"execution_count": 10,
642+
"execution_count": 8,
643643
"id": "60f80689",
644644
"metadata": {},
645645
"outputs": [
@@ -717,7 +717,7 @@
717717
"<Link rel=item target=<Item id=tccas-sodankylae-model_forcing>>"
718718
]
719719
},
720-
"execution_count": 10,
720+
"execution_count": 8,
721721
"metadata": {},
722722
"output_type": "execute_result"
723723
}
@@ -796,7 +796,7 @@
796796
},
797797
{
798798
"cell_type": "code",
799-
"execution_count": 11,
799+
"execution_count": 9,
800800
"id": "ead22923",
801801
"metadata": {},
802802
"outputs": [
@@ -874,7 +874,7 @@
874874
"<Link rel=item target=<Item id=tccas-sodankylae-documentation>>"
875875
]
876876
},
877-
"execution_count": 11,
877+
"execution_count": 9,
878878
"metadata": {},
879879
"output_type": "execute_result"
880880
}
@@ -927,12 +927,12 @@
927927
"id": "33d4ffee",
928928
"metadata": {},
929929
"source": [
930-
"## 4. Save the metadata as a self-contained collection"
930+
"## 3. Save the metadata as a self-contained collection"
931931
]
932932
},
933933
{
934934
"cell_type": "code",
935-
"execution_count": 12,
935+
"execution_count": 10,
936936
"id": "52756c30",
937937
"metadata": {},
938938
"outputs": [],
@@ -946,7 +946,7 @@
946946
},
947947
{
948948
"cell_type": "code",
949-
"execution_count": 13,
949+
"execution_count": 11,
950950
"id": "4a19d066",
951951
"metadata": {},
952952
"outputs": [
@@ -1050,7 +1050,7 @@
10501050
" \n",
10511051
" <li class=\"pystac-row\">\n",
10521052
" <span class=\"pystac-k\">href</span>\n",
1053-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/collection.json\"</span>\n",
1053+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/collection.json\"</span>\n",
10541054
" </li>\n",
10551055
" \n",
10561056
" \n",
@@ -1101,7 +1101,7 @@
11011101
" \n",
11021102
" <li class=\"pystac-row\">\n",
11031103
" <span class=\"pystac-k\">href</span>\n",
1104-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-fraction_of_absorbed_photosynthetic_active_radiation_leaf_area_index_(jrc-tip)/tccas-sodankylae-fraction_of_absorbed_photosynthetic_active_radiation_leaf_area_index_(jrc-tip).json\"</span>\n",
1104+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-fraction_of_absorbed_photosynthetic_active_radiation_leaf_area_index_(jrc-tip)/tccas-sodankylae-fraction_of_absorbed_photosynthetic_active_radiation_leaf_area_index_(jrc-tip).json\"</span>\n",
11051105
" </li>\n",
11061106
" \n",
11071107
" \n",
@@ -1143,7 +1143,7 @@
11431143
" \n",
11441144
" <li class=\"pystac-row\">\n",
11451145
" <span class=\"pystac-k\">href</span>\n",
1146-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-brightness_temperature_(smos_tb)/tccas-sodankylae-brightness_temperature_(smos_tb).json\"</span>\n",
1146+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-brightness_temperature_(smos_tb)/tccas-sodankylae-brightness_temperature_(smos_tb).json\"</span>\n",
11471147
" </li>\n",
11481148
" \n",
11491149
" \n",
@@ -1185,7 +1185,7 @@
11851185
" \n",
11861186
" <li class=\"pystac-row\">\n",
11871187
" <span class=\"pystac-k\">href</span>\n",
1188-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-soil_moisture_and_vegetation_optical_depth_(smos_sm_and_smos_l-vod)/tccas-sodankylae-soil_moisture_and_vegetation_optical_depth_(smos_sm_and_smos_l-vod).json\"</span>\n",
1188+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-soil_moisture_and_vegetation_optical_depth_(smos_sm_and_smos_l-vod)/tccas-sodankylae-soil_moisture_and_vegetation_optical_depth_(smos_sm_and_smos_l-vod).json\"</span>\n",
11891189
" </li>\n",
11901190
" \n",
11911191
" \n",
@@ -1227,7 +1227,7 @@
12271227
" \n",
12281228
" <li class=\"pystac-row\">\n",
12291229
" <span class=\"pystac-k\">href</span>\n",
1230-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(sentinel_5p)/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(sentinel_5p).json\"</span>\n",
1230+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(sentinel_5p)/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(sentinel_5p).json\"</span>\n",
12311231
" </li>\n",
12321232
" \n",
12331233
" \n",
@@ -1269,7 +1269,7 @@
12691269
" \n",
12701270
" <li class=\"pystac-row\">\n",
12711271
" <span class=\"pystac-k\">href</span>\n",
1272-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-slope_(ascat_slope)/tccas-sodankylae-slope_(ascat_slope).json\"</span>\n",
1272+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-slope_(ascat_slope)/tccas-sodankylae-slope_(ascat_slope).json\"</span>\n",
12731273
" </li>\n",
12741274
" \n",
12751275
" \n",
@@ -1311,7 +1311,7 @@
13111311
" \n",
13121312
" <li class=\"pystac-row\">\n",
13131313
" <span class=\"pystac-k\">href</span>\n",
1314-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-photochemical_reflectance_index_(modis_pri)/tccas-sodankylae-photochemical_reflectance_index_(modis_pri).json\"</span>\n",
1314+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-photochemical_reflectance_index_(modis_pri)/tccas-sodankylae-photochemical_reflectance_index_(modis_pri).json\"</span>\n",
13151315
" </li>\n",
13161316
" \n",
13171317
" \n",
@@ -1353,7 +1353,7 @@
13531353
" \n",
13541354
" <li class=\"pystac-row\">\n",
13551355
" <span class=\"pystac-k\">href</span>\n",
1356-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-land_surface_temperature_(modis_lst)/tccas-sodankylae-land_surface_temperature_(modis_lst).json\"</span>\n",
1356+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-land_surface_temperature_(modis_lst)/tccas-sodankylae-land_surface_temperature_(modis_lst).json\"</span>\n",
13571357
" </li>\n",
13581358
" \n",
13591359
" \n",
@@ -1395,7 +1395,7 @@
13951395
" \n",
13961396
" <li class=\"pystac-row\">\n",
13971397
" <span class=\"pystac-k\">href</span>\n",
1398-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(oco-2_sif)/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(oco-2_sif).json\"</span>\n",
1398+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(oco-2_sif)/tccas-sodankylae-solar_induced_chlorophyll_fluorescence_(oco-2_sif).json\"</span>\n",
13991399
" </li>\n",
14001400
" \n",
14011401
" \n",
@@ -1437,7 +1437,7 @@
14371437
" \n",
14381438
" <li class=\"pystac-row\">\n",
14391439
" <span class=\"pystac-k\">href</span>\n",
1440-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-vegetation_optical_depth_(amsr-2_vod)/tccas-sodankylae-vegetation_optical_depth_(amsr-2_vod).json\"</span>\n",
1440+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-vegetation_optical_depth_(amsr-2_vod)/tccas-sodankylae-vegetation_optical_depth_(amsr-2_vod).json\"</span>\n",
14411441
" </li>\n",
14421442
" \n",
14431443
" \n",
@@ -1479,7 +1479,7 @@
14791479
" \n",
14801480
" <li class=\"pystac-row\">\n",
14811481
" <span class=\"pystac-k\">href</span>\n",
1482-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-insitu_package/tccas-sodankylae-insitu_package.json\"</span>\n",
1482+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-insitu_package/tccas-sodankylae-insitu_package.json\"</span>\n",
14831483
" </li>\n",
14841484
" \n",
14851485
" \n",
@@ -1521,7 +1521,7 @@
15211521
" \n",
15221522
" <li class=\"pystac-row\">\n",
15231523
" <span class=\"pystac-k\">href</span>\n",
1524-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-model_forcing/tccas-sodankylae-model_forcing.json\"</span>\n",
1524+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-model_forcing/tccas-sodankylae-model_forcing.json\"</span>\n",
15251525
" </li>\n",
15261526
" \n",
15271527
" \n",
@@ -1563,7 +1563,7 @@
15631563
" \n",
15641564
" <li class=\"pystac-row\">\n",
15651565
" <span class=\"pystac-k\">href</span>\n",
1566-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/tccas-sodankylae-documentation/tccas-sodankylae-documentation.json\"</span>\n",
1566+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/tccas-sodankylae-documentation/tccas-sodankylae-documentation.json\"</span>\n",
15671567
" </li>\n",
15681568
" \n",
15691569
" \n",
@@ -1605,7 +1605,7 @@
16051605
" \n",
16061606
" <li class=\"pystac-row\">\n",
16071607
" <span class=\"pystac-k\">href</span>\n",
1608-
" <span class=\"pystac-v\">\"/home/krasen/oneones/data/example_catalog/collection.json\"</span>\n",
1608+
" <span class=\"pystac-v\">\"/home/krasen/examples/PRR/data/example_catalog/collection.json\"</span>\n",
16091609
" </li>\n",
16101610
" \n",
16111611
" \n",
@@ -1802,14 +1802,22 @@
18021802
"<Collection id=tccas-sodankylae>"
18031803
]
18041804
},
1805-
"execution_count": 13,
1805+
"execution_count": 11,
18061806
"metadata": {},
18071807
"output_type": "execute_result"
18081808
}
18091809
],
18101810
"source": [
18111811
"collection"
18121812
]
1813+
},
1814+
{
1815+
"cell_type": "code",
1816+
"execution_count": null,
1817+
"id": "585db2d3",
1818+
"metadata": {},
1819+
"outputs": [],
1820+
"source": []
18131821
}
18141822
],
18151823
"metadata": {

PRR/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ In order to upload data to the ESA Project Results Repository (PRR) you have to
1515
Below you will find guides to the whole process, we recomend starting with the introductory notebook.
1616

1717
- [Generating a STAC Collection for the PRR(Introduction)](./PRR_STAC_introduction.ipynb) - A notebook explaining how to create the required PRR metadata. It describes the steps in detail and uses a relatively simple example, with a single .nc raster data file.
18+
- [Generating STAC collections with zarr files](./Creating%20STAC%20Catalog_from_PRR_example.ipynb) - Example how to generate metadata for a product with zarr files.
1819
- [Generating a STAC Collection for the PRR (Multiple file types)](./example_tccas.ipynb) - Example how to generate metadata for a more complicated dataset which has multiple types of data and different file formats.
19-
- [Generating a STAC Collection for the PRR(Large dataset for multiple regions)](./Creating%20STAC%20Catalog_from_PRR_example.ipynb) - Example how to generate metadata for a large dataset that has multiple disjoint regions.
20+
- [Generating a STAC Collection for the PRR(Large dataset for multiple regions)](./prr_zarr.ipynb) - Example how to generate metadata for a large dataset that has multiple disjoint regions.
2021

2122
If you are interested in exploring/downloading PRR data you can use this notebook as a guide:
2223
- [ESA Project Results Repository (PRR) Data Access and Collections Preview](./PRR_STAC_download_example.ipynb) - A notebook explaining how Item Catalogs should be created, uses raster data.

0 commit comments

Comments
 (0)