{
 "cells": [
  {
   "attachments": {
    "command_prompt.png": {
     "image/png": "[encoded data, 8208 characters]"
    },
    "jupyter_hub.png": {
     "image/png": "[encoded data, 41800 characters]"
    },
    "terminal.png": {
     "image/png": "[encoded data, 25216 characters]"
    }
   },
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Opening the FluxEngine tutorials\n",
    "The FluxEngine tutorials are written using Jupyter which allow text descriptions, images and code to be embedded together into an interactive Python environment. To open the tutorials you must first start Jupyter. If you have installed FluxEngine you should also have Jupyter installed. If you haven't installed FluxEngine download it from [here](https://github.com/oceanflux-ghg/FluxEngine/archive/master.zip) and read the installation instructions in [the manual](https://github.com/oceanflux-ghg/FluxEngine/blob/master/FluxEngineV3_instructions.pdf).\n",
    "\n",
    "## Starting Jupyter\n",
    "Assuming you have FluxEngine installed, you can open the tutorials by running the `jupyter notebook` command in the `Tutorials` sub-directory of the FluxEngine folder. On Windows you'll do this in command prompt, on MacOS or Linux you'll use Terminal.\n",
    "\n",
    "### Windows\n",
    "To open command prompt click the 'Start' menu, and use Cortana to search for and open `Command Prompt`. You should have a window which looks similar to this:\n",
    "\n",
    "![command_prompt.png](attachment:command_prompt.png)\n",
    "\n",
    "Command prompt starts in your home directory so you need to change directory to FluxEngine's `Tutorials` directory. To do this use the `cd` (change directory) command followed by the full path to the `Tutorials` subdirectory of the FluxEngine installation location. You may need to put the path in quotation marks (`\"`) if it contains spaces. For me the command looked something like this:\n",
    "```\n",
    "cd \"C:\\Users\\Tom\\Installed Software\\FluxEngine-master\\tutorials\"\n",
    "```\n",
    "\n",
    "The path at the start of the prompt should change to reflect the new directory. Now you can start Jupyter using the command `jupyter notebook`.\n",
    "\n",
    "### MacOS and Linux\n",
    "Open terminal and use the `cd` (change directory) command to change to the `Tutorials` sub-directory of the FluxEngine directory (wherever you installed FluxEngine to). You may need to put the path in quotation marks (`\"`) if it contains spaces. For me this was:\n",
    "```\n",
    "cd \"/home/Tom/FluxEngine-master/Tutorials\"\n",
    "```\n",
    "\n",
    "Now start the Jupyter hub by running\n",
    "```\n",
    "jupyter notebook\n",
    "```\n",
    "\n",
    "![terminal.png](attachment:terminal.png)\n",
    "\n",
    "\n",
    "In most cases a web browser window should open on a page that looks like this:\n",
    "\n",
    "![jupyter_hub.png](attachment:jupyter_hub.png)\n",
    "\n",
    "On Windows systems you may be asked which program you want to open the file in, if so, choose your usual web browser. On some systems you may not get any popup and instead there will be a URL for you to copy and paste into a web browser in command prompt after you start Jupyter.\n",
    "\n",
    "## Opening the first tutorial\n",
    "This will start you web browser and open jupyter hub. You'll see four folders (one for each tutorial) and the notebook version of this getting started guide.\n",
    "\n",
    "Click on `01_introduction` to enter this folder. Then click on `01_introduction.ipynb` to start the tutorial (this will open in a new tab). You can return to the `Tutorials` directory to view the other tutorials by clicking the folder icon next to the two dots `..` at the top of the list. For now though, have read through the first tutorial."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
