Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These examples show how to extract data as in a table format from BUFR files in CodesUI.

Tip

These conditions are combined together by the logical AND operator. So a row of data is only added to the results when all the conditions match.

Extracting a single parameter


DescriptionFilterResults
Extract
Comments

For all the messages: extract the first non missing temperature value

from all the message


Code Block
extract_data: on
parameter_1: airTemperature


Image Modified

Extract

By default missing values are ignored in data extraction (see option MISSING DATA)
For all the messages: extract the first (rank=1) temperature value (
ignore
if missing ignored)
from all the messages


Code Block
extract_data: on
parameter_1: airTemperature
parameter_rank_1: 1


Image Modified

Extract

For all the messages: extract the first (rank=1) temperature value
when
if it is greater than 300 K
from all the messages


Code Block
extract_data: on
parameter_1: airTemperature
parameter_rank_1: 1
parameter_operator_1: >
parameter_value_1: 300


Image Modified

Extract

For all the messages: extract the first temperature value which is greater than 300 K
from all the messages


Code Block
extract_data: on
parameter_1: airTemperature
parameter_operator_1: >
parameter_value_1: 300


Image Modified

Using coordnates

...


For station 78016: extract all the temperature values



Code Block
extract_data: on
parameter_1: airTemperature
extract_mode: all


Image Added



Single coordinate condition


DescriptionFilterResults
From

For all messages: extract the first temperature value which is greater than 300 K and also extract the pressure on which it occurs


Code Block
extract_data: on
parameter_1: airTemperature
parameter_operator_1: >
parameter_value_1: 300
coordinate_condition_count: 1
coordinate_1: pressure


Image Modified

From
For all messages: extract the first temperature value which is greater than 300 K and the pressure is less than 950 hPa


Code Block
extract_data: on
parameter_1: airTemperature
parameter_operator_1: >
parameter_value_1: 300
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_operator_1: >
coordinate_value_1: 95000


Image Modified

From
For all messages: extract the (first) temperature value on the 500 hPa pressure level


Code Block
extract_data: on
parameter_1: airTemperature
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_operator_1: =
coordinate_value_1: 50000


Image Modified

For station 78016: extract the temperature on the second pressure level



Code Block
identifier_value: 78016
extract_data: on
parameter_1: airTemperature
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_rank_1: 2


Image Modified

For station 78016: extract the temperature on the first
size
6 pressure levels


Code Block
identifier_value: 78016
extract_data: on
parameter_1: airTemperature
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_rank_1: 1/2/3/4/5/6


Image Modified

For station 78016: extract the temperature on the 925, 850 and 700 hPa pressure levels


Code Block
identifier_value: 78016
extract_data: on
parameter_1: airTemperature
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_operator_1: =
coordinate_value_1: 92500/85000/70000
Code Block
extract_data: on
parameter_1: airTemperature
parameter_operator_1: >
parameter_value_1: 300
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_operator_1: >
coordinate_value_1: 95000

Filter by keys from header section

Accessing the header section is fast since the message data does not have to be expanded.

Filter by message index

Filter only the first message from the file (message indexing starts at 1):

Code Block
message_index: 1

Filter by message index list

Filter only message No 1, 2 and 10 from the file:

Code Block
message_index: 1/2/10

Filter by date and time

Note

Please note that temporal filtering is based on the first date and time values present in the data section of the BUFR message/subset.

Filter by single date and time

Here we select only messages/subsets with a given date and time:

Code Block
data_mode: window
date: 20090123
time: 13
window: 0

Filter by time only

The date component can be omitted:

Code Block
data_mode: window
time: 13
window: 0

Filter by time window

Here we set a 1 minute time window of either side of the specified date and time:

Code Block
data_mode: window
date: 20090123
time: 13
window: 1

Filter by period

Here we select the messages/subsets within the given time period:

Code Block
data_mode: period
date_1: 20090123
time_1: 1258
date_2: 20090123
time_2: 1301

Filter by area

Note

Please note that location filtering is based on the first location values present in the data section of the BUFR message/subset.

This is how to select messages in a given area:

Code Block
west: -10
east: 5
north: 60 
south: 50

Filter by identifier

Filter by WMO station

Select messages/subsets by WMO identifier:

Code Block
identifier: WMO station
identifier_value: 12843/12845
Note

Please note that WMO station is not a valid BUFR key but a compound one defined for your convenience. It is defined as follows:

WMO station = blockNumber * 1000 + stationNumber

Filter by other identifiers

Select aircraft messages by identifier:

Code Block
identifier: aircraftFlightNumber
identifier_value: QGOBTRRA

Filter by custom conditions

A custom condition means that we can use any BUFR key from the message/subset to pose a filter condition. The examples below are all valid for classic radiosonde observation data which has multiple temperature, humidity and wind speed values on various pressure levels:

Image Removed

Filter by custom condition with value

This is how to select the messages where there is any temperature value less than 280 K:

Code Block
custom_condition_count: 1
custom_key_1: airTemperature
custom_operator_1: <
custom_value_1: 280

Filter by custom condition with rank

This is how to select the messages where the first (rank=1) temperature value is less than 280 K:

Code Block
custom_condition_count: 1
custom_key_1: airTemperature
custom_rank_1: 1
custom_operator_1: <
custom_value_1: 280

Filter by custom condition with range

This is how to select the messages where the first (rank=1) temperature value is between 280-300K:

Code Block
custom_condition_count: 1
custom_key_1: airTemperature
custom_rank_1: 1
custom_operator_1: in_range
custom_value_1: 280/300

Filter by custom condition with excluded range

This is how to select the messages where the first (rank=1) temperature value is outside the 280-300K range:

Code Block
custom_condition_count: 1
custom_key_1: airTemperature
custom_rank_1: 1
custom_operator_1: not_in_range
custom_value_1: 280/300

Filter by multiple custom conditions

This is how to select the messages where the first (rank=1) temperature value is less than 280K and the first windspeed value is greater than 10 m/s:

...


Image Added


Multiple parameters

DescriptionFilterResults

For all the messages: extract the first wind speed and wind direction values


Code Block
extract_data: on
parameter_1: windDirection
parameter_2: windSpeed


Image Added

For all the messages: extract the first wind speed and wind direction values and also extract their pressure


Code Block
extract_data: on
parameter_1: windDirection
parameter_2: windSpeed
coordinate_condition_count: 1
coordinate_1: pressure


Image Added

For all the messages: extract wind speed and wind direction values on the 500 hPa pressure level


Code Block
extract_data: on
parameter_1: windDirection
parameter_2: windSpeed
coordinate_condition_count: 1
coordinate_1: pressure
coordinate_operator_1: =
coordinate_value_1: 50000


Image Added


Multiple (nested) coordinate conditions

TaskFilterResults

For station 78016: extract all the temperature values on standard pressure levels


Code Block
identifier_value: 78016
extract_data: on
parameter_1: airTemperature
coordinate_condition_count: 2
coordinate_1: pressure
coordinate_2: verticalSoundingSignificance
coordinate_operator_2: =
coordinate_value_2: 32


Image Added

For station 78016: extract all the temperature values on temperature significant levels where the pressure is less than 500 hPa


Code Block
identifier_value: 78016
extract_data: on
parameter_count: 1
parameter_1: airTemperature 
coordinate_condition_count: 2
coordinate_1: pressure
coordinate_operator_1: <
coordinate_value_1: 50000
coordinate_2: verticalSoundingSignificance
coordinate_operator_2: =
coordinate_value_2: 4/68


Image Added

...