NOAA-EMC / bufr-query

Apache License 2.0
0 stars 0 forks source link

Discussion - how to handle the situation that the requested categories are missing from the input file? #6

Open emilyhcliu opened 1 week ago

emilyhcliu commented 1 week ago

In mapping file (example: ATMS)

  splits:
    satId:
      category:
        variable: satelliteIdentifier
        map:
          _224: npp
          _225: n20
          _226: n21

The input BUFR file contains npp and n20, but no n21 data. The output data is the following:

50091849 Jun 22 17:00 gdas.t00z.atms_n20.tm00.nc
18812 Jun 22 17:00 gdas.t00z.atms_n21.tm00.nc
49162754 Jun 22 17:00 gdas.t00z.atms_npp.tm00.nc

The bufr-query will generate output files for data not exist in the input data with headers only.

It is good that the bufr-query gives warning about missing requested categories

PRE-MAIN-WARNING Category (n21) was not found in file.
PRE-MAIN-WARNING Dimension source variables/sensorChannelNumber has no data for category (n21)

Question: How do we handle the situation that the requested categories are missing from the input data? The current way is to generate the file with headers only.

rmclaren commented 1 week ago

Is there a problem with this strategy of just creating empty files (headers but no data)?