Saving Module: Error in Rsx_nc4_put_vara_int: NetCDF: Numeric conversion not representable
The following error message appears when trying to save skill metrics computed using the ERA5Land dataset as the reference:
Error in Rsx_nc4_put_vara_int: NetCDF: Numeric conversion not representable
Error in ncvar_put(ncdf_object, defined_vars[[var_counter]]$name, arrays[[i]], :
C function Rsx_nc4_put_vara_int returned error
This appears to be related to the NAs in the arrays, but I don't think that is the whole story, because the other arrays contain NAs as well yet they can be saved without issue. I have provisionally handled this problem by setting -9.e+33 as the missing value in the skill_metrics
arrays, in the dev-saving-missing_values
branch. It could be an option to just add this to all the functions in the future to avoid potential problems with NAs.
@allabres could you please test your script with this branch and let me know if you can save your data?
@aho do you have any idea why this would happen with these arrays specifically? Some of them had NaN as the missing value, but replacing those NaN values with NA did not seem to help.
Thank you both,
Victòria