mirror of https://github.com/ecmwf/eccodes.git
41 lines
1.5 KiB
Modula-2
41 lines
1.5 KiB
Modula-2
if (substr(g,0,1) is "R" && ( substr(g,3,1) is "/" || substr(g,3,2) is "C/"
|
|
|| substr(g,3,2) is "L/" || substr(g,3,2) is "R/") ) {
|
|
rename(g,RVR2);
|
|
group g : dump; non_alpha na;
|
|
if (substr(RVR2,3,1) is "/") {
|
|
runwayDesignatorRVR2=to_string(RVR2,1,2);
|
|
if (substr(RVR2,4,1) is "P" || substr(RVR2,4,1) is "M") {
|
|
extremeValuesRVR2=to_string(RVR2,4,1);
|
|
RVR2_1=to_string(RVR2,5);
|
|
} else {
|
|
RVR2_1=to_string(RVR2,4);
|
|
}
|
|
} else {
|
|
runwayDesignatorRVR2=to_string(RVR2,1,3);
|
|
meanValueRVR2=to_string(RVR2,5,4);
|
|
if (substr(RVR2,5,1) is "P" || substr(RVR2,5,1) is "M") {
|
|
ExtremeValuesRVR2=to_string(RVR,5,1);
|
|
RVR2_1=to_string(RVR2,6);
|
|
} else {
|
|
RVR2_1=to_string(RVR2,5);
|
|
}
|
|
}
|
|
if (length(RVR2_1)==4 || length(RVR2_1)==5) {
|
|
meanRVR2=to_string(RVR2_1,0,4);
|
|
} else {
|
|
if (substr(RVR2_1,4,1) is "V") {
|
|
oneMinuteMeanMinimumRVR2=to_string(RVR2_1,0,4);
|
|
if (substr(RVR2_1,5,1) is "P" || substr(RVR2_1,5,1) is "M") {
|
|
ExtremeValuesInMaximumRVR2=to_string(RVR_1,5,1);
|
|
oneMinuteMeanMaximumRVR2=to_string(RVR2_1,6,4);
|
|
} else {
|
|
oneMinuteMeanMaximumRVR2=to_string(RVR2_1,5,4);
|
|
}
|
|
}
|
|
}
|
|
if (substr(RVR2,-1,1) is "U" ) { constant pastTendencyRVR2="UPWARD"; }
|
|
if (substr(RVR2,-1,1) is "D" ) { constant pastTendencyRVR2="DOWNWARD"; }
|
|
if (substr(RVR2,-1,1) is "N" ) { constant pastTendencyRVR2="NO_CHANGE"; }
|
|
|
|
}
|