Browse Source

Add CAPE histograms, diurnal curve; Switch INMCM ver.; Add 600 J/kg thres.

master
FedorSarafanov 3 months ago
parent
commit
91f3f1256a
  1. 485
      0_prepare_data.ipynb
  2. 78
      1_earlier_measurements_images.ipynb
  3. 612
      2_Vostok_measurements_images.ipynb
  4. 377
      3_CAPE_T2_images.ipynb
  5. 194
      3_WRF_T2_images.ipynb
  6. 663
      4_IP_simulations_temporal_images.ipynb
  7. 352
      5_IP_simulations_spatial_images.ipynb
  8. BIN
      data/INMCM/INMCM_HOURLY_TOTAL_IP_1000.npy
  9. BIN
      data/INMCM/INMCM_HOURLY_TOTAL_IP_1200.npy
  10. BIN
      data/INMCM/INMCM_HOURLY_TOTAL_IP_600.npy
  11. BIN
      data/INMCM/INMCM_HOURLY_TOTAL_IP_800.npy
  12. BIN
      data/INMCM/INMCM_IP_1000_LATxMON.npy
  13. BIN
      data/INMCM/INMCM_IP_1200_LATxMON.npy
  14. BIN
      data/INMCM/INMCM_IP_600_LATxMON.npy
  15. BIN
      data/INMCM/INMCM_IP_800_LATxMON.npy
  16. BIN
      data/INMCM/INMCM_NUMDAYS_MON.npy
  17. BIN
      data/INMCM/INMCM_SCAPE_HIST.npz
  18. BIN
      data/INMCM/INMCM_SCAPE_RAIN_HIST.npz
  19. BIN
      data/Vostok/vostok_2006_2020_results_adjusted.npz
  20. 23434
      data/Vostok/vostok_daily_pressure_mm_hg_6h.csv
  21. 23434
      data/Vostok/vostok_daily_temp_6h.csv
  22. 23434
      data/Vostok/vostok_daily_wind_6h.csv
  23. BIN
      data/Vostok/vostok_diurnal_2006_2020_adjusted.npy
  24. BIN
      data/WRF/WRF_CAPE_HIST.npz
  25. BIN
      data/WRF/WRF_CAPE_RAIN_HIST.npz
  26. BIN
      data/WRF/WRF_HOURLY_TOTAL_IP_1000.npy
  27. BIN
      data/WRF/WRF_HOURLY_TOTAL_IP_1200.npy
  28. BIN
      data/WRF/WRF_HOURLY_TOTAL_IP_500_T2_25.npy
  29. BIN
      data/WRF/WRF_HOURLY_TOTAL_IP_600.npy
  30. BIN
      data/WRF/WRF_HOURLY_TOTAL_IP_800.npy
  31. BIN
      data/WRF/WRF_IP_1000_LATxMON.npy
  32. BIN
      data/WRF/WRF_IP_1200_LATxMON.npy
  33. BIN
      data/WRF/WRF_IP_500_T2_25_LATxMON.npy
  34. BIN
      data/WRF/WRF_IP_600_LATxMON.npy
  35. BIN
      data/WRF/WRF_IP_800_LATxMON.npy
  36. BIN
      data/WRF/WRF_T2_LATxMON.npy
  37. 2916
      figures/cape.eps
  38. 2
      figures/earlier_measurements.eps
  39. 8009
      figures/ip_decomposed.eps
  40. 3796
      figures/ip_partial.eps
  41. 4845
      figures/ip_pg_diurnal.eps
  42. 4956
      figures/ip_pg_total.eps
  43. 4288
      figures/ip_separate.eps
  44. 3064
      figures/new_parameterisation.eps
  45. 2
      figures/pg_3_years.eps
  46. 2
      figures/pg_corrected.eps
  47. 2
      figures/pg_diurnal_seasonal.eps
  48. 2
      figures/pg_earlier.eps
  49. 2
      figures/pg_individual.eps
  50. 4323
      figures/pg_partial_corrected.eps
  51. 2
      figures/pg_total_partial.eps
  52. 194
      figures/t2.eps
  53. 91
      readme.md

485
0_prepare_data.ipynb

@ -44,21 +44,43 @@ @@ -44,21 +44,43 @@
"metadata": {},
"outputs": [],
"source": [
"# also available at https://eee.ipfran.ru/files/seasonal-variation-2024/\n",
"# attention: the files are very large (~ 350 GB totally)\n",
"src_path = \"../../shared_files/eee_public_files/seasonal-variation-2024/\""
"# also available at https://eee.ipfran.ru/files/seasonal-variation-2024\n",
"# attention: the files are very large (~ 300 GB in total)\n",
"src_path = \"/home/shared_files/eee_public_files/seasonal-variation-2024\""
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "78a4350c-59fb-479a-b7cd-e2bf9b996d36",
"id": "e85f1bf1-8777-459f-a624-146d1f0440c7",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4992\n",
"14965\n"
]
}
],
"source": [
"# the number of simulated days used for analysis\n",
"wrf_N_days = 4992\n",
"inm_N_days = 3650"
"# calculating the number of simulated days used for the WRF analysis\n",
"# (every third day is taken, starting with 1 Jan 1980;\n",
"# we limit the data to 1980–2020)\n",
"\n",
"wrf_days = pd.date_range(start=\"1980-01-01\", end=\"2021-01-01\", freq=\"3D\")\n",
"wrf_N_days = len(wrf_days[wrf_days.year <= 2020]) # limiting index for WRF days\n",
"print(wrf_N_days)\n",
"\n",
"# calculating the number of simulated days used for the INMCM analysis\n",
"# (every day is taken, starting with 1 Jan 1979;\n",
"# we limit the data to 1980–2020)\n",
"\n",
"inm_start_year = 1\n",
"inm_end_year = 42\n",
"inm_N_days = 365 * (inm_end_year - inm_start_year)\n",
"print(inm_N_days)"
]
},
{
@ -68,9 +90,10 @@ @@ -68,9 +90,10 @@
"metadata": {},
"outputs": [],
"source": [
"# dates corresponding to the indices (0 axis) of the data arrays\n",
"# note: in the case of the WRF the dates correspond to real dates\n",
"# note: in the case of the INMCM the are 10 365-day years\n",
"# dates corresponding to the indices of the data arrays\n",
"# (in the case of the WRF the dates exactly correspond to real dates,\n",
"# in the case of the INMCM there are 41 365-day years)\n",
"\n",
"wrf_dt_indices = np.array(\n",
" [dt.date(1980, 1, 1) + dt.timedelta(i * 3) for i in range(wrf_N_days)]\n",
")\n",
@ -84,7 +107,7 @@ @@ -84,7 +107,7 @@
"id": "5e16ee8e-f3b0-4251-9691-19d7dfd4aff7",
"metadata": {},
"source": [
"### Preprocessing T2m data from the WRF"
"### Preprocessing T2 data from the WRF"
]
},
{
@ -94,22 +117,23 @@ @@ -94,22 +117,23 @@
"metadata": {},
"outputs": [],
"source": [
"# air temperature values (in K) at the height of 2 m with the shape\n",
"# (number of days, number of hours, number of latitudes, number of longitudes)\n",
"# contains temperature values depending on (d, h, lat, lon)\n",
"# `WRF-T2-DAILY.npy` contains WRF-simulated\n",
"# average air temperature values (in °C) at the height of 2 m with the shape\n",
"# (number of days, number of latitudes, number of longitudes);\n",
"# the file contains temperature values depending on (d, lat, lon)\n",
"# d (axis 0) is the number of a day starting with 0 and ending with 5113\n",
"# every third day is taken\n",
"# d = 0 corresponds to 1 Jan 1980\n",
"# d = 5113 corresponds to 30 Dec 2021\n",
"# d = 5386 corresponds to 28 Mar 2024\n",
"# d = 4991 corresponds to 29 Dec 2020\n",
"# (we will restrict our attention to 1980–2020)\n",
"# h (axis 1) is the hour of the day (an integer in [0, 25])\n",
"# the values corresponding to h = 0 and h = 24 are the same\n",
"# (we delete the 25th value)\n",
"# lat (axis 2) describes the latitude (an integer in [0, 179])\n",
"# lon (axis 3) describes the longitude (an integer in [0, 359])\n",
"wrf_T2_data = np.load(f\"{src_path}/WRF-T2-MAP.npy\")[:wrf_N_days, :24]\n",
"wrf_T2_data_DAYxLAT = wrf_T2_data.mean(axis=(1, 3))"
"# lat (axis 3) describes the latitude (an integer in [0, 179]\n",
"# corresponding to 1° wide cells within 90°S–90°N)\n",
"# lon (axis 4) describes the longitude (an integer in [0, 359]\n",
"# corresponding to 1° wide cells across each circle of latitudes)\n",
"\n",
"wrf_T2_data = np.load(f\"{src_path}/WRF-T2-DAILY.npy\")[:wrf_N_days]\n",
"wrf_T2_data_DAYxLAT = wrf_T2_data.mean(axis=-1)"
]
},
{
@ -134,14 +158,290 @@ @@ -134,14 +158,290 @@
" ]\n",
"\n",
" # putting the values for the specific month into the array\n",
" # (also converting the values from K to °C)\n",
" wrf_T2_LATxMON[:, month_idx] = (\n",
" wrf_T2_data_DAYxLAT[wrf_monthly_indices].mean(axis=0) - 273.15\n",
" wrf_T2_data_DAYxLAT[wrf_monthly_indices].mean(axis=0)\n",
" )\n",
"\n",
"np.save(\"./data/WRF/WRF_T2_LATxMON.npy\", wrf_T2_LATxMON)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "9942db7c-6d78-4d5e-94b3-acf483cb562a",
"metadata": {},
"outputs": [],
"source": [
"del wrf_T2_data"
]
},
{
"cell_type": "markdown",
"id": "402dc588-a9ac-4b4f-95fb-bd7f58557643",
"metadata": {},
"source": [
"### Preprocessing the values of CAPE and convective precipitation from the INMCM and WRF"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "28ad673c-9668-4cfc-8503-daf42c0e2339",
"metadata": {},
"outputs": [],
"source": [
"# `WRF-CAPE-00-12-TROP.npy` contains WRF-simulated\n",
"# average max-theta-e CAPE values (in J/kg) in the tropics with the shape\n",
"# (number of simulations per day, number of days, number of hours,\n",
"# number of latitudes, number of longitudes);\n",
"# the file contains CAPE values for the air parcel at the height of the maximum theta-e\n",
"# depending on (s, d, h, lat, lon)\n",
"# s (axis 0) is the number of simulations\n",
"# 0 corresponds to the start of the model at 0 UTC the day before\n",
"# 1 corresponds to the start of the model at 12 UTC the day before\n",
"# d (axis 1) is the number of a day starting with 0 and ending with 5113\n",
"# every third day is taken\n",
"# d = 0 corresponds to 1 Jan 1980\n",
"# d = 5386 corresponds to 28 Mar 2024\n",
"# d = 4991 corresponds to 29 Dec 2020\n",
"# (we will restrict our attention to 1980–2020)\n",
"# h (axis 2) is the hour since 18 hours after the model initiation\n",
"# (an integer in [0, 24])\n",
"# lat (axis 3) describes the latitude (an integer in [0, 59]\n",
"# corresponding to 1° wide cells within 30°S–30°N)\n",
"# lon (axis 4) describes the longitude (an integer in [0, 359]\n",
"# corresponding to 1° wide cells across each circle of latitudes)\n",
"\n",
"wrf_cape_data = np.load(\n",
" f\"{src_path}/WRF-CAPE-00-12-TROP.npy\"\n",
")[:, :wrf_N_days].flatten()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "9eed46eb-b88a-4e0b-a1da-0fa365225196",
"metadata": {},
"outputs": [],
"source": [
"# `INMCM-SCAPE-TROP.npy` contains INMCM-simulated\n",
"# average surface CAPE values (in J/kg) in the tropics with the shape\n",
"# (number of years, number of days in a year, number of hours,\n",
"# number of latitudes, number of longitudes);\n",
"# the file contains CAPE values for the air parcel at the surface\n",
"# depending on (y, d, h, lat, lon)\n",
"# y (axis 0) is the number of a year starting with 0 and ending with 42\n",
"# y = 0 roughly corresponds to 1979\n",
"# y = 42 roughly corresponds to 2021\n",
"# y values in [1, 41] correspond to 1980–2020\n",
"# d (axis 1) is the number of a day (an integer in [0, 364])\n",
"# each model year consists of 365 days\n",
"# h (axis 2) is the hour of the day (an integer in [0, 23])\n",
"# lat (axis 3) describes the latitude (an integer in [0, 39]\n",
"# corresponding to 1.5° wide cells within 30°S–30°N)\n",
"# lon (axis 4) describes the longitude (an integer in [0, 179]\n",
"# corresponding to 2° wide cells across each circle of latitude)\n",
"\n",
"inm_scape_data = np.load(\n",
" f\"{src_path}/INMCM-SCAPE-TROP.npy\"\n",
")[inm_start_year:inm_end_year].flatten()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "5d17f9bd-f86f-4d5b-ac4f-5401d8588ce9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"5391360000 0.0 12336.779\n",
"2585952000 0.0 11888.347\n"
]
}
],
"source": [
"for a in [wrf_cape_data, inm_scape_data]:\n",
" print(len(a), np.amin(a), np.amax(a))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "467a1125-5165-404c-862f-47fec5467922",
"metadata": {},
"outputs": [],
"source": [
"# calculating histogram parameters\n",
"\n",
"wrf_cape_hist = np.histogram(wrf_cape_data,\n",
" bins=np.arange(0, 17001, 10))\n",
"inm_scape_hist = np.histogram(inm_scape_data,\n",
" bins=np.arange(0, 17001, 10))"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "c38a809c-5b40-40e0-b811-4f27c35e5d58",
"metadata": {},
"outputs": [],
"source": [
"# saving the data for plotting histograms in other scripts\n",
"\n",
"np.savez(\n",
" \"./data/WRF/WRF_CAPE_HIST.npz\",\n",
" values=wrf_cape_hist[0], bins=wrf_cape_hist[1]\n",
")\n",
"np.savez(\n",
" \"./data/INMCM/INMCM_SCAPE_HIST.npz\",\n",
" values=inm_scape_hist[0], bins=inm_scape_hist[1]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "3388a36e-cd42-4d51-8d66-4e34e24fa015",
"metadata": {},
"outputs": [],
"source": [
"# `WRF-RAIN-00-12-TROP.npy` contains WRF-simulated\n",
"# average amounts of convective precipitation in the tropics with the shape\n",
"# (number of simulations per day, number of days, number of hours,\n",
"# number of latitudes, number of longitudes);\n",
"# the file contains hourly values depending on (s, d, h, lat, lon)\n",
"# s (axis 0) is the number of simulations\n",
"# 0 corresponds to the start of the model at 0 UTC the day before\n",
"# 1 corresponds to the start of the model at 12 UTC the day before\n",
"# d (axis 1) is the number of a day starting with 0 and ending with 5113\n",
"# every third day is taken\n",
"# d = 0 corresponds to 1 Jan 1980\n",
"# d = 5386 corresponds to 28 Mar 2024\n",
"# d = 4991 corresponds to 29 Dec 2020\n",
"# (we will restrict our attention to 1980–2020)\n",
"# h (axis 2) is the hour since 18 hours after the model initiation\n",
"# (an integer in [0, 24])\n",
"# lat (axis 3) describes the latitude (an integer in [0, 59]\n",
"# corresponding to 1° wide cells within 30°S–30°N)\n",
"# lon (axis 4) describes the longitude (an integer in [0, 359]\n",
"# corresponding to 1° wide cells across each circle of latitudes)\n",
"\n",
"wrf_rain_data = np.load(\n",
" f\"{src_path}/WRF-RAIN-00-12-TROP.npy\"\n",
")[:, :wrf_N_days].flatten()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "2c247909-90ce-43d8-9e07-ae0afc34545a",
"metadata": {},
"outputs": [],
"source": [
"# `INMCM-RAIN-TROP.npy` contains INMCM-simulated\n",
"# average amounts of convective precipitation in the tropics with the shape\n",
"# (number of years, number of days in a year, number of hours,\n",
"# number of latitudes, number of longitudes);\n",
"# the file contains hourly values depending on (y, d, h, lat, lon)\n",
"# y (axis 0) is the number of a year starting with 0 and ending with 42\n",
"# y = 0 roughly corresponds to 1979\n",
"# y = 42 roughly corresponds to 2021\n",
"# y values in [1, 41] correspond to 1980–2020\n",
"# d (axis 1) is the number of a day (an integer in [0, 364])\n",
"# each model year consists of 365 days\n",
"# h (axis 2) is the hour of the day (an integer in [0, 23])\n",
"# lat (axis 3) describes the latitude (an integer in [0, 39]\n",
"# corresponding to 1.5° wide cells within 30°S–30°N)\n",
"# lon (axis 4) describes the longitude (an integer in [0, 179]\n",
"# corresponding to 2° wide cells across each circle of latitude)\n",
"\n",
"inm_rain_data = np.load(\n",
" f\"{src_path}/INMCM-RAIN-TROP.npy\"\n",
")[inm_start_year:inm_end_year].flatten()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "74fa8644-6b49-4000-8b10-880378a10b1a",
"metadata": {},
"outputs": [],
"source": [
"# retaining only the cells actually contributing to the IP\n",
"\n",
"wrf_cape_rain_data = wrf_cape_data[wrf_rain_data > 0]\n",
"inm_scape_rain_data = inm_scape_data[inm_rain_data > 0]"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "340da2f8-f285-451b-b6be-86823dbc1d1d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"899773291 0.0 7764.9863\n",
"919183611 0.0 11888.347\n"
]
}
],
"source": [
"for a in [wrf_cape_rain_data, inm_scape_rain_data]:\n",
" print(len(a), np.amin(a), np.amax(a))"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "02ae9453-3af6-4f0c-9269-d2ffd2b8118c",
"metadata": {},
"outputs": [],
"source": [
"# calculating histogram parameters\n",
"# (only the cells contributing to the IP are taken into account)\n",
"\n",
"wrf_cape_hist = np.histogram(wrf_cape_rain_data,\n",
" bins=np.arange(0, 17001, 10))\n",
"inm_scape_hist = np.histogram(inm_scape_rain_data,\n",
" bins=np.arange(0, 17001, 10))"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "95908fbf-4985-4ef5-9066-ba3d094ae4f8",
"metadata": {},
"outputs": [],
"source": [
"# saving the data for plotting histograms in other scripts\n",
"\n",
"np.savez(\n",
" \"./data/WRF/WRF_CAPE_RAIN_HIST.npz\",\n",
" values=wrf_cape_hist[0], bins=wrf_cape_hist[1]\n",
")\n",
"np.savez(\n",
" \"./data/INMCM/INMCM_SCAPE_RAIN_HIST.npz\",\n",
" values=inm_scape_hist[0], bins=inm_scape_hist[1]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "ae9bccd6-b5f4-4f3a-8ccc-6134292fe963",
"metadata": {},
"outputs": [],
"source": [
"del wrf_cape_data, inm_scape_data\n",
"del wrf_rain_data, inm_rain_data"
]
},
{
"cell_type": "markdown",
"id": "46d4f093-a420-42c7-b885-a8409d9d8ee4",
@ -152,7 +452,7 @@ @@ -152,7 +452,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 20,
"id": "052374df-a505-420a-aa69-2902ce5fc23b",
"metadata": {},
"outputs": [],
@ -161,44 +461,49 @@ @@ -161,44 +461,49 @@
"# dictionary keys represent CAPE threshold values\n",
"\n",
"# dictionaries to store diurnal average IP values summed over longitudes\n",
"# the dimensions are (4992, 180) for the WRF and (3650, 120) for the INMCM\n",
"# the dimensions are (4992, 180) for the WRF and (365×41, 120) for the INMCM\n",
"wrf_daily_lat_ip = {}\n",
"inm_daily_lat_ip = {}\n",
"\n",
"# dictionaries to store hourly IP values summed over longitudes and latitudes\n",
"# the dimensions are (4992, 24) for the WRF and (3650, 24) for the INMCM\n",
"# the dimensions are (4992, 24) for the WRF and (365×41, 24) for the INMCM\n",
"wrf_hourly_total_ip = {}\n",
"inm_hourly_total_ip = {}"
]
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 21,
"id": "d8e43c4f-59af-483c-8979-535c696abb4e",
"metadata": {},
"outputs": [],
"source": [
"# iterating over CAPE threshold values (in J/kg) used in modeling \n",
"# iterating over CAPE threshold values (in J/kg) used in modelling \n",
"# for each threshold, there are corresponding model data sets\n",
"for cape_thres in [800, 1000, 1200]:\n",
" # grid cell contributions to the IP (not normalised) with the shape\n",
"\n",
"for cape_thres in [600, 800, 1000, 1200]:\n",
" # `WRF-IP-CAPE-{cape_thres}.npy` contains WRF-simulated\n",
" # grid cell contributions to the IP with CAPE threshold = `cape_thres` J/kg\n",
" # (not normalised) with the shape\n",
" # (number of days, number of hours,\n",
" # number of latitudes, number of longitudes)\n",
" # simulated using the WRF with CAPE threshold = `cape_thres` J/kg\n",
" # contains values of contributions to the IP depending on (d, h, lat, lon)\n",
" # number of latitudes, number of longitudes);\n",
" # the file contains hourly values depending on (d, h, lat, lon)\n",
" # d (axis 0) is the number of a day starting with 0 and ending with 5113\n",
" # every third day is taken\n",
" # d = 0 corresponds to 1 Jan 1980\n",
" # d = 5113 corresponds to 30 Dec 2021\n",
" # d = 5386 corresponds to 28 Mar 2024\n",
" # d = 4991 corresponds to 29 Dec 2020\n",
" # (we will restrict our attention to 1980–2020)\n",
" # h (axis 1) is the hour of the day (an integer in [0, 24])\n",
" # the values corresponding to h = 0 and h = 24 are the same\n",
" # (we delete the 25th value)\n",
" # lat (axis 2) describes the latitude (an integer in [0, 179])\n",
" # lon (axis 3) describes the longitude (an integer in [0, 359])\n",
" # lat (axis 2) describes the latitude (an integer in [0, 179]\n",
" # corresponding to 1° wide cells within 90°S–90°N)\n",
" # lon (axis 3) describes the longitude (an integer in [0, 359]\n",
" # corresponding to 1° wide cells across each circle of latitudes)\n",
"\n",
" wrf_raw_ip_data = np.load(\n",
" f\"{src_path}/WRF-IP-MAP-{cape_thres}.npy\"\n",
" f\"{src_path}/WRF-IP-CAPE-{cape_thres}.npy\"\n",
" )[:wrf_N_days, :24]\n",
"\n",
" # normalising contributions to the IP to the global mean of 240 kV\n",
@ -211,21 +516,43 @@ @@ -211,21 +516,43 @@
" np.save(\n",
" f\"./data/WRF/WRF_HOURLY_TOTAL_IP_{cape_thres}.npy\",\n",
" wrf_hourly_total_ip[cape_thres]\n",
" )\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "f8501fdb-7414-4ad7-a5d2-c361bef14297",
"metadata": {},
"outputs": [],
"source": [
"# iterating over CAPE threshold values (in J/kg) used in modelling \n",
"# for each threshold, there are corresponding model data sets\n",
"\n",
"for cape_thres in [600, 800, 1000, 1200]:\n",
" # `INMCM-IP-CAPE-{cape_thres}.npy` contains INMCM-simulated\n",
" # grid cell contributions to the IP with CAPE threshold = `cape_thres` J/kg\n",
" # (not normalised) with the shape\n",
" # (number of years, number of days in a year, number of hours,\n",
" # number of latitudes, number of longitudes);\n",
" # the file contains hourly values depending on (y, d, h, lat, lon)\n",
" # y (axis 0) is the number of a year starting with 0 and ending with 42\n",
" # y = 0 roughly corresponds to 1979\n",
" # y = 42 roughly corresponds to 2021\n",
" # y values in [1, 41] correspond to 1980–2020\n",
" # d (axis 1) is the number of a day (an integer in [0, 364])\n",
" # each model year consists of 365 days\n",
" # h (axis 2) is the hour of the day (an integer in [0, 23])\n",
" # lat (axis 3) describes the latitude (an integer in [0, 39]\n",
" # corresponding to 1.5° wide cells within 30°S–30°N)\n",
" # lon (axis 4) describes the longitude (an integer in [0, 179]\n",
" # corresponding to 2° wide cells across each circle of latitude)\n",
"\n",
" # grid cell contributions to the IP (not normalised) reshaped to\n",
" # (number of days, number of hours,\n",
" # number of latitudes, number of longitudes)\n",
" # simulated using the INMCM with CAPE threshold = `cape_thres` J/kg\n",
" # contains values of contributions to the IP depending on (d, h, lat, lon)\n",
" # d (axis 0) is the number of a day\n",
" # (10 consecutive 365-day years have been simulated)\n",
" # h (axis 1) is the hour of the day (an integer in [0, 23])\n",
" # lat (axis 2) describes the latitude (an integer in [0, 179])\n",
" # lon (axis 3) describes the longitude (an integer in [0, 359])\n",
" inm_raw_ip_data = np.load(\n",
" f\"{src_path}/INMCM-IP-MAP-{cape_thres}.npy\"\n",
" ).reshape((inm_N_days, 24, 120, 180))\n",
" f\"{src_path}/INMCM-IP-CAPE-{cape_thres}.npy\"\n",
" )[inm_start_year:inm_end_year].reshape(\n",
" (inm_N_days, 24, 120, 180)\n",
" )\n",
"\n",
" # normalising contributions to the IP to the global mean of 240 kV\n",
" inm_raw_ip_data /= (1/240e3) * inm_raw_ip_data.sum(axis=(-2,-1)).mean()\n",
@ -242,15 +569,15 @@ @@ -242,15 +569,15 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 23,
"id": "eb28cbc7-eb0a-49be-8cc1-734bba1d06f5",
"metadata": {},
"outputs": [],
"source": [
"# iterating over CAPE threshold values (in J/kg) used in modeling \n",
"# iterating over CAPE threshold values (in J/kg) used in modelling \n",
"# for each threshold, there are corresponding model data sets\n",
"for cape_thres in [800, 1000, 1200]:\n",
"\n",
"for cape_thres in [600, 800, 1000, 1200]:\n",
" # initialising arrays to store monthly averaged values\n",
" # for different latitudes\n",
" wrf_data_LATxMON = np.zeros((180, 12))\n",
@ -280,6 +607,16 @@ @@ -280,6 +607,16 @@
" )"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "0bfbc02a-8d81-43a2-b60d-c190c6d78d13",
"metadata": {},
"outputs": [],
"source": [
"del wrf_raw_ip_data, inm_raw_ip_data"
]
},
{
"cell_type": "markdown",
"id": "91bc6d7a-393c-4078-9a6d-1955393d55f5",
@ -290,29 +627,33 @@ @@ -290,29 +627,33 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 25,
"id": "5bc66a8f-aa8f-4681-91a9-60c9fbdbf8f2",
"metadata": {},
"outputs": [],
"source": [
"# grid cell contributions to the IP (not normalised) with the shape\n",
"# (number of days, number of hours, number of latitudes, number of longitudes)\n",
"# simulated using the WRF with CAPE threshold = 500 J/kg\n",
"# and temperature threshold = 25 °C\n",
"# contains values of contributions to the IP depending on (d, h, lat, lon)\n",
"# `WRF-IP-CAPE-500-T2-LIN-25.npy` contains WRF-simulated\n",
"# grid cell contributions to the IP with CAPE threshold = 500 J/kg\n",
"# and temperature threshold = 25 °C (not normalised) with the shape\n",
"# (number of days, number of hours,\n",
"# number of latitudes, number of longitudes);\n",
"# the file contains hourly values depending on (d, h, lat, lon)\n",
"# d (axis 0) is the number of a day starting with 0 and ending with 5113\n",
"# every third day is taken\n",
"# d = 0 corresponds to 1 Jan 1980\n",
"# d = 5113 corresponds to 30 Dec 2021\n",
"# d = 5386 corresponds to 28 Mar 2024\n",
"# d = 4991 corresponds to 29 Dec 2020\n",
"# (we will restrict our attention to 1980–2020)\n",
"# h (axis 1) is the hour of the day (an integer in [0, 24])\n",
"# the values corresponding to h = 0 and h = 24 are the same\n",
"# (we delete the 25th value)\n",
"# lat (axis 2) describes the latitude (an integer in [0, 179])\n",
"# lon (axis 3) describes the longitude (an integer in [0, 359])\n",
"# lat (axis 2) describes the latitude (an integer in [0, 179]\n",
"# corresponding to 1° wide cells within 90°S–90°N)\n",
"# lon (axis 3) describes the longitude (an integer in [0, 359]\n",
"# corresponding to 1° wide cells across each circle of latitudes)\n",
"\n",
"wrf_raw_ip_data = np.load(\n",
" f\"{src_path}/WRF-IP-MAP-500-T2-25.npy\"\n",
" f\"{src_path}/WRF-IP-CAPE-500-T2-LIN-25.npy\"\n",
")[:wrf_N_days, :24]\n",
"\n",
"# normalising contributions to the IP to the global mean of 240 kV\n",
@ -330,7 +671,7 @@ @@ -330,7 +671,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 26,
"id": "17036c19-95f8-40df-a6c9-f8a23cf426f6",
"metadata": {},
"outputs": [],
@ -352,6 +693,16 @@ @@ -352,6 +693,16 @@
"np.save(\"./data/WRF/WRF_IP_500_T2_25_LATxMON.npy\", wrf_data_LATxMON)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "a9f4e443-31bd-4a82-ae8a-b447a9d0f2cb",
"metadata": {},
"outputs": [],
"source": [
"del wrf_raw_ip_data"
]
},
{
"cell_type": "markdown",
"id": "e24297fc-cf81-4ea7-9a80-cdcaf277474a",
@ -362,7 +713,7 @@ @@ -362,7 +713,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 28,
"id": "894ad630-17a5-4744-907e-a07768ff7848",
"metadata": {},
"outputs": [],

78
1_earlier_measurements_images.ipynb

@ -47,6 +47,52 @@ @@ -47,6 +47,52 @@
"month_name = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "fd2f56d8-e5e3-46fd-ba85-ff60678c1767",
"metadata": {},
"outputs": [],
"source": [
"# a helper function to show the peak-to-peak amplitude\n",
"def draw_arrows(ax=None, miny=0, maxy=1, exty=1,\n",
" arrow_pos=12, text_pos=12.2, ampl=0, inward=False):\n",
" arrow_props = {\n",
" \"patchA\": None, \"patchB\": None,\n",
" \"shrinkA\": 0.0, \"shrinkB\": 0.0,\n",
" \"connectionstyle\": \"arc3,rad=0.\", \"fc\": \"black\",\n",
" \"linewidth\": 0.5\n",
" }\n",
" coords = {\n",
" \"xycoords\": \"data\",\n",
" \"textcoords\": \"data\",\n",
" \"annotation_clip\": False\n",
" }\n",
"\n",
" if inward:\n",
" ax.annotate(\"\", xy=(arrow_pos, miny), xytext=(arrow_pos, maxy),\n",
" arrowprops={\"arrowstyle\": \"-\", **arrow_props}, **coords)\n",
" \n",
" for y, yt in zip([maxy + exty, miny - exty], [maxy, miny]):\n",
" ax.annotate(\"\", xy=(arrow_pos, y), xytext=(arrow_pos, yt),\n",
" arrowprops={\n",
" \"arrowstyle\": \"<|-,head_length=0.8,head_width=0.3\",\n",
" **arrow_props\n",
" }, **coords)\n",
" else:\n",
" ax.annotate(\"\", xy=(arrow_pos, miny), xytext=(arrow_pos, maxy),\n",
" arrowprops={\n",
" \"arrowstyle\": \"<|-|>,head_length=0.8,head_width=0.3\",\n",
" **arrow_props\n",
" }, **coords)\n",
"\n",
" ax.text(\n",
" text_pos, (miny + maxy) / 2,\n",
" f\"{ampl * 100:.0f}%\",\n",
" fontsize=\"large\", ha=\"left\", va=\"center\", rotation=270\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "4fac1ed4-536f-4e57-9ea5-820eeb0449e2",
@ -57,7 +103,7 @@ @@ -57,7 +103,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "47ac4d85-be01-4961-b983-6d3b5eecaaf6",
"metadata": {},
"outputs": [],
@ -74,7 +120,7 @@ @@ -74,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "1fe2e924-d64d-4db7-9d79-8f42c3cd06a9",
"metadata": {},
"outputs": [],
@ -92,7 +138,7 @@ @@ -92,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "1873f063-f3ad-45ef-b460-310377aba194",
"metadata": {},
"outputs": [],
@ -110,7 +156,7 @@ @@ -110,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "6583858f-a9ad-4185-833d-a2571a88c78d",
"metadata": {},
"outputs": [],
@ -128,7 +174,7 @@ @@ -128,7 +174,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"id": "8c2fb7aa-510d-4169-9894-9b6d56958ee4",
"metadata": {},
"outputs": [],
@ -146,7 +192,7 @@ @@ -146,7 +192,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "e17b9fcc-b96b-46f0-a268-8e4188f92a8a",
"metadata": {},
"outputs": [],
@ -172,7 +218,7 @@ @@ -172,7 +218,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"id": "ecc36887-ab8c-4dae-b3cb-da81c7da33d8",
"metadata": {},
"outputs": [
@ -267,19 +313,13 @@ @@ -267,19 +313,13 @@
" fontsize=\"large\", ha=\"center\", va=\"top\",\n",
" transform=ax[n].transAxes)\n",
"\n",
" ax[n].annotate(\"\", xy=(12, np.min(data[n])), xycoords=\"data\",\n",
" xytext=(12, np.max(data[n])), textcoords=\"data\",\n",
" annotation_clip=False,\n",
" arrowprops=dict(\n",
" arrowstyle=\"<|-|>,head_length=0.8,head_width=0.3\",\n",
" patchA=None, patchB=None, shrinkA=0., shrinkB=0.,\n",
" connectionstyle=\"arc3,rad=0.\", fc=\"black\",\n",
" linewidth=0.5\n",
" ))\n",
" ampl = (np.max(data[n]) - np.min(data[n])) / np.mean(data[n])\n",
" ax[n].text(12.2, (np.min(data[n]) + np.max(data[n])) / 2,\n",
" f\"{ampl * 100:.0f}%\",\n",
" fontsize=\"large\", ha=\"left\", va=\"center\", rotation=270)\n",
" draw_arrows(ax=ax[n],\n",
" miny=np.min(data[n]),\n",
" maxy=np.max(data[n]),\n",
" arrow_pos=12,\n",
" text_pos=12.2,\n",
" ampl=ampl)\n",
"\n",
"fig.align_ylabels([ax[0], ax[2], ax[4]])\n",
"fig.align_ylabels([ax[1], ax[3], ax[5]])\n",

612
2_Vostok_measurements_images.ipynb

File diff suppressed because it is too large Load Diff

377
3_CAPE_T2_images.ipynb

File diff suppressed because one or more lines are too long

194
3_WRF_T2_images.ipynb

File diff suppressed because one or more lines are too long

663
4_IP_simulations_temporal_images.ipynb

File diff suppressed because one or more lines are too long

352
5_IP_simulations_spatial_images.ipynb

File diff suppressed because one or more lines are too long

BIN
data/INMCM/INMCM_HOURLY_TOTAL_IP_1000.npy

Binary file not shown.

BIN
data/INMCM/INMCM_HOURLY_TOTAL_IP_1200.npy

Binary file not shown.

BIN
data/INMCM/INMCM_HOURLY_TOTAL_IP_600.npy

Binary file not shown.

BIN
data/INMCM/INMCM_HOURLY_TOTAL_IP_800.npy

Binary file not shown.

BIN
data/INMCM/INMCM_IP_1000_LATxMON.npy

Binary file not shown.

BIN
data/INMCM/INMCM_IP_1200_LATxMON.npy

Binary file not shown.

BIN
data/INMCM/INMCM_IP_600_LATxMON.npy

Binary file not shown.

BIN
data/INMCM/INMCM_IP_800_LATxMON.npy

Binary file not shown.

BIN
data/INMCM/INMCM_NUMDAYS_MON.npy

Binary file not shown.

BIN
data/INMCM/INMCM_SCAPE_HIST.npz

Binary file not shown.

BIN
data/INMCM/INMCM_SCAPE_RAIN_HIST.npz

Binary file not shown.

BIN
data/Vostok/vostok_2006_2020_results_adjusted.npz

Binary file not shown.

23434
data/Vostok/vostok_daily_pressure_mm_hg_6h.csv

File diff suppressed because it is too large Load Diff

23434
data/Vostok/vostok_daily_temp_6h.csv

File diff suppressed because it is too large Load Diff

23434
data/Vostok/vostok_daily_wind_6h.csv

File diff suppressed because it is too large Load Diff

BIN
data/Vostok/vostok_diurnal_2006_2020_adjusted.npy

Binary file not shown.

BIN
data/WRF/WRF_CAPE_HIST.npz

Binary file not shown.

BIN
data/WRF/WRF_CAPE_RAIN_HIST.npz

Binary file not shown.

BIN
data/WRF/WRF_HOURLY_TOTAL_IP_1000.npy

Binary file not shown.

BIN
data/WRF/WRF_HOURLY_TOTAL_IP_1200.npy

Binary file not shown.

BIN
data/WRF/WRF_HOURLY_TOTAL_IP_500_T2_25.npy

Binary file not shown.

BIN
data/WRF/WRF_HOURLY_TOTAL_IP_600.npy

Binary file not shown.

BIN
data/WRF/WRF_HOURLY_TOTAL_IP_800.npy

Binary file not shown.

BIN
data/WRF/WRF_IP_1000_LATxMON.npy

Binary file not shown.

BIN
data/WRF/WRF_IP_1200_LATxMON.npy

Binary file not shown.

BIN
data/WRF/WRF_IP_500_T2_25_LATxMON.npy

Binary file not shown.

BIN
data/WRF/WRF_IP_600_LATxMON.npy

Binary file not shown.

BIN
data/WRF/WRF_IP_800_LATxMON.npy

Binary file not shown.

BIN
data/WRF/WRF_T2_LATxMON.npy

Binary file not shown.

2916
figures/cape.eps

File diff suppressed because it is too large Load Diff

2
figures/earlier_measurements.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: earlier_measurements.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Mon Dec 16 16:46:44 2024
%%CreationDate: Mon Feb 10 00:33:46 2025
%%Orientation: portrait
%%BoundingBox: -26 85 639 707
%%HiResBoundingBox: -26.911364 85.384063 638.911364 706.615937

8009
figures/ip_decomposed.eps

File diff suppressed because it is too large Load Diff

3796
figures/ip_pg_partial.eps → figures/ip_partial.eps

File diff suppressed because it is too large Load Diff

4845
figures/ip_pg_diurnal.eps

File diff suppressed because it is too large Load Diff

4956
figures/ip_pg_total.eps

File diff suppressed because it is too large Load Diff

4288
figures/ip_separate.eps

File diff suppressed because it is too large Load Diff

3064
figures/new_parameterisation.eps

File diff suppressed because it is too large Load Diff

2
figures/pg_3_years.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_3_years.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:22 2024
%%CreationDate: Mon Feb 10 00:34:39 2025
%%Orientation: portrait
%%BoundingBox: -26 85 639 707
%%HiResBoundingBox: -26.911364 85.384063 638.911364 706.615937

2
figures/pg_corrected.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_corrected.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:28 2024
%%CreationDate: Mon Feb 10 00:34:44 2025
%%Orientation: portrait
%%BoundingBox: -26 78 639 714
%%HiResBoundingBox: -26.911364 78.601092 638.911364 713.398908

2
figures/pg_diurnal_seasonal.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_diurnal_seasonal.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:24 2024
%%CreationDate: Mon Feb 10 00:34:40 2025
%%Orientation: portrait
%%BoundingBox: -31 17 644 775
%%HiResBoundingBox: -31.249212 17.344063 643.249212 774.655937

2
figures/pg_earlier.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_earlier.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:29 2024
%%CreationDate: Mon Feb 10 00:34:45 2025
%%Orientation: portrait
%%BoundingBox: 121 289 491 503
%%HiResBoundingBox: 121.020584 289.309783 490.979416 502.690217

2
figures/pg_individual.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_individual.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:19 2024
%%CreationDate: Mon Feb 10 00:34:36 2025
%%Orientation: portrait
%%BoundingBox: -15 -16 628 809
%%HiResBoundingBox: -15.075000 -16.555937 627.075000 808.555938

4323
figures/pg_partial_corrected.eps

File diff suppressed because it is too large Load Diff

2
figures/pg_total_partial.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: pg_total_partial.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Sun Dec 29 12:47:17 2024
%%CreationDate: Mon Feb 10 00:34:34 2025
%%Orientation: portrait
%%BoundingBox: -26 188 639 604
%%HiResBoundingBox: -26.911364 188.344063 638.911364 603.655937

194
figures/t2.eps

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Title: t2.eps
%%Creator: Matplotlib v3.7.4, https://matplotlib.org/
%%CreationDate: Mon Dec 16 18:25:29 2024
%%CreationDate: Mon Feb 10 00:35:50 2025
%%Orientation: portrait
%%BoundingBox: -10 188 623 604
%%HiResBoundingBox: -10.092857 188.344063 622.092857 603.655937
@ -1029,8 +1029,8 @@ gsave @@ -1029,8 +1029,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
68.978571 -682.555 m
84.921429 -682.555 l
84.921429 329.122973 l
68.978571 329.122973 l
84.921429 329.123225 l
68.978571 329.123225 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1039,8 +1039,8 @@ gsave @@ -1039,8 +1039,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
88.907143 -682.555 m
104.85 -682.555 l
104.85 341.414545 l
88.907143 341.414545 l
104.85 341.414768 l
88.907143 341.414768 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1049,8 +1049,8 @@ gsave @@ -1049,8 +1049,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
108.835714 -682.555 m
124.778571 -682.555 l
124.778571 359.254026 l
108.835714 359.254026 l
124.778571 359.254347 l
108.835714 359.254347 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1059,8 +1059,8 @@ gsave @@ -1059,8 +1059,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
128.764286 -682.555 m
144.707143 -682.555 l
144.707143 371.147111 l
128.764286 371.147111 l
144.707143 371.147378 l
128.764286 371.147378 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1069,8 +1069,8 @@ gsave @@ -1069,8 +1069,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
148.692857 -682.555 m
164.635714 -682.555 l
164.635714 365.873819 l
148.692857 365.873819 l
164.635714 365.874092 l
148.692857 365.874092 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1079,8 +1079,8 @@ gsave @@ -1079,8 +1079,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
168.621429 -682.555 m
184.564286 -682.555 l
184.564286 344.716904 l
168.621429 344.716904 l
184.564286 344.717144 l
168.621429 344.717144 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1089,8 +1089,8 @@ gsave @@ -1089,8 +1089,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
188.55 -682.555 m
204.492857 -682.555 l
204.492857 325.026824 l
188.55 325.026824 l
204.492857 325.027006 l
188.55 325.027006 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1099,8 +1099,8 @@ gsave @@ -1099,8 +1099,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
208.478571 -682.555 m
224.421429 -682.555 l
224.421429 323.126735 l
208.478571 323.126735 l
224.421429 323.127049 l
208.478571 323.127049 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1109,8 +1109,8 @@ gsave @@ -1109,8 +1109,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
228.407143 -682.555 m
244.35 -682.555 l
244.35 332.345513 l
228.407143 332.345513 l
244.35 332.34574 l
228.407143 332.34574 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1119,8 +1119,8 @@ gsave @@ -1119,8 +1119,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
248.335714 -682.555 m
264.278571 -682.555 l
264.278571 339.999321 l
248.335714 339.999321 l
264.278571 339.999646 l
248.335714 339.999646 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1129,8 +1129,8 @@ gsave @@ -1129,8 +1129,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
268.264286 -682.555 m
284.207143 -682.555 l
284.207143 339.006321 l
268.264286 339.006321 l
284.207143 339.006637 l
268.264286 339.006637 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1139,8 +1139,8 @@ gsave @@ -1139,8 +1139,8 @@ gsave
239.143 158.4 66.986 228.245 clipbox
288.192857 -682.555 m
304.135714 -682.555 l
304.135714 331.551008 l
288.192857 331.551008 l
304.135714 331.551232 l
288.192857 331.551232 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1541,8 +1541,8 @@ gsave @@ -1541,8 +1541,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
387.835714 -642.955 m
403.778571 -642.955 l
403.778571 309.884835 l
387.835714 309.884835 l
403.778571 309.885082 l
387.835714 309.885082 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1551,8 +1551,8 @@ gsave @@ -1551,8 +1551,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
407.764286 -642.955 m
423.707143 -642.955 l
423.707143 324.11343 l
407.764286 324.11343 l
423.707143 324.113645 l
407.764286 324.113645 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1561,8 +1561,8 @@ gsave @@ -1561,8 +1561,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
427.692857 -642.955 m
443.635714 -642.955 l
443.635714 343.93066 l
427.692857 343.93066 l
443.635714 343.93095 l
427.692857 343.93095 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1571,8 +1571,8 @@ gsave @@ -1571,8 +1571,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
447.621429 -642.955 m
463.564286 -642.955 l
463.564286 357.363273 l
447.621429 357.363273 l
463.564286 357.363554 l
447.621429 357.363554 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1581,8 +1581,8 @@ gsave @@ -1581,8 +1581,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
467.55 -642.955 m
483.492857 -642.955 l
483.492857 355.291231 l
467.55 355.291231 l
483.492857 355.291495 l
467.55 355.291495 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1591,8 +1591,8 @@ gsave @@ -1591,8 +1591,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
487.478571 -642.955 m
503.421429 -642.955 l
503.421429 341.316951 l
487.478571 341.316951 l
503.421429 341.31717 l
487.478571 341.31717 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1601,8 +1601,8 @@ gsave @@ -1601,8 +1601,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
507.407143 -642.955 m
523.35 -642.955 l
523.35 326.797018 l
507.407143 326.797018 l
523.35 326.79723 l
507.407143 326.79723 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1611,8 +1611,8 @@ gsave @@ -1611,8 +1611,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
527.335714 -642.955 m
543.278571 -642.955 l
543.278571 327.368275 l
527.335714 327.368275 l
543.278571 327.368604 l
527.335714 327.368604 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1621,8 +1621,8 @@ gsave @@ -1621,8 +1621,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
547.264286 -642.955 m
563.207143 -642.955 l
563.207143 334.34782 l
547.264286 334.34782 l
563.207143 334.348053 l
547.264286 334.348053 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1631,8 +1631,8 @@ gsave @@ -1631,8 +1631,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
567.192857 -642.955 m
583.135714 -642.955 l
583.135714 334.547066 l
567.192857 334.547066 l
583.135714 334.547385 l
567.192857 334.547385 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1641,8 +1641,8 @@ gsave @@ -1641,8 +1641,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
587.121429 -642.955 m
603.064286 -642.955 l
603.064286 324.129486 l
587.121429 324.129486 l
603.064286 324.129778 l
587.121429 324.129778 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -1651,8 +1651,8 @@ gsave @@ -1651,8 +1651,8 @@ gsave
239.143 158.4 385.843 228.245 clipbox
607.05 -642.955 m
622.992857 -642.955 l
622.992857 311.889869 l
607.05 311.889869 l
622.992857 311.890073 l
607.05 311.890073 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2049,8 +2049,8 @@ gsave @@ -2049,8 +2049,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
68.978571 -769.675 m
84.921429 -769.675 l
84.921429 91.18298 l
68.978571 91.18298 l
84.921429 91.18323 l
68.978571 91.18323 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2059,8 +2059,8 @@ gsave @@ -2059,8 +2059,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
88.907143 -769.675 m
104.85 -769.675 l
104.85 106.830727 l
88.907143 106.830727 l
104.85 106.830951 l
88.907143 106.830951 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2069,8 +2069,8 @@ gsave @@ -2069,8 +2069,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
108.835714 -769.675 m
124.778571 -769.675 l
124.778571 128.821035 l
108.835714 128.821035 l
124.778571 128.821297 l
108.835714 128.821297 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2079,8 +2079,8 @@ gsave @@ -2079,8 +2079,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
128.764286 -769.675 m
144.707143 -769.675 l
144.707143 146.029573 l
128.764286 146.029573 l
144.707143 146.029858 l
128.764286 146.029858 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2089,8 +2089,8 @@ gsave @@ -2089,8 +2089,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
148.692857 -769.675 m
164.635714 -769.675 l
164.635714 152.002894 l
148.692857 152.002894 l
164.635714 152.00315 l
148.692857 152.00315 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2099,8 +2099,8 @@ gsave @@ -2099,8 +2099,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
168.621429 -769.675 m
184.564286 -769.675 l
184.564286 149.743772 l
168.621429 149.743772 l
184.564286 149.743994 l
168.621429 149.743994 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2109,8 +2109,8 @@ gsave @@ -2109,8 +2109,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
188.55 -769.675 m
204.492857 -769.675 l
204.492857 145.393914 l
188.55 145.393914 l
204.492857 145.394133 l
188.55 145.394133 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2119,8 +2119,8 @@ gsave @@ -2119,8 +2119,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
208.478571 -769.675 m
224.421429 -769.675 l
224.421429 146.919594 l
208.478571 146.919594 l
224.421429 146.919898 l
208.478571 146.919898 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2129,8 +2129,8 @@ gsave @@ -2129,8 +2129,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
228.407143 -769.675 m
244.35 -769.675 l
244.35 144.236662 l
228.407143 144.236662 l
244.35 144.236911 l
228.407143 144.236911 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2139,8 +2139,8 @@ gsave @@ -2139,8 +2139,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
248.335714 -769.675 m
264.278571 -769.675 l
264.278571 130.840034 l
248.335714 130.840034 l
264.278571 130.840328 l
248.335714 130.840328 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2149,8 +2149,8 @@ gsave @@ -2149,8 +2149,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
268.264286 -769.675 m
284.207143 -769.675 l
284.207143 109.81832 l
268.264286 109.81832 l
284.207143 109.818606 l
268.264286 109.818606 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2159,8 +2159,8 @@ gsave @@ -2159,8 +2159,8 @@ gsave
239.143 158.4 66.986 22.325 clipbox
288.192857 -769.675 m
304.135714 -769.675 l
304.135714 93.140158 l
288.192857 93.140158 l
304.135714 93.140369 l
288.192857 93.140369 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2557,8 +2557,8 @@ gsave @@ -2557,8 +2557,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
387.835714 -690.475 m
403.778571 -690.475 l
403.778571 63.449554 l
387.835714 63.449554 l
403.778571 63.4498 l
387.835714 63.4498 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2567,8 +2567,8 @@ gsave @@ -2567,8 +2567,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
407.764286 -690.475 m
423.707143 -690.475 l
423.707143 80.013713 l
407.764286 80.013713 l
423.707143 80.013943 l
407.764286 80.013943 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2577,8 +2577,8 @@ gsave @@ -2577,8 +2577,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
427.692857 -690.475 m
443.635714 -690.475 l
443.635714 107.98205 l
427.692857 107.98205 l
443.635714 107.982309 l
427.692857 107.982309 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2587,8 +2587,8 @@ gsave @@ -2587,8 +2587,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
447.621429 -690.475 m
463.564286 -690.475 l
463.564286 134.151126 l
447.621429 134.151126 l
463.564286 134.151403 l
447.621429 134.151403 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2597,8 +2597,8 @@ gsave @@ -2597,8 +2597,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
467.55 -690.475 m
483.492857 -690.475 l
483.492857 149.730336 l
467.55 149.730336 l
483.492857 149.730593 l
467.55 149.730593 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2607,8 +2607,8 @@ gsave @@ -2607,8 +2607,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
487.478571 -690.475 m
503.421429 -690.475 l
503.421429 157.404259 l
487.478571 157.404259 l
503.421429 157.404481 l
487.478571 157.404481 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2617,8 +2617,8 @@ gsave @@ -2617,8 +2617,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
507.407143 -690.475 m
523.35 -690.475 l
523.35 160.937884 l
507.407143 160.937884 l
523.35 160.938107 l
507.407143 160.938107 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2627,8 +2627,8 @@ gsave @@ -2627,8 +2627,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
527.335714 -690.475 m
543.278571 -690.475 l
543.278571 161.963816 l
527.335714 161.963816 l
543.278571 161.964115 l
527.335714 161.964115 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2637,8 +2637,8 @@ gsave @@ -2637,8 +2637,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
547.264286 -690.475 m
563.207143 -690.475 l
563.207143 149.206822 l
547.264286 149.206822 l
563.207143 149.207073 l
547.264286 149.207073 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2647,8 +2647,8 @@ gsave @@ -2647,8 +2647,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
567.192857 -690.475 m
583.135714 -690.475 l
583.135714 123.16984 l
567.192857 123.16984 l
583.135714 123.170124 l
567.192857 123.170124 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2657,8 +2657,8 @@ gsave @@ -2657,8 +2657,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
587.121429 -690.475 m
603.064286 -690.475 l
603.064286 91.065342 l
587.121429 91.065342 l
603.064286 91.065621 l
587.121429 91.065621 l
cl
0.698 0.133 0.133 setrgbcolor
fill
@ -2667,8 +2667,8 @@ gsave @@ -2667,8 +2667,8 @@ gsave
239.143 158.4 385.843 22.325 clipbox
607.05 -690.475 m
622.992857 -690.475 l
622.992857 67.518947 l
607.05 67.518947 l
622.992857 67.519166 l
607.05 67.519166 l
cl
0.698 0.133 0.133 setrgbcolor
fill

91
readme.md

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
## The seasonal variation of the DC global electric circuit
# The seasonal variation of the DC global electric circuit
In this repository you can find the measurement and modelling data, the research code, and a comprehensive description of the code developed for our two papers on atmospheric electricity:
First paper (**Part 1: A new analysis based on long-term measurements in Antarctica**) focuses on the seasonal variation of the global electric circuit (GEC) based on electric field measurements at the Vostok station in Antarctica during 2006–2020. The key findings include:
@ -15,21 +15,21 @@ Second paper (**Part 2: Further analysis based on simulations**) further analyse @@ -15,21 +15,21 @@ Second paper (**Part 2: Further analysis based on simulations**) further analyse
> **_Note:_** As soon as the articles are published, we will add links to them here.
## Short Description of the Scripts
## A Short Description of the Scripts
> **_Note:_** We use some data sets containing ionospheric potential values simulated via climate and weather forecasting models. Since these raw data sets are very large (around 350 Gb), we only upload preprocessed lower-dimensional data sets (around 20 Mb) to the repository. This preprocessing can be reproduced using the script `0_prepare_data.ipynb`, but this would require downloading the raw data sets from https://eee.ipfran.ru/files/seasonal-variation-2024/.
> **_Note:_** We use some data sets containing ionospheric potential values simulated via climate and weather forecasting models. Since these raw data sets are very large (around 350 Gb), we only upload preprocessed lower-dimensional data sets (around 30 Mb) to the repository. This preprocessing can be reproduced using the script `0_prepare_data.ipynb`, but this would require downloading the raw data sets from https://eee.ipfran.ru/files/seasonal-variation-2024/.
* `1_Earlier_measurements_images.ipynb`: the seasonal variation of the GEC based on the results of earlier studies (with the data taken from other sources)
* `2_Vostok_measurements_images.ipynb`: the seasonal variation and a diurnal-seasonal diagram for the GEC on the basis of potential gradient data from Vostok (both the new data for 2006–2020 and the earlier data for 1998–2001)
* `3_WRF_T2_images.ipynb`: the seasonal variation of air temperature at the height of 2 m (`T2m`) averaged over different latitude ranges
* `4_IP_simulations_temporal_images.ipynb`: the seasonal variation of simulated IP values for different models and parameterisations
* `5_IP_simulations_spatial_images.ipynb`: the decomposition of the seasonal variation into contributions to the IP from different latitude ranges and a new parameterisation of the IP
* `3_CAPE_T2_images.ipynb`: the seasonal variation of air temperature at the height of 2 m (`T2`) averaged over different latitude ranges and the distribution of CAPE in the tropics in different models
* `4_IP_simulations_temporal_images.ipynb`: the seasonal and diurnal variations of simulated ionospheric potential values for different models and parameterisations
* `5_IP_simulations_spatial_images.ipynb`: the decomposition of the seasonal variation into contributions to the ionospheric potential from different latitude ranges and a new parameterisation of the ionospheric potential
> **_Note:_** The scripts should be executed sequentially one after another; at the very least, scripts 4 and 5 should be run after script 2. This is necessary because script 2 saves intermediate arrays of preprocessed data from the Vostok station, which are used in scripts 4 and 5.
## Detailed Description of the Scripts
## A Detailed Description of the Scripts
> **_Note:_** Here and throughout the script descriptions, it will be specified which calculations correspond to which figures. The figure number is presented in the format 1.x or 2.x, where the first digit refers to the article (Part 1 or Part 2) and the second digit indicates the figure number within the article. If the figure number starts with the letter "S" (e.g., 1.S1), it refers to a figure in the Supporting Information for the corresponding article.
> **_Note:_** Here and throughout the script descriptions, it will be specified which calculations correspond to which figures. The figure number is presented in the format 1.x or 2.x, where the first digit refers to the article (Part 1 or Part 2) and the second part indicates the figure number within the article. If the figure number starts with the letter "S" (e.g., 1.S1), it refers to a figure in the Supporting Information for the corresponding article.
### 1. The script `1_Earlier_measurements_images.ipynb`
@ -81,6 +81,8 @@ Since in paper we focus on studying monthly mean values, using hourly dataframes @@ -81,6 +81,8 @@ Since in paper we focus on studying monthly mean values, using hourly dataframes
Such daily-resolution arrays are stored in the variables `daily_df` and `daily_edf`.
> **_Note:_** At this stage we also save the average hourly values in the temporary file `vostok_diurnal_2006_2020.npy` to facilitate plotting later figures.
#### 2.5. Constructing Figure 1.2, Figure 1.S1 and Figure 1.S2
Figure 1.2 illustrates the seasonal variation (based on the new data) across different multi-year periods. To create it, we used the prepared data (daily_df) and helper functions to compute the mean values, the number of fair-weather days and the standard errors for three data sets:
@ -89,7 +91,7 @@ Figure 1.2 illustrates the seasonal variation (based on the new data) across dif @@ -89,7 +91,7 @@ Figure 1.2 illustrates the seasonal variation (based on the new data) across dif
2. The same data for 2006–2012.
3. The same data for 2013–2020.
> **_Note:_** The data from this figure are saved in the temporary file `vostok_2006_2020_results.npz` for use in the second article. This helps us to avoid duplicating the code or merging the code to build different entities in a single cumbersome file.
> **_Note:_** The data from this figure are saved in the temporary file `vostok_2006_2020_results.npz` for use in plotting later figures. This helps us to avoid duplicating the code or merging the code to build different entities in a single cumbersome file.
Figure 1.S1 illustrates the seasonal variation (based on the new data) for individual years. Using the same process as was employed in the case of Figure 1.2, we compute the mean values, the number of fair-weather days and standard errors, but this time for each year separately (we obtain 15 data sets, one for each year in 2006-2020).
@ -123,9 +125,11 @@ The procedure for identifying correlations, determining the regression coefficie @@ -123,9 +125,11 @@ The procedure for identifying correlations, determining the regression coefficie
We apply the solar-wind-imposed correction to two data sets: `meteo_solar_df` (obtained from merging `meteo_df` with `swip_df`; here the potential gradient values are adjusted for both meteorological influences and the solar wind) and `solar_df` (which takes into account only the correction for solar wind).
##### 2.7.3. Construct Figure 1.5 and Figure 1.S3
> **_Note:_** The adjusted data are saved in the temporary file `vostok_2006_2020_results_adjusted.npz` for use in plotting later figures.
#### 2.8. Constructing Figure 1.5 and Figure 1.S3
Finally, we construct Figures 1.5 and 1.S3 using the prepared data in the same manner as it was done for Figures 1.2 and 1.3.
We construct Figures 1.5 and 1.S3 using the prepared data in the same manner as it was done for Figures 1.2 and 1.3.
Figure 1.5 presents the monthly mean fair-weather potential gradient at the Vostok station under different conditions:
@ -140,13 +144,27 @@ Each subplot visualises the seasonal variation for the corresponding data set, w @@ -140,13 +144,27 @@ Each subplot visualises the seasonal variation for the corresponding data set, w
Figure 1.S2 shows the same data as panel 1 of Figure 1.5, but the analysis is based on our own calculations rather than on those by Burns et al. (2012).
### 3. The script `3_WRF_T2_images.ipynb`
#### 2.9. Hourly data adjustment for future use
Finally, we perform procedures similar to those described in section 2.7 above to adjust hourly values of the potential gradient at Vostok for meteorological influences and for the solar-wind-imposed potential difference (we will need these data later). To this end, we employ a 6-hour time series of meteorological parameters (namely, temperature and wind speed at 0:00, 6:00, 12:00 and 18:00 UTC) and interpolate them to estimate values at 0:30, 1:30, 2:30 UTC and so on (`full_temp_df`, `full_wind_df`); we merge these data with hourly electric field values (corresponding to averages over 0:00–1:00, 1:00–2:00, 2:00–3:00 UTC and so on) and with the hourly data from `swip_df` (also corresponding to 0:30, 1:30, 2:30 UTC and so on) to obtain the data set `full_meteo_solar_df`. To remove the unnecessary variability from the potential gradient data, we use the same regression coefficients earlier determined for the diurnal mean values.
> **_Note:_** The average adjusted hourly values are saved in the temporary file `vostok_diurnal_2006_2020_adjusted.npy` to facilitate plotting later figures.
### 3. The script `3_CAPE_T2_images.ipynb`
This script calculates the seasonal variation of air temperature at the height of 2 m (`T2`), derived from global simulations of atmospheric dynamics, and presents distributions of CAPE values in the tropics (more precisely, within 30°S–30°N) in different models.
This script calculates the seasonal variation of air temperature at the height of 2 m (`T2m`), derived from global simulations of atmospheric dynamics.
#### 3.1. Plotting Figures 1.4 and 2.4
In the script the average temperatures for different latitudes and months are loaded from `WRF_T2_MONxLAT.npy` (see the data description below).
The temperature is then averaged across the latitude ranges of 20°S–20°N, 30°S–30°N, 40°S–40°N and 50°S–50°N, taking into account the area variation with latitude (1° wide cells at higher latitudes are weighted with a diminishing coefficient). The results of the averaging (the seasonal variation of temperature within the specified latitude bands) are presented in Figures 1.4 and 2.3, consisting of four panels each.
The temperature is then averaged across the latitude ranges of 20°S–20°N, 30°S–30°N, 40°S–40°N and 50°S–50°N, taking into account the area variation with latitude (1° wide cells at higher latitudes are weighted with a diminishing coefficient). The results of the averaging (the seasonal variation of temperature within the specified latitude bands) are presented in Figures 1.4 and 2.4, consisting of four panels each.
#### 3.1. Plotting Figure 2.S1
The source data for CAPE distributions is downloaded from `WRF_CAPE_HIST.npz`, `INMCM_SCAPE_HIST.npz`, `WRF_CAPE_RAIN_HIST.npz` and `INMCM_SCAPE_RAIN_HIST.npz` (see the data description below).
On the basis of these data the script plots Figure 2.S1, which shows histograms of CAPE for all grid columns and hours within 30°S–30°N, as well as for those grid columns and hours within the same range for which hourly precipitation is non-zero.
### 4. The script `4_IP_simulations_temporal_images.ipynb`
@ -158,33 +176,39 @@ The import of libraries and helper functions in this script is similar to the pr @@ -158,33 +176,39 @@ The import of libraries and helper functions in this script is similar to the pr
The first step in the script is loading the time series of the modelled ionospheric potential. Since there are quite a few of them (calculated for different models with various parameterisation settings), for consistency they are loaded into two dictionaries: `wrf_hourly_total_ip` and `inm_hourly_total_ip`. To facilitate temporal grouping, two auxiliary index arrays, `<model>_dt_indices`, of the same length as the arrays in the dictionaries, are also created; these arrays store the series of dates corresponding to the respective ionospheric potential arrays.
| Dictionary | Key | IP Time Series |
| Dictionary | Key | Ionospheric Potential Time Series |
|---|---|---|
| `wrf_hourly_total_ip` | 500 | WRF model, CAPE > 500 kJ/kg, new parameterisation with T2m > 25 °C |
| `wrf_hourly_total_ip` | 600 | WRF model, CAPE > 600 J/kg |
| `wrf_hourly_total_ip` | 800 | WRF model, CAPE > 800 J/kg |
| `wrf_hourly_total_ip` | 1000 | WRF model, CAPE > 1000 J/kg |
| `wrf_hourly_total_ip` | 1200 | WRF model, CAPE > 1200 J/kg |
| `inm_hourly_total_ip` | 600 | INMCM model with CAPE > 600 J/kg |
| `inm_hourly_total_ip` | 800 | INMCM model with CAPE > 800 J/kg |
| `inm_hourly_total_ip` | 1000 | INMCM model with CAPE > 1000 J/kg |
| `inm_hourly_total_ip` | 1200 | INMCM model with CAPE > 1200 J/kg |
##### 4.1. Constructing Figure 2.1
#### 4.1. Constructing Figure 2.2
Here we average the data from the loaded arrays in the dictionaries (data sets for both models with the usual parameterisation and CAPE thresholds of 800, 1000 and 1200 J/kg) over months and construct seven plots.
Here we average the data from the loaded arrays in the dictionaries (data sets for both models with the usual parameterisation and CAPE thresholds of 600, 800, 1000 and 1200 J/kg) over months and construct eight plots.
Each of these plots represents the seasonal variation for a specific model and set of parameters. Note that monthly grouping for seasonal averaging is implemented using the auxiliary index arrays described above.
Six plots use the modelling data, while the seventh is based on the data from the Vostok station. It should be noted that here we use the output from the script `2_Vostok_measurements_images.ipynb`.
Eight plots use the modelling data, while the final two are based on the data from the Vostok station (before and after adjustments). It should be noted that here we use the output from the script `2_Vostok_measurements_images.ipynb`.
#### 4.2. Constructing Figure 2.1
Here we plot average diurnal variaiton curves corrsponding to the same data sets which were earlier used to plot Figure 2.2. We also use some output from the script `2_Vostok_measurements_images.ipynb`.
##### 4.2. Constructing Figure 2.5
#### 4.3. Constructing Figures 2.S2 and 2.S3
Figure 2.5 is constructed similarly to Figure 2.1. However, here specific summer periods are selected for averaging prior to plotting.
Figures 2.S2 and 2.S3 are constructed similarly to Figure 2.1. However, here specific periods are selected for averaging prior to plotting.
### 5. The script `5_IP_simulations_spatial_images.ipynb`
This script performs a somewhat more complex calculation. It uses the same time-averaging approaches as the previous one but additionally decomposes the IP into contributions from different latitude ranges.
This script performs a somewhat more complex calculation. It uses the same time-averaging approaches as the previous one but additionally decomposes the ionospheric potential into contributions from different latitude ranges.
This script also introduces the results obtained using a new IP parameterisation, which includes the surface air temperature (`T2m`).
This script also introduces the results obtained using a new ionospheric potential parameterisation, which includes the surface air temperature (`T2`).
> **_Note:_** The description of some helper functions and helper arrays will not be provided here, as they are identical to those used in Scripts 1–4.
@ -213,11 +237,11 @@ The loaded arrays and dictionaries of arrays (see the description in Script 4) a @@ -213,11 +237,11 @@ The loaded arrays and dictionaries of arrays (see the description in Script 4) a
After loading these data, various seasonal variation characteristics are calculated for different latitude ranges. These include the contribution of each latitude range to the total ionospheric potential (as a percentage), the amplitude of the seasonal variation, the months when the minimum and maximum of the seasonal variation are attained.
#### 5.3. Constructing Figures 2.2 and 2.4
#### 5.3. Constructing Figures 2.3 and 2.5
For Figure 2.4 we decompose the seasonal variation of the ionospheric potential into contributions and show them cumulatively. The total value in the figure is composed of contributions from specific latitude ranges: `["0-9N", "0-9S", "9S-18S", "18S-90S", "9N-18N", "18N-90N"]`.
For Figure 2.5 we decompose the seasonal variation of the ionospheric potential into contributions and show them cumulatively. The total value in the figure is composed of contributions from specific latitude ranges: `["0-9N", "0-9S", "9S-18S", "18S-90S", "9N-18N", "18N-90N"]`.
Figure 2.2 uses a similar approach to averaging the arrays; however, the contributions of individual latitude strips are plotted in separate subplots. Additionally, seasonal variation patterns for the average temperature across different latitude ranges are shown.
Figure 2.3 uses a similar approach to averaging the arrays; however, the contributions of individual latitude strips are plotted in separate subplots. Additionally, seasonal variation patterns for the average temperature across different latitude ranges are shown.
> **_Note:_** While the ionospheric potential contributions from individual grid cells within latitude ranges can be summed (they are additive), this is not the case for temperature. For temperature we must calculate a weighted average, where the weighting function takes into account the variability in the grid cell area.
@ -225,9 +249,9 @@ Figure 2.2 uses a similar approach to averaging the arrays; however, the contrib @@ -225,9 +249,9 @@ Figure 2.2 uses a similar approach to averaging the arrays; however, the contrib
This figure, which illustrates the simulated diurnal and seasonal variations according to different parameterisations, introduces the data from the new parameterisation that takes into account surface air temperature.
The data processing procedure for the seasonal variation is similar to that used in Figure 2.4. For the diurnal variation the arrays are created based on the hourly time series of the total ionospheric potential (`wrf_hourly_total_ip`), which are used exclusively for this figure.
The data processing procedure for the seasonal variation is similar to that used in Figure 2.5. For the diurnal variation the arrays are created based on the hourly time series of the total ionospheric potential (`wrf_hourly_total_ip`), which are used exclusively for this figure.
Note that we again utilise the data from the Vostok station to construct the figure. However, here we load two preprocessed data sets from previous scripts: one for the diurnal variation (`vostok_diurnal_2006_2020.npy`) and one for the seasonal variation (`vostok_2006_2020_results.npz`).
Note that we again utilise the data from the Vostok station to construct the figure. Here we load two preprocessed data sets from previous scripts: one for the diurnal variation (`vostok_diurnal_2006_2020_adjusted.npy`) and one for the seasonal variation (`vostok_2006_2020_results_adjusted.npz`).
<!-- ### 6. Calculation of SWIP using the Weimer 2005 model -->
<!-- ... -->
@ -239,14 +263,17 @@ Note that we again utilise the data from the Vostok station to construct the fig @@ -239,14 +263,17 @@ Note that we again utilise the data from the Vostok station to construct the fig
- `vostok_1998_2004_hourly_80percent_all.tsv`: Hourly potential gradient data for 1998–2004, based on earlier measurements with a different field mill. Contains two columns: `Datetime` (date and time) and `Field` (potential gradient values in V/m).
- `vostok_1998_2020_hourly_SWIP.txt`: Simulated (with the Weimer 2005 model) hourly solar wind imposed ionospheric potentials over the Vostok station for 1998–2020.
- `vostok_daily_pressure_mm_hg.csv`, `vostok_daily_temp.csv`, `vostok_daily_wind.csv`: CSV files containing daily averaged atmospheric pressure, temperature and wind speed at the Vostok station.
- `vostok_daily_pressure_mm_hg_6h.csv`, `vostok_daily_temp_6h.csv`, `vostok_daily_wind_6h.csv`: CSV files containing daily atmospheric pressure, temperature and wind speed at the Vostok station every 6 hours (the pressure data are not actually used here, given that it did not show a statistically significant correlation with potential gradient values).
#### `./data/WRF/`
- `WRF_HOURLY_TOTAL_IP_[500/800/1000/1200].npy`: `numpy` arrays containing hourly total ionospheric potential values simulated with the WRF model, assuming the CAPE threshold of 500, 800, 1000 or 1200 J/kg. Note that for the threshold of 500 J/kg a new parameterisation is applied, which also assumes a 25 °C threshold in temperature; the same applies to the next item on the list.
- `WRF_IP_[500/800/1000/1200]_LATxMON.npy`: `numpy` arrays with dimensions `(latitude, 12)`, containing monthly average contributions to the ionospheric potential from different latitude ranges simulated with the WRF model, assuming the CAPE threshold of 500, 800, 1000 or 1200 J/kg.
- `WRF_HOURLY_TOTAL_IP_[500_T2_25/600/800/1000/1200].npy`: `numpy` arrays containing hourly total ionospheric potential values simulated with the WRF model, assuming the CAPE threshold of 500, 600, 800, 1000 or 1200 J/kg. Note that for the threshold of 500 J/kg a new parameterisation is applied, which also assumes a 25 °C threshold in temperature; the same applies to the next item on the list.
- `WRF_IP_[500_T2_25/600/800/1000/1200]_LATxMON.npy`: `numpy` arrays with dimensions `(latitude, 12)`, containing monthly average contributions to the ionospheric potential from different latitude ranges simulated with the WRF model, assuming the CAPE threshold of 500, 600, 800, 1000 or 1200 J/kg.
- `WRF_NUMDAYS_MON.npy`: A `numpy` array indicating the number of fair-weather days included in the monthly averages.
- `WRF_T2_LATxMON.npy`: A `numpy` array with the shape `(180, 12)`, containing montly averaged temperatures at the height of 2 m (`T2m`) for each 1° wide latitude band. `T2m` are calculated with the WRF.
- `WRF_CAPE_HIST.npz`, `WRF_CAPE_RAIN_HIST.npz`: Values and 10-J/kg bin boundaries to plot histograms of CAPE within 30°S–30°N simulated with the WRF model (for all grid columns and hours and for those with non-zero precipitation)
#### `./data/INMCM/`
- `INMCM_HOURLY_TOTAL_IP_[800/1000/1200].npy`: `numpy` arrays containing hourly total ionospheric potential values simulated with the INMCM model, assuming the CAPE threshold of 800, 1000 or 1200 J/kg.
- `INMCM_IP_[800/1000/1200]_LATxMON.npy`: `numpy` arrays with dimensions `(latitude, 12)`, containing monthly averaged contributions to the ionospheric potential from different latitude ranges simulated with the INMCM model, assuming the CAPE threshold of 800, 1000 or 1200 J/kg.
- `INMCM_NUMDAYS_MON.npy`: A `numpy` array indicating the number of fair-weather days included in the monthly averages.
- `INMCM_HOURLY_TOTAL_IP_[600/800/1000/1200].npy`: `numpy` arrays containing hourly total ionospheric potential values simulated with the INMCM model, assuming the CAPE threshold of 600, 800, 1000 or 1200 J/kg.
- `INMCM_IP_[600/800/1000/1200]_LATxMON.npy`: `numpy` arrays with dimensions `(latitude, 12)`, containing monthly averaged contributions to the ionospheric potential from different latitude ranges simulated with the INMCM model, assuming the CAPE threshold of 600, 800, 1000 or 1200 J/kg.
- `INMCM_NUMDAYS_MON.npy`: A `numpy` array indicating the number of fair-weather days included in the monthly averages.
- `INMCM_SCAPE_HIST.npz`, `INMCM_SCAPE_RAIN_HIST.npz`: Values and 10-J/kg bin boundaries to plot histograms of surface CAPE within 30°S–30°N simulated with the INMCM model (for all grid columns and hours and for those with non-zero precipitation)
Loading…
Cancel
Save