Coder Social home page Coder Social logo

wmo-im / csv2bufr Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 649 KB

Python package to transform CSV data into the WMO BUFR format

Home Page: https://csv2bufr.readthedocs.io

License: Apache License 2.0

Dockerfile 2.14% Python 96.08% Shell 1.78%
bufr csv tdcf wmo

csv2bufr's People

Contributors

chenxiaoxia2019 avatar david-i-berry avatar kurt-hectic avatar roryptb avatar tomkralidis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

csv2bufr's Issues

Support of structured data

At the moment only flat CSV files are supported, with each row a full BUFR subset. We need to expand this to include other data types, for example TEMP etc.

Missing values

Related to invalid values, checks for missing data need to be added.

Add logging

Logging and error handling need to be added.

error when datetime values contain None

csv file: https://github.com/wmo-im/wis2box-training/blob/main/exercise-materials/csv2bufr-exercises/ex_2/ex_2.csv
mappings file: https://github.com/wmo-im/wis2box-training/blob/main/exercise-materials/csv2bufr-exercises/ex_2/mappings_2.json

$ export CSV2BUFR_NULLIFY_INVALID=true 
$ csv2bufr data transform --bufr-template mappings_2.json ex_2.csv 

	Transforming ex_2.csv to BUFR ...

	... Processing subsets:
Column Year not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for typicalYear, None returned for typicalYear
Column Month not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for typicalMonth, None returned for typicalMonth
Column Day not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for typicalDay, None returned for typicalDay
Column Hour not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for typicalHour, None returned for typicalHour
Column Minute not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for typicalMinute, None returned for typicalMinute
Column M_Year not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for #1#year, None returned for #1#year
Column M_Month not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for #1#month, None returned for #1#month
Column M_DayOfMonth not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for #1#day, None returned for #1#day
Column M_HourOfDay not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for #1#hour, None returned for #1#hour
Column M_Minutes not found in input data: {'WMO_Block': '6', 'Station_ID': '0-454-2-AWSMULANJE', 'Station_Name': 'Mulanje', 'WMO_Station_Type': '0', 'Datetime': '26/05/2023 02:55', 'Latitude': '-16.03', 'Longitude': '35.51', 'Elevation': '649', 'BP_Elevation': '650', 'BP': '94417.67', 'QNH': '102043.2', 'BP_Change': '-35.4375', 'BP_Tendency': '7', 'Temp_H': '1.5', 'AirTempK': '299', 'DewPointTempK': '289.1', 'RH': '54.09', '_wsi_series': '0', '_wsi_issuer': '454', '_wsi_issue_number': '2', '_wsi_local': 'AWSMULANJE'}
Warning raised getting value for #1#minute, None returned for #1#minute
Traceback (most recent call last):
  File "/usr/local/bin/csv2bufr", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/csv2bufr/cli.py", line 130, in transform
    for item in result:
  File "/usr/local/lib/python3.8/dist-packages/csv2bufr/__init__.py", line 896, in transform
    isodate = message.get_datetime().strftime('%Y%m%dT%H%M%S')
  File "/usr/local/lib/python3.8/dist-packages/csv2bufr/__init__.py", line 670, in get_datetime
    return datetime(
TypeError: an integer is required (got type NoneType)

BUFR comparison

Background

  • Now, there are two csv2bufr converters, one designed by Campbell, the other by David
  • source data is Malawi observation data retrieved from AWS server in .csv
  • output data is in BUFR format

Objective

  • use BUFR tools (ECWMF) to compare the two bufr files

Task

  • using bufr_compare to compare BUFR messages contained in two files. If some differences are found it fails to return an error code. Floating-point values are compared exactly by default, different tolerance can be defined see -P -A -R. Default behaviour: absolute error=0, bit-by-bit compare, the same order in files.
  • document the differences
  • fix the problems

validate input data before converting

In the current version the input data is validated after it has been converted. It would make more sense to validate the incoming data in the original units.

Invalid data

Prior to encoding the data values need to be checked for validity (as part of the preprocessing step).

Add GTS message header and terminator to output

Add option to include message AHL and terminator to output.

The Manual on GTS specifies the inclusion of abbreviated headers before binary data messages on the GTS. Similarly, the terminator for messages is also specified. The csv2bufr module only creates the BUFR part of the binary message and not the abbreviated header or terminator.

csv2bufr transform to be able deal with alternative Date,Time,Time zone as input option

Zambia is sending us .csv with the following content:

Date,Time,Time zone,Station-id,Lat,Long,Wind Speed PRO 10,Wind Direction,Temperature,Relative Humidity,Barometric Pressure,Precipitation
2023-02-13,01:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,9.33,358.8,18.9,100.0,862.4,0.0
2023-02-13,02:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,8.56,14.3,18.6,100.0,862.4,0.0
2023-02-13,03:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,3.71,5.6,17.8,100.0,862.4,0.0
2023-02-13,04:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,0.51,22.0,17.0,100.0,862.5,0.0
2023-02-13,05:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,0.52,353.7,16.9,100.0,862.6,0.0
2023-02-13,06:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,0.56,356.7,18.5,99.5,863.0,0.0
2023-02-13,07:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,1.72,353.4,21.2,89.9,863.5,0.0
2023-02-13,08:00 AM,UTC,0-894-2-NWMN001,-11.7398,24.431027,7.33,12.3,24.4,74.4,863.6,0.0

can we make csv2bufr transform be able to deal with this format?

fix docs build warning

(base) (wmo) tomkralidis@aruba:~/Dev/wmo/csv2bufr/docs$ make html
Running Sphinx v4.2.0
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] example                                                                                                                                                                           
/Users/tomkralidis/Dev/wmo/csv2bufr/docs/source/example.rst:67: WARNING: download file not readable: /Users/tomkralidis/Dev/wmo/csv2bufr/docs/source/resources/d0464c97a88ea99f119e87629844c5dd.bufr4
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                                                                                              
generating indices... genindex done
writing additional pages... search done
copying downloadable files... [100%] resources/example-metadata.json                                                                                                                                        
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in build/html.

rename repo to csv2bufr

To be consistent with package naming/publishing, rename this repo from wmo-im/CSV2BUFR to wmo-im/csv2bufr.

No support for NA values represented by empty strings

If the csv file has "NA" in the cells of missing values, the csv is able to be transformed to a bufr4 file with no issue. However, if the csv has "" (an empty string) in the cells of missing values, then an error arises "Expected float value but received class string" and no bufr4 file is created.

Document error handling

Documentation needs to be update to describe error handling, include CSV2BUFR_NULLIFY_INVALID env.

identical geojson output

GeoJSON output is broken, the same data is written to each rather than the corresponding data.

missing value management

  • the mapping templates need to be updated to include specification of missing values.
  • review of code required to make handling of missing values more robust.

include output file name in mapping

The CLI generates the filename for the output files based on the md5 of the BUFR encoded data. Options:

  • set file name based on WSI and date/time of observation
  • user specified format as part of the mapping
  • recommend use of API for different filenames.

transform_csv to report transformation-errors in returned result (with wigos_station_identifier where possible)

Currently transform-function throws out an Exception on the input-data as whole, making it hard to track down issues with specific stations or columns.

Could you please update transform_csv to return a dictionary that always return 1 items per data-row:
"item['_meta']['error']" to be set with string providing error, when it is unable to process the data for that row
"item['_meta']['properties']['wigos_station_identifier']" to be set if station-id can be identified, regardless if other columns could be mapped

Expand testing / tests

At the moment we do not have full coverage for the test cases, e.g. handling of missing data. these need to be added.

investigate STAC items for transform functions

csv2bufr.transform returns a dictionary of messages, each of which having a _meta object to emit some metadata about the messages. We should consider using the STAC item specification.

At some point having this metadata when csv2bufr.transform returns will be valuable for both wis2node processing and even MQP notifications to support downstream monitoring/metrics/reporting applications.

cc @efucile

ecCodes range error duplicated and JSON output obscures view of error

When a variable in the CSV is out of the ecCodes range, the error raised appears twice in the command line. Also, the JSON of the transformed data is printed which makes it very difficult to identify errors. This JSON output still appears when verbosity is set to ERROR. I believe this output should only appear at a level below WARNING, e.g. in DEBUG.

Transforming ex_5.csv to BUFR ...

        ... Processing subsets:
ECCODES ERROR   :  encode_double_value: pressureReducedToMeanSeaLevel (010051). Value (-102043) out of range (minAllowed=0, maxAllowed=163830).
ECCODES ERROR   :  Cannot encode pressureReducedToMeanSeaLevel=-102043 (subset=1)
error calling codes_set(41137136, 'pack', True): Value out of coding range
{
    "edition": {
        "value": 4,
        "type": "int"
    },
    "masterTableNumber": {
        "value": 0,
        "type": "int"
    },
    "bufrHeaderCentre": {
        "value": 0,
        "type": "int"
    },
    "bufrHeaderSubCentre": {
        "value": 0,
        "type": "int"
    },
    "updateSequenceNumber": {
        "value": 0,
        "type": "int"
    },
    "dataCategory": {
        "value": 0,
        "type": "int"
    },
    "internationalDataSubCategory": {
        "value": 6,
        "type": "int"
    },
    "dataSubCategory": {
        "value": null,
        "type": "int"
    },
    "masterTablesVersionNumber": {
        "value": 30,
        "type": "int"
    },
    "localTablesVersionNumber": {
        "value": null,
        "type": "int"
    },
    "typicalYear": {
        "value": 2023,
        "type": "int"
    },
    "typicalMonth": {
        "value": 5,
        "type": "int"
    },
    "typicalDay": {
        "value": 26,
        "type": "int"
    },
    "typicalHour": {
        "value": 0,
        "type": "int"
    },
    "typicalMinute": {
        "value": 55,
        "type": "int"
    },
    "typicalSecond": {
        "value": null,
        "type": "int"
    },
    "typicalDate": {
        "value": null,
        "type": "str"
    },
    "typicalTime": {
        "value": null,
        "type": "str"
    },
    "numberOfSubsets": {
        "value": 1,
        "type": "int"
    },
    "observedData": {
        "value": 1,
        "type": "int"
    },
    "compressedData": {
        "value": 0,
        "type": "int"
    },
    "unexpandedDescriptors": {
        "value": [
            301150,
            307080
        ],
        "type": "int"
    },
    "subsetNumber": {
        "value": null,
        "type": "int"
    },
    "#1#wigosIdentifierSeries": {
        "value": 0,
        "type": "int",
        "code": "001125",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#wigosIssuerOfIdentifier": {
        "value": 454,
        "type": "int",
        "code": "001126",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 16
    },
    "#1#wigosIssueNumber": {
        "value": 2,
        "type": "int",
        "code": "001127",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 16
    },
    "#1#wigosLocalIdentifierCharacter": {
        "value": "AWSMULANJE",
        "type": "str",
        "code": "001128",
        "units": "CCITT IA5",
        "scale": 0,
        "reference": 0,
        "width": 128
    },
    "#1#blockNumber": {
        "value": null,
        "type": "int",
        "code": "001001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#1#stationNumber": {
        "value": null,
        "type": "int",
        "code": "001002",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 10
    },
    "#1#stationOrSiteName": {
        "value": "Mulanje",
        "type": "str",
        "code": "001015",
        "units": "CCITT IA5",
        "scale": 0,
        "reference": 0,
        "width": 160
    },
    "#1#stationType": {
        "value": 0,
        "type": "int",
        "code": "002001",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 2
    },
    "#1#year": {
        "value": 2023,
        "type": "int",
        "code": "004001",
        "units": "a",
        "scale": 0,
        "reference": 0,
        "width": 12
    },
    "#1#month": {
        "value": 5,
        "type": "int",
        "code": "004002",
        "units": "mon",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#day": {
        "value": 26,
        "type": "int",
        "code": "004003",
        "units": "d",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#hour": {
        "value": 0,
        "type": "int",
        "code": "004004",
        "units": "h",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#minute": {
        "value": 55,
        "type": "int",
        "code": "004005",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#latitude": {
        "value": -16.03,
        "type": "float",
        "code": "005001",
        "units": "deg",
        "scale": 5,
        "reference": -9000000,
        "width": 25
    },
    "#1#longitude": {
        "value": 35.51,
        "type": "float",
        "code": "006001",
        "units": "deg",
        "scale": 5,
        "reference": -18000000,
        "width": 26
    },
    "#1#heightOfStationGroundAboveMeanSeaLevel": {
        "value": 649.0,
        "type": "float",
        "code": "007030",
        "units": "m",
        "scale": 1,
        "reference": -4000,
        "width": 17
    },
    "#1#heightOfBarometerAboveMeanSeaLevel": {
        "value": 650.0,
        "type": "float",
        "code": "007031",
        "units": "m",
        "scale": 1,
        "reference": -4000,
        "width": 17
    },
    "#1#nonCoordinatePressure": {
        "value": 94417.67,
        "type": "float",
        "code": "010004",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#pressureReducedToMeanSeaLevel": {
        "value": -102043.2,
        "type": "float",
        "code": "010051",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#3HourPressureChange": {
        "value": -35.4375,
        "type": "float",
        "code": "010061",
        "units": "Pa",
        "scale": -1,
        "reference": -500,
        "width": 10
    },
    "#1#characteristicOfPressureTendency": {
        "value": 7,
        "type": "int",
        "code": "010063",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#24HourPressureChange": {
        "value": null,
        "type": "float",
        "code": "010062",
        "units": "Pa",
        "scale": -1,
        "reference": -1000,
        "width": 11
    },
    "#1#pressure": {
        "value": null,
        "type": "float",
        "code": "007004",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#nonCoordinateGeopotentialHeight": {
        "value": null,
        "type": "int",
        "code": "010009",
        "units": "gpm",
        "scale": 0,
        "reference": -1000,
        "width": 17
    },
    "#1#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": 1.5,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#airTemperature": {
        "value": 2858.15,
        "type": "float",
        "code": "012101",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#dewpointTemperature": {
        "value": 289.09999999999997,
        "type": "float",
        "code": "012103",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#relativeHumidity": {
        "value": 54,
        "type": "int",
        "code": "013003",
        "units": "%",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#2#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#horizontalVisibility": {
        "value": null,
        "type": "float",
        "code": "020001",
        "units": "m",
        "scale": -1,
        "reference": 0,
        "width": 13
    },
    "#3#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#totalPrecipitationPast24Hours": {
        "value": null,
        "type": "float",
        "code": "013023",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#4#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#cloudCoverTotal": {
        "value": null,
        "type": "int",
        "code": "020010",
        "units": "%",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#1#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#cloudAmount": {
        "value": null,
        "type": "int",
        "code": "020011",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#heightOfBaseOfCloud": {
        "value": null,
        "type": "float",
        "code": "020013",
        "units": "m",
        "scale": -1,
        "reference": -40,
        "width": 11
    },
    "#1#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#3#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#delayedDescriptorReplicationFactor": {
        "value": null,
        "type": "int",
        "code": "031001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 8
    },
    "#2#delayedDescriptorReplicationFactor": {
        "value": null,
        "type": "int",
        "code": "031001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 8
    },
    "#2#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#3#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#4#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#3#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#5#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#bearingOrAzimuth": {
        "value": null,
        "type": "float",
        "code": "005021",
        "units": "deg",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#elevation": {
        "value": null,
        "type": "float",
        "code": "007021",
        "units": "deg",
        "scale": 2,
        "reference": -9000,
        "width": 15
    },
    "#4#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#bearingOrAzimuth": {
        "value": null,
        "type": "float",
        "code": "005021",
        "units": "deg",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#2#elevation": {
        "value": null,
        "type": "float",
        "code": "007021",
        "units": "deg",
        "scale": 2,
        "reference": -9000,
        "width": 15
    },
    "#1#stateOfGround": {
        "value": null,
        "type": "int",
        "code": "020062",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#totalSnowDepth": {
        "value": null,
        "type": "float",
        "code": "013013",
        "units": "m",
        "scale": 2,
        "reference": -2,
        "width": 16
    },
    "#1#groundMinimumTemperaturePast12Hours": {
        "value": null,
        "type": "float",
        "code": "012113",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#presentWeather": {
        "value": null,
        "type": "int",
        "code": "020003",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#pastWeather1": {
        "value": null,
        "type": "int",
        "code": "020004",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#pastWeather2": {
        "value": null,
        "type": "int",
        "code": "020005",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#2#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#totalSunshine": {
        "value": null,
        "type": "int",
        "code": "014031",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 11
    },
    "#3#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#totalSunshine": {
        "value": null,
        "type": "int",
        "code": "014031",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 11
    },
    "#5#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#4#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#totalPrecipitationOrTotalWaterEquivalent": {
        "value": null,
        "type": "float",
        "code": "013011",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#5#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#totalPrecipitationOrTotalWaterEquivalent": {
        "value": null,
        "type": "float",
        "code": "013011",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#6#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#6#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#7#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#maximumTemperatureAtHeightAndOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "012111",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#8#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#9#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#minimumTemperatureAtHeightAndOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "012112",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#7#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#instrumentationForWindMeasurement": {
        "value": null,
        "type": "int",
        "code": "002002",
        "units": "FLAG TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#timeSignificance": {
        "value": null,
        "type": "int",
        "code": "008021",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#10#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#windDirection": {
        "value": null,
        "type": "int",
        "code": "011001",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#windSpeed": {
        "value": null,
        "type": "float",
        "code": "011002",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#2#timeSignificance": {
        "value": null,
        "type": "int",
        "code": "008021",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#11#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#maximumWindGustDirection": {
        "value": null,
        "type": "int",
        "code": "011043",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#maximumWindGustSpeed": {
        "value": null,
        "type": "float",
        "code": "011041",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#12#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#maximumWindGustDirection": {
        "value": null,
        "type": "int",
        "code": "011043",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#2#maximumWindGustSpeed": {
        "value": null,
        "type": "float",
        "code": "011041",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#8#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#13#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#typeOfInstrumentationForEvaporationMeasurement": {
        "value": null,
        "type": "int",
        "code": "002004",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#evaporation": {
        "value": null,
        "type": "float",
        "code": "013033",
        "units": "kg m-2",
        "scale": 1,
        "reference": 0,
        "width": 10
    },
    "#14#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#longWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014002",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#1#shortWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014004",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#1#netRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014016",
        "units": "J m-2",
        "scale": -4,
        "reference": -16384,
        "width": 15
    },
    "#1#globalSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014028",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#1#diffuseSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014029",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#1#directSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014030",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#15#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#longWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014002",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#2#shortWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014004",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#2#netRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014016",
        "units": "J m-2",
        "scale": -4,
        "reference": -16384,
        "width": 15
    },
    "#2#globalSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014028",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#2#diffuseSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014029",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#2#directSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014030",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#16#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#17#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#temperatureChangeOverSpecifiedPeriod": {
        "value": null,
        "type": "int",
        "code": "012049",
        "units": "K",
        "scale": 0,
        "reference": -30,
        "width": 6
    }
}
null message returned
ECCODES ERROR   :  encode_double_value: pressureReducedToMeanSeaLevel (010051). Value (-102043) out of range (minAllowed=0, maxAllowed=163830).
ECCODES ERROR   :  Cannot encode pressureReducedToMeanSeaLevel=-102043 (subset=1)
error calling codes_set(35298080, 'pack', True): Value out of coding range
{
    "edition": {
        "value": 4,
        "type": "int"
    },
    "masterTableNumber": {
        "value": 0,
        "type": "int"
    },
    "bufrHeaderCentre": {
        "value": 0,
        "type": "int"
    },
    "bufrHeaderSubCentre": {
        "value": 0,
        "type": "int"
    },
    "updateSequenceNumber": {
        "value": 0,
        "type": "int"
    },
    "dataCategory": {
        "value": 0,
        "type": "int"
    },
    "internationalDataSubCategory": {
        "value": 6,
        "type": "int"
    },
    "dataSubCategory": {
        "value": null,
        "type": "int"
    },
    "masterTablesVersionNumber": {
        "value": 30,
        "type": "int"
    },
    "localTablesVersionNumber": {
        "value": null,
        "type": "int"
    },
    "typicalYear": {
        "value": 2023,
        "type": "int"
    },
    "typicalMonth": {
        "value": 5,
        "type": "int"
    },
    "typicalDay": {
        "value": 26,
        "type": "int"
    },
    "typicalHour": {
        "value": 0,
        "type": "int"
    },
    "typicalMinute": {
        "value": 55,
        "type": "int"
    },
    "typicalSecond": {
        "value": null,
        "type": "int"
    },
    "typicalDate": {
        "value": null,
        "type": "str"
    },
    "typicalTime": {
        "value": null,
        "type": "str"
    },
    "numberOfSubsets": {
        "value": 1,
        "type": "int"
    },
    "observedData": {
        "value": 1,
        "type": "int"
    },
    "compressedData": {
        "value": 0,
        "type": "int"
    },
    "unexpandedDescriptors": {
        "value": [
            301150,
            307080
        ],
        "type": "int"
    },
    "subsetNumber": {
        "value": null,
        "type": "int"
    },
    "#1#wigosIdentifierSeries": {
        "value": 0,
        "type": "int",
        "code": "001125",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#wigosIssuerOfIdentifier": {
        "value": 454,
        "type": "int",
        "code": "001126",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 16
    },
    "#1#wigosIssueNumber": {
        "value": 2,
        "type": "int",
        "code": "001127",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 16
    },
    "#1#wigosLocalIdentifierCharacter": {
        "value": "AWSMULANJE",
        "type": "str",
        "code": "001128",
        "units": "CCITT IA5",
        "scale": 0,
        "reference": 0,
        "width": 128
    },
    "#1#blockNumber": {
        "value": null,
        "type": "int",
        "code": "001001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#1#stationNumber": {
        "value": null,
        "type": "int",
        "code": "001002",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 10
    },
    "#1#stationOrSiteName": {
        "value": "Mulanje",
        "type": "str",
        "code": "001015",
        "units": "CCITT IA5",
        "scale": 0,
        "reference": 0,
        "width": 160
    },
    "#1#stationType": {
        "value": 0,
        "type": "int",
        "code": "002001",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 2
    },
    "#1#year": {
        "value": 2023,
        "type": "int",
        "code": "004001",
        "units": "a",
        "scale": 0,
        "reference": 0,
        "width": 12
    },
    "#1#month": {
        "value": 5,
        "type": "int",
        "code": "004002",
        "units": "mon",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#day": {
        "value": 26,
        "type": "int",
        "code": "004003",
        "units": "d",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#hour": {
        "value": 0,
        "type": "int",
        "code": "004004",
        "units": "h",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#minute": {
        "value": 55,
        "type": "int",
        "code": "004005",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#latitude": {
        "value": -16.03,
        "type": "float",
        "code": "005001",
        "units": "deg",
        "scale": 5,
        "reference": -9000000,
        "width": 25
    },
    "#1#longitude": {
        "value": 35.51,
        "type": "float",
        "code": "006001",
        "units": "deg",
        "scale": 5,
        "reference": -18000000,
        "width": 26
    },
    "#1#heightOfStationGroundAboveMeanSeaLevel": {
        "value": 649.0,
        "type": "float",
        "code": "007030",
        "units": "m",
        "scale": 1,
        "reference": -4000,
        "width": 17
    },
    "#1#heightOfBarometerAboveMeanSeaLevel": {
        "value": 650.0,
        "type": "float",
        "code": "007031",
        "units": "m",
        "scale": 1,
        "reference": -4000,
        "width": 17
    },
    "#1#nonCoordinatePressure": {
        "value": 94417.67,
        "type": "float",
        "code": "010004",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#pressureReducedToMeanSeaLevel": {
        "value": -102043.2,
        "type": "float",
        "code": "010051",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#3HourPressureChange": {
        "value": -35.4375,
        "type": "float",
        "code": "010061",
        "units": "Pa",
        "scale": -1,
        "reference": -500,
        "width": 10
    },
    "#1#characteristicOfPressureTendency": {
        "value": 7,
        "type": "int",
        "code": "010063",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#24HourPressureChange": {
        "value": null,
        "type": "float",
        "code": "010062",
        "units": "Pa",
        "scale": -1,
        "reference": -1000,
        "width": 11
    },
    "#1#pressure": {
        "value": null,
        "type": "float",
        "code": "007004",
        "units": "Pa",
        "scale": -1,
        "reference": 0,
        "width": 14
    },
    "#1#nonCoordinateGeopotentialHeight": {
        "value": null,
        "type": "int",
        "code": "010009",
        "units": "gpm",
        "scale": 0,
        "reference": -1000,
        "width": 17
    },
    "#1#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": 1.5,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#airTemperature": {
        "value": 2858.15,
        "type": "float",
        "code": "012101",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#dewpointTemperature": {
        "value": 289.09999999999997,
        "type": "float",
        "code": "012103",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#relativeHumidity": {
        "value": 54,
        "type": "int",
        "code": "013003",
        "units": "%",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#2#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#horizontalVisibility": {
        "value": null,
        "type": "float",
        "code": "020001",
        "units": "m",
        "scale": -1,
        "reference": 0,
        "width": 13
    },
    "#3#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#totalPrecipitationPast24Hours": {
        "value": null,
        "type": "float",
        "code": "013023",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#4#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#cloudCoverTotal": {
        "value": null,
        "type": "int",
        "code": "020010",
        "units": "%",
        "scale": 0,
        "reference": 0,
        "width": 7
    },
    "#1#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#cloudAmount": {
        "value": null,
        "type": "int",
        "code": "020011",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#heightOfBaseOfCloud": {
        "value": null,
        "type": "float",
        "code": "020013",
        "units": "m",
        "scale": -1,
        "reference": -40,
        "width": 11
    },
    "#1#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#3#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#delayedDescriptorReplicationFactor": {
        "value": null,
        "type": "int",
        "code": "031001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 8
    },
    "#2#delayedDescriptorReplicationFactor": {
        "value": null,
        "type": "int",
        "code": "031001",
        "units": "Numeric",
        "scale": 0,
        "reference": 0,
        "width": 8
    },
    "#2#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#3#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#4#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#3#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved": {
        "value": null,
        "type": "int",
        "code": "020054",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#5#verticalSignificanceSurfaceObservations": {
        "value": null,
        "type": "int",
        "code": "008002",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#1#bearingOrAzimuth": {
        "value": null,
        "type": "float",
        "code": "005021",
        "units": "deg",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#elevation": {
        "value": null,
        "type": "float",
        "code": "007021",
        "units": "deg",
        "scale": 2,
        "reference": -9000,
        "width": 15
    },
    "#4#cloudType": {
        "value": null,
        "type": "int",
        "code": "020012",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 6
    },
    "#2#bearingOrAzimuth": {
        "value": null,
        "type": "float",
        "code": "005021",
        "units": "deg",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#2#elevation": {
        "value": null,
        "type": "float",
        "code": "007021",
        "units": "deg",
        "scale": 2,
        "reference": -9000,
        "width": 15
    },
    "#1#stateOfGround": {
        "value": null,
        "type": "int",
        "code": "020062",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#totalSnowDepth": {
        "value": null,
        "type": "float",
        "code": "013013",
        "units": "m",
        "scale": 2,
        "reference": -2,
        "width": 16
    },
    "#1#groundMinimumTemperaturePast12Hours": {
        "value": null,
        "type": "float",
        "code": "012113",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#presentWeather": {
        "value": null,
        "type": "int",
        "code": "020003",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#pastWeather1": {
        "value": null,
        "type": "int",
        "code": "020004",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#1#pastWeather2": {
        "value": null,
        "type": "int",
        "code": "020005",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#2#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#totalSunshine": {
        "value": null,
        "type": "int",
        "code": "014031",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 11
    },
    "#3#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#totalSunshine": {
        "value": null,
        "type": "int",
        "code": "014031",
        "units": "min",
        "scale": 0,
        "reference": 0,
        "width": 11
    },
    "#5#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#4#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#totalPrecipitationOrTotalWaterEquivalent": {
        "value": null,
        "type": "float",
        "code": "013011",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#5#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#totalPrecipitationOrTotalWaterEquivalent": {
        "value": null,
        "type": "float",
        "code": "013011",
        "units": "kg m-2",
        "scale": 1,
        "reference": -1,
        "width": 14
    },
    "#6#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#6#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#7#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#maximumTemperatureAtHeightAndOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "012111",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#8#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#9#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#minimumTemperatureAtHeightAndOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "012112",
        "units": "K",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#7#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#1#instrumentationForWindMeasurement": {
        "value": null,
        "type": "int",
        "code": "002002",
        "units": "FLAG TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#timeSignificance": {
        "value": null,
        "type": "int",
        "code": "008021",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#10#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#windDirection": {
        "value": null,
        "type": "int",
        "code": "011001",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#windSpeed": {
        "value": null,
        "type": "float",
        "code": "011002",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#2#timeSignificance": {
        "value": null,
        "type": "int",
        "code": "008021",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 5
    },
    "#11#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#maximumWindGustDirection": {
        "value": null,
        "type": "int",
        "code": "011043",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#1#maximumWindGustSpeed": {
        "value": null,
        "type": "float",
        "code": "011041",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#12#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004025",
        "units": "min",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#maximumWindGustDirection": {
        "value": null,
        "type": "int",
        "code": "011043",
        "units": "deg",
        "scale": 0,
        "reference": 0,
        "width": 9
    },
    "#2#maximumWindGustSpeed": {
        "value": null,
        "type": "float",
        "code": "011041",
        "units": "m/s",
        "scale": 1,
        "reference": 0,
        "width": 12
    },
    "#8#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform": {
        "value": null,
        "type": "float",
        "code": "007032",
        "units": "m",
        "scale": 2,
        "reference": 0,
        "width": 16
    },
    "#13#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#typeOfInstrumentationForEvaporationMeasurement": {
        "value": null,
        "type": "int",
        "code": "002004",
        "units": "CODE TABLE",
        "scale": 0,
        "reference": 0,
        "width": 4
    },
    "#1#evaporation": {
        "value": null,
        "type": "float",
        "code": "013033",
        "units": "kg m-2",
        "scale": 1,
        "reference": 0,
        "width": 10
    },
    "#14#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#longWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014002",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#1#shortWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014004",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#1#netRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014016",
        "units": "J m-2",
        "scale": -4,
        "reference": -16384,
        "width": 15
    },
    "#1#globalSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014028",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#1#diffuseSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014029",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#1#directSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014030",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#15#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#2#longWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014002",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#2#shortWaveRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014004",
        "units": "J m-2",
        "scale": -3,
        "reference": -65536,
        "width": 17
    },
    "#2#netRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014016",
        "units": "J m-2",
        "scale": -4,
        "reference": -16384,
        "width": 15
    },
    "#2#globalSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014028",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#2#diffuseSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014029",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
        "width": 20
    },
    "#2#directSolarRadiationIntegratedOverPeriodSpecified": {
        "value": null,
        "type": "float",
        "code": "014030",
        "units": "J m-2",
        "scale": -2,
        "reference": 0,
    "#17#timePeriod": {
        "value": null,
        "type": "int",
        "code": "004024",
        "units": "h",
        "scale": 0,
        "reference": -2048,
        "width": 12
    },
    "#1#temperatureChangeOverSpecifiedPeriod": {
        "value": null,
        "type": "int",
        "code": "012049",
        "units": "K",
        "scale": 0,
        "reference": -30,
        "width": 6
    }
}
null message returned
        'None' found in BUFR output, no data written

        End of processing, exiting.

add GeoJSON support per message

Foreach message, provide a GeoJSON representation (as a Python dict) in the response. This will allow users to use the messages as part of geospatial workflows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.