diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f30f901 Binary files /dev/null and b/.DS_Store differ diff --git a/KE - Calculate.ipynb b/KE - Calculate.ipynb index f2b17fa..95363ca 100644 --- a/KE - Calculate.ipynb +++ b/KE - Calculate.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 2, "id": "6389d026", "metadata": {}, "outputs": [ @@ -28,7 +28,7 @@ "True" ] }, - "execution_count": 66, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -54,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 85, "id": "cb788516", "metadata": {}, "outputs": [ @@ -75,13 +75,13 @@ " 'oceQnet']" ] }, - "execution_count": 51, + "execution_count": 85, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "data = zarr.open('/Volumes/workDrive/LLC_Daily/LLC4320.zarr', mode='a')\n", + "data = zarr.open('/Volumes/workDrive/KE/LLC4320.zarr', mode='r')\n", "list(data.keys())" ] }, @@ -404,7 +404,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 30, "id": "01c2a307", "metadata": {}, "outputs": [], @@ -421,7 +421,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 29, "id": "f64a4a2b", "metadata": {}, "outputs": [], @@ -496,7 +496,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 24, "id": "65f6bc38", "metadata": {}, "outputs": [], @@ -984,116 +984,394 @@ }, { "cell_type": "markdown", - "id": "81f5df43", + "id": "28a8107b", "metadata": {}, "source": [ - "## Total KE" + "## Calc Mean KE" ] }, { "cell_type": "code", - "execution_count": 65, - "id": "e4f2d75e", + "execution_count": null, + "id": "321061af", "metadata": {}, "outputs": [], "source": [ - "SOSE_mask = np.load('/Volumes/workDrive/KE/SOSE_mask.npy')\n", - "SOhi_mask = np.load('/Volumes/workDrive/KE/SOHI_mask.npy')\n", - "LLC_mask = np.load('/Volumes/workDrive/KE/LLC_mask.npy')" + "## Depths are \n", + "\n", + "## 0 meters\n", + "## 100 meters\n", + "## 300 meters\n", + "## 600 meters" ] }, { "cell_type": "code", - "execution_count": 67, - "id": "47292ef4", + "execution_count": 8, + "id": "8adecd87", "metadata": {}, "outputs": [], "source": [ - "LLC_MKE = LLC['Mean_KE'][1] * LLC_mask\n", - "LLC_EKE = LLC['Eddy_KE'][1] * LLC_mask\n", - "\n", - "SOHI_MKE = SOhi['Mean_KE'][1] * SOhi_mask\n", - "SOHI_EKE = SOhi['Eddy_KE'][1] * SOhi_mask\n", - "\n", - "SOSE_MKE = SOSE['Mean_KE'][1][:138,:] * SOSE_mask\n", - "SOSE_EKE = SOSE['Eddy_KE'][1][:138,:] * SOSE_mask" + "LLC = zarr.open('/Volumes/workDrive/KE/LLC4320.zarr', 'r')\n", + "SOSE = zarr.open('/Volumes/workDrive/KE/SOSE.zarr', 'r')\n", + "SOHI = zarr.open('/Volumes/workDrive/KE/SOHI.zarr', 'r')" ] }, { "cell_type": "code", - "execution_count": 80, - "id": "4e634902", + "execution_count": 11, + "id": "a3f3935b", "metadata": {}, "outputs": [], "source": [ - "SOSE_MKE[SOSE_MKE==0] = np.nan\n", - "SOSE_EKE[SOSE_EKE==0] = np.nan" + "LLC_total = LLC['Eddy_KE'][:] + LLC['Mean_KE'][:]\n", + "SOSE_total = SOSE['Eddy_KE'][:] + SOSE['Mean_KE'][:]\n", + "SOHI_total = SOHI['Eddy_KE'][:] + SOHI['Mean_KE'][:]" ] }, { "cell_type": "code", - "execution_count": 83, - "id": "c0e85366", + "execution_count": 12, + "id": "43b8296c", "metadata": {}, "outputs": [], "source": [ - "SOHI_MKE[SOHI_MKE==0] = np.nan\n", - "SOHI_EKE[SOHI_EKE==0] = np.nan" + "SOSE_mask = np.load('/Volumes/workDrive/KE/SOSE_mask.npy')\n", + "SOhi_mask = np.load('/Volumes/workDrive/KE/SOHI_mask.npy')\n", + "LLC_mask = np.load('/Volumes/workDrive/KE/LLC_mask.npy')" ] }, { "cell_type": "code", - "execution_count": 91, - "id": "ca05f66a", + "execution_count": 68, + "id": "0311c1cb", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.023551060593110074\n", + "0.012464289260131291\n", + "0.00975675291418651\n", + "0.007237872706271506\n" + ] + } + ], "source": [ - "LLC_MKE[LLC_MKE==0] = np.nan\n", - "LLC_EKE[LLC_EKE==0] = np.nan" + "_, _, res = crop_region(xbound = [103, 144], \n", + " ybound = [-69, -63], \n", + " XC = LLC['lon'], \n", + " YC = LLC['lat'], \n", + " data = [LLC_total[0]*LLC_mask, \n", + " LLC_total[1]*LLC_mask,\n", + " LLC_total[2]*LLC_mask,\n", + " LLC_total[3]*LLC_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" ] }, { "cell_type": "code", - "execution_count": 112, - "id": "0ffe807e", - "metadata": { - "scrolled": true - }, + "execution_count": 70, + "id": "0bfd25af", + "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "(0.002515877059804883, 0.0023092967243210382, 0.000511586664880341)" - ] - }, - "execution_count": 112, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "0.0460869329835875\n", + "0.013742534137361333\n", + "0.00864688572635169\n", + "0.006654359411085959\n" + ] + } + ], + "source": [ + "_, _, res = crop_region(xbound = [103, 144], \n", + " ybound = [-69, -63], \n", + " XC = SOHI['lon'], \n", + " YC = SOHI['lat'], \n", + " data = [SOHI_total[0]*SOhi_mask, \n", + " SOHI_total[1]*SOhi_mask,\n", + " SOHI_total[2]*SOhi_mask,\n", + " SOHI_total[3]*SOhi_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "id": "c52da010", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.008197946912974662\n", + "0.001614011463246977\n", + "0.0006085698556000877\n", + "0.0005818063119137469\n" + ] } ], "source": [ - "np.nanmean(SOHI_EKE), np.nanmean(LLC_EKE), np.nanmean(SOSE_EKE)" + "_, _, res = crop_region(xbound = [103, 144], \n", + " ybound = [-69, -63], \n", + " XC = SOSE['lon'], \n", + " YC = SOSE['lat'], \n", + " data = [SOSE_total[0][:138, :]*SOSE_mask, \n", + " SOSE_total[1][:138, :]*SOSE_mask,\n", + " SOSE_total[2][:138, :]*SOSE_mask,\n", + " SOSE_total[3][:138, :]*SOSE_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" ] }, { "cell_type": "code", - "execution_count": 113, - "id": "af05d685", + "execution_count": 73, + "id": "72c7c334", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(0.004048440694475872, 0.004947751211216521, 0.0010025669026889072)" + "" ] }, - "execution_count": 113, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAQyUlEQVR4nO3db4wc9X3H8c/n1n9AgQq7XqwT4JoiqwqyFAMnJxIVSkPsGj8xPIgKkZCrIB0PQAI1feAmD+qoT9IqwKMKyQgrTkRApICwUNrgWkQWUgQ9I9vYcqhJalPA8h0lkSFSCL779sHO2nvr3du53Znd++2+X9Jqd2dnb777u7mP9ma+M+OIEAAgPWODLgAA0B0CHAASRYADQKIIcABIFAEOAIla1s+FrVmzJtavX9/PRQJA8g4fPvxRRFSbp/c1wNevX6+pqal+LhIAkmf7TKvpbEIBgEQR4ACQKAIcABJFgANAoghwAEgUAQ4AiSLAASBRHQPc9hW237R91PYJ29/Lpu+2/YHtI9lte/nlAgDq8hzI85mkr0XEp7aX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FkAgE663oQSERdsPyzp55IqkvZGxIkOb9vT7fKGFONxCWMxH+MxH+PRgiMu22wNAEgAR2ICQKIIcABIVF8CnEPuJdunbb9t+4jtqWzaatsHbJ/K7lcNus6y2N5re7rxOICFPr/tf8jWl3ds//Vgqi5Pm/HYbfuDbB05Ynt7w2tDOx62b7D9mu2Ttk/YfiSbPrLrR24RUepNtR2cv5b055JWSDoq6eayl7vUbpJOS1rTNO1fJO3KHu+S9M+DrrPEz3+HpFslHe/0+VU7NcNRSSsl3ZitP5VBf4Y+jMduSX/fYt6hHg9J45JuzR5fLem/s888sutH3ls/voFzyH17OyTtyx7vk3T34EopV0QckvRx0+R2n3+HpOci4rOI+B9J76q2Hg2NNuPRzlCPR0ScjYi3ssefSDqp2pHeI7t+5NWPAG91yP11fVjuUhOSXrV9ODu9gCStjYizUm0llnTtwKobjHaff5TXmYdtH8s2sdQ3GYzMeNheL+kWSW+I9aOjfgR4rkPuR8DtEXGramdvfMj2HYMuaAkb1XXmSUk3Sdok6aykx7LpIzEetq+S9IKkRyPi/EKztpg2dOORRz8CnEPuJUXEh9n9tKSXVPuX75ztcUnK7qcHV+FAtPv8I7nORMS5iJiNiDlJT+nSZoGhHw/by1UL72ci4sVsMutHB/0I8JE/5N72F2xfXX8saauk46qNw85stp2SXh5MhQPT7vPvl3Sv7ZW2b5S0QdKbA6ivr+phlblHtXVEGvLxsG1JT0s6GRGPN7zE+tFJn/Yyb1dtz/KvJX130Htu+31TrQPnaHY7UR8DSX8q6aCkU9n96kHXWuIYPKvaZoHPVfsG9cBCn1/Sd7P15R1Jdw26/j6Nx48lvS3pmGohNT4K4yHpL1XbBHJM0pHstn2U14+8Nw6lB4BEcSQmACSKAAeARBHgAJAoAhwAEkWAA0CiCHAASBQBDgCJ+n+3Neirx6KuEQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" } ], "source": [ - "np.nanmean(SOHI_MKE), np.nanmean(LLC_MKE), np.nanmean(SOSE_MKE)" + "plt.pcolormesh(res[3], vmin=1e-3, vmax=1e-1)" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "id": "ca50e560", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.004506097270217225\n", + "0.001528951370295939\n", + "0.002051632214932499\n", + "0.013626162409897322\n" + ] + } + ], + "source": [ + "_, _, res = crop_region(xbound = [210, 270], \n", + " ybound = [-76, -70], \n", + " XC = LLC['lon'], \n", + " YC = LLC['lat'], \n", + " data = [LLC_total[0]*LLC_mask, \n", + " LLC_total[1]*LLC_mask,\n", + " LLC_total[2]*LLC_mask,\n", + " LLC_total[3]*LLC_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "id": "287522ba", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.00927682855441499\n", + "0.003830275229360322\n", + "0.004198692103692928\n", + "0.04150267291235298\n" + ] + } + ], + "source": [ + "_, _, res = crop_region(xbound = [210, 270], \n", + " ybound = [-76, -70], \n", + " XC = SOHI['lon'], \n", + " YC = SOHI['lat'], \n", + " data = [SOHI_total[0]*SOhi_mask, \n", + " SOHI_total[1]*SOhi_mask,\n", + " SOHI_total[2]*SOhi_mask,\n", + " SOHI_total[3]*SOhi_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "id": "2ef80661", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.0033284885454190915\n", + "0.00030625975486379454\n", + "0.00017510150734249895\n", + "0.00016488310867815575\n" + ] + } + ], + "source": [ + "_, _, res = crop_region(xbound = [210, 270], \n", + " ybound = [-76, -70], \n", + " XC = SOSE['lon'], \n", + " YC = SOSE['lat'], \n", + " data = [SOSE_total[0][:138, :]*SOSE_mask, \n", + " SOSE_total[1][:138, :]*SOSE_mask,\n", + " SOSE_total[2][:138, :]*SOSE_mask,\n", + " SOSE_total[3][:138, :]*SOSE_mask])\n", + "\n", + "for i in res:\n", + " i[i==0] = np.nan\n", + " print(np.nanmean(i))" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "id": "bceb55ad", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.011765732414870738 0.004828890516603134 0.015965024352445845\n" + ] + } + ], + "source": [ + "test1 = LLC_total[0][:,:] * LLC_mask\n", + "test1[test1==0] = np.nan\n", + "\n", + "test2 = SOSE_total[0][:138,:] * SOSE_mask\n", + "test2[test2==0] = np.nan\n", + "\n", + "test3 = SOHI_total[0][:,:] * SOhi_mask\n", + "test3[test3==0] = np.nan\n", + "\n", + "print(np.nanmean(test1), np.nanmean(test2), np.nanmean(test3))" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "id": "3906d6d0", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.007257047935537565 0.001514153567569248 0.006564317754280764\n" + ] + } + ], + "source": [ + "test1 = LLC_total[1][:,:] * LLC_mask\n", + "test1[test1==0] = np.nan\n", + "\n", + "test2 = SOSE_total[1][:138,:] * SOSE_mask\n", + "test2[test2==0] = np.nan\n", + "\n", + "test3 = SOHI_total[1][:,:] * SOhi_mask\n", + "test3[test3==0] = np.nan\n", + "\n", + "print(np.nanmean(test1), np.nanmean(test2), np.nanmean(test3))" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "id": "745a9c72", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.00603299305667441 0.0008570186606138729 0.004193799398244336\n" + ] + } + ], + "source": [ + "test1 = LLC_total[2][:,:] * LLC_mask\n", + "test1[test1==0] = np.nan\n", + "\n", + "test2 = SOSE_total[2][:138,:] * SOSE_mask\n", + "test2[test2==0] = np.nan\n", + "\n", + "test3 = SOHI_total[2][:,:] * SOhi_mask\n", + "test3[test3==0] = np.nan\n", + "\n", + "print(np.nanmean(test1), np.nanmean(test2), np.nanmean(test3))" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "id": "7a76517a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.008844058929335602 0.0007416790405643526 0.004084758228457443\n" + ] + } + ], + "source": [ + "test1 = LLC_total[3][:,:] * LLC_mask\n", + "test1[test1==0] = np.nan\n", + "\n", + "test2 = SOSE_total[3][:138,:] * SOSE_mask\n", + "test2[test2==0] = np.nan\n", + "\n", + "test3 = SOHI_total[3][:,:] * SOhi_mask\n", + "test3[test3==0] = np.nan\n", + "\n", + "print(np.nanmean(test1), np.nanmean(test2), np.nanmean(test3))" ] } ],