Testing: Add fast BUFR test (no download needed)

This commit is contained in:
Shahram Najm 2020-07-03 13:50:12 +01:00
parent 97b9c1847f
commit 5a5050babd
4 changed files with 144 additions and 8 deletions

View File

@ -64,6 +64,7 @@ EXTRA_DIST = README AUTHORS NOTICE LICENSE ChangeLog version.sh html \
data/scan_y_rotated_ll_8_4_good.dump \ data/scan_y_rotated_ll_8_4_good.dump \
data/scan_y_rotated_ll_8_7_good.dump \ data/scan_y_rotated_ll_8_7_good.dump \
data/tigge_pf_ecmwf.grib2.ref \ data/tigge_pf_ecmwf.grib2.ref \
data/BUFR3.tmpl.dump.plain.ref
data/60_model_levels \ data/60_model_levels \
data/list_points \ data/list_points \
data/step.log \ data/step.log \

View File

@ -0,0 +1,135 @@
delayedDescriptorReplicationFactor= {
1, 1}
edition=3
masterTableNumber=0
bufrHeaderSubCentre=0
bufrHeaderCentre=98
updateSequenceNumber=0
dataCategory=1
dataSubCategory=110
masterTablesVersionNumber=24
localTablesVersionNumber=0
typicalYearOfCentury=12
typicalMonth=10
typicalDay=31
typicalHour=0
typicalMinute=2
numberOfSubsets=1
observedData=1
compressedData=0
unexpandedDescriptors=307080
blockNumber=MISSING
stationNumber=MISSING
stationOrSiteName=MISSING
stationType=MISSING
year=MISSING
month=MISSING
day=MISSING
hour=MISSING
minute=MISSING
latitude=MISSING
longitude=MISSING
heightOfStationGroundAboveMeanSeaLevel=MISSING
heightOfBarometerAboveMeanSeaLevel=MISSING
nonCoordinatePressure=MISSING
pressureReducedToMeanSeaLevel=MISSING
3HourPressureChange=MISSING
characteristicOfPressureTendency=MISSING
24HourPressureChange=MISSING
pressure=MISSING
nonCoordinateGeopotentialHeight=MISSING
#1#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
airTemperature=MISSING
dewpointTemperature=MISSING
relativeHumidity=MISSING
#2#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
horizontalVisibility=MISSING
#3#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
totalPrecipitationPast24Hours=MISSING
#4#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
cloudCoverTotal=MISSING
#1#verticalSignificanceSurfaceObservations=MISSING
#1#cloudAmount=MISSING
#1#heightOfBaseOfCloud=MISSING
#1#cloudType=MISSING
#2#cloudType=MISSING
#3#cloudType=MISSING
#2#verticalSignificanceSurfaceObservations=MISSING
#2#cloudAmount=MISSING
#4#cloudType=MISSING
#2#heightOfBaseOfCloud=MISSING
#3#verticalSignificanceSurfaceObservations=MISSING
#3#cloudAmount=MISSING
#5#cloudType=MISSING
heightOfTopOfCloud=MISSING
cloudTopDescription=MISSING
#4#verticalSignificanceSurfaceObservations=MISSING
#1#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved=MISSING
#5#verticalSignificanceSurfaceObservations=MISSING
#2#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved=MISSING
#6#verticalSignificanceSurfaceObservations=MISSING
#3#trueDirectionFromWhichAPhenomenonOrCloudsAreMovingOrInWhichTheyAreObserved=MISSING
#7#verticalSignificanceSurfaceObservations=MISSING
#1#bearingOrAzimuth=MISSING
#1#elevation=MISSING
#6#cloudType=MISSING
#2#bearingOrAzimuth=MISSING
#2#elevation=MISSING
stateOfGround=MISSING
totalSnowDepth=MISSING
groundMinimumTemperaturePast12Hours=MISSING
presentWeather=MISSING
#1#timePeriod=MISSING
pastWeather1=MISSING
pastWeather2=MISSING
#2#timePeriod=MISSING
#1#totalSunshine=MISSING
#3#timePeriod=MISSING
#2#totalSunshine=MISSING
#5#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
#4#timePeriod=MISSING
#1#totalPrecipitationOrTotalWaterEquivalent=MISSING
#5#timePeriod=MISSING
#2#totalPrecipitationOrTotalWaterEquivalent=MISSING
#6#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
#6#timePeriod=MISSING
#7#timePeriod=MISSING
maximumTemperatureAtHeightAndOverPeriodSpecified=MISSING
#8#timePeriod=MISSING
#9#timePeriod=MISSING
minimumTemperatureAtHeightAndOverPeriodSpecified=MISSING
#7#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
instrumentationForWindMeasurement=MISSING
#1#timeSignificance=MISSING
#10#timePeriod=MISSING
windDirection=MISSING
windSpeed=MISSING
#2#timeSignificance=MISSING
#11#timePeriod=MISSING
#1#maximumWindGustDirection=MISSING
#1#maximumWindGustSpeed=MISSING
#12#timePeriod=MISSING
#2#maximumWindGustDirection=MISSING
#2#maximumWindGustSpeed=MISSING
#8#heightOfSensorAboveLocalGroundOrDeckOfMarinePlatform=MISSING
#13#timePeriod=MISSING
typeOfInstrumentationForEvaporationMeasurement=MISSING
evaporation=MISSING
#14#timePeriod=MISSING
#1#longWaveRadiationIntegratedOverPeriodSpecified=MISSING
#1#shortWaveRadiationIntegratedOverPeriodSpecified=MISSING
#1#netRadiationIntegratedOverPeriodSpecified=MISSING
#1#globalSolarRadiationIntegratedOverPeriodSpecified=MISSING
#1#diffuseSolarRadiationIntegratedOverPeriodSpecified=MISSING
#1#directSolarRadiationIntegratedOverPeriodSpecified=MISSING
#15#timePeriod=MISSING
#2#longWaveRadiationIntegratedOverPeriodSpecified=MISSING
#2#shortWaveRadiationIntegratedOverPeriodSpecified=MISSING
#2#netRadiationIntegratedOverPeriodSpecified=MISSING
#2#globalSolarRadiationIntegratedOverPeriodSpecified=MISSING
#2#diffuseSolarRadiationIntegratedOverPeriodSpecified=MISSING
#2#directSolarRadiationIntegratedOverPeriodSpecified=MISSING
#16#timePeriod=MISSING
#17#timePeriod=MISSING
temperatureChangeOverSpecifiedPeriod=MISSING

View File

@ -61,6 +61,7 @@ list(APPEND other_files
typeOfProcessedData.ok typeOfProcessedData.ok
tigge_pf_ecmwf.grib2.ref tigge_pf_ecmwf.grib2.ref
grib_data_files.txt grib_data_files.txt
BUFR3.tmpl.dump.plain.ref
) )
foreach( file ${other_files} ) foreach( file ${other_files} )

View File

@ -13,13 +13,8 @@
#Define a common label for all the tmp files #Define a common label for all the tmp files
label="bufr_dump_samples_test" label="bufr_dump_samples_test"
#Create log file temp=${label}".temp"
fLog=${label}".log" rm -f $temp
rm -f $fLog
touch $fLog
#Define tmp bufr files
fJsonTmp=${label}".json.tmp"
# Test sample BUFR files # Test sample BUFR files
for file in $ECCODES_SAMPLES_PATH/BUFR*.tmpl; do for file in $ECCODES_SAMPLES_PATH/BUFR*.tmpl; do
@ -27,4 +22,8 @@ for file in $ECCODES_SAMPLES_PATH/BUFR*.tmpl; do
${tools_dir}/bufr_dump -d $file >/dev/null ${tools_dir}/bufr_dump -d $file >/dev/null
done done
rm -f $fLog # Check one specific BUFR file dump output
${tools_dir}/bufr_dump -p $ECCODES_SAMPLES_PATH/BUFR3.tmpl > $temp
diff ${data_dir}/BUFR3.tmpl.dump.plain.ref $temp
rm -f $temp