File: section.1.def

package info (click to toggle)
eccodes 2.46.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 154,956 kB
  • sloc: cpp: 163,970; ansic: 26,310; sh: 22,006; f90: 6,854; perl: 6,361; python: 5,352; java: 2,226; javascript: 1,427; yacc: 854; fortran: 543; lex: 359; makefile: 279; xml: 183; awk: 66
file content (88 lines) | stat: -rw-r--r-- 2,639 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# (C) Copyright 2005- ECMWF.

section_length[3] section1Length ;

unsigned[1] gribTablesVersionNo ;
codetable[1] centre 'common/c-1.table' : string_type;

alias ls.centre=centre;
alias identificationOfOriginatingGeneratingCentre=centre;

unsigned[1] generatingProcessIdentifier ;

unsigned[1] gridDefinition ;

flags[1] flag 'grib1/1.table';

codetable[1] indicatorOfParameter 'grib1/2.[centre:l].[gribTablesVersionNo:l].table';

codetable[1] indicatorOfTypeOfLevel 'grib1/3.table';
codetable[2] heightPressureEtcOfLevels 'grib1/3.table';
alias ls.levelType=indicatorOfTypeOfLevel;

unsigned[1] yearOfCentury ;

unsigned[1] month ;
unsigned[1] day;
unsigned[1] hour ;
unsigned[1] minute ;

transient second  = 0;
meta      dataDate    budgdate(yearOfCentury,month,day);
alias     ls.date=dataDate;
meta      dataTime    time(hour,minute,second);

meta julianDay julian_day(dataDate,hour,minute,second) : edition_specific;

#  Indicator of unit of time range
codetable[1] indicatorOfUnitOfTimeRange 'grib1/4.table';

#  P1 - Period of time (number of time units)
unsigned[1] periodOfTime ;

alias P1 = periodOfTime ;

#  P2 - Period of time (number of time units)
unsigned[1] periodOfTimeIntervals ;

alias P2 = periodOfTimeIntervals ;

codetable[1] timeRangeIndicator 'grib1/5.table';

codetable[1] stepUnits 'grib2/tables/1/4.4.table' = 1 : transient,dump,no_copy;

concept stepType {
  "instant" = {timeRangeIndicator=1;}
  "instant" = {timeRangeIndicator=10;}
  "instant" = {timeRangeIndicator=0;}
  "avg"     = {timeRangeIndicator=3;}
  "accum"   = {timeRangeIndicator=4;}
  "max"     = {timeRangeIndicator=2;}
  "min"     = {timeRangeIndicator=2;}
  "diff"    = {timeRangeIndicator=5;}
  "rms"     = {timeRangeIndicator=2;}
  "sd"      = {timeRangeIndicator=2;}
  "cov"     = {timeRangeIndicator=2;}
  "ratio"   = {timeRangeIndicator=2;}
}

meta ls.stepRange g1step_range(P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange,stepUnits,stepType) : dump;
meta startStep long_vector(stepRange,0) : dump;
meta endStep   long_vector(stepRange,1) : dump;

# Set stepUnits to 1 to get step range in hours
meta stepRangeInHours g1step_range(P1,P2,timeRangeIndicator,indicatorOfUnitOfTimeRange,one,stepType);
meta startStepInHours long_vector(stepRangeInHours,0) : dump;
meta endStepInHours   long_vector(stepRangeInHours,1) : dump;

meta marsStep mars_step(stepRange,stepType);

alias mars.date = dataDate;
alias mars.time = dataTime;
alias mars.step = marsStep;

# This does not work? gribTablesVersionNo is 0
#meta param sprintf("%d.0",indicatorOfParameter) ;
constant paramId = 128;
alias parameter = paramId;
alias ls.parameter=parameter;