diff --git a/notebooks/wp5/satellite_sea_ice_type.ipynb b/notebooks/wp5/satellite_sea_ice_type.ipynb index eaef87f..65eac75 100644 --- a/notebooks/wp5/satellite_sea_ice_type.ipynb +++ b/notebooks/wp5/satellite_sea_ice_type.ipynb @@ -167,7 +167,7 @@ " conc_myi = ds_nersc[\"conc_2yi\"]\n", " n = 3\n", " while (varname := f\"conc_{n}yi\") in ds_nersc.variables:\n", - " conc_myi += ds_nersc[varname]\n", + " conc_myi += ds_nersc[varname].fillna(0)\n", " n += 1\n", "\n", " if not use_fyi:\n", @@ -491,6 +491,32 @@ " facet.fig.suptitle(f\"{use_ambiguous=}\")\n", " plt.show()" ] + }, + { + "cell_type": "markdown", + "id": "19", + "metadata": {}, + "source": [ + "## Plot bias" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "20", + "metadata": {}, + "outputs": [], + "source": [ + "with xr.set_options(keep_attrs=True):\n", + " bias = (ds_cds - ds_nersc)[\"percentage\"]\n", + "bias.attrs[\"long_name\"] = \"Bias of\" + bias.attrs[\"long_name\"]\n", + "for use_ambiguous, da in bias.groupby(\"use_ambiguous\", squeeze=False):\n", + " facet = plot_maps(\n", + " da, cmap=cmocean.cm.balance, center=0, coastline_color=\"k\", robust=True\n", + " )\n", + " facet.fig.suptitle(f\"CDS - NERSC; {use_ambiguous=}\")\n", + " plt.show()" + ] } ], "metadata": {