Reported by Aron.Bartle@mechdyne.com
I started writing an email asking how we can get better compression from the Netcdf4 return file handler... but then I started digging through the fileout_netcdf source code I think I found my problem:
A bug prevents any NetCDF compression for structure members (which are themselves returned as normal NetCDF arrays).
FONcStructure.cc line 108:
FONcBaseType *fbt = FONcUtils::convert(bt);
At this point in the code, the FONcStructure will have had its return type set (e.g. "netcdf-4") but its member array, created here, does not. As a result, when we get to FONcArray::define the type does is not set to netcdf-4 so no compression happens.
I think the fix is to add "setVersion" to FONcStructure and recursively call setVersion on its vars, or to make FONcUtils::convert set this field.
The original email is below, which can probably be ignored now...
Just FYI I made a patch where I just added this line after the call to FONcUtils::convert:
And as a result:
rw-rr-. 1 abartle clarreo 1097513462 Apr 15 2019 filtertest.nc
...is now compressed!
rw-rr-. 1 abartle clarreo 64682295 Apr 15 2019 filtertest.nc