Skip to content

Commit d7a3c1e

Browse files
Fixing unitconverters tutorial
1 parent 76db3a2 commit d7a3c1e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

docs/user_guide/examples/tutorial_unitconverters.ipynb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"cell_type": "markdown",
131131
"metadata": {},
132132
"source": [
133-
"Indeed, if we multiply the value of the U field with 1852 \\* 60 \\* cos(lat) (the number of meters in 1 degree of longitude), we get the expected 1 m s<sup>-1</sup>.\n"
133+
"Indeed, if we multiply the value of the U field with 1852 \\* 60 \\* cos(lat) (the number of meters in 1 degree of longitude) and the value of the V field with 1852 \\* 60 (the number of meters in 1 degree of latitude), we get the expected 1 m s<sup>-1</sup> for `u` and `v`.\n"
134134
]
135135
},
136136
{
@@ -142,22 +142,13 @@
142142
"u, v = fieldset.UV[time, z, lat, lon]\n",
143143
"\n",
144144
"u = u * 1852 * 60 * np.cos(np.deg2rad(lat))\n",
145-
"v = v * 1852 * 60 * np.cos(np.deg2rad(lat))\n",
145+
"v = v * 1852 * 60\n",
146146
"print(f\"(u, v) = ({u}, {v})\")\n",
147147
"\n",
148148
"assert np.isclose(u, 1.0)\n",
149149
"assert np.isclose(v, 1.0)"
150150
]
151151
},
152-
{
153-
"cell_type": "markdown",
154-
"metadata": {},
155-
"source": [
156-
"```{note}\n",
157-
"It may be surprising that the conversion factor depends on latitude also for the V velocity component. This is because Parcels assumes a flux-based interpolation, so that the velocity components are defined on the faces of the grid cells, which vary in size with latitude.\n",
158-
"```"
159-
]
160-
},
161152
{
162153
"attachments": {},
163154
"cell_type": "markdown",

0 commit comments

Comments
 (0)