diff --git a/docs/notebooks/api_user_guide/5_queryables.ipynb b/docs/notebooks/api_user_guide/5_queryables.ipynb index 77801c165d..0f1201c870 100644 --- a/docs/notebooks/api_user_guide/5_queryables.ipynb +++ b/docs/notebooks/api_user_guide/5_queryables.ipynb @@ -26,13 +26,6 @@ "tags": [] }, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "astraea_eod skipped: could not be loaded from user configuration\n" - ] - }, { "data": { "text/html": [ @@ -77,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "id": "5493a4e8-83e5-4e5f-953e-5c71267bf87d", "metadata": {}, "outputs": [ @@ -87,7 +80,7 @@ "True" ] }, - "execution_count": 4, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -97,12 +90,306 @@ "queryables.additional_properties" ] }, + { + "cell_type": "markdown", + "id": "103cf53d-57f3-424c-800b-f2a05eeef98b", + "metadata": {}, + "source": [ + "If the function is called for a specific product type, the queryables available for this product type, i.e., the basic queryables and product type specific queryables, are shown. Only parameters available for all providers offering the product are returned." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "ed35bb7d-5a0c-413b-90a4-7b69d559a9ef", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " QueryablesDict (13) - additional_properties=False\n", + "
\n", + "
\n", + " 'ecmwf:system_version': \n", + " typing.Annotated[List[Literal['operational']], \n", + " FieldInfo('default': 'operational', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['operational']],
\n", + " FieldInfo(annotation=NoneType, required=False, default='operational', title='System version', description=\"System version is the version number of the GloFAS system. Choose 'Operational' for accessing datasets from the official system maintained 24/7 into operations. Following an update, we may provide access to the old GloFAS system for a few months after the official release, these can be found in the Legacy section. Details on system version can be found in the documentation under 'GloFAS versioning system'.

The GloFAS version that was in operations for forecasts between

2019/11/05 - 2021/05/25 GloFAS v2.1

2021/05/26 - 2023/07/25 GloFAS v3.1

2023/07/26 - present GloFAS v4.0\")
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:hydrological_model': \n", + " typing.Annotated[List[Literal['htessel_lisflood']], \n", + " FieldInfo('default': 'htessel_lisflood', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['htessel_lisflood']],
\n", + " FieldInfo(annotation=NoneType, required=False, default='htessel_lisflood', title='Hydrological model', description=\"Hydrological model chain used to generate the hydrological simulations. Details can be found in the documentation under 'GloFAS hydrological models'.\")
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:product_type': \n", + " typing.Annotated[List[Literal['control_forecast']], \n", + " FieldInfo('default': 'control_forecast', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['control_forecast']],
\n", + " FieldInfo(annotation=NoneType, required=False, default='control_forecast', title='Product type', description=\"Ensemble forecasts consisting of a single, unperturbed member ('control forecast') and perturbed ensemble members.\")
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:variable': \n", + " typing.Annotated[Literal['river_discharge_in_the_last_24_hours'], \n", + " FieldInfo('default': 'river_discharge_in_the_last_24_hours', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Literal['river_discharge_in_the_last_24_hours'],
\n", + " FieldInfo(annotation=NoneType, required=False, default='river_discharge_in_the_last_24_hours', title='Variable', description=\"Note that the term 'last hours' in the discharge time step refers to the hours preceeding the end of each time step. For more information about the variables we refer to the Documentation.\")
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:year': \n", + " typing.Annotated[List[Literal['2019']], \n", + " FieldInfo('default': '['2019']', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['2019']],
\n", + " FieldInfo(annotation=NoneType, required=False, default=['2019'], title='Year')
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:month': \n", + " typing.Annotated[List[Literal['11']], \n", + " FieldInfo('default': '['11']', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['11']],
\n", + " FieldInfo(annotation=NoneType, required=False, default=['11'], title='Month')
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:day': \n", + " typing.Annotated[List[Literal['05', ...]], \n", + " FieldInfo('default': '['05']', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']],
\n", + " FieldInfo(annotation=NoneType, required=False, default=['05'], title='Day')
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:leadtime_hour': \n", + " typing.Annotated[List[Literal['120', ...]], \n", + " FieldInfo('default': '24', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.List[typing.Literal['120', '144', '168', '192', '216', '24', '240', '264', '288', '312', '336', '360', '384', '408', '432', '456', '48', '480', '504', '528', '552', '576', '600', '624', '648', '672', '696', '72', '720', '96']],
\n", + " FieldInfo(annotation=NoneType, required=False, default='24', title='Leadtime hour', description='Time step of the forecast in hours.')
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:data_format': \n", + " typing.Annotated[Literal['grib2', ...], \n", + " FieldInfo('default': 'grib2', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Literal['grib2', 'netcdf'],
\n", + " FieldInfo(annotation=NoneType, required=False, default='grib2', title='Data format', description='Select a format for the data files, the native format of MARS datasets is GRIB, and this format is recommended for any operational use, such as deriving downstream products.\\nPlease note that to ensure that data is accurate and sufficient metadata is included in the output, your request may be split into multiple files when converted to netCDF.')
]\n", + "
\n", + "
\n", + "
\n", + " 'ecmwf:download_format': \n", + " typing.Annotated[Literal['unarchived', ...], \n", + " FieldInfo('default': 'zip', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Literal['unarchived', 'zip'],
\n", + " FieldInfo(annotation=NoneType, required=False, default='zip', title='Download format', description=\"Please note that in some circumstance the conversion from GRIB to NetCDF can result in multiple files.

If you select 'Zip' the files will always be zipped into a single file.

If you select 'Unarchived' then the files will be returned unarchived if there is only one file, and zipped if there are multiple files.\")
]\n", + "
\n", + "
\n", + "
\n", + " 'start': \n", + " typing.Annotated[Union[datetime, ...], \n", + " FieldInfo('default': '2019-11-05T00:00:00Z', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Union[datetime.datetime, datetime.date],
\n", + " FieldInfo(annotation=NoneType, required=False, default='2019-11-05T00:00:00Z', alias='startTimeFromAscendingNode', alias_priority=2)
]\n", + "
\n", + "
\n", + "
\n", + " 'end': \n", + " typing.Annotated[Union[datetime, ...], \n", + " FieldInfo('default': '2019-11-05T00:00:00+00:00', \n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Union[datetime.datetime, datetime.date],
\n", + " FieldInfo(annotation=NoneType, required=False, default='2019-11-05T00:00:00+00:00', alias='completionTimeFromAscendingNode', alias_priority=2)
]\n", + "
\n", + "
\n", + "
\n", + " 'geom': \n", + " typing.Annotated[Union[str, Dict[str, ...], ...], \n", + " FieldInfo(\n", + " 'required': False,\n", + " ...\n", + " )]\n", + " \n", + " typing.Annotated[\n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " typing.Union[str, typing.Dict[str, float], shapely.geometry.base.BaseGeometry],
\n", + " FieldInfo(annotation=NoneType, required=False, default=None, description='Read EODAG documentation for all supported geometry format.')
]\n", + "
\n", + "
" + ], + "text/plain": [ + "{'ecmwf:system_version': typing.Annotated[typing.List[typing.Literal['operational']], FieldInfo(annotation=NoneType, required=False, default='operational', title='System version', description=\"System version is the version number of the GloFAS system. Choose 'Operational' for accessing datasets from the official system maintained 24/7 into operations. Following an update, we may provide access to the old GloFAS system for a few months after the official release, these can be found in the Legacy section. Details on system version can be found in the documentation under 'GloFAS versioning system'.

The GloFAS version that was in operations for forecasts between

2019/11/05 - 2021/05/25 GloFAS v2.1

2021/05/26 - 2023/07/25 GloFAS v3.1

2023/07/26 - present GloFAS v4.0\")], 'ecmwf:hydrological_model': typing.Annotated[typing.List[typing.Literal['htessel_lisflood']], FieldInfo(annotation=NoneType, required=False, default='htessel_lisflood', title='Hydrological model', description=\"Hydrological model chain used to generate the hydrological simulations. Details can be found in the documentation under 'GloFAS hydrological models'.\")], 'ecmwf:product_type': typing.Annotated[typing.List[typing.Literal['control_forecast']], FieldInfo(annotation=NoneType, required=False, default='control_forecast', title='Product type', description=\"Ensemble forecasts consisting of a single, unperturbed member ('control forecast') and perturbed ensemble members.\")], 'ecmwf:variable': typing.Annotated[typing.Literal['river_discharge_in_the_last_24_hours'], FieldInfo(annotation=NoneType, required=False, default='river_discharge_in_the_last_24_hours', title='Variable', description=\"Note that the term 'last hours' in the discharge time step refers to the hours preceeding the end of each time step. For more information about the variables we refer to the Documentation.\")], 'ecmwf:year': typing.Annotated[typing.List[typing.Literal['2019']], FieldInfo(annotation=NoneType, required=False, default=['2019'], title='Year')], 'ecmwf:month': typing.Annotated[typing.List[typing.Literal['11']], FieldInfo(annotation=NoneType, required=False, default=['11'], title='Month')], 'ecmwf:day': typing.Annotated[typing.List[typing.Literal['05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']], FieldInfo(annotation=NoneType, required=False, default=['05'], title='Day')], 'ecmwf:leadtime_hour': typing.Annotated[typing.List[typing.Literal['120', '144', '168', '192', '216', '24', '240', '264', '288', '312', '336', '360', '384', '408', '432', '456', '48', '480', '504', '528', '552', '576', '600', '624', '648', '672', '696', '72', '720', '96']], FieldInfo(annotation=NoneType, required=False, default='24', title='Leadtime hour', description='Time step of the forecast in hours.')], 'ecmwf:data_format': typing.Annotated[typing.Literal['grib2', 'netcdf'], FieldInfo(annotation=NoneType, required=False, default='grib2', title='Data format', description='Select a format for the data files, the native format of MARS datasets is GRIB, and this format is recommended for any operational use, such as deriving downstream products.\\nPlease note that to ensure that data is accurate and sufficient metadata is included in the output, your request may be split into multiple files when converted to netCDF.')], 'ecmwf:download_format': typing.Annotated[typing.Literal['unarchived', 'zip'], FieldInfo(annotation=NoneType, required=False, default='zip', title='Download format', description=\"Please note that in some circumstance the conversion from GRIB to NetCDF can result in multiple files.

If you select 'Zip' the files will always be zipped into a single file.

If you select 'Unarchived' then the files will be returned unarchived if there is only one file, and zipped if there are multiple files.\")], 'start': typing.Annotated[typing.Union[datetime.datetime, datetime.date], FieldInfo(annotation=NoneType, required=False, default='2019-11-05T00:00:00Z', alias='startTimeFromAscendingNode', alias_priority=2)], 'end': typing.Annotated[typing.Union[datetime.datetime, datetime.date], FieldInfo(annotation=NoneType, required=False, default='2019-11-05T00:00:00+00:00', alias='completionTimeFromAscendingNode', alias_priority=2)], 'geom': typing.Annotated[typing.Union[str, typing.Dict[str, float], shapely.geometry.base.BaseGeometry], FieldInfo(annotation=NoneType, required=False, default=None, description='Read EODAG documentation for all supported geometry format.')]}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dag.list_queryables(productType=\"GLOFAS_FORECAST\")" + ] + }, { "cell_type": "markdown", "id": "41857931-fe84-4e27-ba69-54834ab2d0de", "metadata": {}, "source": [ - "The queryables can be retrieved for a specific product type and provider. These queryables are either taken from the queryables endpoint of the provider (if available), the constraints for the query parameter values defined by the provider (if available) or the provider configuration in EODAG. In the example below we use a provider offering a queryables endpoint." + "The queryables can also be retrieved for a specific provider. These queryables are either taken from the queryables endpoint of the provider (if available), the constraints for the query parameter values defined by the provider (if available) or the provider configuration in EODAG. In the example below we use a provider offering a queryables endpoint." ] }, { @@ -1381,7 +1668,14 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.1" + "version": "3.12.3" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "state": {}, + "version_major": 2, + "version_minor": 0 + } } }, "nbformat": 4,