{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "p_lcl = 951.68202846\n", "lcl_height = 550.0\n" ] }, { "ename": "NameError", "evalue": "name 'file_list' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 26\u001b[0m \u001b[0;31m# Removes the file lists which are not yet written to\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 27\u001b[0;31m \u001b[0mfile_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfile_list\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNameError\u001b[0m: name 'file_list' is not defined" ] } ], "source": [ "from skewPy import SkewT\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import glob\n", "from datetime import datetime\n", "\n", "import seaborn as sns; sns.set()\n", "sns.set_style(\"ticks\")\n", "sns.set_context(\"talk\")\n", "sns.set_style({'xtick.minor.size': '1.0'})\n", "\n", "plt.close('all')\n", "\n", "#S1 = SkewT.Sounding(filename='/Volumes/cruiseshare/Soundings/Palau/91408_KororPalau/201808.txt', fmt='PALAU', date_to_read = 0, init_plot = 1)\n", "S1 = SkewT.Sounding(filename='/Volumes/cruiseshare/Soundings/Yap/201808.txt', fmt='PALAU', date_to_read = 0, init_plot = 1)\n", "\n", "# Main folder where the reading is done\n", "read_folder = '/Volumes/cruiseshare/Soundings/91408_KororPalau/'\n", "file_list = sorted(glob.glob(read_folder + '2*.txt'))\n", "print(file_list)\n", "\n", "#\n", "#S1 = SkewT.Sounding(filename=file_list[-1], fmt='PISTON_EDT', init_plot=1)\n", "\n", "# Removes the file lists which are not yet written to\n", "file_list = file_list[0:-2]" ] }, { "cell_type": "code", "execution_count": 43, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "ename": "IndexError", "evalue": "index 0 is out of bounds for axis 1 with size 0", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mntimes\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m \u001b[0;31m#number of days\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mfile_name\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mfile_list\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mS1\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreadfile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mntimes\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mntimes\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mS1\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'temp'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mntimes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Users/zanemartin/Desktop/PISTON/csu_sdg_code_zm/skewPy/SkewT.py\u001b[0m in \u001b[0;36mreadfile\u001b[0;34m(self, fname)\u001b[0m\n\u001b[1;32m 1225\u001b[0m \u001b[0mlcounter\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1226\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1227\u001b[0;31m \u001b[0moutput\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mfields\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdat_col\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfloat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mlhi\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mrhi\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1228\u001b[0m \u001b[0mldata\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1229\u001b[0m \u001b[0mdata_end\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mIndexError\u001b[0m: index 0 is out of bounds for axis 1 with size 0" ] } ], "source": [ "ntimes = 0 #number of days\n", "for file_name in file_list:\n", " S1.readfile(file_name)\n", " ntimes = ntimes + S1.data['temp'].shape[1]\n", "print(ntimes)\n", "#S1.fig.legend()\n", "\n", "# For reading in the data_str from the dictionary\n", "def read_all():\n", " data_out = list()\n", " for file_name in file_list:\n", " S1 = SkewT.Sounding(data={}, fmt='PALAU', date_to_read = 0, init_plot=0)\n", " S1.readfile(file_name)\n", " data_out.append(S1.data)\n", " return(data_out)\n", "#S1.fig.legend()\n", "\n", "\n", "# Interpolates a single variable data_in from A SINGLE .TXT FILE onto goal_hghts\n", "def interp_all(data_str, goal_hghts, data_in):\n", " data_out = np.empty([len(goal_hghts), len(data_in)])\n", " for i in range(len(data_in)):\n", " data_out[:,i] = np.interp(goal_hghts, data_in[i]['hght'], data_in[i][data_str])\n", " return(data_out)\n", "\n", "# Interpolates a data_set from full monthly data formed from many files \n", "def interp_all_monthly(data_set_in, goal_hghts, data_str):\n", " data_out = np.empty([len(goal_hghts), ntimes])\n", " idx_start = 0\n", " for i in range(len(data_set_in)):\n", " idx_end = idx_start + data_set_in[i]['hght'].shape[1]\n", " #print(data_out[:, idx_start:idx_end].shape)\n", " #print('goal hghts', goal_hghts)\n", " for j in range(idx_end - idx_start):\n", " hght_mask = np.where(data_set_in[i]['hght'][:,j].mask == False)\n", " data_mask = np.where(data_set_in[i][data_str][:,j].mask == False)\n", " #print('actual hghts', data_set_in[i]['hght'][:,j][hght_mask])\n", " #print('actual hghts shape', data_set_in[i]['hght'][:,j][hght_mask].shape)\n", " #print('hght_mask shape ', hght_mask[0].shape)\n", " #print('data_mask shape ', data_mask[0].shape)\n", " data_out[:, idx_start+j] = np.interp(goal_hghts, \\\n", " data_set_in[i]['hght'][:,j][hght_mask], \\\n", " data_set_in[i][data_str][:,j][hght_mask], left=np.nan, right=np.nan)\n", " #print(data_out[0, idx_start+j])\n", " data_out[np.where(data_out == -999)] = np.nan\n", " idx_start = idx_end\n", " return(data_out)\n", "\n", "\n", "\n", "\n", "palau_full = read_all()\n" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "ename": "ValueError", "evalue": "object too deep for desired array", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mutemp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'sknt'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcos\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mradians\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m270\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'drct'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mvtemp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'sknt'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mradians\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m270\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'drct'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mutemp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minterp\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mz\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'hght'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mutemp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0mvtemp\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minterp\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mz\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'hght'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvtemp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0mutemp\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwhere\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mz\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0mpalau_full\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'hght'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnan\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/Users/zanemartin/anaconda/lib/python3.6/site-packages/numpy/lib/function_base.py\u001b[0m in \u001b[0;36minterp\u001b[0;34m(x, xp, fp, left, right, period)\u001b[0m\n\u001b[1;32m 1672\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mcompiled_interp\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mxp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1673\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1674\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mcompiled_interp\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mxp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfp\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mleft\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mright\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1675\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1676\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mperiod\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mValueError\u001b[0m: object too deep for desired array" ] } ], "source": [ "temp = interp_all_monthly(palau_full, z, 'temp')\n", "dwpt = interp_all_monthly(palau_full, z, 'dwpt')\n", "pres = interp_all_monthly(palau_full, z, 'pres')\n", "\n", "# Calculates relative humidity; might also read in and compare if in sounding\n", "\n" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(array([], dtype=int64), array([], dtype=int64))\n" ] } ], "source": [ "print(np.where(dwpt == -999))" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "data_temp = [[ nan nan nan ..., nan nan\n", " nan]\n", " [ 28.16470776 28.2 28.37353082 ..., 26.13688294 25.22298056\n", " 23.73155853]\n", " [ 27.06403557 27.82911073 27.48171791 ..., 25.54950892 25.4\n", " 23.68737723]\n", " ..., \n", " [-71.75246392 -69.96460075 -68.62021681 ..., -67.26578792 -67.38380368\n", " -65.89602932]\n", " [-71.71504315 -69.18073788 -68.82524251 ..., -67.44783771 -67.56807264\n", " -65.24543107]\n", " [-71.41974522 -68.90082988 -69.0302682 ..., -67.26526055 -67.5837274\n", " -64.59483283]]\n", "(300, 1419)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/zanemartin/anaconda/lib/python3.6/site-packages/ipykernel/__main__.py:6: RuntimeWarning: invalid value encountered in greater\n" ] } ], "source": [ "z = np.linspace(0, 20000, 300)\n", "\n", "temp = interp_all_monthly(palau_full, z, 'temp')\n", "dwpt = interp_all_monthly(palau_full, z, 'dwpt')\n", "sknt = interp_all_monthly(palau_full, z, 'sknt')\n", "drct = interp_all_monthly(palau_full, z, 'drct')\n", "relh = SkewT.RH(temp, dwpt)\n", "u = sknt*np.cos(np.radians(270-drct))\n", "v = sknt*np.sin(np.radians(270-drct))\n", "\n", "# Some data management\n", "dwpt[np.where(dwpt > 50.)] = np.nan\n" ] }, { "cell_type": "code", "execution_count": 41, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [], "source": [ "to_plot = v\n", "plt.close('all')\n", "plt.contourf(np.arange(to_plot.shape[1]), z, to_plot, np.arange(-25, 25, 5), cmap='RdBu_r', extend='both')\n", "plt.colorbar()\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 37, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "990.3363116638244" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "u[np.where(np.isnan(u) == False)].max()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "plt.figure()\n", "plt.plot(np.nanmean(temp, 1), z)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "np.nanmean(temp, 1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "scrolled": false }, "outputs": [], "source": [ "fig = plt.figure()\n", "\n", "ax1 = fig.add_subplot(3,1,1)\n", "ax2 = fig.add_subplot(3,1,2)\n", "ax3 = fig.add_subplot(3,1,3)\n", "\n", "cf = ax1.contourf(np.arange(0,ndays-1)+1, z, temp, cmap='RdBu_r')\n", "plt.colorbar(cf, ax=ax1)\n", "ax1.set_title('Temperature (C)')\n", "\n", "ax2.plot(np.arange(0,len(data_set))+1, np.min(temp, 0))\n", "ax2.set_title('Cold point tropopause (C)')\n", "\n", "melting_level = np.empty(len(data_set))\n", "for i in range(len(data_set)):\n", " melting_level[i] = data_set[i]['hght'][np.argmin(abs(data_set[i]['temp']-0))]\n", "\n", "ax3.plot(np.arange(0,len(data_set))+1, melting_level/1000)\n", "ax3.set_title('Melting Level (km)')\n", "\n", "fig.tight_layout()\n", "plt.show()\n", "\n", "plt.figure()\n", "plt.contourf(np.arange(0,len(data_set))+1, z, u, cmap='RdBu_r')\n", "plt.title('Zonal wind (knots)')\n", "plt.colorbar()\n", "plt.show()\n", "\n", "plt.figure()\n", "plt.contourf(np.arange(0,len(data_set))+1, z, v, cmap='RdBu_r')\n", "plt.title('Meridional wind (knots)')\n", "plt.colorbar()\n", "plt.show()\n", "\n", "plt.figure()\n", "plt.contourf(np.arange(0,len(data_set))+1, z, relh, np.linspace(50, 100, 25), cmap='Blues')\n", "plt.plot(np.arange(0,len(data_set))+1, z[:,-1], color='r')\n", "plt.title('Relative humidity (%)')\n", "plt.colorbar()\n", "plt.show()\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "temp" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "test_list = list()\n", "for i in range(15):\n", " test_list.append(i)\n", "print(test_list)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.0" } }, "nbformat": 4, "nbformat_minor": 2 }