From 546d5405710daf8a3150ebcf979fbcda3b349ab5 Mon Sep 17 00:00:00 2001 From: FGeo Date: Tue, 16 Apr 2024 23:45:24 +0300 Subject: [PATCH] Fix small discrepancy --- 0_prepare_data.ipynb | 99 +++++++++++--- 4_IP_simulations_temporal_images.ipynb | 76 +++++------ 5_IP_simulations_spatial_images.ipynb | 177 +++++++++++++------------ data/INMCM/INMCM_NUMDAYS_MON.npy | Bin 0 -> 224 bytes data/WRF/WRF_NUMDAYS_MON.npy | Bin 0 -> 224 bytes 5 files changed, 212 insertions(+), 140 deletions(-) create mode 100644 data/INMCM/INMCM_NUMDAYS_MON.npy create mode 100644 data/WRF/WRF_NUMDAYS_MON.npy diff --git a/0_prepare_data.ipynb b/0_prepare_data.ipynb index 800c57d..84955e7 100644 --- a/0_prepare_data.ipynb +++ b/0_prepare_data.ipynb @@ -31,7 +31,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "36b9f49e-32e6-4544-a9d3-f6a8ba49d867", "metadata": {}, "outputs": [], @@ -46,12 +46,12 @@ "id": "5e16ee8e-f3b0-4251-9691-19d7dfd4aff7", "metadata": {}, "source": [ - "## Preprocessing WRF T2m data" + "### Preprocessing WRF T2m data" ] }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 4, "id": "78a4350c-59fb-479a-b7cd-e2bf9b996d36", "metadata": {}, "outputs": [], @@ -63,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 5, "id": "53cb9cc3-0e56-4da4-920b-2f071a0846fb", "metadata": {}, "outputs": [], @@ -247,12 +247,12 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": null, "id": "2b6f987e-ba3c-4371-af7b-c9857a7d33d9", "metadata": {}, "outputs": [], "source": [ - "wrf_raw_ip_data = np.load(f\"WRF-IP-MAP-500-T2-25.npy\")[:wrf_N_days]\n", + "wrf_raw_ip_data = np.load(f\"{src_path}/WRF-IP-MAP-500-T2-25.npy\")[:wrf_N_days]\n", "wrf_raw_ip_data = wrf_raw_ip_data[:, :24, :, :]\n", "wrf_raw_ip_data /= (1/240e3) * wrf_raw_ip_data.sum(axis=(-2,-1)).mean()\n", "\n", @@ -262,22 +262,89 @@ "np.save(\n", " f\"./data/WRF/WRF_HOURLY_TOTAL_IP_500_T2_25.npy\",\n", " wrf_hourly_total_ip,\n", - ")\n", - "\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "17036c19-95f8-40df-a6c9-f8a23cf426f6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4992\n" + ] + } + ], + "source": [ "wrf_data_LATxMON = np.zeros((180, 12))\n", "\n", "for month_idx in range(12):\n", " monthly_indicies = [\n", - " i for i, date in enumerate(wrf_dt_indicies) if date.month == month_idx + 1\n", + " i for i, date in enumerate(wrf_dt_indicies) \n", + " if date.month == month_idx + 1\n", " ]\n", "\n", - " wrf_data_MONxLAT[:, month_idx] = wrf_daily_latitudal_ip[monthly_indicies].mean(\n", - " axis=0\n", - " )\n", - "np.save(\n", - " f\"./data/WRF/WRF_IP_500_T2_25_LATxMON.npy\",\n", - " wrf_data_MONxLAT\n", - ")" + " wrf_data_LATxMON[:, month_idx] = \\\n", + " wrf_daily_latitudal_ip[monthly_indicies].mean(axis=0)\n", + "\n", + "np.save(f\"./data/WRF/WRF_IP_500_T2_25_LATxMON.npy\", wrf_data_LATxMON)" + ] + }, + { + "cell_type": "markdown", + "id": "e24297fc-cf81-4ea7-9a80-cdcaf277474a", + "metadata": {}, + "source": [ + "### Saving number of days (used for monthly mean) for each month" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "6dfdae16-cb07-4580-97ba-414b5b2c1f2b", + "metadata": {}, + "outputs": [], + "source": [ + "wrf_days = np.array([len([\n", + " i for i, date in enumerate(wrf_dt_indicies) \n", + " if date.month == m + 1\n", + " ]) for m in range(12)])\n", + "\n", + "np.save(f\"./data/WRF/WRF_NUMDAYS_MON.npy\", wrf_days)" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "762dd08f-7d1e-4b68-b272-e7aa9b26d9f1", + "metadata": {}, + "outputs": [], + "source": [ + "inm_days = np.array([len([\n", + " i for i, date in enumerate(inmcm_dt_indicies) \n", + " if date.month == m + 1\n", + " ]) for m in range(12)])\n", + "\n", + "np.save(f\"./data/INMCM/INMCM_NUMDAYS_MON.npy\", inm_days)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "78afb8e1-3975-4e19-993f-1b0c74c3e9bd", + "metadata": {}, + "outputs": [], + "source": [ + "# for average over months use\n", + "# `(wrf_data_LATxMON[:, :].sum(axis=0)*days).sum()/days.sum()`\n", + "# unstead\n", + "# `wrf_data_LATxMON[:, :].sum(axis=0).mean()`\n", + "# because\n", + "# ((a1+a2+a3)/3 + (b1+b2)/2)/2 != (a1+a2+a3+b1+b2)/5" ] } ], diff --git a/4_IP_simulations_temporal_images.ipynb b/4_IP_simulations_temporal_images.ipynb index c36ebd2..e06142d 100644 --- a/4_IP_simulations_temporal_images.ipynb +++ b/4_IP_simulations_temporal_images.ipynb @@ -115,28 +115,14 @@ "metadata": {}, "outputs": [], "source": [ - "wrf_LATxMON_t2 = np.load(\"./data/WRF/WRF_T2_LATxMON.npy\")\n", - "\n", - "wrf_LATxMON_ip = {\n", - " key: np.load(f\"./data/WRF/WRF_IP_{parameters}_LATxMON.npy\")\n", - " for key, parameters in zip([500, 800, 1000, 1200],\n", - " [\"500_T2_25\", \"800\", \"1000\", \"1200\"])\n", - "}\n", - "\n", - "inm_LATxMON_ip = {\n", - " key: np.load(f\"./data/INMCM/INMCM_IP_{parameters}_LATxMON.npy\")\n", - " for key, parameters in zip([800, 1000, 1200],\n", - " [\"800\", \"1000\", \"1200\"])\n", - "}\n", - "\n", "wrf_hourly_total_ip = {\n", - " key: np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{parameters}.npy\")\n", + " key: np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{parameters}.npy\")[:wrf_N_days]\n", " for key, parameters in zip([500, 800, 1000, 1200],\n", " [\"500_T2_25\", \"800\", \"1000\", \"1200\"])\n", "}\n", "\n", "inm_hourly_total_ip = {\n", - " key: np.load(f\"./data/INMCM/INMCM_HOURLY_TOTAL_IP_{parameters}.npy\")\n", + " key: np.load(f\"./data/INMCM/INMCM_HOURLY_TOTAL_IP_{parameters}.npy\")[:inm_N_days]\n", " for key, parameters in zip([800, 1000, 1200],\n", " [\"800\", \"1000\", \"1200\"])\n", "}" @@ -166,9 +152,9 @@ "\n", " # fill data for WRF panels\n", " ax_idx = j * 2\n", - "\n", - " wrf_inds =[i for i, date in enumerate(wrf_dt_indicies) if date.month == m + 1]\n", - " ip = np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{cape_thres}.npy\")[wrf_inds]\n", + " wrf_inds = [i for i, date in enumerate(wrf_dt_indicies) \n", + " if date.month == m + 1]\n", + " ip = wrf_hourly_total_ip[cape_thres][wrf_inds]\n", " data[ax_idx, m] = ip.mean()\n", " data_counter[ax_idx, m] = len(ip)\n", " data_sqr[ax_idx, m] = np.sum(\n", @@ -177,10 +163,9 @@ "\n", " # fill data for INMCM panels\n", " ax_idx = j * 2 + 1\n", - "\n", - " inmcm_inds =[i for i, date in enumerate(inm_dt_indicies) if date.month == m + 1]\n", - " ip = np.load(f\"./data/INMCM/INMCM_HOURLY_TOTAL_IP_{cape_thres}.npy\")[inmcm_inds]\n", - "\n", + " inmcm_inds =[i for i, date in enumerate(inm_dt_indicies) \n", + " if date.month == m + 1]\n", + " ip = inm_hourly_total_ip[cape_thres][inmcm_inds]\n", " data[ax_idx, m] = ip.mean()\n", " data_counter[ax_idx, m] = len(ip)\n", " data_sqr[ax_idx, m] = np.sum(\n", @@ -316,7 +301,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "id": "5c2a949e-1c6c-409f-9a62-6012fe5900a0", "metadata": {}, "outputs": [], @@ -325,37 +310,36 @@ "data_counter = np.zeros((8, 12), dtype=int)\n", "data_sqr = np.zeros((8, 12))\n", "\n", - "ranges = {\n", + "wrf_ranges = {\n", " 0: range(1981, 1990 + 1),\n", " 1: range(1991, 2000 + 1),\n", " 2: range(2001, 2010 + 1),\n", " 3: range(2011, 2020 + 1),\n", "}\n", "\n", - "inm_splitted_indicies = {\n", - " 4: np.split(np.arange(len(inm_dt_indicies)), 2)[0],\n", - " 5: np.split(np.arange(len(inm_dt_indicies)), 2)[1]\n", + "inm_ranges = {\n", + " 4: range(0, 5),\n", + " 5: range(5, 10)\n", "}\n", "\n", "for m in range(12):\n", " for ax_idx in range(6):\n", " if ax_idx in [0, 1, 2, 3]:\n", - " wrf_inds = [\n", - " i\n", - " for i, date in enumerate(wrf_dt_indicies)\n", - " if date.month == m + 1 and date.year in ranges[ax_idx]\n", - " ]\n", - " ip = np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{1000}.npy\")[wrf_inds]\n", + " wrf_inds = [i for i, date in enumerate(wrf_dt_indicies)\n", + " if date.month == m + 1\n", + " and date.year in wrf_ranges[ax_idx]\n", + " ]\n", + " ip = wrf_hourly_total_ip[1000][wrf_inds]\n", " data[ax_idx, m] = ip.mean()\n", " data_counter[ax_idx, m] = len(ip)\n", " data_sqr[ax_idx, m] = np.sum(ip.mean(axis=-1) ** 2) / len(ip)\n", "\n", " if ax_idx in [4, 5]:\n", - " inmcm_inds = [\n", - " i for i, date in enumerate(inm_dt_indicies) if date.month == m + 1\n", - " ]\n", - " inmcm_inds = np.intersect1d(inmcm_inds, inm_splitted_indicies[ax_idx])\n", - " ip = np.load(f\"./data/INMCM/INMCM_HOURLY_TOTAL_IP_{1000}.npy\")[inmcm_inds]\n", + " inmcm_inds = [i for i, date in enumerate(inm_dt_indicies) \n", + " if date.month == m + 1\n", + " and i//365 in inm_ranges[ax_idx]\n", + " ]\n", + " ip = inm_hourly_total_ip[1000][inmcm_inds]\n", " data[ax_idx, m] = ip.mean()\n", " data_counter[ax_idx, m] = len(ip)\n", " data_sqr[ax_idx, m] = np.sum(ip.mean(axis=-1) ** 2) / len(ip)\n", @@ -376,7 +360,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "id": "97cc13ff-e014-4626-90ec-1c65a60bdcac", "metadata": {}, "outputs": [ @@ -394,8 +378,7 @@ "source": [ "fig = plt.figure(figsize=(10, 14), constrained_layout=False)\n", "ax = [None for _ in range(8)]\n", - "# for n in range(8):\n", - "# ax[n] = fig.add_subplot(4, 2, n + 1)\n", + "\n", "for n in range(8):\n", " ax[n] = fig.add_subplot(4, 4, (2*n + 1, 2*n + 2))\n", "\n", @@ -403,6 +386,7 @@ "high = [280e3] * 6 + [180] * 2\n", "step = [20e3] * 6 + [20] * 2\n", "coeff = [1e3] * 6 + [1] * 2\n", + "\n", "caption = [\"WRF, 1981–1990, $\\\\varepsilon_0 = 1$ kJ/kg\",\n", " \"WRF, 1991–2000, $\\\\varepsilon_0 = 1$ kJ/kg\",\n", " \"WRF, 2001–2010, $\\\\varepsilon_0 = 1$ kJ/kg\",\n", @@ -481,6 +465,14 @@ "\n", "fig.savefig(\"./figures_two_parts/ip_pg_partial.eps\", bbox_inches=\"tight\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7af55182-03fb-4e9f-979b-0df94edbd451", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/5_IP_simulations_spatial_images.ipynb b/5_IP_simulations_spatial_images.ipynb index 4d66ab8..f882586 100644 --- a/5_IP_simulations_spatial_images.ipynb +++ b/5_IP_simulations_spatial_images.ipynb @@ -45,31 +45,36 @@ { "cell_type": "markdown", "id": "83163834-de47-4f28-8add-768c7b76e1d3", - "metadata": {}, + "metadata": { + "jp-MarkdownHeadingCollapsed": true + }, "source": [ "### Helper functions, variables and classes" ] }, { "cell_type": "code", - "execution_count": 144, + "execution_count": 411, "id": "61405aa1-0b4d-4a8a-85a5-3097d37c644e", "metadata": {}, "outputs": [], "source": [ - "month_name = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"]\n", - "month_name_3 = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]" + "month_name = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \n", + " \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"]\n", + "month_name_3 = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n", + " \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 412, "id": "b929a567-c60d-47e4-a5e3-3ca83b29d07a", "metadata": {}, "outputs": [], "source": [ "area_factor = (\n", - " np.cos(np.arange(180) * np.pi / 180) - np.cos(np.arange(1, 181) * np.pi / 180)\n", + " np.cos(np.arange(180) * np.pi / 180) - \n", + " np.cos(np.arange(1, 181) * np.pi / 180)\n", ") / 2" ] }, @@ -97,7 +102,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 376, "id": "4250ebc7-1c87-4ff0-bc58-faaf6732008f", "metadata": {}, "outputs": [], @@ -113,6 +118,7 @@ " model (str): model associated with the latitude band\n", " color (str): color associated with the latitude band.\n", " \"\"\"\n", + "\n", " def __init__(self, expression, model=None):\n", " \"\"\"\n", " Initializes a LatitudeBand object with the given latitude \n", @@ -174,7 +180,10 @@ " # store latitude bands model and prettify title\n", " self.model = model\n", " self.title = f\"{p1}–{p2}\" # like 9° S–18° S\n", - " self.label = self.title.replace(\" \", \"\")" + " self.label = self.title.replace(\" \", \"\")\n", + "\n", + " def __repr__(self):\n", + " return self.label" ] }, { @@ -187,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 413, "id": "2dd01e73-6586-4e1b-b519-4f3e84ae8940", "metadata": {}, "outputs": [], @@ -198,7 +207,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 414, "id": "9252215e-9586-444e-bb63-b65dcb945dd6", "metadata": {}, "outputs": [], @@ -214,7 +223,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 416, "id": "69602993-2005-4fed-b425-69575f9fd2cf", "metadata": { "editable": true, @@ -240,15 +249,9 @@ "}\n", "\n", "wrf_hourly_total_ip = {\n", - " key: np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{parameters}.npy\")\n", + " key: np.load(f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{parameters}.npy\")[:wrf_N_days]\n", " for key, parameters in zip([500, 800, 1000, 1200],\n", " [\"500_T2_25\", \"800\", \"1000\", \"1200\"])\n", - "}\n", - "\n", - "inm_hourly_total_ip = {\n", - " key: np.load(f\"./data/INMCM/INMCM_HOURLY_TOTAL_IP_{parameters}.npy\")\n", - " for key, parameters in zip([800, 1000, 1200],\n", - " [\"800\", \"1000\", \"1200\"])\n", "}" ] }, @@ -262,7 +265,25 @@ }, { "cell_type": "code", - "execution_count": 265, + "execution_count": 417, + "id": "728962ea-6e40-4827-bbf3-0da19b8e5c5b", + "metadata": {}, + "outputs": [], + "source": [ + "# for averaging over months we use\n", + "# `(wrf_data_LATxMON[:, :].sum(axis=0)*days).sum()/days.sum()`\n", + "# unstead\n", + "# `wrf_data_LATxMON[:, :].sum(axis=0).mean()`\n", + "# because\n", + "# ((a1+a2+a3)/3 + (b1+b2)/2)/2 != (a1+a2+a3+b1+b2)/5\n", + "\n", + "wrf_numdays = np.load(\"./data/WRF/WRF_NUMDAYS_MON.npy\")\n", + "inm_numdays = np.load(\"./data/INMCM/INMCM_NUMDAYS_MON.npy\")" + ] + }, + { + "cell_type": "code", + "execution_count": 418, "id": "90002efb-7421-46cc-8e64-96c6d465c617", "metadata": { "editable": true, @@ -278,19 +299,19 @@ "text": [ "Model | CAPE | T2,°C | Band | % \n", "-----------------------------------------\n", - "WRF | 500 | 25 | 9°S–9°N | 57.5%\n", - "INMCM | 800 | - | 9°S–9°N | 51.7%\n", - "WRF | 800 | - | 9°S–9°N | 60.2%\n", - "INMCM | 1000 | - | 9°S–9°N | 53.0%\n", - "WRF | 1000 | - | 9°S–9°N | 62.3%\n", - "INMCM | 1200 | - | 9°S–9°N | 53.7%\n", - "WRF | 1200 | - | 9°S–9°N | 63.4%\n", + "WRF | 500 | 25 | 9°S–9°N | 57.53%\n", + "INMCM | 800 | - | 9°S–9°N | 51.72%\n", + "WRF | 800 | - | 9°S–9°N | 60.19%\n", + "INMCM | 1000 | - | 9°S–9°N | 52.99%\n", + "WRF | 1000 | - | 9°S–9°N | 62.30%\n", + "INMCM | 1200 | - | 9°S–9°N | 53.66%\n", + "WRF | 1200 | - | 9°S–9°N | 63.40%\n", "-----------------------------------------\n", - "INMCM | 1000 | - | 18°S–18°N | 86.1%\n", - "WRF | 1000 | - | 18°S–18°N | 92.1%\n", + "INMCM | 1000 | - | 18°S–18°N | 86.08%\n", + "WRF | 1000 | - | 18°S–18°N | 92.08%\n", "-----------------------------------------\n", - "INMCM | 1000 | - | 30°S–30°N | 96.5%\n", - "WRF | 1000 | - | 30°S–30°N | 98.8%\n" + "INMCM | 1000 | - | 30°S–30°N | 96.51%\n", + "WRF | 1000 | - | 30°S–30°N | 98.83%\n" ] } ], @@ -311,19 +332,21 @@ " capes = [500, 800, 1000, 1200]\n", "\n", " for cape in capes:\n", - " wrf_ip = wrf_LATxMON_ip[cape][wrf_band.slice].sum(axis=0).mean() / 240e3 * 100\n", + " wrf_ip_MON = wrf_LATxMON_ip[cape][wrf_band.slice].sum(axis=0)\n", + " wrf_share = (wrf_ip_MON*wrf_numdays).sum() / wrf_numdays.sum() / 240e3 * 100\n", "\n", " if cape != 500:\n", - " inm_ip = inm_LATxMON_ip[cape][inm_band.slice].sum(axis=0).mean() / 240e3 * 100\n", - " print(f\"INMCM | {cape:4d} | - |{inm_band.label:>11} | {inm_ip:>4.1f}%\")\n", + " inm_ip_MIN = inm_LATxMON_ip[cape][inm_band.slice].sum(axis=0)\n", + " inm_share = (inm_ip_MIN*inm_numdays).sum() / inm_numdays.sum() / 240e3 * 100\n", + " print(f\"INMCM | {cape:4d} | - |{inm_band.label:>11} | {inm_share:>4.2f}%\")\n", "\n", " p = \"25 \" if cape == 500 else \"- \"\n", - " print(f\"WRF | {cape:4d} | {p} |{wrf_band.label:>11} | {wrf_ip:>4.1f}%\") " + " print(f\"WRF | {cape:4d} | {p} |{wrf_band.label:>11} | {wrf_share:>4.2f}%\") " ] }, { "cell_type": "code", - "execution_count": 268, + "execution_count": 419, "id": "7cc0c763-f1ec-4ff4-b4fe-2730be6daec9", "metadata": { "editable": true, @@ -339,29 +362,29 @@ "text": [ "Model | CAPE | T2,°C | Band | Min | Max | Peak-to-peak, %\n", "---------------------------------------------------------------\n", - "WRF | 500 | 25 | 90°S–9°S | Aug | Feb | 208.8%\n", - "INMCM | 800 | - | 90°S–9°S | Sep | Feb | 165.7%\n", - "WRF | 800 | - | 90°S–9°S | Aug | Feb | 201.8%\n", - "INMCM | 1000 | - | 90°S–9°S | Aug | Feb | 190.5%\n", - "WRF | 1000 | - | 90°S–9°S | Aug | Feb | 215.5%\n", - "INMCM | 1200 | - | 90°S–9°S | Aug | Feb | 212.7%\n", - "WRF | 1200 | - | 90°S–9°S | Aug | Feb | 238.8%\n", + "WRF | 500 | 25 | 90°S–9°S | Aug | Feb | 208.77%\n", + "INMCM | 800 | - | 90°S–9°S | Sep | Feb | 165.65%\n", + "WRF | 800 | - | 90°S–9°S | Aug | Feb | 201.77%\n", + "INMCM | 1000 | - | 90°S–9°S | Aug | Feb | 190.49%\n", + "WRF | 1000 | - | 90°S–9°S | Aug | Feb | 215.48%\n", + "INMCM | 1200 | - | 90°S–9°S | Aug | Feb | 212.74%\n", + "WRF | 1200 | - | 90°S–9°S | Aug | Feb | 238.80%\n", "---------------------------------------------------------------\n", - "WRF | 500 | 25 | 9°S–9°N | Aug | Apr | 57.7%\n", - "INMCM | 800 | - | 9°S–9°N | Jul | May | 29.1%\n", - "WRF | 800 | - | 9°S–9°N | Aug | Apr | 52.1%\n", - "INMCM | 1000 | - | 9°S–9°N | Jul | May | 32.9%\n", - "WRF | 1000 | - | 9°S–9°N | Aug | Apr | 63.0%\n", - "INMCM | 1200 | - | 9°S–9°N | Jul | May | 38.4%\n", - "WRF | 1200 | - | 9°S–9°N | Aug | Apr | 72.8%\n", + "WRF | 500 | 25 | 9°S–9°N | Aug | Apr | 57.68%\n", + "INMCM | 800 | - | 9°S–9°N | Jul | May | 29.09%\n", + "WRF | 800 | - | 9°S–9°N | Aug | Apr | 52.07%\n", + "INMCM | 1000 | - | 9°S–9°N | Jul | May | 32.93%\n", + "WRF | 1000 | - | 9°S–9°N | Aug | Apr | 62.95%\n", + "INMCM | 1200 | - | 9°S–9°N | Jul | May | 38.38%\n", + "WRF | 1200 | - | 9°S–9°N | Aug | Apr | 72.82%\n", "---------------------------------------------------------------\n", - "WRF | 500 | 25 | 9°N–90°N | Feb | Aug | 226.0%\n", - "INMCM | 800 | - | 9°N–90°N | Feb | Aug | 181.5%\n", - "WRF | 800 | - | 9°N–90°N | Feb | Aug | 220.5%\n", - "INMCM | 1000 | - | 9°N–90°N | Feb | Jul | 190.6%\n", - "WRF | 1000 | - | 9°N–90°N | Feb | Aug | 224.9%\n", - "INMCM | 1200 | - | 9°N–90°N | Feb | Jul | 201.6%\n", - "WRF | 1200 | - | 9°N–90°N | Feb | Aug | 226.7%\n" + "WRF | 500 | 25 | 9°N–90°N | Feb | Aug | 226.01%\n", + "INMCM | 800 | - | 9°N–90°N | Feb | Aug | 181.46%\n", + "WRF | 800 | - | 9°N–90°N | Feb | Aug | 220.47%\n", + "INMCM | 1000 | - | 9°N–90°N | Feb | Jul | 190.60%\n", + "WRF | 1000 | - | 9°N–90°N | Feb | Aug | 224.93%\n", + "INMCM | 1200 | - | 9°N–90°N | Feb | Jul | 201.56%\n", + "WRF | 1200 | - | 9°N–90°N | Feb | Aug | 226.70%\n" ] } ], @@ -379,7 +402,7 @@ " month_min = month_name_3[np.argmin(seas_var)]\n", " month_max = month_name_3[np.argmax(seas_var)]\n", " pk_pk_ampl = (seas_var.max() - seas_var.min())/seas_var.mean() * 100\n", - " print(f\"INMCM | {cape:4} | - |{inm_band.label:>11} | {month_min} | {month_max} | {pk_pk_ampl:>5.1f}%\")\n", + " print(f\"INMCM | {cape:4} | - |{inm_band.label:>11} | {month_min} | {month_max} | {pk_pk_ampl:>6.2f}%\")\n", " \n", " seas_var = wrf_LATxMON_ip[cape][wrf_band.slice].sum(axis=0)\n", " month_min = month_name_3[np.argmin(seas_var)]\n", @@ -387,12 +410,12 @@ " pk_pk_ampl = (seas_var.max() - seas_var.min())/seas_var.mean() * 100\n", " \n", " p = \"25 \" if cape == 500 else \"- \"\n", - " print(f\"WRF | {cape:4} | {p:<5} |{inm_band.label:>11} | {month_min} | {month_max} | {pk_pk_ampl:>5.1f}%\")" + " print(f\"WRF | {cape:4} | {p:<5} |{inm_band.label:>11} | {month_min} | {month_max} | {pk_pk_ampl:>6.2f}%\")" ] }, { "cell_type": "code", - "execution_count": 314, + "execution_count": 420, "id": "12e57219-ea3e-447b-b858-5240e2f8004b", "metadata": { "editable": true, @@ -428,16 +451,6 @@ "WRF | 18°S–90°S | 17133.10 V\n", "INMCM | 18°S–90°S | 24639.04 V\n" ] - }, - { - "data": { - "text/plain": [ - "(60, 12)" - ] - }, - "execution_count": 314, - "metadata": {}, - "output_type": "execute_result" } ], "source": [ @@ -458,7 +471,7 @@ }, { "cell_type": "code", - "execution_count": 359, + "execution_count": 421, "id": "df0d50ea-4001-4007-9a4d-bc37b8a1be9f", "metadata": { "editable": true, @@ -513,7 +526,7 @@ }, { "cell_type": "code", - "execution_count": 273, + "execution_count": 422, "id": "34e25ddd-4815-4c70-bc3b-982cad6b65b4", "metadata": {}, "outputs": [], @@ -537,7 +550,7 @@ }, { "cell_type": "code", - "execution_count": 274, + "execution_count": 423, "id": "fc39428e-ea03-494e-97d7-c38ecd8cb044", "metadata": {}, "outputs": [ @@ -647,7 +660,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 424, "id": "57a55242-5fc1-4339-a386-297c20320f3e", "metadata": {}, "outputs": [], @@ -661,7 +674,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 425, "id": "92d565d9-fd1f-4bff-91e7-1a5185de08a7", "metadata": {}, "outputs": [], @@ -676,7 +689,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 426, "id": "421b6814-7f62-4325-8f40-08d9dffc720b", "metadata": {}, "outputs": [], @@ -691,7 +704,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 427, "id": "04ac548c-47d9-4643-b26c-58b3359bd9a5", "metadata": {}, "outputs": [], @@ -713,7 +726,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 428, "id": "8fc9d1a5-e75b-4dd7-971d-67d900c89207", "metadata": {}, "outputs": [ @@ -1038,7 +1051,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 429, "id": "cd3ddeed-7054-46bc-9764-7324b89ad4fe", "metadata": {}, "outputs": [], @@ -1049,7 +1062,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 430, "id": "15f1693c-53bd-448b-9388-6cf4fd53acf6", "metadata": {}, "outputs": [], @@ -1061,7 +1074,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 431, "id": "72c110be-1294-4df7-a7d7-e3197b38a5b9", "metadata": {}, "outputs": [], @@ -1074,7 +1087,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 432, "id": "0dc8e9ad-9444-4880-85b0-405a4f26e6bf", "metadata": {}, "outputs": [], @@ -1093,7 +1106,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 433, "id": "9a85ba47-cb25-4a1f-a036-f1d09f63438b", "metadata": {}, "outputs": [ diff --git a/data/INMCM/INMCM_NUMDAYS_MON.npy b/data/INMCM/INMCM_NUMDAYS_MON.npy new file mode 100644 index 0000000000000000000000000000000000000000..9dbd598356b29dce5f75d4b20ecef45e37ce842b GIT binary patch literal 224 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlWC!@qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= kXCxM+0{I$-Mmm~03bhL411>X01~8C-(lEXb0Y0(n02wnKzW@LL literal 0 HcmV?d00001 diff --git a/data/WRF/WRF_NUMDAYS_MON.npy b/data/WRF/WRF_NUMDAYS_MON.npy new file mode 100644 index 0000000000000000000000000000000000000000..ae2726d123aa5b26c0008a58982da875b0259af5 GIT binary patch literal 224 zcmbR27wQ`j$;eQ~P_3SlTAW;@Zl$1ZlWC!@qoAIaUsO_*m=~X4l#&V(cT3DEP6dh= pXCxM+0{I$-Mmm~03bhL41FrRq3}8?VrD6P8Q2r7qjm{@l9RMogBK-gW literal 0 HcmV?d00001