Skip to content

Commit

Permalink
add attributes to CDM lite
Browse files Browse the repository at this point in the history
  • Loading branch information
garciampred committed Nov 25, 2024
1 parent 731d4d7 commit 5615dc2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cdsobs/api_rest/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ def get_dataset_service_definition(dataset: str) -> ServiceDefinition:


@router.get("/cdm/lite_variables")
def get_cdm_lite_variables() -> dict[str, list[str]]:
def get_cdm_lite_variables() -> dict[str, list[str] | dict]:
return cdm_lite_variables
25 changes: 25 additions & 0 deletions cdsobs/cdm/lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,33 @@
"humidity_bias_estimate",
"wind_bias_estimate",
]


cdm_lite_variables = dict(
mandatory=variable_names,
optional=optional_variable_names,
auxiliary=auxiliary_variable_names,
attributes={
"uncertainty_value_1": {"long_name": "random_uncertainty"},
"uncertainty_value_10": {"long_name": "negative_systematic_uncertainty"},
"uncertainty_value_11": {"long_name": "positive_systematic_uncertainty"},
"uncertainty_value_12": {"long_name": "negative_quasisystematic_uncertainty"},
"uncertainty_value_13": {"long_name": "positive_quasisystematic_uncertainty"},
"uncertainty_value_14": {"long_name": "negative_structured_random_uncertainty"},
"uncertainty_value_15": {"long_name": "positive_structured_random_uncertainty"},
"uncertainty_value_16": {"long_name": "negative_total_uncertainty"},
"uncertainty_value_17": {"long_name": "positive_total_uncertainty"},
"uncertainty_value_2": {"long_name": "systematic_uncertainty"},
"uncertainty_value_3": {"long_name": "quasisystematic_uncertainty"},
"uncertainty_value_4": {"long_name": "structured_random_uncertainty"},
"uncertainty_value_5": {"long_name": "total_uncertainty"},
"uncertainty_value_6": {
"long_name": "ozone_partial_pressure_total_uncertainty_uncertainty"
},
"uncertainty_value_7": {
"long_name": "ozone_partial_pressure_percentage_uncertainty_uncertainty"
},
"uncertainty_value_8": {"long_name": "negative_random_uncertainty"},
"uncertainty_value_9": {"long_name": "positive_random_uncertainty"},
},
)

0 comments on commit 5615dc2

Please sign in to comment.