Skip to content

Extracting sub-domains with indices, but how to handle the longitude periodicity ?  #468

@slawchune

Description

@slawchune

Hello Erik and Phillipe,

I run Parcels with 1/12° global currents and my velocity data are so big that I feel convenient to extract a subdomain of velocity fields to work with. But some of the drifters that I model cross the [-180°,180°] boundary, that are in fact at the edges of my grid (centred at 0° of longitude).

I tried to set negative indexes to my extractions (for instance : indices_extract= {'depth': [0], 'lat': range(863, 975), 'lon': range(-67, 67)}), which seems to work when plotting the initial state of the particles :
parcels_longitude_periodicity_0

But finally after some hours of drift, the particle doesn't want to cross the western boundary to the reach the eastern one.

parcels_longitude_periodicity_50

Instead, the particle falls out of the domain and is removed thanks the DeleteParticle kernel given as example in the tutorial.

Am I doing things wrong ? Sorry if the question was already post, I didn't find anything about this.

Best regards,
Stéphane

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions