foua-pps / level1c4pps

module to create level1c input files to PPS using satpy
GNU General Public License v3.0
3 stars 13 forks source link

VGAC time unit is in microseconds not milliseconds #93

Open ninahakansson opened 1 month ago

ninahakansson commented 1 month ago

Code Sample, a minimal, complete, and verifiable piece of code

# Your code here
vgac2pps.py VGAC_VNPP02MOD_A2012218_2220_n04009_K005.nc

Problem description

Units are changed to microseconds since instead of milliseconds since when running vgac2pps.py

[this should also explain why the current behaviour is a problem and why the expected output is a better solution.]

Expected Output

Unit should be kept as "milliseconds since".

Actual Result, Traceback if applicable

Units are changed to *microseconds since

writers/cf_writer.py:309: UserWarning: Times can't be serialized faithfully to int64 with requested units 'milliseconds since 1970-01-01'. Serializing with units 'microseconds since 1970-01-01' instead. Set encoding['dtype'] to floating point dtype to serialize with units 'milliseconds since 1970-01-01'. Set encoding['units'] to 'microseconds since 1970-01-01' to silence this warning .

Versions of Python, package at hand and relevant dependencies

Thank you for reporting an issue !