Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomodeller committed Dec 16, 2023
1 parent 9590ec5 commit abfada2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
39 changes: 15 additions & 24 deletions mini_book/model_skill.ipynb
Expand Up @@ -60,31 +60,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### compare()\n",
"The compare() method will return an object that can be used for scatter plots, skill assessment, time series plots etc."
"### Match observation to model\n",
"The `match()` method will return an object that can be used for scatter plots, skill assessment, time series plots etc."
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 32,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jan/src/book-learn-mikeio-fmskill/.venv/lib/python3.10/site-packages/modelskill/matching.py:243: FutureWarning: compare is deprecated. Use match instead.\n",
" warnings.warn(\"compare is deprecated. Use match instead.\", FutureWarning)\n"
]
}
],
"outputs": [],
"source": [
"c = ms.compare(fn_obs, df_mod)"
"cmp = ms.match(fn_obs, df_mod)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 36,
"metadata": {},
"outputs": [
{
Expand All @@ -99,7 +90,7 @@
}
],
"source": [
"c[0].plot.timeseries();"
"cmp.plot.timeseries();"
]
},
{
Expand Down Expand Up @@ -139,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 34,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -210,13 +201,13 @@
"eur_Hm0 0.929005 "
]
},
"execution_count": 6,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"c.skill()"
"cmp.skill()"
]
},
{
Expand All @@ -228,7 +219,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 35,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -283,13 +274,13 @@
"eur_Hm0 66 0.177321 0.970199 0.999428"
]
},
"execution_count": 7,
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"c.skill(metrics=[\"mae\",\"rho\",\"lin_slope\"])"
"cmp.skill(metrics=[\"mae\",\"rho\",\"lin_slope\"])"
]
},
{
Expand Down Expand Up @@ -318,7 +309,7 @@
}
],
"source": [
"c.plot.scatter();"
"cmp.plot.scatter();"
]
},
{
Expand Down Expand Up @@ -370,7 +361,7 @@
}
],
"source": [
"c.plot.taylor();"
"cmp.plot.taylor();"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion mini_book/point_observations.ipynb
Expand Up @@ -308,7 +308,9 @@
"metadata": {},
"outputs": [],
"source": [
"o2 = ms.PointObservation(df, item=\"Hm0\", x=pos[0], y=pos[1], name='Hm0_from_csv', quantity=ms.Quantity('Significant wave height', 'm'))"
"o2 = ms.PointObservation(df, item=\"Hm0\", x=pos[0], y=pos[1],\n",
" name='Hm0_from_csv',\n",
" quantity=ms.Quantity('Significant wave height', 'm'))"
]
},
{
Expand Down
9 changes: 0 additions & 9 deletions mini_book/track_observations.ipynb
Expand Up @@ -236,15 +236,6 @@
"repo = DHIAltimetryRepository(api_key)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"repo.time_of_newest_data"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit abfada2

Please sign in to comment.