From 7dbb12756698729139f0eb310df08f90eb47e33c Mon Sep 17 00:00:00 2001 From: raychew Date: Tue, 14 May 2024 03:54:33 +0200 Subject: [PATCH] latest prepare_orog notebook --- notebooks/prepare_orog.ipynb | 341 ++++++++++++++--------------------- 1 file changed, 131 insertions(+), 210 deletions(-) diff --git a/notebooks/prepare_orog.ipynb b/notebooks/prepare_orog.ipynb index 3a7762c..b93fdec 100644 --- a/notebooks/prepare_orog.ipynb +++ b/notebooks/prepare_orog.ipynb @@ -58,17 +58,32 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 3, "id": "7848fa25-c08a-4f87-807e-2b6b05c3b782", "metadata": {}, "outputs": [], "source": [ + "### tierra del fuego\n", + "lat_min = -56.0\n", + "lat_max = -38.0\n", + "\n", + "lon_min = -76.0\n", + "lon_max = -53.0\n", + "\n", + "### alaska\n", "lat_min = 48.0\n", "lat_max = 64.0\n", "\n", "lon_min = -148.0\n", "lon_max = -112.0\n", "\n", + "### south pole (REMA)\n", + "lat_min = -75.0 \n", + "lat_max = -61.0 \n", + "\n", + "lon_min = -77.0\n", + "lon_max = -50.0\n", + "\n", "# dlat, dlon in degs\n", "dlat = 0.05\n", "dlon = 0.05\n", @@ -84,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "id": "c81b0521-19d1-4c61-8785-c026c7cd1221", "metadata": {}, "outputs": [], @@ -105,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "87f97fd3-0fa8-4449-8836-74ad08a96d1e", "metadata": {}, "outputs": [ @@ -140,14 +155,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "84e3c0b9-8579-4d72-8c6d-909cbb8650cb", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(184, 108)" + "(93, 108)" ] }, "execution_count": 6, @@ -161,7 +176,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "da65b094", "metadata": {}, "outputs": [ @@ -169,14 +184,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "[40 44 47 64 68 71 92]\n", - "[[2 5 0 ... 0 0 0]\n", - " [2 5 0 ... 0 0 0]\n", - " [2 5 0 ... 0 0 0]\n", + "[ 82 86 101 103]\n", + "[[4 0 0 ... 0 0 0]\n", + " [3 4 0 ... 0 0 0]\n", + " [4 0 0 ... 0 0 0]\n", " ...\n", - " [1 2 4 ... 0 0 0]\n", - " [1 2 4 ... 0 0 0]\n", - " [1 4 0 ... 0 0 0]]\n" + " [2 0 0 ... 0 0 0]\n", + " [1 2 0 ... 0 0 0]\n", + " [2 0 0 ... 0 0 0]]\n" ] } ], @@ -198,7 +213,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "0870e3eb-76ca-4443-8612-627a5aba3853", "metadata": {}, "outputs": [ @@ -211,194 +226,103 @@ " dimensions(sizes): \n", " variables(dimensions): \n", " groups: \n", - "('cell', : name = 'cell', size = 184)\n", + "('cell', : name = 'cell', size = 93)\n", "('nv', : name = 'nv', size = 3)\n", "('nlinks', : name = 'nlinks', size = 108)\n", "Compact ICON grid for testing and debugging purposes\n", - "[[-2.2920494 -2.2536633 -2.3105268]\n", - " [-2.2536633 -2.212061 -2.2710307]\n", - " [-2.2710307 -2.3105268 -2.2536633]\n", - " [-2.3105268 -2.2710307 -2.3308356]\n", - " [-2.212061 -2.1670187 -2.2280848]\n", - " [-2.1670187 -2.1183457 -2.181394 ]\n", - " [-2.181394 -2.2280848 -2.1670187]\n", - " [-2.2280848 -2.181394 -2.245909 ]\n", - " [-2.245909 -2.2902462 -2.2280848]\n", - " [-2.2902462 -2.3308356 -2.2710307]\n", - " [-2.2710307 -2.2280848 -2.2902462]\n", - " [-2.2280848 -2.2710307 -2.212061 ]\n", - " [-2.3308356 -2.2902462 -2.3533208]\n", - " [-2.2902462 -2.245909 -2.3116412]\n", - " [-2.3116412 -2.3533208 -2.2902462]\n", - " [-2.3533208 -2.3116412 -2.3783152]\n", - " [-2.1183457 -2.0658822 -2.130744 ]\n", - " [-2.0658822 -2.0095215 -2.0758965]\n", - " [-2.0758965 -2.130744 -2.0658822]\n", - " [-2.130744 -2.0758965 -2.1446989]\n", - " [-2.0095215 -1.9492085 -2.0167127]\n", - " [-1.9530712 -2.0167127 -1.9492085]\n", - " [-2.0167127 -1.9530712 -2.0248976]\n", - " [-2.0248976 -2.0872416 -2.0167127]\n", - " [-2.0872416 -2.1446989 -2.0758965]\n", - " [-2.0758965 -2.0167127 -2.0872416]\n", - " [-2.0167127 -2.0758965 -2.0095215]\n", - " [-2.1446989 -2.0872416 -2.1605406]\n", - " [-2.0872416 -2.0248976 -2.1001925]\n", - " [-2.1001925 -2.1605406 -2.0872416]\n", - " [-2.1605406 -2.1001925 -2.1786232]\n", - " [-2.1786232 -2.2362237 -2.1605406]\n", - " [-2.2362237 -2.2883852 -2.215641 ]\n", - " [-2.215641 -2.1605406 -2.2362237]\n", - " [-2.1605406 -2.215641 -2.1446989]\n", - " [-2.2883852 -2.3355823 -2.2658892]\n", - " [-2.3355823 -2.3783152 -2.3116412]\n", - " [-2.3116412 -2.2658892 -2.3355823]\n", - " [-2.2658892 -2.3116412 -2.245909 ]\n", - " [-2.245909 -2.1974924 -2.2658892]\n", - " [-2.1974924 -2.1446989 -2.215641 ]\n", - " [-2.215641 -2.2658892 -2.1974924]\n", - " [-2.2658892 -2.215641 -2.2883852]\n", - " [-2.1446989 -2.1974924 -2.130744 ]\n", - " [-2.1974924 -2.245909 -2.181394 ]\n", - " [-2.181394 -2.130744 -2.1974924]\n", - " [-2.130744 -2.181394 -2.1183457]\n", - " [-2.3783152 -2.3355823 -2.406272 ]\n", - " [-2.3355823 -2.2883852 -2.3625376]\n", - " [-2.3625376 -2.406272 -2.3355823]\n", - " [-2.406272 -2.3625376 -2.4376593]\n", - " [-2.2883852 -2.2362237 -2.3139057]\n", - " [-2.2362237 -2.1786232 -2.2597435]\n", - " [-2.2597435 -2.3139057 -2.2362237]\n", - " [-2.3139057 -2.2597435 -2.3430057]\n", - " [-2.3430057 -2.3930335 -2.3139057]\n", - " [-2.3930335 -2.4376593 -2.3625376]\n", - " [-2.3625376 -2.3139057 -2.3930335]\n", - " [-2.3139057 -2.3625376 -2.2883852]\n", - " [-2.4376593 -2.3930335 -2.4731019]\n", - " [-2.3930335 -2.3430057 -2.4277568]\n", - " [-2.4277568 -2.4731019 -2.3930335]\n", - " [-2.4731019 -2.4277568 -2.5132742]\n", - " [-2.5132742 -2.5534465 -2.4731019]\n", - " [-2.5534465 -2.588889 -2.5132742]\n", - " [-2.5132742 -2.4731019 -2.5534465]\n", - " [-2.4731019 -2.5132742 -2.4376593]\n", - " [-2.588889 -2.6202762 -2.5490174]\n", - " [-2.5590556 -2.5987916 -2.5132742]\n", - " [-2.5809166 -2.5490174 -2.6202762]\n", - " [-2.5490174 -2.5809166 -2.5132742]\n", - " [-2.5132742 -2.4775307 -2.5490174]\n", - " [-2.4775307 -2.4376593 -2.5132742]\n", - " [-2.5132742 -2.5490174 -2.4775307]\n", - " [-2.5490174 -2.5132742 -2.588889 ]\n", - " [-2.4376593 -2.4775307 -2.406272 ]\n", - " [-2.4775307 -2.5132742 -2.4456317]\n", - " [-2.4456317 -2.406272 -2.4775307]\n", - " [-2.406272 -2.4456317 -2.3783152]\n", - " [-2.3182113 -2.3764532 -2.2868028]\n", - " [-2.6006193 -2.5743802 -2.6352646]\n", - " [-2.5743802 -2.6006193 -2.542427 ]\n", - " [-2.6006193 -2.6245012 -2.5689657]\n", - " [-2.5689657 -2.542427 -2.6006193]\n", - " [-2.542427 -2.5689657 -2.5132742]\n", - " [-2.5132742 -2.484121 -2.542427 ]\n", - " [-2.484121 -2.452168 -2.5132742]\n", - " [-2.5132742 -2.542427 -2.484121 ]\n", - " [-2.542427 -2.5132742 -2.5743802]\n", - " [-2.452168 -2.4170268 -2.481155 ]\n", - " [-2.4170268 -2.3783152 -2.4456317]\n", - " [-2.4456317 -2.481155 -2.4170268]\n", - " [-2.481155 -2.4456317 -2.5132742]\n", - " [-2.5132742 -2.5453932 -2.481155 ]\n", - " [-2.5453932 -2.5743802 -2.5132742]\n", - " [-2.5132742 -2.481155 -2.5453932]\n", - " [-2.481155 -2.5132742 -2.452168 ]\n", - " [-2.5743802 -2.5453932 -2.6095214]\n", - " [-2.5453932 -2.5132742 -2.5809166]\n", - " [-2.5809166 -2.6095214 -2.5453932]\n", - " [-2.3783152 -2.4170268 -2.3533208]\n", - " [-2.4170268 -2.452168 -2.3912835]\n", - " [-2.3912835 -2.3533208 -2.4170268]\n", - " [-2.3533208 -2.3912835 -2.3308356]\n", - " [-2.452168 -2.484121 -2.425929 ]\n", - " [-2.484121 -2.5132742 -2.4575827]\n", - " [-2.4575827 -2.425929 -2.484121 ]\n", - " [-2.425929 -2.4575827 -2.4020472]\n", - " [-2.4020472 -2.367992 -2.425929 ]\n", - " [-2.367992 -2.3308356 -2.3912835]\n", - " [-2.3912835 -2.425929 -2.367992 ]\n", - " [-2.425929 -2.3912835 -2.452168 ]\n", - " [-2.3308356 -2.367992 -2.3105268]\n", - " [-2.367992 -2.4020472 -2.346821 ]\n", - " [-2.346821 -2.3105268 -2.367992 ]\n", - " [-2.3105268 -2.346821 -2.2920494]\n", - " [-2.5987916 -2.5590556 -2.650095 ]\n", - " [-2.5132742 -2.4674928 -2.5590556]\n", - " [-2.588889 -2.5534465 -2.633515 ]\n", - " [-2.5534465 -2.5132742 -2.5987916]\n", - " [-2.5987916 -2.633515 -2.5534465]\n", - " [-2.4277568 -2.3764532 -2.4674928]\n", - " [-2.3430057 -2.2868028 -2.3764532]\n", - " [-2.3764532 -2.4277568 -2.3430057]\n", - " [-2.4674928 -2.5132742 -2.4277568]\n", - " [-2.2868028 -2.2236419 -2.3182113]\n", - " [-2.2236419 -2.2868028 -2.1994596]\n", - " [-2.2868028 -2.3430057 -2.2597435]\n", - " [-2.2597435 -2.1994596 -2.2868028]\n", - " [-2.1994596 -2.2597435 -2.1786232]\n", - " [-2.1786232 -2.1150882 -2.1994596]\n", - " [-2.1150882 -2.0451908 -2.1323814]\n", - " [-2.1323814 -2.1994596 -2.1150882]\n", - " [-2.1994596 -2.1323814 -2.2236419]\n", - " [-2.3764532 -2.3182113 -2.4151325]\n", - " [-1.9685576 -2.0451908 -1.9626018]\n", - " [-1.9626018 -1.8849556 -1.9685576]\n", - " [-2.0451908 -2.1150882 -2.0343041]\n", - " [-2.1150882 -2.1786232 -2.1001925]\n", - " [-2.1001925 -2.0343041 -2.1150882]\n", - " [-2.0343041 -2.1001925 -2.0248976]\n", - " [-2.0248976 -1.9574945 -2.0343041]\n", - " [-1.9574945 -1.8849556 -1.9626018]\n", - " [-1.9626018 -2.0343041 -1.9574945]\n", - " [-2.0343041 -1.9626018 -2.0451908]\n", - " [-1.9574945 -2.0248976 -1.9530712]\n", - " [-1.9530712 -1.8849556 -1.9574945]\n", - " [-1.9492085 -2.0095215 -1.9458101]\n", - " [-2.0095215 -2.0658822 -2.003172 ]\n", - " [-2.0658822 -2.1183457 -2.0569866]\n", - " [-2.0569866 -2.003172 -2.0658822]\n", - " [-2.003172 -2.0569866 -1.997515 ]\n", - " [-1.997515 -1.9427984 -2.003172 ]\n", - " [-1.9458101 -2.003172 -1.9427984]\n", - " [-2.003172 -1.9458101 -2.0095215]\n", - " [-1.9427984 -1.997515 -1.9401143]\n", - " [-2.1183457 -2.1670187 -2.1072838]\n", - " [-2.1670187 -2.212061 -2.1541057]\n", - " [-2.1541057 -2.1072838 -2.1670187]\n", - " [-2.1072838 -2.1541057 -2.0973263]\n", - " [-2.212061 -2.2536633 -2.1975935]\n", - " [-2.2536633 -2.2920494 -2.2378714]\n", - " [-2.2378714 -2.1975935 -2.2536633]\n", - " [-2.1975935 -2.2378714 -2.1844122]\n", - " [-2.1844122 -2.1424274 -2.1975935]\n", - " [-2.1424274 -2.0973263 -2.1541057]\n", - " [-2.1541057 -2.1975935 -2.1424274]\n", - " [-2.1975935 -2.1541057 -2.212061 ]\n", - " [-2.0973263 -2.1424274 -2.0883276]\n", - " [-2.0353901 -1.9878929 -2.0418744]\n", - " [-2.0418744 -2.0883276 -2.0353901]\n", - " [-2.0883276 -2.0418744 -2.0973263]\n", - " [-1.9878929 -1.9377054 -1.9924575]\n", - " [-1.9401143 -1.9924575 -1.9377054]\n", - " [-1.9924575 -1.9401143 -1.997515 ]\n", - " [-1.997515 -2.0490322 -1.9924575]\n", - " [-2.0490322 -2.0973263 -2.0418744]\n", - " [-2.0418744 -1.9924575 -2.0490322]\n", - " [-1.9924575 -2.0418744 -1.9878929]\n", - " [-2.0973263 -2.0490322 -2.1072838]\n", - " [-2.0490322 -1.997515 -2.0569866]\n", - " [-2.0569866 -2.1072838 -2.0490322]\n", - " [-2.1072838 -2.0569866 -2.1183457]\n", - " [-1.9377054 -1.9878929 -1.9355322]]\n", + "[[-1.2566371 -1.2566371 -1.3943659 ]\n", + " [-1.0980824 -0.9659675 -1.1189082 ]\n", + " [-1.2566371 -1.1189082 -1.2566371 ]\n", + " [-1.2566371 -1.2566371 -1.3784156 ]\n", + " [-1.2566371 -1.2566371 -1.3658272 ]\n", + " [-1.3658272 -1.3784156 -1.2566371 ]\n", + " [-1.2566371 -1.2566371 -1.3556495 ]\n", + " [-1.2566371 -1.2566371 -1.3472605 ]\n", + " [-1.3472605 -1.3556495 -1.2566371 ]\n", + " [-1.3556495 -1.3658272 -1.2566371 ]\n", + " [-1.2566371 -1.2566371 -1.340239 ]\n", + " [-1.2566371 -1.2566371 -1.3342832 ]\n", + " [-1.3342832 -1.340239 -1.2566371 ]\n", + " [-1.340239 -1.3342832 -1.4168724 ]\n", + " [-1.2566371 -1.2566371 -1.329176 ]\n", + " [-1.3247527 -1.329176 -1.2566371 ]\n", + " [-1.329176 -1.3247527 -1.396579 ]\n", + " [-1.3342832 -1.329176 -1.4059856 ]\n", + " [-1.329176 -1.3342832 -1.2566371 ]\n", + " [-1.0414002 -0.981052 -1.054351 ]\n", + " [-0.981052 -1.0414002 -0.96296936]\n", + " [-0.96296936 -0.90536904 -0.981052 ]\n", + " [-1.3472605 -1.340239 -1.4296209 ]\n", + " [-1.340239 -1.3472605 -1.2566371 ]\n", + " [-0.90536904 -0.96296936 -0.88184917]\n", + " [-0.88184917 -0.82768697 -0.90536904]\n", + " [-0.8559369 -0.9359902 -0.81551445]\n", + " [-0.9359902 -1.0284123 -0.90066475]\n", + " [-0.90066475 -0.81551445 -0.9359902 ]\n", + " [-1.0284123 -1.1348586 -1.0009478 ]\n", + " [-1.1348586 -1.2566371 -1.1189082 ]\n", + " [-1.1189082 -1.0009478 -1.1348586 ]\n", + " [-1.0009478 -1.1189082 -0.9659675 ]\n", + " [-0.9659675 -0.85670334 -1.0009478 ]\n", + " [-0.85670334 -0.76629126 -0.90066475]\n", + " [-0.90066475 -1.0009478 -0.85670334]\n", + " [-1.0009478 -0.90066475 -1.0284123 ]\n", + " [-0.85670334 -0.9659675 -0.80066335]\n", + " [-1.3784156 -1.3943659 -1.2566371 ]\n", + " [-1.2566371 -1.1348586 -1.2566371 ]\n", + " [-1.1348586 -1.0284123 -1.1474469 ]\n", + " [-1.1474469 -1.2566371 -1.1348586 ]\n", + " [-1.2566371 -1.1474469 -1.2566371 ]\n", + " [-1.0284123 -0.9359902 -1.0504717 ]\n", + " [-0.9359902 -0.8559369 -0.964892 ]\n", + " [-0.964892 -1.0504717 -0.9359902 ]\n", + " [-1.0504717 -0.964892 -1.0685759 ]\n", + " [-1.0685759 -1.1576246 -1.0504717 ]\n", + " [-1.1576246 -1.2566371 -1.1474469 ]\n", + " [-1.1474469 -1.0504717 -1.1576246 ]\n", + " [-1.0504717 -1.1474469 -1.0284123 ]\n", + " [-1.2566371 -1.1576246 -1.2566371 ]\n", + " [-1.1576246 -1.0685759 -1.1660136 ]\n", + " [-1.1660136 -1.2566371 -1.1576246 ]\n", + " [-1.2566371 -1.1660136 -1.2566371 ]\n", + " [-0.8559369 -0.7866259 -0.8895696 ]\n", + " [-0.8895696 -0.8233815 -0.9179507 ]\n", + " [-0.8547899 -0.9179507 -0.8233815 ]\n", + " [-0.9179507 -0.8547899 -0.94213307]\n", + " [-0.8547899 -0.798587 -0.88184917]\n", + " [-0.88184917 -0.94213307 -0.8547899 ]\n", + " [-0.94213307 -0.88184917 -0.96296936]\n", + " [-0.96296936 -1.0265045 -0.94213307]\n", + " [-1.0265045 -1.0964017 -1.0092112 ]\n", + " [-1.0092112 -0.94213307 -1.0265045 ]\n", + " [-0.94213307 -1.0092112 -0.9179507 ]\n", + " [-1.0964017 -1.173035 -1.0836533 ]\n", + " [-1.173035 -1.2566371 -1.1660136 ]\n", + " [-1.1660136 -1.0836533 -1.173035 ]\n", + " [-1.0836533 -1.1660136 -1.0685759 ]\n", + " [-1.0685759 -0.9889414 -1.0836533 ]\n", + " [-0.9889414 -0.9179507 -1.0092112 ]\n", + " [-1.0092112 -1.0836533 -0.9889414 ]\n", + " [-1.0836533 -1.0092112 -1.0964017 ]\n", + " [-0.9179507 -0.9889414 -0.8895696 ]\n", + " [-0.9889414 -1.0685759 -0.964892 ]\n", + " [-0.964892 -0.8895696 -0.9889414 ]\n", + " [-0.8895696 -0.964892 -0.8559369 ]\n", + " [-1.2566371 -1.173035 -1.2566371 ]\n", + " [-1.173035 -1.0964017 -1.1789908 ]\n", + " [-1.1789908 -1.2566371 -1.173035 ]\n", + " [-1.2566371 -1.1789908 -1.2566371 ]\n", + " [-1.0964017 -1.0265045 -1.1072886 ]\n", + " [-1.0265045 -0.96296936 -1.0414002 ]\n", + " [-1.0414002 -1.1072886 -1.0265045 ]\n", + " [-1.1072886 -1.0414002 -1.1166952 ]\n", + " [-1.1166952 -1.1840981 -1.1072886 ]\n", + " [-1.1840981 -1.2566371 -1.1789908 ]\n", + " [-1.1789908 -1.1072886 -1.1840981 ]\n", + " [-1.1072886 -1.1789908 -1.0964017 ]\n", + " [-1.2566371 -1.1840981 -1.2566371 ]\n", + " [-1.1840981 -1.1166952 -1.1885214 ]\n", + " [-1.1885214 -1.2566371 -1.1840981 ]]\n", "Dataset is closed!\n" ] } @@ -446,7 +370,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "43652c93-3d56-4251-8241-8671f251d2ca", "metadata": {}, "outputs": [ @@ -454,21 +378,18 @@ "name": "stdout", "output_type": "stream", "text": [ - "[39 43 46 63 67 70 91]\n", - "(7, 2400, 3600)\n", - "i, lnk = (0, 39)\n", - "i, lnk = (1, 43)\n", - "i, lnk = (2, 46)\n", - "i, lnk = (3, 63)\n", - "i, lnk = (4, 67)\n", - "i, lnk = (5, 70)\n", - "i, lnk = (6, 91)\n", + "[ 81 85 100 102]\n", + "(4, 2400, 3600)\n", + "i, lnk = (0, 81)\n", + "i, lnk = (1, 85)\n", + "i, lnk = (2, 100)\n", + "i, lnk = (3, 102)\n", "\n", "root group (NETCDF4_CLASSIC data model, file format HDF5):\n", " dimensions(sizes): \n", " variables(dimensions): \n", " groups: \n", - "('nfiles', : name = 'nfiles', size = 7)\n", + "('nfiles', : name = 'nfiles', size = 4)\n", "('lat', : name = 'lat', size = 2400)\n", "('lon', : name = 'lon', size = 3600)\n", "Compact GMTED2010 USGS Topography grid for testing and debugging purposes\n",