Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter object in observations profile collection and data response #22

Open
Teddy-1000 opened this issue Oct 10, 2024 · 8 comments · May be fixed by #34
Open

Parameter object in observations profile collection and data response #22

Teddy-1000 opened this issue Oct 10, 2024 · 8 comments · May be fixed by #34
Assignees
Labels
observations Issues about observations / climate profile

Comments

@Teddy-1000
Copy link
Collaborator

Teddy-1000 commented Oct 10, 2024

Many parts of the Parameter object are quite straight forward. Most difficult to define I think is the parameter-id, since this might be used by clients.

I do suggest we make a parameter label mandatory and description optional.

 "parameter-id": {
      "type": "Parameter",
      "description": "text description of parameter", # optional
      "label": "short text label of parameter", # mandatory
      "unit": {
        "label": "as written", # mandatroy
        "symbol": "any unicode symbol" # optional
      },
      "observedProperty": {
        "id": "URI to vocab/standard names", # mandatory, should be part of a vocab. CF?
        "label": "short text label of observedPropery" # If CF, this should be the standard name
      },
      "measurementType": {
        "method": "", # aggregation method for observation, suggest CF cell methods
        "period": "" # ISO8601 duration
      },
      "rodeo:level": 10 # instruments height above ground
    },

This is a current example of how E-SOH format of a parameter. It does not have a parameter label yet. First is from a data query, seconds is from a collection response.

    "air_pressure:150:mean:60": {
      "type": "Parameter",
      "description": {
        "en": "air_pressure at 1.5m, aggregated over PT1M with method 'mean'"
      },
      "observedProperty": {
        "id": "https://vocab.nerc.ac.uk/standard_name/air_pressure",
        "label": {
          "en": "air_pressure:150:mean:60"
        }
      },
      "unit": {
        "label": {
          "en": "hPa"
        }
      },     
   "measurementType": {
        "method": "mean",
        "period": "PT1M"
      },
      "rodeo:standard_name": "air_pressure",
      "rodeo:level": 1.5
    }
    "air_pressure:150:mean:60": {
      "type": "Parameter",
      "description": "air_pressure at 1.5m, aggregated over PT1M with method 'mean'",
      "unit": {
        "label": "hPa"
      },
      "observedProperty": {
        "id": "https://vocab.nerc.ac.uk/standard_name/air_pressure",
        "label": "air_pressure:150:mean:60"
      },
      "measurementType": {
        "method": "mean",
        "period": "PT1M"
      },
      "rodeo:standard_name": "air_pressure",
      "rodeo:level": 1.5
    }

Any feed back or discussion can be done here, or else I will get to creating a PR for this.

@Teddy-1000 Teddy-1000 added the observations Issues about observations / climate profile label Oct 10, 2024
@havardf
Copy link
Collaborator

havardf commented Oct 10, 2024

@Teddy-1000 Sounds good. But as with title, I think the intention here is to keep it short. Include a rule for 50 characters max?

And that example from E-SOH may be from CoverageJSON, not collection? As labels in EDR collection does not currently support multi-language.

@Teddy-1000 Teddy-1000 changed the title parameret object in observations profile response Parameret object in observations profile response Oct 10, 2024
@Teddy-1000
Copy link
Collaborator Author

This issue is regarding the observation profile response, so this would indeed be CovJSON.
Label will have to be short. Are there any need for description to have any length limitations?

@havardf
Copy link
Collaborator

havardf commented Oct 10, 2024

Ah, I misunderstood, sorry.

I don't think its necessary to limit description no.

@Teddy-1000 Teddy-1000 self-assigned this Oct 10, 2024
@Teddy-1000
Copy link
Collaborator Author

I can expand this issue to also include the collection Parameter, since they are very closely connceted?
Are we good with going for the limitations of CF standard_names for ObservedProperty, and CF cell methods for method?

@havardf
Copy link
Collaborator

havardf commented Oct 10, 2024

I think it makes sense to handle both in one PR yes, since they anyway need to be in sync. Should probably exist as separate requirments in the profile documenth though.

CF names seems good enough for me. We need to tackle exceptions maybe, but we can start with mandating CF names.

I have no experience with CF cell methods, so not sure there.

@Teddy-1000 Teddy-1000 changed the title Parameret object in observations profile response Parameret object in observations profile collection and data response Oct 11, 2024
@PaulVanSchayck
Copy link

We've been discussing Parameter metadata for RODEO WP5 (Climate) as well. This is our current proposal:

"TG": {
   "type": "Parameter",
   "label": "Mean temperature",
   "description": "Daily mean air temperature, measured at 1.5 m, in degree Celcius.",
   "unit": {
       "label": "degree Celsius",
       "symbol": {
           "value": "°C",
           "type": "https://qudt.org/vocab/unit/DEG_C"
        }
   },
   "observedProperty": {
       "id": "https://vocab.nerc.ac.uk/standard_name/air_temperature",
       "label": "Air temperature"
   },
   "measurementType": {
      "method": "mean",
      "duration": "P1D"
   },
   "eumetnet:standard_name": "air_temperature",​
   "eumetnet:level": 1.5​
}

This proposal is with the following ideas in mind:

  • Parameter id: Free to choose. Bears no further meaning ("TG" in example). Should not be used for display purposes in UIs.
  • Parameter label: required. To be used in plots/dropdowns
  • Parameter description: required. A full description of the parameter, describing all other fields in text.
  • Unit required: Using QUDT as vocabulary.
    • QUDT has persistent and unique URIs per unit. Can provide translation to UDUNITS (as used in CF conventions)
    • In case no URI to vocabulary exists, use unit.symbol.description to describe the unit.
  • Observed Property: The physical property being measured. Using CF convention standard_name.
    • In case no CF convention standard_name exists. Use observerdProperty.description to describe the property being measured
  • Measurement Type:
    • Method: EDR spec 1.2 (in draft) now lists a set of recommended values. They are pretty similar to the CF cell methods
    • Duration: Duration of measurement within the temporal extent of the coverage. This follows the ISO 8601 Duration standard.
      • In EDR 1.1 spec this is called period in some examples. In 1.2 this has now been rectified to duration
  • eumetnet:standard_name: The CF convention standard name. Should match the one in observedProperty.type. Used as custom dimension to be queried on. See below
  • eumetnet:level: The height above ground level where the measurement occurs. Used as custom dimension to be queried on. See below

The eumetnet:standard_name and eumetnet:level can then be exposed as EDR custom dimension. This is similar to how ESOH is doing this. It allows for queries such as:

https://server.example/collections/observations/area?​
coords=POLYGON((-12.602 59.367,-12.954 46.580,2.169 47.061,2.169 60.769,-12.602 59.367))​
&datetime=2022-05-10T00:00Z/2022-05-10T06:00Z​
&standard_name=air_temperature​
&level=1.0/2.0

This queries for air temperature, between 1 and 2 meter. It may return one or more actual parameters, that fit these properties.

Another discussion point has been the the Parameter ID. We have chosen to give this no further meaning. In theory, it should only link parameters to ranges in the CovJSON. In practice, we expect these to may be used to reflect some internal database ID. However, this may make it difficult to retrieve parameters from different EDR APIs which are effectively equal. For example, within RODEO Climate WP5 we defined a list of Core Parameters, that all partner API should provide at a minimum (think min/max air temperature, wind speed, precipitation). To facilitate easier querying of these Core Parameters we are considering to add these as separate custom dimension.

@havardf
Copy link
Collaborator

havardf commented Nov 28, 2024

@PaulVanSchayck Great, thank you! Could you also add an example for how this will look in the responding CoverageJSON document?

@PaulVanSchayck
Copy link

PaulVanSchayck commented Nov 28, 2024

You would hope they are equal, wouldn't you. Unfortunately, the specs (EDR vs CovJSON) do differ somewhat from each other. We've not implemented this proposal yet in CovJSON, so I'm not 100% sure if I've missed anything.

"TG": {
   "type": "Parameter",
   "label": {"en": "Mean temperature"},
   "description": {"en": "Daily mean air temperature, measured at 1.5 m, in degree Celcius."}
   "unit": {
       "label": {"en":"degree Celsius"},
       "symbol": {
           "value": "°C",
           "type": "https://qudt.org/vocab/unit/DEG_C"
        }
   },
   "observedProperty": {
       "id": "https://vocab.nerc.ac.uk/standard_name/air_temperature",
       "label": {"en","Air temperature"}
   },
   "measurementType": {
      "method": "mean",
      "duration": "P1D"
   },
   "eumetnet:standard_name": "air_temperature",​
   "eumetnet:level": 1.5​
}

The most obvious difference is the i18n stuff which is present in CovJSON but not EDR. Also parameter.measurementType is not specified in CovJSON. But the spec allows extra members on parameter, so it's within the spec.

@havardf havardf assigned havardf and unassigned Teddy-1000 Dec 9, 2024
@havardf havardf changed the title Parameret object in observations profile collection and data response Parameter object in observations profile collection and data response Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
observations Issues about observations / climate profile
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants