Skip to content

Make planetary radius configurable #2731

Description

@maureenjcohen

What version of Parcels are you running?

v4

Is your feature request related to a problem?

I'm a planetary scientist and have been using Parcels (v3.1.4) for some simulations of trajectories in the Venus atmosphere. Venus has a very similar radius to Earth, so degrees are a similar size in meters.

However, I'd like to use the package for Mars and potentially Jupiter in the future. The hardcoded degree to meter conversions (1852 * 60) will be way off for these planets.

Describe the solution you'd like

Make radius configurable by adding it as an attribute to the grid (defaulting to Earth radius). Then calculate deg2m = radius * PI/180. Replace instances of 1852 * 60 with the new deg2m constant.

Describe alternatives you've considered

No response

Additional context

I'm happy to fork/implement this myself and try it in v4. I could allow deg2rad to revert to 1852 * 60 whenever Earth's radius or no radius is specified so it's fully back compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that has not been reviewed by a Parcels team member

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions