/usr/share/eccodes/definitions/metar/wind.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 | alias windVariableDirection = false;
if (substr(g,-2,2) is "KT") {
alias windPresent=one;
constant windUnits="knots" :dump;
rename(g,windInKnots) ;
modify windInKnots : hidden;
if (is_integer(windInKnots,3,2)){
windSpeed=to_string(windInKnots,3,2) : dump;
}
if (substr(windInKnots,0,3) is "VRB") {
constant windDirection= "Variable" : dump;
alias windVariableDirection = true;
} else {
if (is_integer(windInKnots,0,3)) {
windDirection=to_string(windInKnots,0,3) : dump;
}
}
if (substr(windInKnots,5,1) is "G" && is_integer(windInKnots,6,2) ) {
windGust=to_string(windInKnots,6,2);
}
group g : dump; non_alpha na;
}
if (substr(g,-3,3) is "KMH") {
alias windPresent=one;
constant windUnits="km/h" : dump;
rename(g,windInKilometresPerHour) ;
modify windInKilometresPerHour : hidden;
if (is_integer(windInKilometresPerHour,3,2)){
windSpeed=to_string(windInKilometresPerHour,3,2) : dump;
}
if (substr(windInKilometresPerHour,0,3) is "VRB") {
constant windDirection= "Variable" : dump;
alias windVariableDirection = true;
} else {
if (is_integer(windInKilometresPerHour,0,3)) {
windDirection=to_string(windInKilometresPerHour,0,3) : dump;
}
}
if (substr(windInKilometresPerHour,5,1) is "G" && is_integer(windInKilometresPerHour,6,2) ) {
windGust=to_string(windInKilometresPerHour,6,2);
}
group g : dump; non_alpha na;
}
if (substr(g,-3,3) is "MPS") {
alias windPresent=one;
constant windUnits="m/s" : dump;
rename(g,windInMetresPerSecond) ;
modify windInMetresPerSecond : hidden;
if (is_integer(windInMetresPerSecond,3,2)) {
windSpeed=to_string(windInMetresPerSecond,3,2) : dump;
}
if (substr(windInMetresPerSecond,0,3) is "VRB") {
constant windDirection= "Variable" : dump;
alias windVariableDirection = true;
} else {
if (is_integer(windInMetresPerSecond,0,3)) {
windDirection=to_string(windInMetresPerSecond,0,3) : dump;
}
}
if (substr(windInMetresPerSecond,5,1) is "G" && is_integer(windInMetresPerSecond,6,2) ) {
windGust=to_string(windInMetresPerSecond,6,2);
}
group g : dump; non_alpha na;
}
if ( length(g)==7 && substr(g,3,1) is "V" ) {
rename(g,variationInWindDirection);
group g : dump; non_alpha na;
if (is_integer(variationInWindDirection,0,3)) {
extremeClockwiseWindDirection=to_string(variationInWindDirection,0,3);
}
if (is_integer(variationInWindDirection,4,3)) {
extremeCounterClockwiseWindDirection=to_string(variationInWindDirection,4,3);
}
}
|