Replace tabs with spaces

This commit is contained in:
Shahram Najm 2013-07-23 18:06:45 +01:00
parent 6c03d54a38
commit c22de37f79
14 changed files with 125 additions and 127 deletions

View File

@ -4,20 +4,20 @@ template mars_labeling "grib2/mars_labeling.def";
transient productDefinitionTemplateNumberInternal=-1; transient productDefinitionTemplateNumberInternal=-1;
meta localDefinitionNumber local_definition(grib2LocalSectionNumber, meta localDefinitionNumber local_definition(grib2LocalSectionNumber,
productDefinitionTemplateNumber, productDefinitionTemplateNumber,
productDefinitionTemplateNumberInternal, productDefinitionTemplateNumberInternal,
type, type,
stream, stream,
class, class,
eps, eps,
stepType, stepType,
derivedForecast); derivedForecast);
meta eps g2_eps(productDefinitionTemplateNumber, meta eps g2_eps(productDefinitionTemplateNumber,
type, type,
stream, stream,
stepType, stepType,
derivedForecast); derivedForecast);
template localSection "grib2/local.98.[grib2LocalSectionNumber:l].def"; template localSection "grib2/local.98.[grib2LocalSectionNumber:l].def";
position offsetAfterLocalSection; position offsetAfterLocalSection;
@ -26,9 +26,8 @@ transient deleteExtraLocalSection=0;
#transient extraLocalSectionPresent=section2Length - offsetAfterLocalSection + offsetSection2 ; #transient extraLocalSectionPresent=section2Length - offsetAfterLocalSection + offsetSection2 ;
meta extraLocalSectionPresent evaluate (section2Length - offsetAfterLocalSection + offsetSection2 > 0 ); meta extraLocalSectionPresent evaluate (section2Length - offsetAfterLocalSection + offsetSection2 > 0 );
if ( ( extraLocalSectionPresent || addExtraLocalSection ) && ! deleteExtraLocalSection) { if ( ( extraLocalSectionPresent || addExtraLocalSection ) && ! deleteExtraLocalSection) {
# extra local section present # extra local section present
codetable[2] extraLocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 300 : dump; codetable[2] extraLocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 300 : dump;
template localSection "grib2/local.98.[extraLocalSectionNumber:l].def"; template localSection "grib2/local.98.[extraLocalSectionNumber:l].def";
} }

View File

@ -13,34 +13,34 @@ codetable[2] marsStream "mars/stream.table" = "oper" : dump,string_type,lowercas
ksec1expver[4] experimentVersionNumber = "0001" : dump; ksec1expver[4] experimentVersionNumber = "0001" : dump;
meta class g2_mars_labeling(0,marsClass, meta class g2_mars_labeling(0,marsClass,
marsType, marsType,
marsStream, marsStream,
experimentVersionNumber, experimentVersionNumber,
typeOfProcessedData, typeOfProcessedData,
productDefinitionTemplateNumber, productDefinitionTemplateNumber,
stepType, stepType,
derivedForecast, derivedForecast,
typeOfGeneratingProcess); typeOfGeneratingProcess);
meta type g2_mars_labeling(1,marsClass, meta type g2_mars_labeling(1,marsClass,
marsType, marsType,
marsStream, marsStream,
experimentVersionNumber, experimentVersionNumber,
typeOfProcessedData, typeOfProcessedData,
productDefinitionTemplateNumber, productDefinitionTemplateNumber,
stepType, stepType,
derivedForecast, derivedForecast,
typeOfGeneratingProcess); typeOfGeneratingProcess);
meta stream g2_mars_labeling(2,marsClass, meta stream g2_mars_labeling(2,marsClass,
marsType, marsType,
marsStream, marsStream,
experimentVersionNumber, experimentVersionNumber,
typeOfProcessedData, typeOfProcessedData,
productDefinitionTemplateNumber, productDefinitionTemplateNumber,
stepType, stepType,
derivedForecast, derivedForecast,
typeOfGeneratingProcess); typeOfGeneratingProcess);
alias ls.dataType = marsType; alias ls.dataType = marsType;

View File

@ -24,7 +24,7 @@ alias parameter.name=name;
if(levtype is "sfc") if(levtype is "sfc")
{ {
unalias mars.levelist; unalias mars.levelist;
} }
alias mars.expver = marsExpver; alias mars.expver = marsExpver;
@ -36,10 +36,10 @@ alias mars.origin = centre;
# Tigge-LAM rules # Tigge-LAM rules
# productionStatusOfProcessedData == 4 # productionStatusOfProcessedData == 4
if (section2Used == 1) { if (section2Used == 1) {
constant marsLamModel = 'lam'; constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob' alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed unalias mars.domain; # No mars domain needed
} }
concept marsType { concept marsType {

View File

@ -24,7 +24,7 @@ alias parameter.name=name;
if(levtype is "sfc") if(levtype is "sfc")
{ {
unalias mars.levelist; unalias mars.levelist;
} }
alias mars.expver = marsExpver; alias mars.expver = marsExpver;
@ -36,10 +36,10 @@ alias mars.origin = centre;
# Tigge-LAM rules # Tigge-LAM rules
# productionStatusOfProcessedData == 5 # productionStatusOfProcessedData == 5
if (section2Used == 1) { if (section2Used == 1) {
constant marsLamModel = 'lam'; constant marsLamModel = 'lam';
alias mars.model = marsLamModel; # model redefined. It is not 'glob' alias mars.model = marsLamModel; # model redefined. It is not 'glob'
alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM alias mars.origin = tiggeSuiteID; # origin is the suiteName for Tigge-LAM
unalias mars.domain; # No mars domain needed unalias mars.domain; # No mars domain needed
} }
concept marsType { concept marsType {

View File

@ -20,24 +20,24 @@ alias tiggeSuiteID = zero;
transient addEmptySection2 = 0; transient addEmptySection2 = 0;
if ( addEmptySection2 == 0 ) { if ( addEmptySection2 == 0 ) {
if ( grib2LocalSectionPresent==1 or ( section2Length>5 or new() ) ) { if ( grib2LocalSectionPresent==1 or ( section2Length>5 or new() ) ) {
alias section2Used=one; alias section2Used=one;
if(productionStatusOfProcessedData == 4 || productionStatusOfProcessedData == 5) { if(productionStatusOfProcessedData == 4 || productionStatusOfProcessedData == 5) {
# This is TIGGE-LAM because of the productionStatusOfProcessedData and the non-empty section 2 # This is TIGGE-LAM because of the productionStatusOfProcessedData and the non-empty section 2
codetable[2] tiggeLocalVersion 'grib2/tiggeLocalVersion.table' = 1 : dump; codetable[2] tiggeLocalVersion 'grib2/tiggeLocalVersion.table' = 1 : dump;
template tiggeSection "grib2/local.tigge.[tiggeLocalVersion:l].def"; template tiggeSection "grib2/local.tigge.[tiggeLocalVersion:l].def";
} }
codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump; codetable[2] grib2LocalSectionNumber 'grib2/grib2LocalSectionNumber.[centreForLocal:l].table' = 1 : dump;
if (grib2LocalSectionNumber!=0) { if (grib2LocalSectionNumber!=0) {
template_nofail local "grib2/local.[centreForLocal:l].def"; template_nofail local "grib2/local.[centreForLocal:l].def";
} else { } else {
constant deleteLocalDefinition=1; constant deleteLocalDefinition=1;
} }
position offsetAfterCentreLocalSection; position offsetAfterCentreLocalSection;
} }
} }
section_padding section2Padding : read_only; section_padding section2Padding : read_only;

View File

@ -35,31 +35,31 @@ codetable[2] dataRepresentationTemplateNumber ('5.0.table',masterDir,localDir) :
concept packingType (unknown) { concept packingType (unknown) {
#set uses the last one #set uses the last one
#get returns the first match #get returns the first match
"grid_simple" = { dataRepresentationTemplateNumber = 0; } "grid_simple" = { dataRepresentationTemplateNumber = 0; }
"spectral_complex" = { dataRepresentationTemplateNumber = 51; spectralType=1; spectralMode=1; } "spectral_complex" = { dataRepresentationTemplateNumber = 51; spectralType=1; spectralMode=1; }
"spectral_simple" = { dataRepresentationTemplateNumber = 50; spectralType=1; spectralMode=1; } "spectral_simple" = { dataRepresentationTemplateNumber = 50; spectralType=1; spectralMode=1; }
"grid_simple_matrix" = { dataRepresentationTemplateNumber = 1; } "grid_simple_matrix" = { dataRepresentationTemplateNumber = 1; }
"grid_complex" = { dataRepresentationTemplateNumber = 2; } "grid_complex" = { dataRepresentationTemplateNumber = 2; }
"grid_complex_spatial_differencing" = { dataRepresentationTemplateNumber = 3; } "grid_complex_spatial_differencing" = { dataRepresentationTemplateNumber = 3; }
"grid_jpeg" = { dataRepresentationTemplateNumber = 40000; } "grid_jpeg" = { dataRepresentationTemplateNumber = 40000; }
"grid_jpeg" = { dataRepresentationTemplateNumber = 40; } "grid_jpeg" = { dataRepresentationTemplateNumber = 40; }
"grid_png" = { dataRepresentationTemplateNumber = 40010; } "grid_png" = { dataRepresentationTemplateNumber = 40010; }
"grid_png" = { dataRepresentationTemplateNumber = 41; } "grid_png" = { dataRepresentationTemplateNumber = 41; }
"grid_szip" = { dataRepresentationTemplateNumber = 42; } "grid_szip" = { dataRepresentationTemplateNumber = 42; }
"grid_ieee" = { dataRepresentationTemplateNumber = 4; } "grid_ieee" = { dataRepresentationTemplateNumber = 4; }
"grid_second_order" = { dataRepresentationTemplateNumber = 50001; } "grid_second_order" = { dataRepresentationTemplateNumber = 50001; }
"grid_second_order" = { dataRepresentationTemplateNumber = 50002; } "grid_second_order" = { dataRepresentationTemplateNumber = 50002; }
"grid_second_order_boustrophedonic" = { dataRepresentationTemplateNumber = 50002; } "grid_second_order_boustrophedonic" = { dataRepresentationTemplateNumber = 50002; }
"grid_second_order_no_boustrophedonic" = { dataRepresentationTemplateNumber = 50001; } "grid_second_order_no_boustrophedonic" = { dataRepresentationTemplateNumber = 50001; }
"grid_second_order_row_by_row" = { dataRepresentationTemplateNumber = 50001; } "grid_second_order_row_by_row" = { dataRepresentationTemplateNumber = 50001; }
"grid_second_order_constant_width" = { dataRepresentationTemplateNumber = 50001; } "grid_second_order_constant_width" = { dataRepresentationTemplateNumber = 50001; }
"grid_second_order_general_grib1" = { dataRepresentationTemplateNumber = 50001; } "grid_second_order_general_grib1" = { dataRepresentationTemplateNumber = 50001; }
"grid_second_order_no_SPD" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=0; } "grid_second_order_no_SPD" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=0; }
"grid_second_order_SPD1" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=1; } "grid_second_order_SPD1" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=1; }
"grid_second_order_SPD2" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=2; } "grid_second_order_SPD2" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=2; }
"grid_second_order_SPD3" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=3; } "grid_second_order_SPD3" = { dataRepresentationTemplateNumber = 50001;orderOfSPD=3; }
"spectral_ieee" = { dataRepresentationTemplateNumber=50000; } "spectral_ieee" = { dataRepresentationTemplateNumber=50000; }
"grid_simple_log_preprocessing" = { dataRepresentationTemplateNumber = 61; } "grid_simple_log_preprocessing" = { dataRepresentationTemplateNumber = 61; }
} : dump; } : dump;
template dataRepresentation "grib2/template.5.[dataRepresentationTemplateNumber:l].def"; template dataRepresentation "grib2/template.5.[dataRepresentationTemplateNumber:l].def";

View File

@ -40,7 +40,7 @@ meta scaleValuesBy scale_values(values,missingValue) : edition_specific;
meta offsetValuesBy offset_values(values,missingValue) : edition_specific; meta offsetValuesBy offset_values(values,missingValue) : edition_specific;
concept productType(unknown) { concept productType(unknown) {
"obstat" = {grib2LocalSectionPresent=1; centre=98; grib2LocalSectionNumber=500;productDefinitionTemplateNumber=2000;} "obstat" = {grib2LocalSectionPresent=1; centre=98; grib2LocalSectionNumber=500;productDefinitionTemplateNumber=2000;}
} }
position offsetAfterData; position offsetAfterData;

View File

@ -16,9 +16,9 @@
lookup[1] sectionNumber(4) ; lookup[1] sectionNumber(4) ;
transient grib2LocalSectionPresent=0; transient grib2LocalSectionPresent=0;
alias section2Used=zero; alias section2Used=zero;
alias setLocalDefinition=grib2LocalSectionPresent; alias setLocalDefinition=grib2LocalSectionPresent;
if( sectionNumber == 2 or grib2LocalSectionPresent>0 ){ if( sectionNumber == 2 or grib2LocalSectionPresent>0 ){
position sectionPosition; position sectionPosition;

View File

@ -39,13 +39,13 @@ meta geography.latitudeOfLastGridPointInDegrees g2latlon(g2grid,2) : du
meta geography.longitudeOfLastGridPointInDegrees g2latlon(g2grid,3) : dump; meta geography.longitudeOfLastGridPointInDegrees g2latlon(g2grid,3) : dump;
meta geography.iDirectionIncrementInDegrees g2latlon(g2grid,4,iDirectionIncrementGiven) : can_be_missing,dump; meta geography.iDirectionIncrementInDegrees g2latlon(g2grid,4,iDirectionIncrementGiven) : can_be_missing,dump;
meta global global_gaussian(N,Ni,iDirectionIncrement, meta global global_gaussian(N,Ni,iDirectionIncrement,
latitudeOfFirstGridPoint, latitudeOfFirstGridPoint,
longitudeOfFirstGridPoint, longitudeOfFirstGridPoint,
latitudeOfLastGridPoint, latitudeOfLastGridPoint,
longitudeOfLastGridPoint, longitudeOfLastGridPoint,
basicAngleOfTheInitialProductionDomain, basicAngleOfTheInitialProductionDomain,
subdivisionsOfBasicAngle) = 0 : dump; subdivisionsOfBasicAngle) = 0 : dump;
alias xFirst=longitudeOfFirstGridPointInDegrees; alias xFirst=longitudeOfFirstGridPointInDegrees;
alias yFirst=latitudeOfFirstGridPointInDegrees; alias yFirst=latitudeOfFirstGridPointInDegrees;

View File

@ -46,10 +46,10 @@ include "template.3.resolution_flags.def"
include "template.3.scanning_mode.def"; include "template.3.scanning_mode.def";
longitudesList list(Ni) { longitudesList list(Ni) {
unsigned[4] longitudes; unsigned[4] longitudes;
} }
latitudesList list(Ni) { latitudesList list(Ni) {
signed[4] latitudes; signed[4] latitudes;
} }

View File

@ -17,7 +17,7 @@ flagbit alternativeRowScanning(scanningMode,4) = 0 : edition_specific,dump;
if (jPointsAreConsecutive) { if (jPointsAreConsecutive) {
alias numberOfRows=Ni; alias numberOfRows=Ni;
alias numberOfColumns=Nj; alias numberOfColumns=Nj;
} else { } else {
alias numberOfRows=Nj; alias numberOfRows=Nj;
alias numberOfColumns=Ni; alias numberOfColumns=Ni;

View File

@ -92,7 +92,7 @@ if (typeOfSecondFixedSurface==255) {
scaleFactorOfSecondFixedSurface, scaleFactorOfSecondFixedSurface,
scaledValueOfSecondFixedSurface, scaledValueOfSecondFixedSurface,
pressureUnits) :dump; pressureUnits) :dump;
transient level=topLevel; transient level=topLevel;
} }
alias ls.level=level; alias ls.level=level;
alias vertical.level=level; alias vertical.level=level;
@ -101,27 +101,26 @@ alias vertical.topLevel=topLevel;
alias extraDim=zero; alias extraDim=zero;
if (defined(extraDimensionPresent)) { if (defined(extraDimensionPresent)) {
if (extraDimensionPresent) { if (extraDimensionPresent) {
alias extraDim=one; alias extraDim=one;
} }
} }
if (extraDim) { if (extraDim) {
alias mars.levelist = dimension; alias mars.levelist = dimension;
alias mars.levtype = dimensionType; alias mars.levtype = dimensionType;
} else { } else {
if (!(typeOfLevel is "surface")) { if (!(typeOfLevel is "surface")) {
if (pressureUnits is "Pa") { if (pressureUnits is "Pa") {
meta marsLevel scale(level,one,hundred) : read_only; meta marsLevel scale(level,one,hundred) : read_only;
alias mars.levelist=marsLevel; alias mars.levelist=marsLevel;
} else { } else {
alias mars.levelist = level; alias mars.levelist = level;
} }
} }
alias mars.levtype = typeOfFirstFixedSurface; alias mars.levtype = typeOfFirstFixedSurface;
# GRIB-372: levelist alias does not pertain to surface parameters # GRIB-372: levelist alias does not pertain to surface parameters
if (levtype is "sfc") { if (levtype is "sfc") {
unalias mars.levelist; unalias mars.levelist;
} }
} }
alias ls.typeOfLevel=typeOfLevel; alias ls.typeOfLevel=typeOfLevel;

View File

@ -19,7 +19,7 @@ meta parameterName codetable_title(parameterNumber) : dump;
unsigned[1] partitionTable : dump; unsigned[1] partitionTable : dump;
unsigned[1] numberOfPartitions=1 :dump; unsigned[1] numberOfPartitions=1 :dump;
partitions list(numberOfPartitions) { partitions list(numberOfPartitions) {
unsigned[2] partitionItems ; unsigned[2] partitionItems ;
} }
codetable[2] partitionNumber ('4.[partitionTable].table',masterDir,localDir) : dump; codetable[2] partitionNumber ('4.[partitionTable].table',masterDir,localDir) : dump;

View File

@ -75,7 +75,7 @@ if (numberOfTimeRange==1) {
"ratio" = {typeOfStatisticalProcessing=9;} "ratio" = {typeOfStatisticalProcessing=9;}
} }
meta startStep step_in_units(forecastTime,indicatorOfUnitOfTimeRange,stepUnits, meta startStep step_in_units(forecastTime,indicatorOfUnitOfTimeRange,stepUnits,
indicatorOfUnitForTimeRange,lengthOfTimeRange) : no_copy; indicatorOfUnitForTimeRange,lengthOfTimeRange) : no_copy;
meta endStep g2end_step( meta endStep g2end_step(
startStep, startStep,
stepUnits, stepUnits,