def load(h): h.add(_.Constant('GRIBEXSection1Problem', (960 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('clusterNumber', 1)) h.alias('number', 'clusterNumber') h.add(_.Unsigned('totalNumberOfClusters', 1)) h.alias('totalNumber', 'totalNumberOfClusters') h.add(_.Pad('padding_loc29_1', 1)) h.add(_.Unsigned('clusteringMethod', 1)) h.add(_.Signed('northernLatitudeOfDomain', 3)) h.add(_.Signed('westernLongitudeOfDomain', 3)) h.add(_.Signed('southernLatitudeOfDomain', 3)) h.add(_.Signed('easternLongitudeOfDomain', 3)) h.add(_.Unsigned('numberOfForecastsInCluster', 1)) h.add(_.Unsigned('numberOfParametersUsedForClustering', 1)) h.add(_.Unsigned('numberOfPressureLevelsUsedForClustering', 1)) h.add(_.Unsigned('numberOfStepsUsedForClustering', 1)) h.add(_.Pad('padding_loc29_2', 10)) with h.list('listOfEnsembleForecastNumbers'): for i in range(0, h.get_l('numberOfForecastsInCluster')): h.add(_.Unsigned('baseDateEPS', 4)) h.add(_.Unsigned('baseTimeEPS', 2)) h.add(_.Unsigned('number', 1)) with h.list('listOfParametersUsedForClustering'): for i in range(0, h.get_l('numberOfParametersUsedForClustering')): h.add(_.Unsigned('parameterCode', 1)) h.add(_.Unsigned('tableCode', 1)) h.add(_.Unsigned('pressureLevel', 2, _.Get('numberOfPressureLevelsUsedForClustering'))) h.add(_.Unsigned('stepForClustering', 2, _.Get('numberOfStepsUsedForClustering'))) h.add(_.Padto('padding_loc29_3', (_.Get('offsetSection1') + 960))) h.alias('number', 'clusterNumber')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (328 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('clusterNumber', 1)) h.alias('number', 'clusterNumber') h.add(_.Unsigned('totalNumberOfClusters', 1)) h.alias('totalNumber', 'totalNumberOfClusters') h.add(_.Pad('padding_loc2_1', 1)) h.add(_.Unsigned('clusteringMethod', 1)) h.add(_.Unsigned('startTimeStep', 2)) h.add(_.Unsigned('endTimeStep', 2)) h.add(_.Signed('northernLatitudeOfDomain', 3)) h.add(_.Signed('westernLongitudeOfDomain', 3)) h.add(_.Signed('southernLatitudeOfDomain', 3)) h.add(_.Signed('easternLongitudeOfDomain', 3)) h.add(_.Ascii('clusteringDomain', 1)) h.add(_.Unsigned('operationalForecastCluster', 1)) h.add(_.Unsigned('controlForecastCluster', 1)) h.add(_.Unsigned('representativeMember', 1)) h.add(_.Codetable('climatologicalRegime', 1, "grib1/regime.table")) h.add(_.Unsigned('numberOfForecastsInCluster', 1)) if (h.get_l('numberOfForecastsInCluster') > 0): h.add( _.Unsigned('ensembleForecastNumbers', 1, _.Get('numberOfForecastsInCluster'))) h.add(_.Padto('padding_loc2_2', (_.Get('offsetSection1') + 328))) h.alias('mars.number', 'clusterNumber') h.alias('mars.domain', 'clusteringDomain')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', 0)) h.add(_.StringCodetable('thisMarsClass', 1, "mars/class.table")) h.add(_.StringCodetable('thisMarsType', 1, "mars/type.table")) h.add(_.StringCodetable('thisMarsStream', 2, "mars/stream.table")) h.add(_.Ksec1expver('thisExperimentVersionNumber', 4)) h.alias('ls.dataType', 'thisMarsType') h.alias('mars.class', 'thisMarsClass') h.alias('mars.type', 'thisMarsType') h.alias('mars.stream', 'thisMarsStream') h.alias('mars.expver', 'thisExperimentVersionNumber') h.add(_.Pad('padding_loc192_1', 2)) h.add(_.Unsigned('numberOfLocalDefinitions', 1)) if (h.get_l('numberOfLocalDefinitions') == 2): h.add(_.Unsigned('subLocalDefinitionLength1', 2)) h.add(_.Unsigned('subLocalDefinitionNumber1', 1)) h.add(_.StringCodetable('marsClass1', 1, "mars/class.table")) h.add(_.StringCodetable('marsType1', 1, "mars/type.table")) h.add(_.StringCodetable('marsStream1', 2, "mars/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber1', 4)) _.Template( 'grib1/local_no_mars.98.[subLocalDefinitionNumber1].def').load(h) h.add(_.Unsigned('subLocalDefinitionLength2', 2)) h.add(_.Unsigned('subLocalDefinitionNumber2', 1)) h.add(_.StringCodetable('marsClass2', 1, "mars/class.table")) h.add(_.StringCodetable('marsType2', 1, "mars/type.table")) h.add(_.StringCodetable('marsStream2', 2, "mars/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber2', 4)) _.Template( 'grib1/local_no_mars.98.[subLocalDefinitionNumber2].def').load(h)
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (120 - _.Get('section1Length')))) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 18)) if (h.get_s('stepType') == "instant"): h.alias('productDefinitionTemplateNumber', 'epsPoint') else: h.alias('productDefinitionTemplateNumber', 'epsContinous') _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Codetable('dataOrigin', 1, "common/c-1.table")) h.alias('origin', 'dataOrigin') h.add(_.Ascii('modelIdentifier', 4)) h.add(_.Unsigned('consensusCount', 1)) h.add(_.Pad('padding_loc18_1', 3)) with h.list('consensus'): for i in range(0, h.get_l('consensusCount')): h.add(_.Ascii('ccccIdentifiers', 4)) h.add(_.Padto('padding_loc18_2', (_.Get('offsetSection1') + 120))) h.alias('local.dataOrigin', 'dataOrigin') h.alias('local.modelIdentifier', 'modelIdentifier') h.alias('local.consensusCount', 'consensusCount')
def load(h): _.Template('grib1/mars_labeling.def').load(h) h.add(_.Constant('GRIBEXSection1Problem', (80 - _.Get('section1Length')))) h.add(_.Unsigned('number', 1)) h.alias('perturbationNumber', 'number') h.add(_.Unsigned('ensembleSize', 1)) h.alias('totalNumber', 'ensembleSize') h.add( _.Sprintf('quantile', "%s:%s", _.Get('number'), _.Get('ensembleSize'))) h.add(_.Unsigned('versionNumberOfExperimentalSuite', 1)) h.alias('powerOfTenUsedToScaleClimateWeight', 'versionNumberOfExperimentalSuite') h.add(_.Unsigned('implementationDateOfModelCycle', 4)) h.alias('weightAppliedToClimateMonth1', 'implementationDateOfModelCycle') h.add(_.Unsigned('numberOfReforecastYearsInModelClimate', 3)) h.alias('firstMonthUsedToBuildClimateMonth1', 'numberOfReforecastYearsInModelClimate') h.add(_.Unsigned('numberOfDaysInClimateSamplingWindow', 3)) h.alias('lastMonthUsedToBuildClimateMonth1', 'numberOfDaysInClimateSamplingWindow') h.add(_.Unsigned('sampleSizeOfModelClimate', 3)) h.alias('firstMonthUsedToBuildClimateMonth2', 'sampleSizeOfModelClimate') h.add(_.Unsigned('versionOfModelClimate', 3)) h.alias('lastMonthUsedToBuildClimateMonth2', 'versionOfModelClimate') h.add(_.Unsigned('efiOrder', 1)) h.add(_.Pad('padding_loc19_2', 11))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (328 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('clusterNumber', 1)) h.alias('number', 'clusterNumber') h.add(_.Unsigned('totalNumberOfClusters', 1)) h.alias('totalNumber', 'totalNumberOfClusters') h.add(_.Pad('padding_loc2_1', 1)) h.add(_.Unsigned('clusteringMethod', 1)) h.add(_.Unsigned('startTimeStep', 2)) h.add(_.Unsigned('endTimeStep', 2)) h.add(_.Signed('northernLatitudeOfDomain', 3)) h.add(_.Signed('westernLongitudeOfDomain', 3)) h.add(_.Signed('southernLatitudeOfDomain', 3)) h.add(_.Signed('easternLongitudeOfDomain', 3)) h.add(_.Unsigned('operationalForecastCluster', 1)) h.add(_.Unsigned('controlForecastCluster', 1)) h.add(_.Unsigned('numberOfForecastsInCluster', 1)) if (h.get_l('numberOfForecastsInCluster') > 0): h.add( _.Unsigned('ensembleForecastNumbers', 1, _.Get('numberOfForecastsInCluster'))) h.add(_.Padto('padding_loc2_2', (_.Get('offsetSection1') + 328))) h.add(_.Constant('unknown', "-")) h.add( _.Concept('clusteringDomain', 'unknown', 'cluster_domain.def', 'conceptsMasterDir', 'conceptsLocalDirAll', True)) h.alias('number', 'clusterNumber') h.alias('domain', 'clusteringDomain')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (100 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('forecastOrSingularVectorNumber', 2)) h.add(_.Unsigned('numberOfIterations', 2)) h.add(_.Unsigned('numberOfSingularVectorsComputed', 2)) h.add(_.Unsigned('normAtInitialTime', 1)) h.add(_.Unsigned('normAtFinalTime', 1)) h.add(_.Unsigned('multiplicationFactorForLatLong', 4)) h.add(_.Signed('northWestLatitudeOfVerficationArea', 4)) h.add(_.Signed('northWestLongitudeOfVerficationArea', 4)) h.add(_.Signed('southEastLatitudeOfVerficationArea', 4)) h.add(_.Signed('southEastLongitudeOfVerficationArea', 4)) h.add(_.Unsigned('accuracyMultipliedByFactor', 4)) h.add(_.Unsigned('numberOfSingularVectorsEvolved', 2)) h.add(_.Signed('NINT_LOG10_RITZ', 4)) h.add(_.Signed('NINT_RITZ_EXP', 4)) h.add(_.Unsigned('optimisationTime', 1)) h.alias('mars.opttime', 'optimisationTime') h.add(_.Unsigned('forecastLeadTime', 1)) h.alias('mars.leadtime', 'forecastLeadTime') h.add(_.Ascii('marsDomain', 1)) h.add(_.Unsigned('methodNumber', 2)) h.add(_.Unsigned('numberOfForecastsInEnsemble', 2)) h.add(_.Unsigned('shapeOfVerificationArea', 1)) h.add(_.Pad('padding_loc21_1', 1)) h.alias('mars.domain', 'marsDomain')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (69 - _.Get('section1Length')))) h.add(_.Transient('localFlag', 2)) _.Template('grib1/mars_labeling.def').load(h) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 26)) if (h.get_s('stepType') == "instant"): h.alias('productDefinitionTemplateNumber', 'epsPoint') else: h.alias('productDefinitionTemplateNumber', 'epsContinous') h.add(_.Constant('wrongPadding', 1)) h.add(_.Unsigned('number', 1)) h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Unsigned('referenceDate', 4)) h.add(_.Unsigned('climateDateFrom', 4)) h.add(_.Unsigned('climateDateTo', 4)) h.add(_.Pad('padding_loc26_1', 6)) h.alias('perturbationNumber', 'number') h.alias('local.referenceDate', 'referenceDate') h.alias('local.climateDateFrom', 'climateDateFrom') h.alias('local.climateDateTo', 'climateDateTo')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (72 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('classOfAnalysis', 1)) h.add(_.Unsigned('typeOfAnalysis', 1)) h.add(_.Unsigned('streamOfAnalysis', 2)) h.add(_.Ksec1expver('experimentVersionNumberOfAnalysis', 4)) h.add(_.Unsigned('yearOfAnalysis', 1)) h.add(_.Unsigned('monthOfAnalysis', 1)) h.add(_.Unsigned('dayOfAnalysis', 1)) h.add(_.Unsigned('hourOfAnalysis', 1)) h.add(_.Unsigned('minuteOfAnalysis', 1)) h.add(_.Unsigned('centuryOfAnalysis', 1)) h.add(_.Unsigned('originatingCentreOfAnalysis', 1)) h.add(_.Unsigned('subcentreOfAnalysis', 1)) h.add(_.Pad('padding_local11_1', 7)) h.add(_.Constant('secondsOfAnalysis', 0)) h.add( _.G1date('dateOfAnalysis', _.Get('centuryOfAnalysis'), _.Get('yearOfAnalysis'), _.Get('monthOfAnalysis'), _.Get('dayOfAnalysis'))) h.add( _.Time('timeOfAnalysis', _.Get('hourOfAnalysis'), _.Get('minuteOfAnalysis'), _.Get('secondsOfAnalysis'))) h.alias('date', 'dateOfAnalysis') h.alias('time', 'timeOfAnalysis')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (60 - _.Get('section1Length')))) h.add(_.Transient('localFlag', 1)) _.Template('grib1/mars_labeling.def').load(h) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 15)) if (h.get_s('stepType') == "instant"): h.alias('productDefinitionTemplateNumber', 'one') else: h.alias('productDefinitionTemplateNumber', 'eleven') h.add(_.Unsigned('perturbationNumber', 2)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('systemNumber', 2)) h.add(_.Unsigned('methodNumber', 2)) h.add(_.Unsigned('numberOfForecastsInEnsemble', 2)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Pad('padding_loc15_1', 3)) h.alias('origin', 'centre') h.alias('number', 'perturbationNumber') h.alias('total', 'numberOfForecastsInEnsemble') h.alias('system', 'systemNumber') h.alias('method', 'methodNumber') h.alias('local.perturbationNumber', 'perturbationNumber') h.alias('local.systemNumber', 'systemNumber') h.alias('local.methodNumber', 'methodNumber')
def load(h): h.add(_.StringCodetable('marsClass', 1, "mars/eswi/class.table")) h.add(_.StringCodetable('marsType', 1, "mars/eswi/type.table")) h.add(_.StringCodetable('marsStream', 2, "mars/eswi/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber', 4)) h.add(_.Pad('reservedNeedNotBePresent', 2)) h.add(_.StringCodetable('marsModel', 1, "mars/eswi/model.table"))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (106 - _.Get('section1Length')))) h.add(_.Transient('localFlag', 3)) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 30)) _.Template('grib1/mars_labeling.def').load(h) if (h.get_s('stepType') == "instant"): if ((h.get_s('type') == "em") or (h.get_s('type') == "es")): h.alias('productDefinitionTemplateNumber', 'epsStatisticsPoint') else: h.alias('productDefinitionTemplateNumber', 'epsPoint') else: if ((h.get_s('type') == "em") or (h.get_s('type') == "es")): h.alias('productDefinitionTemplateNumber', 'epsStatisticsContinous') else: h.alias('productDefinitionTemplateNumber', 'epsContinous') h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Unsigned('oceanAtmosphereCoupling', 1)) h.add(_.Pad('padding_loc30_1', 3)) h.add(_.Unsigned('legBaseDate', 4)) h.add(_.Unsigned('legBaseTime', 2)) h.add(_.Unsigned('legNumber', 1)) h.add(_.Unsigned('referenceDate', 4)) h.add(_.Unsigned('climateDateFrom', 4)) h.add(_.Unsigned('climateDateTo', 4)) h.alias('local.oceanAtmosphereCoupling', 'oceanAtmosphereCoupling') h.alias('local.legBaseDate', 'legBaseDate') h.alias('local.legBaseTime', 'legBaseTime') h.alias('local.legNumber', 'legNumber') h.alias('local.referenceDate', 'referenceDate') h.alias('local.climateDateFrom', 'climateDateFrom') h.alias('local.climateDateTo', 'climateDateTo') h.alias('mars._leg_number', 'legNumber') h.add(_.Pad('padding_loc30_2', 32))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (53 - _.Get('section1Length')))) h.add(_.StringCodetable('marsClass', 1, "mars/eswi/class.table")) h.add(_.StringCodetable('marsType', 1, "mars/eswi/type.table")) h.add(_.StringCodetable('marsStream', 2, "mars/eswi/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber', 4)) h.add(_.Pad('reservedNeedNotBePresent', 2)) h.add(_.StringCodetable('marsModel', 1, "mars/eswi/model.table")) h.add(_.Unsigned('marsExperimentOffset', 1))
def load(h): h.add(_.Unsigned('systemNumber', 2)) h.add(_.Unsigned('methodNumber', 2)) h.alias('local.systemNumber', 'systemNumber') h.alias('local.methodNumber', 'methodNumber') h.add(_.Unsigned('indexingDate', 4)) h.add(_.Unsigned('indexingTime', 2)) h.alias('mars.date', 'indexingDate') h.alias('mars.time', 'indexingTime') h.add(_.Pad('padding_loc12_1', 50))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (107 - _.Get('section1Length')))) h.add(_.Transient('grib2LocalSectionNumber', 30)) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Constant('wrongPadding', 1)) h.add(_.Unsigned('perturbationNumber', 1)) h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.alias('number', 'perturbationNumber') h.add(_.Unsigned('oceanAtmosphereCoupling', 1)) h.add(_.Pad('padding_loc27_1', 3)) h.add(_.Unsigned('legBaseDate', 4)) h.add(_.Unsigned('legBaseTime', 2)) h.add(_.Unsigned('legNumber', 1)) h.add(_.Unsigned('referenceDate', 4)) h.add(_.Unsigned('climateDateFrom', 4)) h.add(_.Unsigned('climateDateTo', 4)) h.alias('mars._leg_number', 'legNumber') h.add(_.Pad('padding_loc27_2', 33))
def load(h): _.Template('grib1/mars_labeling.def').load(h) h.add(_.Pad('padding_loc191_1', 2)) h.add(_.Unsigned('formatVersionMajorNumber', 1)) h.add(_.Unsigned('formatVersionMinorNumber', 1)) h.add(_.Unsigned('originalSubCentreIdentifier', 1)) h.alias('mars.levelist', 'level') h.add(_.Pad('padding_loc191_2', 4)) h.add(_.Unsigned('numberOfBytesOfFreeFormatData', 2)) h.add(_.Position('offsetFreeFormData')) h.add(_.Unsigned('freeFormData', 1, _.Get('numberOfBytesOfFreeFormatData'))) h.add(_.Padtomultiple('padding_loc191_3', _.Get('offsetFreeFormData'), 80)) h.add(_.Position('offsetAfterPadding')) h.add( _.Constant( 'GRIBEXSection1Problem', ((_.Get('offsetAfterPadding') - _.Get('offsetFreeFormData')) % 80)))
def load(h): h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 9)) h.add(_.Constant('GRIBEXSection1Problem', (92 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('forecastOrSingularVectorNumber', 2)) h.add(_.Constant('perturbedType', 60)) if (h.get_l('type') == h.get_l('perturbedType')): h.add(_.Pad('padding_loc9_1', 41)) if (h.get_l('type') != h.get_l('perturbedType')): h.add(_.Unsigned('numberOfIterations', 2)) h.add(_.Unsigned('numberOfSingularVectorsComputed', 2)) h.add(_.Unsigned('normAtInitialTime', 1)) h.add(_.Unsigned('normAtFinalTime', 1)) h.add(_.Unsigned('multiplicationFactorForLatLong', 4)) h.add(_.Signed('northWestLatitudeOfLPOArea', 4)) h.add(_.Signed('northWestLongitudeOfLPOArea', 4)) h.add(_.Signed('southEastLatitudeOfLPOArea', 4)) h.add(_.Signed('southEastLongitudeOfLPOArea', 4)) h.add(_.Unsigned('accuracyMultipliedByFactor', 4)) h.add(_.Unsigned('numberOfSingularVectorsEvolved', 2)) h.add(_.Signed('NINT_LOG10_RITZ', 4)) h.add(_.Signed('NINT_RITZ_EXP', 4)) h.alias('local.numberOfIterations', 'numberOfIterations') h.alias('local.numberOfSingularVectorsComputed', 'numberOfSingularVectorsComputed') h.alias('local.normAtInitialTime', 'normAtInitialTime') h.alias('local.normAtFinalTime', 'normAtFinalTime') h.alias('local.multiplicationFactorForLatLong', 'multiplicationFactorForLatLong') h.alias('local.northWestLatitudeOfLPOArea', 'northWestLatitudeOfLPOArea') h.alias('local.northWestLongitudeOfLPOArea', 'northWestLongitudeOfLPOArea') h.alias('local.southEastLatitudeOfLPOArea', 'southEastLatitudeOfLPOArea') h.alias('local.southEastLongitudeOfLPOArea', 'southEastLongitudeOfLPOArea') h.alias('local.accuracyMultipliedByFactor', 'accuracyMultipliedByFactor') h.alias('local.numberOfSingularVectorsEvolved', 'numberOfSingularVectorsEvolved') h.alias('local.NINT_LOG10_RITZ', 'NINT_LOG10_RITZ') h.alias('local.NINT_RITZ_EXP', 'NINT_RITZ_EXP') h.add(_.Pad('padding_loc9_2', 1))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (58 - _.Get('section1Length')))) h.add(_.Constant('probPoint', 5)) h.add(_.Constant('probContinous', 9)) if (((h.get_l('timeRangeIndicator') == 3) or (h.get_l('timeRangeIndicator') == 4)) or (h.get_l('timeRangeIndicator') == 5)): h.alias('productDefinitionTemplateNumber', 'probContinous') else: h.alias('productDefinitionTemplateNumber', 'probPoint') _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('forecastProbabilityNumber', 1)) h.add(_.Unsigned('totalNumberOfForecastProbabilities', 1)) h.add(_.Signed('localDecimalScaleFactor', 1)) h.add(_.Unsigned('thresholdIndicator', 1)) h.add(_.Signed('lowerThreshold', 2)) h.add(_.Signed('upperThreshold', 2)) if (h.get_l('thresholdIndicator') == 1): h.add(_.Transient('probabilityType', 3)) h.add( _.Transient('scaleFactorOfLowerLimit', _.Get('localDecimalScaleFactor'))) h.add(_.Transient('scaledValueOfLowerLimit', _.Get('lowerThreshold'))) h.add(_.Transient('scaleFactorOfUpperLimit', h._missing())) h.add(_.Transient('scaledValueOfUpperLimit', h._missing())) if (h.get_l('thresholdIndicator') == 2): h.add(_.Transient('probabilityType', 4)) h.add(_.Transient('scaleFactorOfLowerLimit', h._missing())) h.add(_.Transient('scaledValueOfLowerLimit', h._missing())) h.add( _.Transient('scaleFactorOfUpperLimit', _.Get('localDecimalScaleFactor'))) h.add(_.Transient('scaledValueOfUpperLimit', _.Get('upperThreshold'))) if (h.get_l('thresholdIndicator') == 3): h.add(_.Transient('probabilityType', 2)) h.add( _.Transient('scaleFactorOfLowerLimit', _.Get('localDecimalScaleFactor'))) h.add(_.Transient('scaledValueOfLowerLimit', _.Get('lowerThreshold'))) h.add( _.Transient('scaleFactorOfUpperLimit', _.Get('localDecimalScaleFactor'))) h.add(_.Transient('scaledValueOfUpperLimit', _.Get('upperThreshold'))) h.add(_.Pad('padding_loc5_1', 1)) h.alias('number', 'forecastProbabilityNumber') h.alias('totalNumber', 'totalNumberOfForecastProbabilities')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (52 - _.Get('section1Length')))) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 20)) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('iterationNumber', 1)) h.add(_.Unsigned('totalNumberOfIterations', 1)) h.alias('iteration', 'iterationNumber') h.alias('local.iterationNumber', 'iterationNumber') h.alias('local.totalNumberOfIterations', 'totalNumberOfIterations') h.add(_.Pad('padding_loc20_1', 1))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (52 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Constant('operStream', "oper")) h.alias('mars.stream', 'operStream') h.add(_.Unsigned('band', 1)) h.alias('mars.obstype', 'band') h.add(_.Sprintf('marsIdent', "%d", _.Get('indicatorOfTypeOfLevel'))) h.alias('mars.ident', 'marsIdent') h.add(_.Unsigned('functionCode', 1)) h.add(_.Pad('padding_loc3_1', 1))
def load(h): h.add(_.StringCodetable('marsClass', 1, "mars/eswi/class.table")) h.add(_.StringCodetable('marsType', 1, "mars/eswi/type.table")) h.add(_.StringCodetable('marsStream', 2, "mars/eswi/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber', 4)) h.add(_.Pad('reservedNeedNotBePresent', 2)) h.add(_.StringCodetable('marsModel', 1, "mars/eswi/model.table")) h.add(_.Codetable('matchSort', 1, "grib1/localConcepts/eswi/sort.table")) h.add(_.Codetable('matchTimeRepres', 1, "grib1/localConcepts/eswi/timerepres.table")) h.add(_.Codetable('matchLandType', 1, "grib1/localConcepts/eswi/landtype.table")) h.add(_.Codetable('matchAerosolBinNumber', 2, "grib1/localConcepts/eswi/aerosolbinnumber.table")) h.add(_.Unsigned('meanSize', 2))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (120 - _.Get('section1Length')))) h.add(_.Transient('localFlag', 1)) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 2)) h.add(_.Unsigned('systemNumber', 2)) h.add(_.Unsigned('methodNumber', 2)) h.add(_.Unsigned('verifyingMonth', 4)) h.add(_.G1end_of_interval_monthly('endOfInterval', _.Get('verifyingMonth'))) h.add(_.Vector('yearOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 0)) h.add( _.Vector('monthOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 1)) h.add(_.Vector('dayOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 2)) h.add(_.Vector('hourOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 3)) h.add( _.Vector('minuteOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 4)) h.add( _.Vector('secondOfEndOfOverallTimeInterval', _.Get('endOfInterval'), 5)) h.add(_.Transient('hourOfEndOfOverallTimeInterval', 23)) h.add(_.Transient('minuteOfEndOfOverallTimeInterval', 59)) h.add(_.Transient('secondOfEndOfOverallTimeInterval', 59)) h.add(_.Transient('indicatorOfUnitForTimeRange', 3)) h.add(_.Transient('lengthOfTimeRange', 1)) h.add(_.Unsigned('averagingPeriod', 1)) h.add(_.Transient('typeOfStatisticalProcessing', 0)) h.add(_.Transient('indicatorOfUnitForTimeIncrement', 1)) h.add(_.Transient('timeIncrement', _.Get('averagingPeriod'))) h.add(_.Unsigned('forecastMonth', 2)) h.add(_.Transient('forecastTime', (_.Get('forecastMonth') - 1))) h.add(_.Transient('typeOfTimeIncrement', 3)) h.add( _.G1forecastmonth('marsForecastMonth', _.Get('verifyingMonth'), _.Get('dataDate'), _.Get('day'), _.Get('hour'), _.Get('forecastMonth'), _.Get('zero'))) h.alias('origin', 'centre') h.alias('number', 'perturbationNumber') h.alias('system', 'systemNumber') h.alias('method', 'methodNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 2)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Unsigned('indexingDate', 4)) h.add(_.Unsigned('indexingTime', 2)) h.alias('mars.date', 'indexingDate') h.alias('mars.time', 'indexingTime') h.add(_.Pad('padding_loc12_1', 50))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (79 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Constant('wrongPadding', 1)) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Unsigned('baseDateEPS', 4)) h.add(_.Unsigned('baseTimeEPS', 2)) h.add(_.Unsigned('numberOfRepresentativeMember', 1)) h.add(_.Unsigned('numberOfMembersInCluster', 1)) h.add(_.Unsigned('totalInitialConditions', 1)) h.add(_.Pad('padding_loc28_1', 19))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (56 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 1)) h.add(_.Codetable('marsModel', 2, "mars/model.[centre:l].table")) h.alias('mars.model', 'marsModel') h.add(_.Codetable('marsDomain', 2, "mars/domain.[centre:l].table")) h.alias('mars.domain', 'marsDomain') h.add(_.Pad('padding_local40_1', 1))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (56 - _.Get('section1Length')))) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 38)) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('iterationNumber', 1)) h.add(_.Unsigned('totalNumberOfIterations', 1)) h.alias('iteration', 'iterationNumber') h.alias('local.iterationNumber', 'iterationNumber') h.alias('local.totalNumberOfIterations', 'totalNumberOfIterations') h.add(_.Unsigned('offsetToEndOf4DvarWindow', 2)) h.add(_.Unsigned('lengthOf4DvarWindow', 2)) h.alias('anoffset', 'offsetToEndOf4DvarWindow') h.add(_.Pad('padding_loc38_1', 1))
def load(h): _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.add(_.Ascii('Model_Identifier', 8)) h.add(_.Ascii('LBC_Initial_Conditions', 8)) h.add(_.Ascii('Model_LBC_Member_Identifier', 4)) h.add(_.Ascii('Model_Additional_Information', 8)) h.add(_.Pad('padding_loc245_1', 20)) h.add(_.Unsigned('Extra_Data_FreeFormat_0_none', 2)) h.add(_.Position('offsetFreeFormData')) h.add(_.Unsigned('freeFormData', 1, _.Get('Extra_Data_FreeFormat_0_none'))) h.add(_.Padtomultiple('padding_loc245_2', _.Get('offsetSection1'), 80))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (80 - _.Get('section1Length')))) h.add(_.StringCodetable('marsClass', 1, "mars/eswi/class.table")) h.add(_.StringCodetable('marsType', 1, "mars/eswi/type.table")) h.add(_.StringCodetable('marsStream', 2, "mars/eswi/stream.table")) h.add(_.Ksec1expver('experimentVersionNumber', 4)) h.add(_.Pad('reservedNeedNotBePresent', 2)) h.add(_.StringCodetable('marsModel', 1, "mars/eswi/model.table")) h.add(_.Codetable('matchSort', 1, "grib1/localConcepts/eswi/sort.table")) h.add(_.Codetable('matchTimeRepres', 1, "grib1/localConcepts/eswi/timerepres.table")) h.add(_.Codetable('matchLandType', 1, "grib1/localConcepts/eswi/landtype.table")) h.add(_.Codetable('matchAerosolBinNumber', 2, "grib1/localConcepts/eswi/aerosolbinnumber.table")) h.add(_.Unsigned('molarMass', 2)) h.add(_.Unsigned('logTransform', 1)) h.add(_.Signed('threshold', 2)) h.add(_.Unsigned('reserved', 1)) h.add(_.Unsigned('totalAerosolBinsNumbers', 1)) h.add(_.Signed('integerScaleFactor', 1)) h.add(_.Unsigned('lowerRange', 2)) h.add(_.Unsigned('upperRange', 2)) h.add(_.Unsigned('meanSize', 2)) h.add(_.Unsigned('standardDeviation', 2)) h.add(_.Pad('padding_local1_1', 7))
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (52 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Pad('padding_local1_1', 1)) h.alias('grib2LocalSectionPresent', 'present') h.add(_.Constant('grib2LocalSectionNumber', 1)) if (h.get_s('stepType') == "instant"): if ((h.get_s('type') == "em") or (h.get_s('type') == "es")): h.alias('productDefinitionTemplateNumber', 'epsStatisticsPoint') else: if (h.get_l('numberOfForecastsInEnsemble') != 0): if (((h.get_l('perturbationNumber') / 2) * 2) == h.get_l('perturbationNumber')): h.alias('typeOfEnsembleForecast', 'two') else: h.alias('typeOfEnsembleForecast', 'three') h.alias('productDefinitionTemplateNumber', 'epsPoint') else: h.alias('productDefinitionTemplateNumber', 'zero') else: if ((h.get_s('type') == "em") or (h.get_s('type') == "es")): h.alias('productDefinitionTemplateNumber', 'epsStatisticsContinous') else: if (h.get_l('numberOfForecastsInEnsemble') != 0): if (((h.get_l('perturbationNumber') / 2) * 2) == h.get_l('perturbationNumber')): h.alias('typeOfEnsembleForecast', 'two') else: h.alias('typeOfEnsembleForecast', 'three') h.alias('productDefinitionTemplateNumber', 'epsContinous') else: h.alias('productDefinitionTemplateNumber', 'eight')
def load(h): h.add(_.Constant('GRIBEXSection1Problem', (300 - _.Get('section1Length')))) _.Template('grib1/mars_labeling.def').load(h) h.add(_.Unsigned('perturbationNumber', 1)) h.alias('number', 'perturbationNumber') h.add(_.Unsigned('numberOfForecastsInEnsemble', 1)) h.alias('totalNumber', 'numberOfForecastsInEnsemble') h.add(_.Unsigned('modelIdentifier', 1)) h.add(_.Signed('latitudeOfNorthWestCornerOfArea', 4)) h.add(_.Signed('longitudeOfNorthWestCornerOfArea', 4)) h.add(_.Signed('latitudeOfSouthEastCornerOfArea', 4)) h.add(_.Signed('longitudeOfSouthEastCornerOfArea', 4)) h.add(_.Unsigned('originalParameterNumber', 1)) h.add(_.Unsigned('originalParameterTableNumber', 1)) h.add(_.Pad('padding_loc50_1', 46)) h.add(_.Ascii('optionalData', 184))
def load(h): _.Template('grib1/mars_labeling.def').load(h) h.add(_.Pad('padding_loc6_1', 2)) h.add(_.Unsigned('dateSSTFieldUsed', 3)) h.add(_.Unsigned('typeOfSSTFieldUsed', 1)) h.add(_.Unsigned('countOfICEFieldsUsed', 1)) with h.list('ICEFieldsUsed'): for i in range(0, h.get_l('countOfICEFieldsUsed')): h.add(_.Unsigned('dateOfIceFieldUsed', 3)) h.add(_.Unsigned('satelliteNumber', 1)) h.add( _.Constant( 'GRIBEXSection1Problem', ((56 + (_.Get('countOfICEFieldsUsed') * 3)) - _.Get('section1Length'))))