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
I am trying to change the values associated with a gribmessage.
Say I have a GRIB file, call it grib1, that I want to change the values of to a new array that I have created, call it new_arr. I have tried going about directly setting grib1.values = new_arr (or grib1['values'] = new_arr) but neither option works. The resulting grib1.values is not the same as new_arr, rather some strange combination of the old array and new_arr.
Example: Original value in grib file: 2015.5
The value I want in the grib file: 215.6476593
The value that is in the grib file after setting it (grib1.values = new_arr): 216.33317871
Of course the example is just of a single value but it is happening everywhere in the array.
I checked and the precision of arrays all equal float64. Do you have to the same number of significant digits when trying to replace the old values with the new values?
How did you solve this? Any advice is greatly appreciated!
-Chris
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to change the values associated with a gribmessage.
Say I have a GRIB file, call it grib1, that I want to change the values of to a new array that I have created, call it new_arr. I have tried going about directly setting grib1.values = new_arr (or grib1['values'] = new_arr) but neither option works. The resulting grib1.values is not the same as new_arr, rather some strange combination of the old array and new_arr.
Example: Original value in grib file: 2015.5
The value I want in the grib file: 215.6476593
The value that is in the grib file after setting it (grib1.values = new_arr): 216.33317871
Of course the example is just of a single value but it is happening everywhere in the array.
I checked and the precision of arrays all equal float64. Do you have to the same number of significant digits when trying to replace the old values with the new values?
How did you solve this? Any advice is greatly appreciated!
-Chris
The text was updated successfully, but these errors were encountered: