mirror of https://github.com/ecmwf/eccodes.git
ECC-1855: Fix step initialisation
This commit is contained in:
parent
5b1a7a3159
commit
2fb5fbbe27
|
@ -309,7 +309,7 @@ static int unpack_multiple_time_ranges_double_(grib_accessor* a, double* val, si
|
|||
long the_coded_unit = arr_coded_unit[i];
|
||||
long the_coded_time_range = arr_coded_time_range[i];
|
||||
|
||||
eccodes::Step time_range{ the_coded_unit, the_coded_time_range };
|
||||
eccodes::Step time_range{the_coded_time_range, the_coded_unit};
|
||||
*val = (start_step + time_range).value<double>(eccodes::Unit(step_units));
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
|
|
|
@ -62,6 +62,11 @@ fi
|
|||
instantaneous_field=$data_dir/reduced_gaussian_surface.grib2
|
||||
accumulated_field=$data_dir/reduced_gaussian_sub_area.grib2
|
||||
|
||||
# ECC-1855: Bad step initialisation
|
||||
${tools_dir}/grib_set -s productDefinitionTemplateNumber=11,forecastTime=2184,indicatorOfUnitForForecastTime=1,lengthOfTimeRange=720,indicatorOfUnitForTimeRange=1,typeOfTimeIncrement=2,numberOfTimeRange=2 $accumulated_field $temp
|
||||
${tools_dir}/grib_ls $temp
|
||||
grib_check_key_equals $temp "-p stepRange" "2184-2904"
|
||||
|
||||
# ECC-1802: Relaxation of the "Step Units Rule":
|
||||
# The updated rule permits the simultaneous assignment of the same step unit to both 'stepUnits' and 'step*' keys
|
||||
in="$instantaneous_field"
|
||||
|
|
Loading…
Reference in New Issue