/usr/share/eccodes/definitions/metar/boot.def is in libeccodes-data 2.0.2-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # Copyright 2005-2016 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
constant normal="NORMAL";
constant correction="CORRECTION";
#meta out sprintf("metar_%s.xml",count);
alias temperatureAndDewpointPresent=zero;
alias qnhPresent=zero;
alias qnhAPresent=zero;
alias qfePresent=zero;
alias status=normal;
alias isCorrection=zero;
alias presentTrend1=zero;
alias presentTrend2=zero;
alias presentTrend3=zero;
alias isAuto=false;
alias windPresent=zero;
alias nosigPresent=zero;
position startOfMessage;
message_copy theMessage :dump ;
group identifier; non_alpha na;
group g : dump; non_alpha na;
if ( g is "COR" ) {
rename(g,cor);
alias isCorrection=one;
alias status=correction;
group g : dump; non_alpha na;
}
if (length(g) == 4) {
include "metar/cccc.def";
} else {
if (g is "METAR") {
rename(g,metarTwice);
group g : dump; non_alpha na;
if (length(g) == 4) { include "metar/cccc.def"; }
else {
constant CCCC = "unknown";
constant coordinatesPresent = 0;
}
} else {
constant CCCC = "unknown";
constant coordinatesPresent = 0;
}
}
alias ls.CCCC=CCCC;
if (substr(g,6,1) is "Z" && is_integer(g,0,6) ) {
rename(g,YYGGgg);
modify YYGGgg : hidden;
group g : dump ; non_alpha na;
year=getenv("METAR_YEAR") : dump;
month=getenv("METAR_MONTH") : dump;
day = to_string(YYGGgg,0,2) : dump;
hour = to_string(YYGGgg,2,2) : dump;
minute = to_string(YYGGgg,4,2) : dump;
meta dateTime sprintf("%s-%s-%s %s:%s",year,month,day,hour,minute);
alias ls.dateTime=dateTime;
}
if ( ! isCorrection && g is "COR" ) {
rename(g,cor);
alias status=correction;
alias isCorrection=one;
group g : dump; non_alpha na;
}
include "metar/wrong_delayed.def";
if ( g is "NIL" ) {
rename(g,nil); group g : dump;
} else {
if (g is "AUTO") {
rename(g,auto);
alias isAuto=true;
group g : dump; non_alpha na;
}
include "metar/wind.def";
include "metar/horizontalVisibility.def";
if ( ! isCavok ) {
include "metar/present_weather.def";
include "metar/clouds.def";
}
include "metar/missing_field.def";
include "metar/temperature.def";
include "metar/qnh.def";
include "metar/colour.def";
include "metar/recent_weather.def";
include "metar/wind_shear.def";
include "metar/sea_state.def";
template runwayState "metar/runwayState.def";
include "metar/trend1.def";
include "metar/trend2.def";
include "metar/trend3.def";
include "metar/trend4.def";
}
include "metar/remark.def";
if (length(g) == 0) {
modify g : hidden;
} else {
if ( ! remarkPresent) {
rename(g,skippedGroup);
group g : dump; non_alpha na;
include "metar/colour.def";
include "metar/recent_weather.def";
include "metar/wind_shear.def";
include "metar/sea_state.def";
template runwayState "metar/runwayState.def";
include "metar/temperature.def";
include "metar/qnh.def";
if (!presentTrend1) {
include "metar/trend1.def";
include "metar/trend2.def";
include "metar/trend3.def";
include "metar/trend4.def";
}
}
include "metar/remark.def";
if ( ! remarkPresent) {
if ( length(g) == 0) {
modify g : hidden;
} else {
rename(g,unknownGroup) ;
}
}
group notDecoded("=") : dump;
if (remarkPresent) {
rename(notDecoded,remark);
}
}
ascii[1] endMark :read_only ;
position totalLength;
position endOfMessage;
meta lengthOfMessage evaluate( endOfMessage-startOfMessage);
meta md5Headers md5(startOfMessage,lengthOfMessage);
alias ls.totalLength=totalLength;
|