Source code for epygram.formats.grib_utilities

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Contains equivalences tables for GRIB encoding.
"""

#: Aliases to *productionStatusOfProcessedData* numbers
productionStatusOfProcessedData_dict = {'oper':0,
                                        'dble':1,
                                        'test':2,
                                        'research':2,
                                        'unknown':255}

#: Aliases to *typeOfGeneratingProcess* numbers
typeOfGeneratingProcess_dict = {'Analysis':0,
                                'Initialization':1,
                                'Forecast':2,
                                'Bias corrected forecast':3,
                                'Ensemble forecast':4,
                                'Probability forecast':5,
                                'Forecast error':6,
                                'Analysis error':7,
                                'Observation':8,
                                'Climatological':9,
                                'Probability-weighted forecast':10,
                                'Bias-corrected ensemble forecast':11,
                                'Post-processed analysis':12,
                                'Post-processed forecast':13,
                                'Nowcast':14,
                                'Hindcast':15,
                                'unknown':255}

#: Table of Météo-France models' *generatingProcessIdentifier*
generatingProcessIdentifier_dict = {'ARPEGE':
                                        {'prod':{'oper':211,
                                                 'dble':212,
                                                 'test':200},
                                         'assim':{'oper':12,
                                                  'dble':22,
                                                  'test':21}},
                                    'AROME':
                                        {'prod':{'oper':204,
                                                 'dble':209},
                                         'assim':{'oper':213,
                                                  'dble':210}},
                                    'ALADIN-REUNION':
                                        {'prod':{'oper':15,
                                                 'dble':219},
                                         'assim':{'oper':215,
                                                  'dble':19}},
                                    'ALADIN-NC':
                                        {'prod':{'oper':215},
                                         'assim':{'oper':15}},
                                    'ALADIN-POLY':
                                        {'prod':{'oper':215},
                                         'assim':{'oper':15}},
                                    'ALADIN-AG':
                                        {'prod':{'oper':215},
                                         'assim':{'oper':15}},
                                    'CTPINI':
                                        {'prod':{'oper':173,
                                                 'test':221}},  # 221 -> 225
                                    'ALADIN-CEP':
                                        {'prod':{'oper':184}},
                                    'TESTMP1':
                                        {'prod':{'oper':177}},
                                    'TESTMP2':
                                        {'prod':{'oper':177}},
                                    'TESTMS1':
                                        {'prod':{'oper':177}},
                                    'QATAR':
                                        {'prod':{'oper':241}},
                                    'LIBYE':
                                        {'prod':{'oper':243}},
                                    'SINOP':
                                        {'prod':{'oper':244}},
                                    'ALGERIE':
                                        {'prod':{'oper':241}},
                                    'AROME-PEGASE':
                                        {'prod':{'oper':190}},
                                    'VARPACK':
                                        {'prod':{'oper':178,
                                                 'dble':208}},
                                    }