|
7 | 7 | "tags": [] |
8 | 8 | }, |
9 | 9 | "source": [ |
10 | | - "*Contributors*: [Ian Fenty](https://github.com/ifenty), with minor edits by [Andrew Delman](https://github.com/andrewdelman).\n", |
| 10 | + "*Contributors*: [Ian Fenty](https://github.com/ifenty), [Andrew Delman](https://github.com/andrewdelman).\n", |
11 | 11 | "\n", |
12 | 12 | "## Objectives\n", |
13 | 13 | "\n", |
|
93 | 93 | "\n", |
94 | 94 | "from os.path import join,expanduser\n", |
95 | 95 | "user_home_dir = expanduser('~')\n", |
96 | | - "# user_home_dir = '/Users/ifenty/'\n", |
97 | 96 | "print(join(user_home_dir,'ECCOv4-py'))\n", |
98 | 97 | "sys.path.append(join(user_home_dir,'ECCOv4-py'))\n", |
99 | 98 | "import ecco_v4_py as ecco\n", |
|
203 | 202 | "source": [ |
204 | 203 | "To calculate zonal and meridional gradients from ECCO fields on the lat-lon-cap grid we need to rotate vectors. In general it is easier and more accurate to first calculate our gradient vectors with respect to the orthogonal basis $M$ defined by the local $[x,y]$ coordinates of the model grid. The horizonal gradient of field, $f$ in the model basis is a vector comprised of the gradient in the local $x$ and $y$ directions in $M$.\n", |
205 | 204 | "\n", |
206 | | - "$∇_M f =[\\partial_x f, \\partial_y f]_M$\n", |
| 205 | + "$\\nabla_M f =[\\partial_x f, \\partial_y f]_M$\n", |
207 | 206 | "\n", |
208 | | - "Once we know $∇_M f$, we can rotate the gradient vectors to the orthogonal basis $G$ of meridians and parallels. Rotation to $G$ from $M$ is accomplished via the change of basis matrix, $S_{M→G}$.\\\n", |
| 207 | + "Once we know $\\nabla_M f$, we can rotate the gradient vectors to the orthogonal basis $G$ of meridians and parallels. Rotation to $G$ from $M$ is accomplished via the change of basis matrix, $S_{M→G}$.\\\n", |
209 | 208 | "$S_{M→G} [\\partial_x f, \\partial_y f]_M = [\\partial_x f, \\partial_y f]_G $\n", |
210 | 209 | "\n", |
211 | 210 | "After the change of basis, the vector $[\\partial_x f, \\partial_y f]_G$ contains the gradients of $f$ with respect to the zonal ($x:\\lambda$) and meridional ($y:\\phi$) directions, respectively. The subscripts $M$ and $G$ denote the basis of the vector.\n", |
|
246 | 245 | "\n", |
247 | 246 | "**Zonal gradient** of $f$:\n", |
248 | 247 | "\n", |
249 | | - "[$\\partial_x f]_G = [\\partial_x f]_M \\, cos(\\theta) - [\\partial_y f]_M \\, sin(\\theta)$\n", |
| 248 | + "$[\\partial_x f]_G = [\\partial_x f]_M \\, cos(\\theta) - [\\partial_y f]_M \\, sin(\\theta)$\n", |
250 | 249 | "\n", |
251 | 250 | "**Meridional gradient** of $f$:\n", |
252 | 251 | "\n", |
253 | | - "[$\\partial_y f]_G = [\\partial_x f]_M \\, sin(\\theta) + [\\partial_y f]_M \\, cos(\\theta)$\n", |
| 252 | + "$[\\partial_y f]_G = [\\partial_x f]_M \\, sin(\\theta) + [\\partial_y f]_M \\, cos(\\theta)$\n", |
254 | 253 | "\n", |
255 | 254 | "#### Plotting $sin(\\theta)$ and $cos(\\theta)$\n", |
256 | 255 | "Plotting $SN$ and $CS$, shows the expected values for tiles 1 and 4 where $\\theta=0$: $sin(\\theta)=0$ and $cos(\\theta)=1$ and the expected values for tiles 8 and 11 where $\\theta=-\\pi/2$: $sin(\\theta)=-1$ and $cos(\\theta)=0$\n", |
|
2313 | 2312 | "source": [ |
2314 | 2313 | "### Part 3: calculate vorticity from the flow field gradients\n", |
2315 | 2314 | "\n", |
2316 | | - "Let's wrap up this section by calcualting the relative vorticity: 𝝎=∇×𝐮\n", |
| 2315 | + "Let's wrap up this section by calcualting the relative vorticity: $\\bf{\\omega} = \\nabla\\times\\bf{u}$\n", |
2317 | 2316 | "\n", |
2318 | | - "***omega = dv/dx - du/dy***\n", |
| 2317 | + "$$\\omega = \\frac{\\partial{v}}{\\partial{x}} - \\frac{\\partial{u}}{\\partial{y}}$$\n", |
2319 | 2318 | "\n", |
2320 | | - "For the dv/dx term use the zonal gradient of meridional velocity,\n", |
2321 | | - "`d_v_phi_dlambda` and for the du/dy term use the meridional gradient of zonal velocity,\n", |
| 2319 | + "For the $\\partial{v}/\\partial{x}$ term use the zonal gradient of meridional velocity,\n", |
| 2320 | + "`d_v_phi_dlambda` and for the $\\partial{u}/\\partial{y}$ term use the meridional gradient of zonal velocity,\n", |
2322 | 2321 | "`d_u_lambda_dphi`.\n", |
2323 | 2322 | "\n" |
2324 | 2323 | ] |
|
0 commit comments