make mesh2d_make_global
in line with interacter behaviour
#181
Labels
enhancement
New feature or request
mesh2d_make_global
in line with interacter behaviour
#181
Is your feature request related to a problem? Please describe.
When generating a global grid with
mesh2d_make_global
, the resulting grid is sort of flipped with respect to the reference in interacter. This is inconvenient, since it complicates conversions in other tools like thexugrid.to_nonperiodic()
conversion.To reproduce:
Gives:

Describe the solution you'd like
Get a flipped version of the figure above, in other words: get the continuous longitude line at
lon=-180
instead oflon=180
.Additional context
Additionally, the algorithm seems not to be robust for different lat/lon values.
When converting it to non-periodic with xugrid we do not see the around-the-back lines anymore, which is expected. This example is not self-contained, it requires also the code block above.
Gives:

When supplying a low number of longitude values, we get orphan edges at the min/max latitudes
When supplying a low number of latitude values, the resulting grid does not extent to +/- 90 latitudes:
The text was updated successfully, but these errors were encountered: