Skip to content

Commit

Permalink
Merge pull request #39 from ecmwf-projects/uscrn-add-uncertainty-to-d…
Browse files Browse the repository at this point in the history
…escriptions

Uncertainty added to USGS descriptions
  • Loading branch information
garciampred authored Oct 10, 2024
2 parents 916c709 + ca9600d commit a056c03
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 28 deletions.
5 changes: 4 additions & 1 deletion cdsobs/cdm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,16 @@ def get_cdm_fields(cdm_tables: CDMTables) -> list[str]:
)
cdm_variables += cdm_variables_with_table_names
if "uncertainty_table" in cdm_tables:
n_uncertainties = 17
vars_supporting_numbers = [
"uncertainty_type",
"uncertainty_units",
"uncertainty_value",
]
numbered_fields = [
v + str(n) for v in vars_supporting_numbers for n in range(1, 17)
v + str(n)
for v in vars_supporting_numbers
for n in range(1, n_uncertainties + 1)
]
cdm_variables += numbered_fields
return cdm_variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,35 +105,15 @@ sources:
description: Barometric air pressure using silicon sensor up to 15.4 km, derived from GPS-altitude above
dtype: float32
units: Pa
uncertainty_value1:
description: Uncertainty value 1
uncertainty_valueN:
description: "Uncertainty value N. Available uncertainty types are: 1 (random), 2 (systematic) and 5 (total)"
dtype: float32
units: See uncertainty_units1
uncertainty_type1:
description: Uncertainty type 1
units: Defined in uncertainty_unitsN
uncertainty_typeN:
description: Uncertainty type N
dtype: uint8
uncertainty_units1:
description: Uncertainty units 1
dtype: object
uncertainty_value2:
description: Uncertainty value 2
dtype: float32
units: See uncertainty_units2
uncertainty_type2:
description: Uncertainty type 2
dtype: uint8
uncertainty_units2:
description: Uncertainty units 2
dtype: object
uncertainty_value5:
description: Uncertainty value 5
dtype: float32
units: See uncertainty_units5
uncertainty_type5:
description: Uncertainty type 5
dtype: uint8
uncertainty_units5:
description: Uncertainty units 5
uncertainty_unitsN:
description: Units for uncertainty type N.
dtype: object
air_relative_humidity_effective_vertical_resolution:
description: Resolution (defined by 1 / cut-off frequency) of the relative humidity time in terms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,22 @@ sources:
description: Average soil temperature measured at 5 cm below the surface level over the aggregation period.
dtype: float32
units: K
uncertainty_valueN:
description: "Uncertainty value N. Available uncertainty types are: 8 (negative random), 9 (positive random), 10 (negative systematic), 11 (positive systematic), 12 (negative quasisystematic), 13 (positive quasisystematic), 16 (negative total) and 17 (positive total)."
dtype: float32
units: Defined in uncertainty_unitsN
uncertainty_typeN:
description: Uncertainty type N
dtype: uint8
uncertainty_unitsN:
description: Units for uncertainty type N.
dtype: object
quality_flag:
description: Quality flag for observation
dtype: uint8
processing_level:
description: Level of processing applied to observation.
dtype: uint8
main_variables:
- air_temperature
- daily_maximum_air_temperature
Expand Down Expand Up @@ -481,6 +497,22 @@ sources:
description: The quantity with standard name downward_shortwave_irradiance_at_earth_surface, often called Total Solar Irradiance (TSI), is the radiation from the sun integrated over the whole electromagnetic spectrum and over the entire solar disk. The quantity applies outside the atmosphere, by default at a distance of one astronomical unit from the sun, but a coordinate or scalar coordinate variable of distance_from_sun can be used to specify a value other than the default. "Irradiance" means the power per unit area (called radiative flux in other standard names), the area being normal to the direction of flow of the radiant energy.
dtype: float32
units: W m-2
uncertainty_valueN:
description: "Uncertainty value N. Available uncertainty types are: 1 (random), 10 (negative systematic), 11 (positive systematic), 12 (negative quasisystematic), 13 (positive quasisystematic), 16 (negative total) and 17 (positive total)."
dtype: float32
units: Defined in uncertainty_unitsN
uncertainty_typeN:
description: Uncertainty type N
dtype: uint8
uncertainty_unitsN:
description: Units for uncertainty type N.
dtype: object
quality_flag:
description: Quality flag for observation
dtype: uint8
processing_level:
description: Level of processing applied to observation.
dtype: uint8
main_variables:
- air_temperature
- daily_maximum_air_temperature
Expand Down Expand Up @@ -658,6 +690,22 @@ sources:
description: Average infrared temperature of the soil measured using infrared thermal imaging technology, over the aggregation period.
dtype: float32
units: K
uncertainty_valueN:
description: "Uncertainty value N. Available uncertainty types are: 1 (random), 10 (negative systematic), 11 (positive systematic), 12 (negative quasisystematic), 13 (positive quasisystematic) , 16 (negative total) and 17 (positive total)."
dtype: float32
units: Defined in uncertainty_unitsN
uncertainty_typeN:
description: Uncertainty type N
dtype: uint8
uncertainty_unitsN:
description: Units for uncertainty type N.
dtype: object
quality_flag:
description: Quality flag for observation
dtype: uint8
processing_level:
description: Level of processing applied to observation.
dtype: uint8
main_variables:
- air_temperature
- daily_maximum_air_temperature
Expand Down Expand Up @@ -814,6 +862,23 @@ sources:
description: This parameter is the horizontal velocity of the air near the surface. It is measured using a 3-cup anemometer placed at the same height at the air temperature shield intake. The exact measurement height is 1.5 metres above the ground surface.
dtype: float32
units: m s-1
uncertainty_valueN:
description: "Uncertainty value N. Available uncertainty types are: 1 (random), 3 (quasisystematic), 10 (negative systematic), 11 (positive systematic), 16 (negative total) and 17 (positive total)."
dtype: float32
units: Defined in uncertainty_unitsN
uncertainty_typeN:
description: Uncertainty type N
dtype: uint8
uncertainty_unitsN:
description: Units for uncertainty type N.
dtype: object
quality_flag:
description: Quality flag for observation
dtype: uint8
processing_level:
description: Level of processing applied to observation.
dtype: uint8

main_variables:
- air_temperature
- accumulated_precipitation
Expand Down

0 comments on commit a056c03

Please sign in to comment.