To follow this lesson, you would need:
Bash is a commonly-used shell that gives you the power to do simple tasks more quickly.
cmd
and press [Enter])setx HOME "%USERPROFILE%"
SUCCESS: Specified value was saved.
exit
then pressing [Enter]This will provide you with both Git and Bash in the Git Bash program.
The default shell in all versions of Mac OS X is Bash, so no
need to install anything. You access Bash from the Terminal
(found in
/Applications/Utilities
).
See the Git installation video tutorial
for an example on how to open the Terminal.
You may want to keep
Terminal in your dock for this workshop.
The default shell is usually Bash, but if your
machine is set up differently you can run it by opening a
terminal and typing bash
. There is no need to
install anything.
Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com. You will need a supported web browser (current versions of Chrome, Firefox or Safari, or Internet Explorer version 9 or above).
You will need an account at github.com for parts of the Git lesson. Basic GitHub accounts are free. We encourage you to create a GitHub account if you don't have one already. Please consider what personal information you'd like to reveal. For example, you may want to review these instructions for keeping your email address private provided at GitHub.
Git should be installed on your computer as part of your Bash install (described above).
For OS X 10.9 and higher, install Git for Mac
by downloading and running the most recent "mavericks" installer from
this list.
After installing Git, there will not be anything in your /Applications
folder,
as Git is a command line program.
For older versions of OS X (10.5-10.8) use the
most recent available installer labelled "snow-leopard"
available here.
If Git is not already available on your machine you can try to
install it via your distro's package manager. For Debian/Ubuntu run
sudo apt-get install git
and for Fedora run
sudo yum install git
.
When you're writing code, it's nice to have a text editor that is
optimized for writing code, with features like automatic
color-coding of key words. The default text editor on Mac OS X and
Linux is usually set to Vim, which is not famous for being
intuitive. if you accidentally find yourself stuck in it, try
typing the escape key, followed by :q!
(colon, lower-case 'q',
exclamation mark), then hitting Return to return to the shell.
nano is a basic editor and the default that instructors use in the workshop. To install it, download the Windows installer and double click on the file to run it. This installer requires an active internet connection.
Others editors that you can use are Notepad++ or Sublime Text. Be aware that you must add its installation directory to your system path. Please ask your instructor to help you do this.
nano is a basic editor and the default that instructors use in the workshop. See the Git installation video tutorial for an example on how to open nano. It should be pre-installed.
Others editors that you can use are Text Wrangler or Sublime Text.
nano is a basic editor and the default that instructors use in the workshop. It should be pre-installed.
Others editors that you can use are Gedit, Kate or Sublime Text.
Python is a popular language for scientific computing, and great for general-purpose programming as well. Installing all of its scientific packages individually can be a bit difficult, however, so we recommend the all-in-one installer Anaconda.
Regardless of how you choose to install it, please make sure you install Python version 3.6. Also, please set up your python environment at least a day in advance of the workshop. If you encounter problems with the installation procedure, ask your workshop organizers via e-mail for assistance so you are ready to go as soon as the workshop begins.
Open http://continuum.io/downloads with your web browser.
Download the Python 3 installer for Windows.
Double-click the executable and install Python 3 using MOST of the default settings. The only exception is to check the Make Anaconda the default Python option.
Open http://continuum.io/downloads with your web browser.
Download the Python 3 installer for OS X.
Install Python 3 using all of the defaults for installation.
Note that the following installation steps require you to work from the shell. If you run into any difficulties, please request help before the workshop begins.
Open http://continuum.io/downloads with your web browser.
Download the Python 3 installer for Linux.
Install Python 3 using all of the defaults for installation.
a. Open a terminal window.
b. Navigate to the folder where you downloaded the installer
c. Type
$ bash Anaconda3-
and press tab. The name of the file you just downloaded should appear.
d. Press enter.
e. Follow the text-only prompts. When the license agreement appears (a colon
will be present at the bottom of the screen) hold the down arrow until the
bottom of the text. Type yes
and press enter to approve the license. Press
enter again to approve the default location for the files. Type yes
and
press enter to prepend Anaconda to your PATH
(this makes the Anaconda
distribution the default Python).
The data we will be using is a small dataset created for this lesson. To obtain it, download and unzip the file metos-python-data.tar.
In order to follow the presented material, you should launch a Jupyter notebook in the root directory (see Starting Python).
We will teach Python using the Jupyter notebook, a programming environment that runs in a web browser. Jupyter requires a reasonably up-to-date browser, preferably a current version of Chrome, Safari, or Firefox (note that Internet Explorer version 9 and below are not supported). If you installed Python using Anaconda, Jupyter should already be on your system. If you did not use Anaconda, use the Python package manager pip (see the Jupyter website for details.)
To start the notebook, open a terminal or git bash and type the command:
$ jupyter notebook
To start the Python interpreter without the notebook, open a terminal or Git Bash and type the command:
$ python
To install additional Python packages/libraries, you need to open a Terminal, and then follow the instructions below.
For Windows, Linux and Mac OS X:
$ conda config --add channels conda-forge
$ conda install netcdf4
We will be using HDF5 python library and for Windows, Linux and Mac OS X:
$ conda install hdf5
GDAL is a library for reading/writing raster and vector geospatial data formats.
$ conda install gdal
$ conda install matplotlib basemap basemap-data-hires
$ conda install pandas geopandas pytables
$ conda install plotly
$ conda install ffmpeg
$ conda install pillow
$ conda install scipy scikit-learn scikit-image
$ conda install xarray dask=0.15.2
$ conda install cartopy holoviews datashader dill
$ conda install ipyleaflet gmaps
$ conda install graphviz python-graphviz