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
When I try to calculate the vorticity of velocity of ECCOv4 (LLC90 data) using the following python codes: zeta0=grid_llc.diff_2d_vector({'X': (data_uv.VVELMASS * data_uv.dyC), 'Y': (data_uv.UVELMASS * data_uv.dxC)},boundary='fill') zeta2 = (zeta0['X'] -zeta0['Y']) / (data_uv.rA) --------------------------------------------------------------------------- NotImplementedError Traceback (most recent call last) Cell In[18], line 1 ----> 1 zeta0=grid_llc.diff_2d_vector({'X': (data_uv.VVELMASS * data_uv.dyC), \ 2 'Y': (data_uv.UVELMASS * data_uv.dxC)},\ 3 boundary='fill')
File /g/data/hh5/public/apps/miniconda3/envs/analysis3-23.01/lib/python3.9/site-packages/xgcm/grid.py:2422, in Grid.diff_2d_vector(self, vector, **kwargs) 2403 def diff_2d_vector(self, vector, **kwargs): 2404 """ 2405 Difference a 2D vector to the intermediate grid point. This method is 2406 only necessary for complex grid topologies. (...) 2420 are differenced vector components along each axis 2421 """ -> 2422 return self._apply_vector_function(self.diff, vector, **kwargs) File /g/data/hh5/public/apps/miniconda3/envs/analysis3-23.01/lib/python3.9/site-packages/xgcm/grid.py:2378, in Grid._apply_vector_function(self, function, vector, **kwargs) 2376 position, coord = axis._get_position_name(component) 2377 if position == "center": -> 2378 raise NotImplementedError( 2379 "Only vector interpolation to cell " 2380 "center is implemented, but vector " 2381 "%s component is defined at center " 2382 "(dims: %r)" % (axis_name, component.dims) 2383 ) 2385 x_axis_name, y_axis_name = list(vector) 2387 # apply for each component NotImplementedError: Only vector interpolation to cell center is implemented, but vector X component is defined at center (dims: ('k', 'face', 'j_g', 'i'))
Any help will be appreciated.
Thanks you.
The text was updated successfully, but these errors were encountered:
When I try to calculate the vorticity of velocity of ECCOv4 (LLC90 data) using the following python codes:
zeta0=grid_llc.diff_2d_vector({'X': (data_uv.VVELMASS * data_uv.dyC), 'Y': (data_uv.UVELMASS * data_uv.dxC)},boundary='fill')
zeta2 = (zeta0['X'] -zeta0['Y']) / (data_uv.rA)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[18], line 1
----> 1 zeta0=grid_llc.diff_2d_vector({'X': (data_uv.VVELMASS * data_uv.dyC), \
2 'Y': (data_uv.UVELMASS * data_uv.dxC)},\
3 boundary='fill')
File /g/data/hh5/public/apps/miniconda3/envs/analysis3-23.01/lib/python3.9/site-packages/xgcm/grid.py:2422, in Grid.diff_2d_vector(self, vector, **kwargs)
2403 def diff_2d_vector(self, vector, **kwargs):
2404 """
2405 Difference a 2D vector to the intermediate grid point. This method is
2406 only necessary for complex grid topologies.
(...)
2420 are differenced vector components along each axis
2421 """
-> 2422 return self._apply_vector_function(self.diff, vector, **kwargs)
File /g/data/hh5/public/apps/miniconda3/envs/analysis3-23.01/lib/python3.9/site-packages/xgcm/grid.py:2378, in Grid._apply_vector_function(self, function, vector, **kwargs)
2376 position, coord = axis._get_position_name(component)
2377 if position == "center":
-> 2378 raise NotImplementedError(
2379 "Only vector interpolation to cell "
2380 "center is implemented, but vector "
2381 "%s component is defined at center "
2382 "(dims: %r)" % (axis_name, component.dims)
2383 )
2385 x_axis_name, y_axis_name = list(vector)
2387 # apply for each component
NotImplementedError: Only vector interpolation to cell center is implemented, but vector X component is defined at center (dims: ('k', 'face', 'j_g', 'i'))
Any help will be appreciated.
Thanks you.
The text was updated successfully, but these errors were encountered: