+Add and use the new interface field_checksum #841
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of three commits that first add the new publicly visible interface
field_checksum()
to return the checksums that are used to verify that the arrays that written to or read from files are correct, and then uses this new interface inget_depth_list_checksum()
,save_restart()
andrestore state()
.The new
field_checksum()
interface includes the options to handle both the unscaling and rotation of the arrays. The 5 internalrotated_field_chksum_real_...()
functions were renamed tofield_checksum_real_...()
to reflect their slightly broadened purpose and now have new optionalunscale
arguments. The previousrotated_field_chksum()
interface has been retained because it is still being used in SIS2, but this may change in the future.The refactoring of
get_depth_list_checksum()
allows it to work in scaled units for dimensional consistency verification. The changes insave_restart()
andrestore_state()
eliminate a total of 10 instances of array-syntax math which are unnecessary in most cases because the conversion factor is 1.All answers and output are bitwise identical, but there is a new publicly visible interface,
field_checksum()
. The specific commits in this PR include: