ewatercycle.esmvaltool.search ============================= .. py:module:: ewatercycle.esmvaltool.search .. autoapi-nested-parse:: Search ESGF for datasets with ESMValTool. Module Contents --------------- .. py:data:: logger .. py:function:: search_esgf(experiment: str, frequency: Literal['hr', '3hr', 'day'], variables: list[str], project: str = 'CMIP6', extended_mip_tables: bool = False, verbose: bool = False) -> dict[str, set[str]] Search through ESGF using ESMValTool to find datasets fitting your requirements. As different models require different inputs for their forcing generation, this module helps you find which CMIP models (and their ensembles) have the required variables stored on the `Earth System Grid Federation (ESGF). `_ Do note that although a dataset might be in the MIP tables, the actual node hosting the data could be offline. Node status can be found `here `_. More informations on ESMValTool's search functionality can be found at the `ESMValCore api docs `_ For more information on what valid experiments, frequencies, variables are, see the `CMIP6 controlled vocabulary (CV). `_ You can also use the ESGF REST API to ask for currently available values, e.g.: https://esgf-node.llnl.gov/esg-search/search?format=application%2Fsolr%2Bjson&project=CMIP6&facets=experiment_id&limit=0 .. rubric:: Examples To find all model ensembles which have the "pr", "tas", "rsdt" and "orog" variables (the ones required for wflow), for the ssp585 scenario. .. code-block:: python from ewatercycle.esmvaltool.search import search_esgf search_esgf( experiment="ssp585", frequency="day", variables=["pr", "tas", "rsdt", "orog"], ) Gives something like: .. code-block:: python { 'MPI-ESM1-2-HR': {'r1i1p1f1', 'r2i1p1f1'}, 'MPI-ESM1-2-LR': {'r10i1p1f1', 'r11i1p1f1', ... 'r9i1p1f1'}, 'INM-CM4-8': {'r1i1p1f1'}, 'MRI-ESM2-0': {'r1i1p1f1', 'r2i1p1f1', 'r3i1p1f1', 'r4i1p1f1', 'r5i1p1f1'}, 'IPSL-CM6A-LR': {'r1i1p1f1'}, 'GFDL-CM4': {'r1i1p1f1'}, } :param experiment: The experiment of interest. E.g.: 'ssp585' :param frequency: Which frequency of data are you interested in. Valid inputs are 'hr', '3hr', and 'day. :param variables: Which variables are you searching for. Use the short_name definition. For example: ['pr', 'tas']. :param project: Which project to search in. Defaults to 'CMIP6'. :param extended_mip_tables: Optional. If you want to use extended MIP tables. These tables are probably not relevant for most hydrology usecases and can make the search slower. Defaults to False. :param verbose: Optional. If the results should be printed in a verbose way, to aid in your search experience. Defaults to False. :returns: A dictionary with the dataset name as key, and the valid ensemble member names in a set as items.