Skip to content

Commit 877d84b

Browse files
committed
fix for rendering of math characters in markdown of gradients tutorial
1 parent 3df25d9 commit 877d84b

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Gradient_calc_on_native_grid.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"tags": []
88
},
99
"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",
1111
"\n",
1212
"## Objectives\n",
1313
"\n",
@@ -93,7 +93,6 @@
9393
"\n",
9494
"from os.path import join,expanduser\n",
9595
"user_home_dir = expanduser('~')\n",
96-
"# user_home_dir = '/Users/ifenty/'\n",
9796
"print(join(user_home_dir,'ECCOv4-py'))\n",
9897
"sys.path.append(join(user_home_dir,'ECCOv4-py'))\n",
9998
"import ecco_v4_py as ecco\n",
@@ -203,9 +202,9 @@
203202
"source": [
204203
"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",
205204
"\n",
206-
"$∇_M f =[\\partial_x f, \\partial_y f]_M$\n",
205+
"$\\nabla_M f =[\\partial_x f, \\partial_y f]_M$\n",
207206
"\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",
209208
"$S_{M→G} [\\partial_x f, \\partial_y f]_M = [\\partial_x f, \\partial_y f]_G $\n",
210209
"\n",
211210
"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,11 +245,11 @@
246245
"\n",
247246
"**Zonal gradient** of $f$:\n",
248247
"\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",
250249
"\n",
251250
"**Meridional gradient** of $f$:\n",
252251
"\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",
254253
"\n",
255254
"#### Plotting $sin(\\theta)$ and $cos(\\theta)$\n",
256255
"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,12 +2312,12 @@
23132312
"source": [
23142313
"### Part 3: calculate vorticity from the flow field gradients\n",
23152314
"\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",
23172316
"\n",
2318-
"***omega = dv/dx - du/dy***\n",
2317+
"$$\\omega = \\frac{\\partial{v}}{\\partial{x}} - \\frac{\\partial{u}}{\\partial{y}}$$\n",
23192318
"\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",
23222321
"`d_u_lambda_dphi`.\n",
23232322
"\n"
23242323
]

doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171

172172
# -- Options for LaTeX output ---------------------------------------------
173173

174-
latex_engine = "xelatex"
175174
latex_elements = {
176175
# The paper size ('letterpaper' or 'a4paper').
177176
#

0 commit comments

Comments
 (0)