Hi, is it possible to generate derivatives of multi dimensional coordinates, for example curvilinear (2d) latitude longitude grids? I have tried the following example which does not work:
lat = np.array(( ((50,60), (55,65), (60,70)) ),dtype=float)
lon = np.array(( ((0,180), (0,180), (0,180)) ),dtype=float)
print('lat.shape=',lat.shape)
print('lon.shape=',lon.shape)
d_dlon = FinDiff(1, lon, acc=2)
print(d_dlon)
time = np.array((1,3,5,7), dtype=float)
data = np.array(( (((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3))) ),dtype=float)
print('data.shape=',data.shape)
ddata_dlon = d_dlon(data)
print('ddata_dlon=',ddata_dlon)
Hi, is it possible to generate derivatives of multi dimensional coordinates, for example curvilinear (2d) latitude longitude grids? I have tried the following example which does not work:
lat = np.array(( ((50,60), (55,65), (60,70)) ),dtype=float)
lon = np.array(( ((0,180), (0,180), (0,180)) ),dtype=float)
print('lat.shape=',lat.shape)
print('lon.shape=',lon.shape)
d_dlon = FinDiff(1, lon, acc=2)
print(d_dlon)
time = np.array((1,3,5,7), dtype=float)
data = np.array(( (((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3)), ((3,5), (6,2), (4,3))) ),dtype=float)
print('data.shape=',data.shape)
ddata_dlon = d_dlon(data)
print('ddata_dlon=',ddata_dlon)