Skip to content

Consider removing default mesh type from Grid class #2408

@erikvansebille

Description

@erikvansebille

As reported in #2406, things can go pretty wrong when the Grid assumes a "flat" mesh instead of a "spherical" one (or vice versa).

The default for XGrid is now "flat":

def __init__(self, grid: xgcm.Grid, mesh="flat"):

And so is the default for UxGrid:

def __init__(self, grid: ux.grid.Grid, z: ux.UxDataArray, mesh="flat") -> UxGrid:

Perhaps it's better to remove this default and let the user be explicit about it? Of course, FieldSet.from_* methods could use the appropriate mesh_type so most users won't notice.

@VeckoTheGecko, what do you think?

And @fluidnumerics-joe, do you think removing the default mesh would also make sense for uxgrid?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions