diff --git a/notebooks/RPSS_verification.ipynb b/notebooks/RPSS_verification.ipynb index d6c86d339a043575d4941d41ff46539ae17587ca..58e038c1412685d3f8528253d856b18bf363af09 100644 --- a/notebooks/RPSS_verification.ipynb +++ b/notebooks/RPSS_verification.ipynb @@ -37,9 +37,18 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.8/site-packages/xarray/backends/cfgrib_.py:27: UserWarning: Failed to load cfgrib - most likely there is a problem accessing the ecCodes library. Try `import cfgrib` to get the full error message\n", + " warnings.warn(\n" + ] + } + ], "source": [ "import xarray as xr\n", "import xskillscore as xs\n", @@ -88,16 +97,25 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 3, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/conda/lib/python3.8/site-packages/xarray/backends/plugins.py:61: RuntimeWarning: Engine 'cfgrib' loading failed:\n", + "/opt/conda/lib/python3.8/site-packages/gribapi/_bindings.cpython-38-x86_64-linux-gnu.so: undefined symbol: codes_bufr_key_is_header\n", + " warnings.warn(f\"Engine {name!r} loading failed:\\n{ex}\", RuntimeWarning)\n" + ] + }, { "data": { "text/plain": [ "Frozen(SortedKeysDict({'category': 3, 'lead_time': 2, 'forecast_time': 53, 'latitude': 121, 'longitude': 240}))" ] }, - "execution_count": 26, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -135,7 +153,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -144,7 +162,7 @@ "Frozen(SortedKeysDict({'forecast_time': 53, 'latitude': 121, 'lead_time': 2, 'longitude': 240, 'category': 3}))" ] }, - "execution_count": 27, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -164,7 +182,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -181,7 +199,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -190,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -214,7 +232,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -223,7 +241,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -241,7 +259,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -250,7 +268,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -268,7 +286,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -277,7 +295,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -302,7 +320,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -316,7 +334,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -325,7 +343,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -343,7 +361,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -426,7 +444,7 @@ " southern_extratropics -0.04 -0.06" ] }, - "execution_count": 41, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -443,7 +461,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -490,7 +508,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -508,7 +526,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -517,7 +535,7 @@ "Frozen(SortedKeysDict({'forecast_time': 53, 'category': 3, 'lead_time': 2, 'latitude': 121, 'longitude': 240}))" ] }, - "execution_count": 23, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -529,7 +547,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -538,7 +556,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -583,7 +601,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -628,7 +646,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -711,7 +729,7 @@ " southern_extratropics -0.01 -0.01" ] }, - "execution_count": 29, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -725,7 +743,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -733,15 +751,14 @@ "output_type": "stream", "text": [ "<xarray.DataArray ()>\n", - "array(-0.00559998)\n" + "array(-0.00701943)\n" ] } ], "source": [ - "# final score\n", - "scores_bench = scores_bench.to_array().mean().reset_coords(drop=True)\n", - "# score transfered to leaderboard\n", - "\n", + "# averaged variables to one single value\n", + "scores_bench = rpss_bench.sel(latitude=slice(None, -60)).weighted(weights).mean('latitude').mean('longitude').to_array().mean(['lead_time','variable']).reset_coords(drop=True)\n", + "# final score score transfered to leaderboard\n", "print(scores_bench)" ] }, @@ -755,9 +772,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:s2s-ai]", + "display_name": "Python 3", "language": "python", - "name": "conda-env-s2s-ai-py" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -769,7 +786,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.10" + "version": "3.8.6" }, "toc-autonumbering": true },