This section shows how to correctly filter the sub-hourly messages when using the step keys
sub-hourly, grib_copy, grib_filter InstructionsFor sub-hourly data, the step values can use different units (e.g., seconds, minutes, hours). This can cause problems when applying grib_copy to GRIB files whose messages use different stepUnits, because grib_copy compares only the numeric value, not the units. As a result, something like this won't work:
Here is one way to do it in the grib_filter. You can set a new step unit (e.g., seconds) and then use a condition in the if statement to filter the messages you need. In that condition, you can assume all steps are in seconds.
|