GHER

GeoHydrodynamics and Environment Research

Installation

These two packages can be installed using the following commands.

using Pkg
Pkg.add(["NCDatasets","PyPlot","Interpolations","DIVAnd","IJulia"])
using PyPlot
using IJulia
notebook()

This installs DIVAnd, IJulia, the graphical notebook interface to Julia (highly recommended for the workshop) and PyPlot for the plotting among others. Installation can take a couple of minutes and will take about 3 GB of disk space.

Copying and pasting commands in a terminal

Windows user should have a look at this to enable the quick edit mode to facilitate copying and pasting commands.

Testing your installation

using Pkg
Pkg.test("DIVAnd");

All tests should succeed but it might need some time to execute completely (you will need an active internet connection). Be patient.

using PyPlot
plot(1:10)

A new window should open with a straight line.

using IJulia
notebook()

A new browser window should open. Then, click on New => Julia 1.x (where 1.x is you julia version). In the text box, type 1+2 and then hit Control-Enter. The answer should be 3! Normally your notebook should open in your home directory so you see the files/directories you have there. If this does not work, please report the issue here with the full error message: https://github.com/gher-ulg/Diva-Workshops/issues/new

If you want to see another directory tree, you can try to open the browser interface with

using IJulia
notebook(dir="D:/myotherdirectory/onanotherdisk/")

For issues with IJulia/Jupyter please have a look at https://github.com/JuliaLang/IJulia.jl.

First steps with Jupyter and Julia

If you modify DIVAnd module, restart the kernel to make sure latest version is used (remember, Julia does some compilations).

Updating Julia

  1. Download binaries, install as usual.
  2. Run in Julia (NOT IJulia of Jupyter): Pkg.build("IJulia")
  3. Then (in IJulia or Julia) Pkg.update()

More information is available at: https://github.com/JuliaLang/IJulia.jl#updating-julia-and-ijulia

Troubleshooting

For any installation issue please have a look at:

If the installation does not work, please report the issue here with the full error message: https://github.com/gher-ulg/Diva-Workshops/issues/new

IJulia