Skip to content

Latest commit

 

History

History
94 lines (71 loc) · 3.68 KB

File metadata and controls

94 lines (71 loc) · 3.68 KB

Configure an EDR timeseries service using AdagucServer

Prerequisites

Make sure adaguc-server is running, follow the instructions at Starting the adaguc-server with docker

Step 1: Copy a file with timesteps into the adaguc-data folder

Copy the file from the adaguc-server repository under data/datasets/forecast_reference_time/HARM_N25_20171215090000_dimx16_dimy16_dimtime49_dimforecastreferencetime1_varairtemperatureat2m.nc into the configured adaguc-data folder:

cp ${ADAGUC_PATH}/data/datasets/forecast_reference_time/HARM_N25_20171215090000_dimx16_dimy16_dimtime49_dimforecastreferencetime1_varairtemperatureat2m.nc ${ADAGUC_DATA_DIR}

Step 2: Configure a dataset for this datafile, including EDR support

Create the following file at the filepath $ADAGUC_DATASET_DIR/edr.xml. You can also consider changing <FilePath> to /data/adaguc-data/*.nc.

<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
    <!-- Styles -->
    <Style name="temperature">
        <Legend fixedclasses="true" textformatting="%0.0f" tickinterval="2">bluewhitered</Legend>
        <Min>-10</Min>
        <Max>10</Max>
    </Style>

    <!-- Layers -->
    <Layer type="database">
        <Name>my_temperature</Name>
        <Title>Temperature</Title>
        <Abstract>The temperature at 2m height</Abstract>
        <Group collection="mycollection" />
        <FilePath>/data/adaguc-data/tutorial/HARM_N25_20171215090000_dimx16_dimy16_dimtime49_dimforecastreferencetime1_varairtemperatureat2m.nc</FilePath>
        <Variable units="Celsius" long_name="air_temperature">air_temperature__at_2m</Variable>
        <Styles>temperature</Styles>
    </Layer>
</Configuration>

For the given example this will result in the following parameter name definition:

"parameter_names": {
  "my_temperature": {
    "type": "Parameter",
    "id": "my_temperature",
    "label": "Temperature",
    "description": "The temperature at 2m height",
    "unit": {
      "symbol": {
        "value": "Celsius",
        "type": "http://www.opengis.net/def/uom/UCUM"
      }
    },
    "observedProperty": {
      "id": "https://vocab.nerc.ac.uk/standard_name/air_temperature",
      "label": "air_temperature"
    }
  }
}

Step 3: Scan the new data

docker exec -i -t my-adaguc-server scan.sh -d edr

Step 4: Check if the EDR endpoint works

The EDR endpoint is at /edr/collections. This will list all the configured collections.

You can find the collection from above under edr.mycollection. This EDR collection name is a combination of the dataset name (edr) and the "group collection" (mycollection).

The following examples test the /collections, /instances, /position and the /cube EDR calls:

You can also try pasting your EDR endpoint https://yourhostname/edr/collections in https://labs.metoffice.gov.uk/edr/static/html/query.html.

See: