You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compute_tidal_elevations.py is used to create netcdf output, time is defined as a float (4-byte, NCFLOAT), using units: time:units = "days since 1992-01-01T00:00:00" ;
Unfortunately, the default float does not contain enough accuracy for this process. At present time (>30 years after 1992-01-01), most of the significant digits are used on the days-part (integer part), leaving only about 2 digits for time-of-day.
For instance, when I define (input) time as every 10 minutes for an hour of 2023-01-30 (using another time:units), the values are correctly read and converted, but upon output the time values are: time = 10622, 10622.01, 10622.01, 10622.02, 10622.03, 10622.04, 10622.04 ;
There is a clear loss of accuracy going on.
Other coordinate variables (x,y) are already defined as double. It is necessary that time be defined as double as well.
Thank you, Bjarne
The text was updated successfully, but these errors were encountered:
If possible, take the time kind and units from the input netcdf file and use same in output. The actual values are already present, so they do not need to be converted back from the internal units, as long as they are not thrown away during the process.
When compute_tidal_elevations.py is used to create netcdf output, time is defined as a float (4-byte, NCFLOAT), using units:
time:units = "days since 1992-01-01T00:00:00" ;
Unfortunately, the default float does not contain enough accuracy for this process. At present time (>30 years after 1992-01-01), most of the significant digits are used on the days-part (integer part), leaving only about 2 digits for time-of-day.
For instance, when I define (input) time as every 10 minutes for an hour of 2023-01-30 (using another time:units), the values are correctly read and converted, but upon output the time values are:
time = 10622, 10622.01, 10622.01, 10622.02, 10622.03, 10622.04, 10622.04 ;
There is a clear loss of accuracy going on.
Other coordinate variables (x,y) are already defined as double. It is necessary that time be defined as double as well.
Thank you, Bjarne
The text was updated successfully, but these errors were encountered: