MetOffice / tcd-XIOS-demonstration

Demonstration code and examples for XIOS (XML I/O Server) multi-version use
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

Netcdf quantize #32

Closed harry-shepherd closed 4 months ago

harry-shepherd commented 5 months ago

Add the testing of the C interface to the NetCDF quantize functionality. Examples of compressed data are show for the three quantize methods:

We quantize to 3 significant figures in the Bit grooming, and granular bit round case, or 10 bits in the bit rounding case. (These should give similar behavior).

The examples shown use an analytic function, which will probably flatter the quantization slightly. Additionally as these examples are serial, we include independent timers around nc_put_var_float() and nc_close(), to understand overhead made by quantizing, compressing (or deflating) and writing this data. The nuances of the timings are not yet fully understood, but hopefully they are enough to allow us to inform some decisions and approaches to further work.

The test is run using a similar approach to the XIOS tests (although much simpler). The python unit test framework is again used, and an additional .yml workflow file run_netcdf_test.yml has been added. The unit test discover mechanism has been used (again), so should help with the addition of further tests.