Skip to content

use zero for land-values throughout Parcels#2762

Open
erikvansebille wants to merge 2 commits into
Parcels-code:mainfrom
erikvansebille:land_filling
Open

use zero for land-values throughout Parcels#2762
erikvansebille wants to merge 2 commits into
Parcels-code:mainfrom
erikvansebille:land_filling

Conversation

@erikvansebille

Copy link
Copy Markdown
Member

Description

This PR implements the definition that land values are zero in Parcels. This choice is intuitive for velocities (since ocean velocities are zero on land) and is needed for slip boundary conditions. For tracer fields, using zero for land also works nicer because NaNs currently throw errors. The XLinearInvdistLandTracer interpolator also assumes that land is 0.0

This PR adds a _assert_no_nan_in_field_data() function that throws a ValueError when there are NaNs in the Sgrid-dataset, and adds fillna(0) calls to some of the convert functions.

This PR supersedes #2451

Checklist

AI Disclosure

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Land as np.nan or 0 in v4?

1 participant