Commit 5016bbf0 authored by Lana B's avatar Lana B
Browse files

small

parent 4519ce7f
......@@ -279,82 +279,6 @@
"What is the difference and which is the right one?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Problem: get_subpolar_gyre_all_models.py stopped\n",
"Last output:\n",
"```\n",
"EC-Earth3-Veg\n",
" + Longitude: longitude\n",
" + Latitude: latitude\n",
" The mean is taken over the dimensions ['j', 'i']\n",
" Ensemble-members added:\n",
" - r2i1p1f1\n",
" - r5i1p1f1\n",
" - r1i1p1f1\n",
" - r4i1p1f1\n",
" - r3i1p1f1\n",
" - r10i1p1f1\n",
"\n",
"```\n",
"throwing the error:\n",
"\n",
"```\n",
"IndexError: dimension coordinate 'time' conflicts between indexed and indexing objects:\n",
"<xarray.DataArray 'time' (time: 456)>\n",
"array(['1852-01-01T00:00:00.000000000', '1852-02-01T00:00:00.000000000',\n",
" '1852-03-01T00:00:00.000000000', ..., '1988-10-01T00:00:00.000000000',\n",
" '1988-11-01T00:00:00.000000000', '1988-12-01T00:00:00.000000000'],\n",
" dtype='datetime64[ns]')\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1852-01-01 1852-02-01 ... 1988-12-01\n",
"vs.\n",
"<xarray.IndexVariable 'time' (time: 1980)>\n",
"array(['1850-01-01T00:00:00.000000000', '1850-02-01T00:00:00.000000000',\n",
" '1850-03-01T00:00:00.000000000', ..., '2014-10-01T00:00:00.000000000',\n",
" '2014-11-01T00:00:00.000000000', '2014-12-01T00:00:00.000000000'],\n",
" dtype='datetime64[ns]')\n",
"```\n",
"\n",
"Somehow, there are a lot of years missing in the data, see e.g. the jump from 1861 to 1892. But this ensemble member does also not occur in Matthew's data, so we should simply exclude it manually when creating the full dataset."
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1852 1852\n",
"1853 1853\n",
"1854 1854\n",
"1855 1855\n",
"1857 1857\n",
"1858 1858\n",
"1859 1859\n",
"1860 1860\n",
"1861 1861\n",
"1892 1892\n"
]
}
],
"source": [
"model = 'EC-Earth3-Veg'\n",
"emember = 'r10i1p1f1'\n",
"\n",
"paths = paths_all_models[model][emember]\n",
"i_start = len('/p/tmp/mayayami/SYNDA/data/CMIP6/CMIP/EC-Earth-Consortium/EC-Earth3-Veg/historical/r10i1p1f1/Omon/tos/gn/v20210523/tos_Omon_EC-Earth3-Veg_historical_r10i1p1f1_gn_')\n",
"p_time = [p[i_start:-3] for p in paths[0]]\n",
"p_time.sort()\n",
"for p in p_time[0:10]:\n",
" print(p[0:4], p[7:11])"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -1406,6 +1330,82 @@
" p.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Problem: get_subpolar_gyre_all_models.py stopped\n",
"Last output:\n",
"```\n",
"EC-Earth3-Veg\n",
" + Longitude: longitude\n",
" + Latitude: latitude\n",
" The mean is taken over the dimensions ['j', 'i']\n",
" Ensemble-members added:\n",
" - r2i1p1f1\n",
" - r5i1p1f1\n",
" - r1i1p1f1\n",
" - r4i1p1f1\n",
" - r3i1p1f1\n",
" - r10i1p1f1\n",
"\n",
"```\n",
"throwing the error:\n",
"\n",
"```\n",
"IndexError: dimension coordinate 'time' conflicts between indexed and indexing objects:\n",
"<xarray.DataArray 'time' (time: 456)>\n",
"array(['1852-01-01T00:00:00.000000000', '1852-02-01T00:00:00.000000000',\n",
" '1852-03-01T00:00:00.000000000', ..., '1988-10-01T00:00:00.000000000',\n",
" '1988-11-01T00:00:00.000000000', '1988-12-01T00:00:00.000000000'],\n",
" dtype='datetime64[ns]')\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1852-01-01 1852-02-01 ... 1988-12-01\n",
"vs.\n",
"<xarray.IndexVariable 'time' (time: 1980)>\n",
"array(['1850-01-01T00:00:00.000000000', '1850-02-01T00:00:00.000000000',\n",
" '1850-03-01T00:00:00.000000000', ..., '2014-10-01T00:00:00.000000000',\n",
" '2014-11-01T00:00:00.000000000', '2014-12-01T00:00:00.000000000'],\n",
" dtype='datetime64[ns]')\n",
"```\n",
"\n",
"Somehow, there are a lot of years missing in the data, see e.g. the jump from 1861 to 1892. But this ensemble member does also not occur in Matthew's data, so we should simply exclude it manually when creating the full dataset."
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1852 1852\n",
"1853 1853\n",
"1854 1854\n",
"1855 1855\n",
"1857 1857\n",
"1858 1858\n",
"1859 1859\n",
"1860 1860\n",
"1861 1861\n",
"1892 1892\n"
]
}
],
"source": [
"model = 'EC-Earth3-Veg'\n",
"emember = 'r10i1p1f1'\n",
"\n",
"paths = paths_all_models[model][emember]\n",
"i_start = len('/p/tmp/mayayami/SYNDA/data/CMIP6/CMIP/EC-Earth-Consortium/EC-Earth3-Veg/historical/r10i1p1f1/Omon/tos/gn/v20210523/tos_Omon_EC-Earth3-Veg_historical_r10i1p1f1_gn_')\n",
"p_time = [p[i_start:-3] for p in paths[0]]\n",
"p_time.sort()\n",
"for p in p_time[0:10]:\n",
" print(p[0:4], p[7:11])"
]
},
{
"cell_type": "markdown",
"metadata": {},
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment