-
Notifications
You must be signed in to change notification settings - Fork 45
Labels
Description
(From Greg Lucas):
it looks like cdflib defaults to the recommended ISTP FILLVALs based upon the datatype. So even if you specify a FILLVAL in the attributes, it will still use the default. Is this expected behavior?
cdflib/cdflib/xarray/xarray_to_cdf.py
Lines 54 to 72 in 6d3f966
| DATATYPE_FILLVALS = { | |
| 1: np.int8(-128), | |
| 2: np.int16(-32768), | |
| 4: np.int32(-2147483648), | |
| 8: np.int64(-9223372036854775808), | |
| 11: np.uint8(255), | |
| 12: np.uint16(65535), | |
| 14: np.uint32(4294967295), | |
| 21: np.float32(-1e31), | |
| 22: np.float64(-1e31), | |
| 31: np.float64(-1e31), | |
| 32: np.complex128(complex(-1e31, -1e31)), | |
| 33: np.datetime64(-9223372036854775808, "ns"), | |
| 41: np.int8(-128), | |
| 44: np.float32(-1e31), | |
| 45: np.float64(-1e31), | |
| 51: np.str_(" "), | |
| 52: np.str_(" "), | |
| } |
I ran into this because I'm loading a dataproduct that has a different FILLVAL specified and that isn't getting turned into nan's like I expected it to.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog