|
7 | 7 | "source": [ |
8 | 8 | "# ESA Project Results Repository: Generating STAC collections with multiple assets\n", |
9 | 9 | "\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", |
11 | 11 | "\n", |
12 | 12 | "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", |
13 | 13 | "\n", |
|
382 | 382 | }, |
383 | 383 | { |
384 | 384 | "cell_type": "code", |
385 | | - "execution_count": null, |
| 385 | + "execution_count": 3, |
386 | 386 | "id": "60ad7781", |
387 | 387 | "metadata": {}, |
388 | 388 | "outputs": [], |
|
406 | 406 | }, |
407 | 407 | { |
408 | 408 | "cell_type": "code", |
409 | | - "execution_count": 6, |
| 409 | + "execution_count": 4, |
410 | 410 | "id": "30dfc770", |
411 | 411 | "metadata": {}, |
412 | 412 | "outputs": [], |
|
418 | 418 | }, |
419 | 419 | { |
420 | 420 | "cell_type": "code", |
421 | | - "execution_count": 7, |
| 421 | + "execution_count": 5, |
422 | 422 | "id": "e37e5a77", |
423 | 423 | "metadata": {}, |
424 | 424 | "outputs": [], |
|
436 | 436 | }, |
437 | 437 | { |
438 | 438 | "cell_type": "code", |
439 | | - "execution_count": 8, |
| 439 | + "execution_count": 6, |
440 | 440 | "id": "5bedc1dd", |
441 | 441 | "metadata": { |
442 | 442 | "scrolled": true |
|
446 | 446 | "name": "stderr", |
447 | 447 | "output_type": "stream", |
448 | 448 | "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", |
450 | 450 | " 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", |
452 | 452 | " 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", |
454 | 454 | " ts = (start_time - np.datetime64('1970-01-01T00:00:00Z')) / np.timedelta64(1, 's')\n" |
455 | 455 | ] |
456 | 456 | } |
|
519 | 519 | }, |
520 | 520 | { |
521 | 521 | "cell_type": "code", |
522 | | - "execution_count": 9, |
| 522 | + "execution_count": 7, |
523 | 523 | "id": "00e4d3b5", |
524 | 524 | "metadata": {}, |
525 | 525 | "outputs": [ |
|
597 | 597 | "<Link rel=item target=<Item id=tccas-sodankylae-insitu_package>>" |
598 | 598 | ] |
599 | 599 | }, |
600 | | - "execution_count": 9, |
| 600 | + "execution_count": 7, |
601 | 601 | "metadata": {}, |
602 | 602 | "output_type": "execute_result" |
603 | 603 | } |
|
639 | 639 | }, |
640 | 640 | { |
641 | 641 | "cell_type": "code", |
642 | | - "execution_count": 10, |
| 642 | + "execution_count": 8, |
643 | 643 | "id": "60f80689", |
644 | 644 | "metadata": {}, |
645 | 645 | "outputs": [ |
|
717 | 717 | "<Link rel=item target=<Item id=tccas-sodankylae-model_forcing>>" |
718 | 718 | ] |
719 | 719 | }, |
720 | | - "execution_count": 10, |
| 720 | + "execution_count": 8, |
721 | 721 | "metadata": {}, |
722 | 722 | "output_type": "execute_result" |
723 | 723 | } |
|
796 | 796 | }, |
797 | 797 | { |
798 | 798 | "cell_type": "code", |
799 | | - "execution_count": 11, |
| 799 | + "execution_count": 9, |
800 | 800 | "id": "ead22923", |
801 | 801 | "metadata": {}, |
802 | 802 | "outputs": [ |
|
874 | 874 | "<Link rel=item target=<Item id=tccas-sodankylae-documentation>>" |
875 | 875 | ] |
876 | 876 | }, |
877 | | - "execution_count": 11, |
| 877 | + "execution_count": 9, |
878 | 878 | "metadata": {}, |
879 | 879 | "output_type": "execute_result" |
880 | 880 | } |
|
927 | 927 | "id": "33d4ffee", |
928 | 928 | "metadata": {}, |
929 | 929 | "source": [ |
930 | | - "## 4. Save the metadata as a self-contained collection" |
| 930 | + "## 3. Save the metadata as a self-contained collection" |
931 | 931 | ] |
932 | 932 | }, |
933 | 933 | { |
934 | 934 | "cell_type": "code", |
935 | | - "execution_count": 12, |
| 935 | + "execution_count": 10, |
936 | 936 | "id": "52756c30", |
937 | 937 | "metadata": {}, |
938 | 938 | "outputs": [], |
|
946 | 946 | }, |
947 | 947 | { |
948 | 948 | "cell_type": "code", |
949 | | - "execution_count": 13, |
| 949 | + "execution_count": 11, |
950 | 950 | "id": "4a19d066", |
951 | 951 | "metadata": {}, |
952 | 952 | "outputs": [ |
|
1050 | 1050 | " \n", |
1051 | 1051 | " <li class=\"pystac-row\">\n", |
1052 | 1052 | " <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", |
1054 | 1054 | " </li>\n", |
1055 | 1055 | " \n", |
1056 | 1056 | " \n", |
|
1101 | 1101 | " \n", |
1102 | 1102 | " <li class=\"pystac-row\">\n", |
1103 | 1103 | " <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", |
1105 | 1105 | " </li>\n", |
1106 | 1106 | " \n", |
1107 | 1107 | " \n", |
|
1143 | 1143 | " \n", |
1144 | 1144 | " <li class=\"pystac-row\">\n", |
1145 | 1145 | " <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", |
1147 | 1147 | " </li>\n", |
1148 | 1148 | " \n", |
1149 | 1149 | " \n", |
|
1185 | 1185 | " \n", |
1186 | 1186 | " <li class=\"pystac-row\">\n", |
1187 | 1187 | " <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", |
1189 | 1189 | " </li>\n", |
1190 | 1190 | " \n", |
1191 | 1191 | " \n", |
|
1227 | 1227 | " \n", |
1228 | 1228 | " <li class=\"pystac-row\">\n", |
1229 | 1229 | " <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", |
1231 | 1231 | " </li>\n", |
1232 | 1232 | " \n", |
1233 | 1233 | " \n", |
|
1269 | 1269 | " \n", |
1270 | 1270 | " <li class=\"pystac-row\">\n", |
1271 | 1271 | " <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", |
1273 | 1273 | " </li>\n", |
1274 | 1274 | " \n", |
1275 | 1275 | " \n", |
|
1311 | 1311 | " \n", |
1312 | 1312 | " <li class=\"pystac-row\">\n", |
1313 | 1313 | " <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", |
1315 | 1315 | " </li>\n", |
1316 | 1316 | " \n", |
1317 | 1317 | " \n", |
|
1353 | 1353 | " \n", |
1354 | 1354 | " <li class=\"pystac-row\">\n", |
1355 | 1355 | " <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", |
1357 | 1357 | " </li>\n", |
1358 | 1358 | " \n", |
1359 | 1359 | " \n", |
|
1395 | 1395 | " \n", |
1396 | 1396 | " <li class=\"pystac-row\">\n", |
1397 | 1397 | " <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", |
1399 | 1399 | " </li>\n", |
1400 | 1400 | " \n", |
1401 | 1401 | " \n", |
|
1437 | 1437 | " \n", |
1438 | 1438 | " <li class=\"pystac-row\">\n", |
1439 | 1439 | " <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", |
1441 | 1441 | " </li>\n", |
1442 | 1442 | " \n", |
1443 | 1443 | " \n", |
|
1479 | 1479 | " \n", |
1480 | 1480 | " <li class=\"pystac-row\">\n", |
1481 | 1481 | " <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", |
1483 | 1483 | " </li>\n", |
1484 | 1484 | " \n", |
1485 | 1485 | " \n", |
|
1521 | 1521 | " \n", |
1522 | 1522 | " <li class=\"pystac-row\">\n", |
1523 | 1523 | " <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", |
1525 | 1525 | " </li>\n", |
1526 | 1526 | " \n", |
1527 | 1527 | " \n", |
|
1563 | 1563 | " \n", |
1564 | 1564 | " <li class=\"pystac-row\">\n", |
1565 | 1565 | " <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", |
1567 | 1567 | " </li>\n", |
1568 | 1568 | " \n", |
1569 | 1569 | " \n", |
|
1605 | 1605 | " \n", |
1606 | 1606 | " <li class=\"pystac-row\">\n", |
1607 | 1607 | " <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", |
1609 | 1609 | " </li>\n", |
1610 | 1610 | " \n", |
1611 | 1611 | " \n", |
|
1802 | 1802 | "<Collection id=tccas-sodankylae>" |
1803 | 1803 | ] |
1804 | 1804 | }, |
1805 | | - "execution_count": 13, |
| 1805 | + "execution_count": 11, |
1806 | 1806 | "metadata": {}, |
1807 | 1807 | "output_type": "execute_result" |
1808 | 1808 | } |
1809 | 1809 | ], |
1810 | 1810 | "source": [ |
1811 | 1811 | "collection" |
1812 | 1812 | ] |
| 1813 | + }, |
| 1814 | + { |
| 1815 | + "cell_type": "code", |
| 1816 | + "execution_count": null, |
| 1817 | + "id": "585db2d3", |
| 1818 | + "metadata": {}, |
| 1819 | + "outputs": [], |
| 1820 | + "source": [] |
1813 | 1821 | } |
1814 | 1822 | ], |
1815 | 1823 | "metadata": { |
|
0 commit comments