These examples show how to define a message/subset filter for BUFR files in CodesUI.
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):
message_index: 1
Filter by message index list
Filter only message No 1, 2 and 10 from the file:
message_index: 1/2/10
Filter by date and time
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:
data_mode: window date: 20090123 time: 13 window: 0
Filter by time only
The date component can be omitted:
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:
data_mode: window date: 20090123 time: 13 window: 1
Filter by period
Here we select the messages/subsets within the given time period:
data_mode: period date_1: 20090123 time_1: 1258 date_2: 20090123 time_2: 1301
Filter by area
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:
west: -10 east: 5 north: 60 south: 50
Filter by identifier
Filter by WMO station
Select messages/subsets by WMO identifier:
identifier: WMO station identifier_value: 12843/12845
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:
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:
Filter by custom condition with value
This is how to select the messages where there is any temperature value less than 280 K:
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:
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:
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:
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:
custom_condition_count: 2 custom_key_1: airTemperature custom_rank_1: 1 custom_operator_1: < custom_value_1: 280 custom_key_2: windSpeed custom_rank_2: 1 custom_operator_2: > custom_value_2: 10