"1. [DKRZ intake-esm catalogs for project data](#examples)\n",
"1. [Catalog dependencies on different stores](#stores)\n",
"1. [Workflow at Levante for collecting and merging catalogs into main catalog](#workflow)\n",
...
...
@@ -56,13 +57,234 @@
"source": [
"<a class=\"anchor\" id=\"examples\"></a>\n",
"\n",
"## Closer look into DKRZ intake-esm catalogs for project data\n",
"## DKRZ intake-esm catalog strategy and schema\n",
"\n",
"- You will find only **one version** for each *atomic dataset* in each catalog. This is the most recent one available in the store.\n",
"- All catalogs try to follow the *cataloonies schema* for dkrz catalogs\n",
"- Across the project you will find **redundant** attributes in the catalogs which have the same meaning, e.g:\n",
"DKRZ catalogs aim at using one common scheme for its attributes so that **combining** catalogs and working with multiple catalogs on the same time will be easy. In collaboration with NextGEMS scientists, we agreed on some attribute names that DKRZ intake-esm catalogs should be equipped with. The resulting scheme is named *cataloonies scheme*.\n",
"\n",
"```{note}\n",
"\n",
"The cataloonies scheme is not a standard for anything but evolving and adapting to use cases. It is influenced mainly by ICON output and the CMIP standard. If you have suggestions, please contact us.\n",
"\n",
"```\n",
"\n",
"- As a result, you will find **redundant** attributes in project catalogs which have the same meaning, e.g:\n",
" - source_id, model_id, model\n",
" - member_id, ensemble_member, simulation_id"
" - member_id, ensemble_member, simulation_id\n",
"- Which of these attributes are loaded into the python workflow can be set (see intake-1).\n",
"- You will find only **one version** for each *atomic dataset* in each catalog. This is the most recent one available in the store. An atomic dataset is found if unique values are set for all catalog attributes with one exception: it covers the entire time span of the simulation."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a class=\"anchor\" id=\"examples\"></a>\n",
"\n",
"### The cataloonies scheme\n",
"\n",
"ESM script developers, project scientists and data managers together defined some attribute names that DKRZ intake-esm catalogs should be equipped with. One benefit, originated by the composition of this working group, is that these attribute names can be used throughout the research data life cycle: At the earliest point, for model raw output, but also at the latest point, for data that is standardized and published.\n",
"\n",
"The integration of intake-esm catalog generation into ESM run scripts is planned. That will enable the usage of intake and with it the easy usage and configuration of the python software stack for data processing from the beginning of data life.\n",
"\n",
"Already existing catalogs will be provided with the newly defined attributes. For some, the values will fall back to *None* as there is no easy way to retrieve the values without looking into the asset which is technically not implementable when taking into account the amount of published project data. For CMIP6-like projects, we can take missing information from the *cmor-mip-tables* which represent the data standard of the project."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Attribute name and column name</th>\n",
" <th>Examples</th>\n",
" <th>Description</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>project</td>\n",
" <td>DYAMON-WINTER</td>\n",
" <td>The project in which the data was produced</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>institution_id</td>\n",
" <td>MPIM-DWD-DKRZ</td>\n",
" <td>The institution that runs the simulations</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>source_id</td>\n",
" <td>ICON-SAP-5km</td>\n",
" <td>The Earth System Model which produced the simu...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>experiment_id</td>\n",
" <td>DW-CPL / DW-ATM</td>\n",
" <td>The short term for the experiment that was run</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>simulation_id</td>\n",
" <td>dpp1234</td>\n",
" <td>The simulation/member/realization of the ensem...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>realm</td>\n",
" <td>atm / oce</td>\n",
" <td>The submodel of the ESM which produces the out...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>frequency</td>\n",
" <td>PT1h or 1hr – Style</td>\n",
" <td>The frequency of the output</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>time_reduction</td>\n",
" <td>mean / inst / timmax /…</td>\n",
" <td>The method used for sampling and averaging alo...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>grid_label</td>\n",
" <td>gn</td>\n",
" <td>A clear description for the grid for distingus...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>grid_id</td>\n",
" <td></td>\n",
" <td>A specific identifier of the grid.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>variable_id</td>\n",
" <td>tas</td>\n",
" <td>The CMIP short term of the variable.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>level_type</td>\n",
" <td>pressure_level, atmosphere_level</td>\n",
" <td>The vertical axis type used for the variable.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>time_min</td>\n",
" <td>1800</td>\n",
" <td>The minimal time value covered by the asset.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>time_max</td>\n",
" <td>1900</td>\n",
" <td>The maximal time value covered by the asset.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>format</td>\n",
" <td>netcdf/zarr/…</td>\n",
" <td>The format of the asset.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>uri</td>\n",
" <td>url,path-to-file</td>\n",
" <td>The uri used to open and load the asset.</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>(time_range)</td>\n",
" <td>start-end</td>\n",
" <td>Combination of time_min and time_max.</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Attribute name and column name ... Description\n",
"0 project ... The project in which the data was produced\n",
"1 institution_id ... The institution that runs the simulations\n",
"2 source_id ... The Earth System Model which produced the simu...\n",
"3 experiment_id ... The short term for the experiment that was run\n",
"4 simulation_id ... The simulation/member/realization of the ensem...\n",
"5 realm ... The submodel of the ESM which produces the out...\n",
"6 frequency ... The frequency of the output\n",
"7 time_reduction ... The method used for sampling and averaging alo...\n",
"8 grid_label ... A clear description for the grid for distingus...\n",
"9 grid_id ... A specific identifier of the grid.\n",
"10 variable_id ... The CMIP short term of the variable.\n",
"11 level_type ... The vertical axis type used for the variable.\n",
"12 time_min ... The minimal time value covered by the asset.\n",
"13 time_max ... The maximal time value covered by the asset.\n",
"14 format ... The format of the asset.\n",
"15 uri ... The uri used to open and load the asset.\n",
"16 (time_range) ... Combination of time_min and time_max.\n",
"\n",
"[17 rows x 3 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"cataloonies_raw=[[\"#\",\"Attribute name and column name\",\"Examples\",\"Description\",\"Comments\"],\n",
"[1,\"project\",\"DYAMON-WINTER\",\"The project in which the data was produced\",],\n",
"[2,\"institution_id\",\"MPIM-DWD-DKRZ\",\"The institution that runs the simulations\",],\n",
"[3,\"source_id\",\"ICON-SAP-5km\",\"The Earth System Model which produced the simulations\",],\n",
"[4,\"experiment_id\",\"DW-CPL / DW-ATM\",\"The short term for the experiment that was run\",],\n",
"[5,\"simulation_id\",\"dpp1234\",\"The simulation/member/realization of the ensemble.\",],\n",
"[6,\"realm\",\"atm / oce\",\"The submodel of the ESM which produces the output.\",],\n",
"[7,\"frequency\",\"PT1h or 1hr – Style\",\"The frequency of the output\",\"ICON uses ISO format\"],\n",
"[8,\"time_reduction\",\"mean / inst / timmax /…\",\"The method used for sampling and averaging along time. The same as the time part of cell_methods.\",],\n",
"[9,\"grid_label\",\"gn\",\"A clear description for the grid for distingusihing between native and regridded grids.\",],\n",
"[10,\"grid_id\",\"\",\"A specific identifier of the grid.\",\"we might need more than one (e.g. horizontal + vertical)\"],\n",
"[11,\"variable_id\",\"tas\",\"The CMIP short term of the variable.\",],\n",
"[12,\"level_type\",\"pressure_level, atmosphere_level\",\"The vertical axis type used for the variable.\",],\n",
"[13,\"time_min\",1800,\"The minimal time value covered by the asset.\",],\n",
"[14,\"time_max\",1900,\"The maximal time value covered by the asset.\",],\n",
"[15,\"format\",\"netcdf/zarr/…\",\"The format of the asset.\",],\n",
"[16,\"uri\",\"url,path-to-file\",\"The uri used to open and load the asset.\",],\n",
"[17,\"(time_range)\",\"start-end\",\"Combination of time_min and time_max.\",]]\n",
" - Only a small subset is still available on the pool's common and shared disk resource due to a lack of disk storage capacity. But most of the data have been archived and can be accessed via `jblob`.\n",
...
...
@@ -107,11 +328,12 @@
" - A **unique variable** is a combination of `mip_table` and `variable`. A variable can look different from one table to another. I.e., a variable can have different dimensions for monthly frequency than it has for daily frequency.\n",
" - For disk projects, mostly linked under `/pool/data`\n",
"- **Attributes**:\n",
...
...
@@ -184,8 +406,10 @@
"## Preparing project catalogs for DKRZ's main catalog\n",
"\n",
"1. Use attributes of existing catalogs and/or templates in `/pool/data/Catalogs/Templates` but at least `uri`, `format` and `project`.\n",
"1. Make the data referenced in the catalog and the catalog readable for everyone.\n",
"1. Use the naming convention for dkrz catalogs: `dkrz_PROJECT_STORE`.\n",
"1. Set permissions to *readable for everyone* for\n",
" - the data referenced in the catalog under `uri`\n",
" - the catalog itself\n",
"1. Use the naming convention for dkrz catalogs ( `dkrz_PROJECT_STORE` ) for your catalog\n",
"1. Link the catalog via `ln -s PATH-TO-YOUR-CATALOG /pool/data/Catalogs/Candidates/YOUR-CATALOG`\n"
]
},
...
...
@@ -200,7 +424,7 @@
" - open, search and load\n",
" - if for disk, are all `uri` values *readable*?\n",
"1. merges or creates your catalog\n",
" - if a catalog for the specified project exists in `/pool/data/Catalogs/`, they will be merged if possible\n",
" - if a catalog for the specified project exists in `/pool/data/Catalogs/`, they will be merged if possible. Entries of your catalog will be merged if they are no duplicates.\n",
" - else, your catalog will be written to `/work/ik1017/Catalogs` and a link will be set in `/pool/data/Catalogs/`"
]
},
...
...
%% Cell type:markdown id: tags:
# Intake I - find, browse and access `intake-esm` collections
1. [DKRZ intake-esm catalogs for project data](#examples)
1. [Catalog dependencies on different stores](#stores)
1. [Workflow at Levante for collecting and merging catalogs into main catalog](#workflow)
```
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
## Closer look into DKRZ intake-esm catalogs for project data
## DKRZ intake-esm catalog strategy and schema
- You will find only **one version** for each *atomic dataset* in each catalog. This is the most recent one available in the store.
- All catalogs try to follow the *cataloonies schema* for dkrz catalogs
- Across the project you will find **redundant** attributes in the catalogs which have the same meaning, e.g:
DKRZ catalogs aim at using one common scheme for its attributes so that **combining** catalogs and working with multiple catalogs on the same time will be easy. In collaboration with NextGEMS scientists, we agreed on some attribute names that DKRZ intake-esm catalogs should be equipped with. The resulting scheme is named *cataloonies scheme*.
```{note}
The cataloonies scheme is not a standard for anything but evolving and adapting to use cases. It is influenced mainly by ICON output and the CMIP standard. If you have suggestions, please contact us.
```
- As a result, you will find **redundant** attributes in project catalogs which have the same meaning, e.g:
- source_id, model_id, model
- member_id, ensemble_member, simulation_id
- Which of these attributes are loaded into the python workflow can be set (see intake-1).
- You will find only **one version** for each *atomic dataset* in each catalog. This is the most recent one available in the store. An atomic dataset is found if unique values are set for all catalog attributes with one exception: it covers the entire time span of the simulation.
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
### The cataloonies scheme
ESM script developers, project scientists and data managers together defined some attribute names that DKRZ intake-esm catalogs should be equipped with. One benefit, originated by the composition of this working group, is that these attribute names can be used throughout the research data life cycle: At the earliest point, for model raw output, but also at the latest point, for data that is standardized and published.
The integration of intake-esm catalog generation into ESM run scripts is planned. That will enable the usage of intake and with it the easy usage and configuration of the python software stack for data processing from the beginning of data life.
Already existing catalogs will be provided with the newly defined attributes. For some, the values will fall back to *None* as there is no easy way to retrieve the values without looking into the asset which is technically not implementable when taking into account the amount of published project data. For CMIP6-like projects, we can take missing information from the *cmor-mip-tables* which represent the data standard of the project.
%% Cell type:code id: tags:
``` python
importpandasaspd
cataloonies_raw=[["#","Attribute name and column name","Examples","Description","Comments"],
[1,"project","DYAMON-WINTER","The project in which the data was produced",],
[2,"institution_id","MPIM-DWD-DKRZ","The institution that runs the simulations",],
[3,"source_id","ICON-SAP-5km","The Earth System Model which produced the simulations",],
[4,"experiment_id","DW-CPL / DW-ATM","The short term for the experiment that was run",],
[5,"simulation_id","dpp1234","The simulation/member/realization of the ensemble.",],
[6,"realm","atm / oce","The submodel of the ESM which produces the output.",],
[7,"frequency","PT1h or 1hr – Style","The frequency of the output","ICON uses ISO format"],
[8,"time_reduction","mean / inst / timmax /…","The method used for sampling and averaging along time. The same as the time part of cell_methods.",],
[9,"grid_label","gn","A clear description for the grid for distingusihing between native and regridded grids.",],
[10,"grid_id","","A specific identifier of the grid.","we might need more than one (e.g. horizontal + vertical)"],
[11,"variable_id","tas","The CMIP short term of the variable.",],
[12,"level_type","pressure_level, atmosphere_level","The vertical axis type used for the variable.",],
[13,"time_min",1800,"The minimal time value covered by the asset.",],
[14,"time_max",1900,"The maximal time value covered by the asset.",],
[15,"format","netcdf/zarr/…","The format of the asset.",],
[16,"uri","url,path-to-file","The uri used to open and load the asset.",],
[17,"(time_range)","start-end","Combination of time_min and time_max.",]]
0 project ... The project in which the data was produced
1 institution_id ... The institution that runs the simulations
2 source_id ... The Earth System Model which produced the simu...
3 experiment_id ... The short term for the experiment that was run
4 simulation_id ... The simulation/member/realization of the ensem...
5 realm ... The submodel of the ESM which produces the out...
6 frequency ... The frequency of the output
7 time_reduction ... The method used for sampling and averaging alo...
8 grid_label ... A clear description for the grid for distingus...
9 grid_id ... A specific identifier of the grid.
10 variable_id ... The CMIP short term of the variable.
11 level_type ... The vertical axis type used for the variable.
12 time_min ... The minimal time value covered by the asset.
13 time_max ... The maximal time value covered by the asset.
14 format ... The format of the asset.
15 uri ... The uri used to open and load the asset.
16 (time_range) ... Combination of time_min and time_max.
[17 rows x 3 columns]
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
## DKRZ intake-esm catalogs for community project data
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
By 2022, we offer you project data for
```{tabbed} CMIP6-like projects
- 💾 **projects** :
- [CMIP6](https://c6de.dkrz.de/)
- [PalMod2](https://www.palmod.de/)
- **Data location**:
- is hosted within the [cmip-data-pool](cmip-data-pool.dkrz.de) accessible for all dkrz users under `/pool/data/PROJECT`
- **Attributes**:
- the catalog's attributes are explained [here](https://goo.gl/v1drZl)
- `source_id` and `experiment_id` are the most important attributes. A unique `source_id` refers to one and only the one same model. Different institutions can use it but it is the same model. An `experiment_id` can be found only in *one activity*.
- values of `member_id` are rather arbitrary. Some member might never be published, others have been retracted. There is no gurantee in having *r1i1p1f1* availabe.
- **Variable definition**:
- a **unique variable** is a combination of `table_id` and `variable_id`. A variable can look different from one table to another. I.e., a variable can have different dimensions for monthly frequency than it has for daily frequency.
- Only a small subset is still available on the pool's common and shared disk resource due to a lack of disk storage capacity. But most of the data have been archived and can be accessed via `jblob`.
- CORDEX:
- On disk, CORDEX data are disseminated across different storage projects
- **Attributes**:
- In comparison to CMIP6-like projects, such projects build on the older CMIP5 standard. Therefore, some attributes have different names.
- Regional model data includes additional attributes incomparison to CMIP5: `CORDEX_domain`, `driving_model_id` and `rcm_version_id`.
- **Variable definition**:
- A **unique variable** is a combination of `mip_table` and `variable`. A variable can look different from one table to another. I.e., a variable can have different dimensions for monthly frequency than it has for daily frequency.
- For disk projects, mostly linked under `/pool/data`
- **Attributes**:
- We try to use the cataloonies schema for catalogs of all other projects. For reanalysis products, it cannot be entirely fulfilled as the data is available in GRIB format.
```
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
## Catalog dependencies on different stores
DKRZ's catalog naming convention distinguishes between the different storage formats for as long as data access to stores like archive is either not possible or very different to disk access. The specialties of the storages are explained in the following.
%% Cell type:markdown id: tags:
```{tabbed} Disk
- **Way of data access**:
- `uri` contain *pathes* on levante's lustre filesystem
- **User requirements for data access**:
- users muste be **logged in** to levante to *access* the data (exception: opendap_url column, see [introduction]())
- **Provider requirements**:
- pathes of a valid catalog must be *readable for everyone*
```
```{tabbed} Cloud
- **Way of data access**:
- `uri` contain *links* to datasets in dkrz's swift cloud storage which can be opened with `xarray` and therefore `intake`
- If the asset's `format` is *zarr* (specified in the `format` column), use `zarr_kwargs` in the `to_dataset_dict()` function
- **User requirements for data access**:
- None. Users can access it from everywhere if internet connection is sufficient
- **Provider requirements**:
- links in a valid catalog must point at datasets in **open containers**
```
```{tabbed} Archive
- **Way of data access**:
- `uri` is empty i.e. no direct data access via intake is possible. If the catalog contains a `jblob_file` column, users can however download the data via *jblob* on levante (see next point).
- **User requirements for data access**:
- users muste be **logged in** to levante to *access* the data. After loading the module on levante via `module load jblob`, e.g. for CMIP5, an example command is `jblob --cmip5-file DSET` where dset is a value of `jblob_file`, e.g. `cmip5.output1.BCC.bcc-csm1-1.abrupt4xCO2.fx.atmos.fx.r0i0p0.v1.areacella.areacella_fx_bcc-csm1-1_abrupt4xCO2_r0i0p0.nc`
- **Provider requirements**:
- None
```
%% Cell type:markdown id: tags:
<aclass="anchor"id="examples"></a>
## Preparing project catalogs for DKRZ's main catalog
1. Use attributes of existing catalogs and/or templates in `/pool/data/Catalogs/Templates` but at least `uri`, `format` and `project`.
1. Make the data referenced in the catalog and the catalog readable for everyone.
1. Use the naming convention for dkrz catalogs: `dkrz_PROJECT_STORE`.
1. Set permissions to *readable for everyone* for
- the data referenced in the catalog under `uri`
- the catalog itself
1. Use the naming convention for dkrz catalogs ( `dkrz_PROJECT_STORE` ) for your catalog
1. Link the catalog via `ln -s PATH-TO-YOUR-CATALOG /pool/data/Catalogs/Candidates/YOUR-CATALOG`
%% Cell type:markdown id: tags:
Your catalog then will be catched by a cronjob which
1. tests your catalog
- against the catalog naming convention
- open, search and load
- if for disk, are all `uri` values *readable*?
1. merges or creates your catalog
- if a catalog for the specified project exists in `/pool/data/Catalogs/`, they will be merged if possible
- if a catalog for the specified project exists in `/pool/data/Catalogs/`, they will be merged if possible. Entries of your catalog will be merged if they are no duplicates.
- else, your catalog will be written to `/work/ik1017/Catalogs` and a link will be set in `/pool/data/Catalogs/`
* [Part 4: Use preprocessing and create derived variables](https://data-infrastructure-services.gitlab-pages.dkrz.de/tutorials-and-use-cases/tutorial_intake-4-preprocessing-derived-variables.html)
* [Part 5: How to create an intake catalog](https://data-infrastructure-services.gitlab-pages.dkrz.de/tutorials-and-use-cases/tutorial_intake-5-create-esm-collection.html)
- You can also do another [CMIP6 tutorial](https://intake-esm.readthedocs.io/en/latest/user-guide/cmip6-tutorial.html) from the official intake page.