Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the EUMETSAT 2019 tutorial directory #14

Merged
merged 7 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,60 @@
"2. Open a new console from the Start menu -> System Tools -> Konsole (font size can be made bigger with Ctrl +)\n",
"\n",
"\n",
"## Installation of `miniconda3`\n",
"## Installation and use of `conda`\n",
"\n",
"Type the following commands to the terminal\n",
"### Installation of `miniconda3`\n",
"\n",
"Type the following commands to the terminal.\n",
"\n",
"1. `wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh`\n",
"2. `bash ~/miniconda.sh -b -p $HOME/miniconda3`\n",
"3. `echo 'export PATH=\"$PATH:$HOME/miniconda3/bin\"' >> ~/.profile.local`\n",
"4. `source ~/.profile.local`\n",
"\n",
"## Create a new `conda` environment for the training\n",
"### Create a new `conda` environment for the training\n",
"\n",
"The name of the environment can be chosen freely, for the sake of simplicity we will use name `troll`for this training.\n",
"The name of the environment can be chosen freely, for the sake of simplicity we will use name `troll` for this training.\n",
"\n",
"1. `conda create -n troll python=3.6`\n",
"\n",
"Activate the `troll` environment with a command\n",
"\n",
"2. `source activate troll`\n",
"\n",
"You should have an indication in your terminal prompt that the conda environment is active, e.g.:\n",
"`(troll) joro@x2g13:~ $`. When the `conda` environment is active, all the installations after this point will go only to this specific environment. The environment can be deactivated with `source deactivate`-command.\n",
"\n",
"### Installation of required libraries and modules\n",
"\n",
"Install the required libraries and modules with this monster one-liner:\n",
"\n",
"1. `conda install -c conda-forge gdal satpy jupyter ffmpeg \"imageio<2.5\" imageio-ffmpeg shapely cartopy scipy rasterio mysql-connector-python matplotlib cartopy scipy pycoast pyorbital`\n",
"\n",
"### Apply updates to packages\n",
"\n",
"PyTroll packages are constantly being developed. In order to carry out some the exercises, we need to get an updated version of one of the readers.\n",
"\n",
"## Installation of 3rd party libraries\n",
"1. `pip install git+https://github.com/pytroll/satpy.git`\n",
"2. `cp /tcenas/scratch/pytroll/seviri_l1b_native.py ~/miniconda3/envs/troll/lib/python3.6/site-packages/satpy/readers/`\n",
"\n",
"1. `conda install -c conda-forge gdal`\n",
"\n",
"## Using `jupyter`-notebook\n",
"\n",
"## Installation of necessary Python modules\n",
"### Copy the exercises\n",
"\n",
"1. `conda install -c anaconda jupyter`\n",
"2. `conda install -c menpo imageio`\n",
"3. `conda install -c menpo ffmpeg`\n",
"1. `mkdir ~/pytroll_training`\n",
"2. `cp /tcenas/scratch/pytroll/exercises/* ~/pytroll_training`\n",
"3. `cd ~/pytroll_training`\n",
"\n",
"## Installation of PyTroll packages\n",
"### Starting headless `jupyter notebook` server\n",
"In order to get the best performance for the exercises, we'll start `jupyter notebook` with a headless server, i.e., we run the notebook on the X2Go-server, but connect to it from your own laptops.\n",
"\n",
"PyTroll packages are constantly being developed. In order to carry out some the exercises, we need to use the latest versions of `satpy` and `geotiepoints`. Hence, the installation of these packages will be done directly from GitHub.\n",
"Find out the IP-address of your server, and start `jupyter notebook` with `--ip` and `--no-browser` options\n",
"1. `/sbin/ifconfig`\n",
"2. `jupyter notebook --ip=<ip_address> --no-browser`\n",
"\n",
"1. `conda install -c conda-forge pyorbital`\n",
"2. `conda install -c conda-forge pycoast`\n",
"3. `conda install -c conda-forge satpy`\n",
"4. `conda uninstall satpy python-geotiepoints`\n",
"5. `pip install git+https://github.com/pytroll/python-geotiepoints.git`\n",
"6. `pip install git+https://github.com/pytroll/satpy.git`\n",
"7. `pip install git+https://github.com/pytroll/pyspectral.git`\n"
"Copy and paste the given URL to your laptops Google Chrome browser\n"
]
},
{
Expand Down Expand Up @@ -83,7 +95,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"from satpy import Scene, find_files_and_readers\n",
"\n",
"files = find_files_and_readers(base_dir='/tcenas/scratch/pytroll/ex1/',\n",
" reader='native_msg')\n",
" reader='seviri_l1b_native')\n",
"\n",
"scn = Scene(filenames=files)"
]
Expand Down Expand Up @@ -238,7 +238,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"import pprint\n",
"\n",
"files = find_files_and_readers(base_dir='/tcenas/scratch/pytroll/ex2',\n",
" reader='avhrr_eps_l1b',\n",
" reader='avhrr_l1b_eps',\n",
" start_time=datetime(2018, 10, 7 ,9, 25),\n",
" end_time=datetime(2018, 10, 7 , 9, 30))\n",
"\n",
Expand Down Expand Up @@ -143,7 +143,7 @@
"outputs": [],
"source": [
"files = find_files_and_readers(base_dir='/tcenas/scratch/pytroll/ex2',\n",
" reader='avhrr_eps_l1b')\n",
" reader='avhrr_l1b_eps')\n",
"scn = Scene(filenames=files, filter_parameters={'area':'germ'})"
]
},
Expand All @@ -166,7 +166,7 @@
"metadata": {},
"source": [
"## Saving the data\n",
"Satpy allows you to save the data in various formats, among which GeoTIFF and NetCDF"
"Satpy allows you to save the data in various formats, e.g. GeoTIFF"
]
},
{
Expand All @@ -175,8 +175,8 @@
"metadata": {},
"outputs": [],
"source": [
"newscn.save_dataset('my_fantastic_image.tiff')\n",
"newscn.save_dataset('my_fantastic_image.nc')"
"newscn.save_dataset(composite,filename='my_fantastic_image.tiff')\n",
"#newscn.save_dataset(composite,filename='my_fantastic_image.nc')"
]
},
{
Expand Down Expand Up @@ -213,7 +213,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"metadata": {},
"source": [
"## Exercise 3.2 (Advanced)\n",
"Plot the first of the computed passes on a map. This can be achieved by using the pytroll-schedule package, that you will need to install, using the `feature-oo` branch. You also need to have basemap installed.\n",
"Plot the first of the computed passes on a map. This can be achieved by using the pytroll-schedule package, that you will need to install with pip. You also need to have basemap installed.\n",
"Use the `trollsched.satpass.Pass` class. Documentation on this one is scarce, so look in the source code to see how it works.\n",
"\n",
"And if you feel very advanced, please convert this plotting facility to cartopy (as basemap is deprecated)."
Expand Down Expand Up @@ -61,7 +61,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"from datetime import datetime\n",
"\n",
"metop_files = find_files_and_readers(base_dir='/tcenas/scratch/pytroll/ex6',\n",
" reader='avhrr_eps_l1b',\n",
" reader='avhrr_l1b_eps',\n",
" start_time=datetime(2018, 10, 7 ,9, 25),\n",
" end_time=datetime(2018, 10, 7 ,9, 30))\n",
"scn_metop = Scene(filenames=metop_files)\n",
Expand All @@ -41,7 +41,7 @@
"outputs": [],
"source": [
"msg_files = find_files_and_readers(base_dir='/tcenas/scratch/pytroll/ex6',\n",
" reader='native_msg')\n",
" reader='seviri_l1b_native')\n",
"\n",
"scn = Scene(filenames=msg_files)\n",
"scn_msg = Scene(filenames=msg_files)\n",
Expand Down Expand Up @@ -159,7 +159,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"files=sorted(files)\n",
"\n",
"# Create a scene for each file and store in scenes list\n",
"scenes = [Scene(sensor=\"seviri\",reader='native_msg', filenames=[filenames]) for filenames in files]\n",
"scenes = [Scene(sensor=\"seviri\",reader='seviri_l1b_native', filenames=[filenames]) for filenames in files]\n",
"\n"
]
},
Expand Down Expand Up @@ -94,7 +94,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down