From 20ca208a72e878dafecb199cff4ad63eb533f372 Mon Sep 17 00:00:00 2001 From: Stephanie Chong Date: Fri, 6 Sep 2024 12:35:51 +1000 Subject: [PATCH] Modified code comments to say percent bias --- .../Additive_and_multiplicative_bias.ipynb | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tutorials/Additive_and_multiplicative_bias.ipynb b/tutorials/Additive_and_multiplicative_bias.ipynb index 4ee80e54..0a2e21f6 100644 --- a/tutorials/Additive_and_multiplicative_bias.ipynb +++ b/tutorials/Additive_and_multiplicative_bias.ipynb @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -38,7 +38,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": { "scrolled": true }, @@ -66,10 +66,10 @@ { "data": { "text/plain": [ - "[]" + "[]" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" }, @@ -104,16 +104,16 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[]" + "[]" ] }, - "execution_count": 4, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, @@ -149,7 +149,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -520,14 +520,14 @@ " fill: currentColor;\n", "}\n", "
<xarray.DataArray 'multiplicative bias' ()> Size: 8B\n",
-       "array(inf)
" + "array(inf)" ], "text/plain": [ " Size: 8B\n", "array(inf)" ] }, - "execution_count": 5, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -538,7 +538,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -911,8 +911,8 @@ "
<xarray.DataArray 'multiplicative bias' (lat: 1536)> Size: 6kB\n",
        "array([nan, nan, nan, ..., nan, nan, nan], dtype=float32)\n",
        "Coordinates:\n",
-       "  * lat      (lat) float64 12kB 89.94 89.82 89.71 89.59 ... -89.71 -89.82 -89.94
  • " ], "text/plain": [ " Size: 6kB\n", @@ -930,7 +930,7 @@ " * lat (lat) float64 12kB 89.94 89.82 89.71 89.59 ... -89.71 -89.82 -89.94" ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -950,7 +950,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -968,16 +968,16 @@ "import matplotlib.pyplot as plt\n", "fcst_flow = fcst.temp_scrn\n", "obs_flow = obs.temp_scrn\n", - "# Calculate additive bias precentage and preserve the \"lat\" dimension\n", + "# Calculate percent bias and preserve the \"lat\" dimension\n", "bias = pbias(fcst_flow, obs_flow, preserve_dims=\"lat\")\n", "bias.name = \"percent bias (%)\"\n", "# Generate second dataset with large flow values\n", "fcst_flow_large=fcst_flow + 1000\n", "obs_flow_large = obs_flow + 1000\n", - "# Calculate additive bias precentage for large flow values and preserve the \"lat\" dimension\n", + "# Calculate percent bias for large flow values and preserve the \"lat\" dimension\n", "bias_large_flow = pbias(fcst_flow_large, obs_flow_large, preserve_dims=\"lat\")\n", "bias_large_flow.name = \"percent bias (%)\"\n", - "# Compare the additive bias precentage for small and large flow values\n", + "# Compare the percent bias for small and large flow values\n", "bias.plot(label='pbias_small_streamflow')\n", "bias_large_flow.plot(label='pbias_large_streamflow')\n", "plt.legend()\n",