ARPA-SIMC / libsim

Command-line utilities and fortran modules for meteorological data processing
GNU General Public License v2.0
7 stars 1 forks source link

[vg6d_transform] `--comp-full-steps` issues with 12h comp-step #98

Closed brancomat closed 2 years ago

brancomat commented 2 years ago

(as seen in https://github.com/ARPA-SIMC/arkimaps/issues/117)

test data: tp_2Iruc.tar.gz

forcing --comp-start="2022-05-18 00" (the reftime of the example data) still doesn't work but forcing --comp-start to a subsequent hours gives the expected output:

vg6d_transform --comp-stat-proc 1 --comp-frac-valid=0 --comp-step="0 12" --comp-start="2022-05-18 01" --comp-full-steps tp_2Iruc.grib tp_12h_fullsteps1.grib
grib_ls tp_12h_fullsteps1.grib
tp_12h_fullsteps1.grib
edition      centre       typeOfLevel  level        dataDate     stepRange    shortName    packingType  gridType     
1            cnmc         surface      0            20220518     1-13         tp           grid_simple  rotated_ll  
1 of 1 messages in tp_12h_fullsteps1.grib

1 of 1 total messages in 1 files

This is curious since in the first example (the one without --comp-full-steps) it seems to be able to compute the 0-12 interval.

(bonus issue: exporting LOG4C_PRIORITY="debug" gives no debug output)

dcesari commented 2 years ago

It did not work when there was only a single "good" step to be copied from input to output without need to compute any difference. I pushed an update that corrects, but this matter of statistical processing on intervals is very complicate and I would like to improve it further.

dcesari commented 2 years ago

In commit 9a7dddfd9c42ff3129baa69761618a609031eb09 and surroundings a better search algorithm for existing ready intervals has been implemented. It is exact for gridded data, while for sparse data, due to how data are copied from input to output, it may not work perfectly with full steps, however it is netter than before. Some tests in analysis mode are needed.