Skip to content

Improve handling of NaN values #245

@hjabbot

Description

@hjabbot

Moving here from project repo #83.

This could go into MeshiPhi, but I personally think that NaN's are perfectly valid in meshes, so anything downstream should handle NaN's gracefully. Issue is NaNs and Infs aren't natively supported by the JSON schema so strictly speaking they shouldn't be in the output of MeshiPhi meshes, but it seems dangerous to equate NaNs to a real value.


NaN values in the mesh shouldn't be allowed to reach the route planner as they will cause errors that may be difficult to debug. Currently NaN values are filtered out within the vessel performance class and all NaN values are set to zero. We should consider whether this is the correct approach in all cases and identify where NaN values might arise and how their propagation could be avoided.

Metadata

Metadata

Assignees

Labels

BugIt might be considered a bug...

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions