Skip to content
Snippets Groups Projects
Commit 38a95fd1 authored by Nils Brüggemann's avatar Nils Brüggemann
Browse files

pyicon/pyicon_calc_xr.py: Prepare derivation of curl.

parent c179dea7
No related branches found
No related tags found
No related merge requests found
......@@ -393,3 +393,18 @@ def xr_calc_grad(ds_IcD, scalar, grad_coeff=None):
- scalar.isel(cell=ds_IcD.adjacent_cell_of_edge.isel(nc=0))
) * grad_coeff
return grad_of_scalar
## Curl
#def xr_calc_rot_coeff(ds_IcD):
# rot_coeff = (
#
#def xr_calc_curl(ds_IcD, vector, rot_coeff=None):
# if rot_coeff is None:
# rot_coeff = xr_calc_rot_coeff(ds_IcD)
# curl_of_vector = (
# curl_v = (
# vector.isel(edge=ds_IcD.edges_of_vertex)
# * rot_coeff)
# ).sum(dim=2)
# return curl_of_vector
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment