Jeff Whitaker
Jeff Whitaker
Sorry to hear this change caused you grief. I would recommend using the Dataset.set_auto_mask method to always get non-masked numpy arrays.
`set_auto_mask(False)` will always return non-masked numpy arrays. To restore the previous default behavior (only return masked arrays if there are missing elements), use `set_always_mask(False)`.
`set_auto_mask(False)` only affects reading. What do you mean by 'you are writing data and it is always a masked array"?
That is because you need to set Dataset.set_auto_mask(False) when you re-open the file.
You C example will fail the same way as the python example if you specify the netCDF4 format (`ncgen -lc -4 test.cdl > test.c`). There must be a private attribute...
The only workaround I can suggest now is to use the old netCDF3 format (i.e. `format='NETCDF3_64BIT`). That must be what CAMx uses?
Leaving this open for now until we decide whether it's a netcdf-c bug or not.
@WardF - have you had a chance to check on this yet?
Perhaps the C library did not actually build with hdf4 support? Check the output of configure to make sure the hdf4 library and headers were detected. Also, I don't think...
You can use unsigned data types when the file is created with the NETCDF4 flag, or even in the old format if the file is created using the new NETCDF3_64BIT_DATA...