You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm using recreate_metrics to calculate distances along cmip6 grids. It can calculate all metrics (dx_t, dy_t, dx_gy, dy_gx, dx_gx, dy_gy, dy_gxgy and dz_t) except for dx_gxgy (dx at the corner point). When using the ff method:
The input positions to _get_neighbor_data_pairs are similar and this error appears:
File/srv/conda/envs/notebook/lib/python3.9/site-packages/xgcm/grid.py:517, inAxis._get_neighbor_data_pairs(self, da, position_to, boundary, fill_value, ignore_connections, boundary_discontinuity, vector_partner, position_check)
514valid_positions= ["outer", "inner", "left", "right", "center"]
516ifposition_to==position_from:
-->517raiseValueError("Can't get neighbor pairs for the same position.")
519ifposition_tonotinvalid_positions:
520raiseValueError(
521"`%s` is not a valid axis position name. Valid "522"names are %r."% (position_to, valid_positions)
523 )
ValueError: Can'tgetneighborpairsforthesameposition.
I tried it with CMIP6 models where the X axis is either shifted to the right (e.g., IPSL-CM6A-LR) or left (e.g., NorESM2-LM), and the same error appears. Example:
This error is fixed when ds_subset has lat_verticies and lon_verticies assigned from tracer points (e.g., in the example above assign lat_verticies and lon_verticies from wmo to ds_subset, don't use the coords from either umo or vmo).
Ideally one could infer the metrics for each and then have all the grid metrics afterwards, but I have never tried that. I think for now inferring metrics on the tracer (and then interpolating..)is sufficient.
Hi! I'm using
recreate_metrics
to calculate distances along cmip6 grids. It can calculate all metrics (dx_t
,dy_t
,dx_gy
,dy_gx
,dx_gx
,dy_gy
,dy_gxgy
anddz_t
) except fordx_gxgy
(dx at the corner point). When using the ff method:The input positions to
_get_neighbor_data_pairs
are similar and this error appears:I tried it with CMIP6 models where the
X
axis is either shifted to the right (e.g.,IPSL-CM6A-LR
) or left (e.g.,NorESM2-LM
), and the same error appears. Example:The text was updated successfully, but these errors were encountered: