Fetching Climate Datasets

Fetching Datasets

Search datasets using the list_dataset_blocks function which has the following definition:

res_list = list_dataset_blocks(
  adapter,
  query='*',
  region=None,
  scenario=None,
  experiment=None,
  model=None,
  variable=None,
  temporalFrequency=None,
  lat=None,
  lon=None,
  cordexDomain=None,
  cordexVariable=None,
  cordexModelId=None,
  cordexDrivingModelId=None,
  cordexExperimentId=None,
  cordexFrequency=None,
  cordexDrivingModelEnsembleMember=None,
)

where,

  • adapter: The Eratos adapter used to perform the query.
  • query: A textual search string to query the available datasets against.
  • region: The id (String) or Eratos Resource (Object) of the region resource to match against.
  • scenario: The id (String) or Eratos Resource (Object) of the scenario resource to match against.
  • experiment: The id (String) or Eratos Resource (Object) of the experiment resource to match against.
  • model: The id (String) or Eratos Resource (Object) of the model resource to match against.
  • variable: The id (String) or Eratos Resource (Object) of the variable resource to match against.
  • temporalFrequency: The id (String) or Eratos Resource (Object) of the time period resource to match against.
  • lat: A latitude (Float) to match against. (WGS84)
  • lon: A longitude (Float) to match against. (WGS84)
  • cordexDomain: The cordex variable domain to match against (Mutually exclusive with region).
  • cordexVariable: The cordex variable key to match against (Mutually exclusive with variable).
  • cordexModelId: The cordex model id to match against (Mutually exclusive with experiment).
  • cordexDrivingModelId: The cordex driving model id to match against (Mutually exclusive with model).
  • cordexExperimentId: The cordex experiment id to match against (Mutually exclusive with scenario).
  • cordexFrequency: The cordex frequency key to match against (Mutually exclusive with temporalFrequency).
  • cordexDrivingModelEnsembleMember: The cordex model ensemble member key to match against.
  • res_list: A list of Eratos Dataset Resources that match the query.

Examples in Python and R are shown below.

# Query for all datasets.
eratosClimate.list_dataset_blocks(adapter)
# Query for the datasets using the search string 'precipitation'
eratosClimate.list_dataset_blocks(adapter, 'precipitation')
# Query for the datasets matching the cordex variable id 'pr'
eratosClimate.list_dataset_blocks(adapter, cordexVariable='pr')
# Query for the datasets in the region TAS-10.
region_id = eratosClimate.list_regions(adapter, cordexDomain ='TAS-10')
eratosClimate.list_dataset_blocks(adapter, region=region_id[0])
# Query for the datasets with the pr, tasmax and tasmin cordex variables at 145.010 -37.826
eratosClimate.list_dataset_blocks(adapter,
 cordexVariable= ['pr','tasmax','tasmin'], lon = 145.010 , lat = -37.826)
# Query for all datasets.
eratosClimate$list_dataset_blocks(adapter)
# Query for the datasets using the search string 'precipitation'
eratosClimate$list_dataset_blocks(adapter, 'precipitation')
# Query for the datasets matching the cordex variable id 'pr'
eratosClimate$list_dataset_blocks(adapter, cordexVariable='pr')
# Query for the datasets in the region TAS-10.
region_id = eratosClimate$list_regions(adapter, cordexDomain ='TAS-10')
eratosClimate$list_dataset_blocks(adapter, region=region_id[[0]])
# Query for the datasets with the pr, tasmax and tasmin cordex variables at 145.010 -37.826
eratosClimate$list_dataset_blocks(adapter, cordexVariable= ['pr','tasmax','tasmin'], lon = 145.010 , lat = -37.826)