Course Project for CMSC6950 Spring 2021
Ruixin Song
Though the latest Python version is already 3.9.x when writing this document, conda with Python-3.8.x environment is more recommanded in terms of to be compatible with the Visualization Toolkit (VTK), which will be introduced later.
After setting up conda, install the Capytaine module by:
conda install -c conda-forge capytaine
After setting up capytaine module, we need to install the visualization dependencies that were not inlusive in the capytaine: matplotlib and VTK (Visualization Toolkit).
According to the Capytaine installation, we can simply execute:
conda install matplotlib
- conda install vtk
+ pip install vtk
However, the conda installing VTK part is not working on my machine, with an error like "vtk is incompatible with your python environment", since the VTK version accessed by conda can only support to Python 3.7.x.
From the developers, the latest VTK wheel has been published supports Python-3.8, which can be reached by PyPl. Therefore, using pip
instead of conda
while installing VTK.
For loading the intermediate netCDF files generated by computational scripts, please make sure you have netCDF module in your machine. If you don't have one, simply run:
- conda install netCDF4
+ pip install netCDF4
Both might work for you! But I would recommend using PyPl since Conda failed to install netCDF module on my machine with some package conflicts happened.
xarray
module should have been installed within capytaine
. You may check by running python in command-line and trying import xarray
. If it goes wrong, execute:
pip install xarray
If all work fine, the environment is set up!
-
Folder
examples
: I played with some instances in the capytaine documentation and backup the code and results here. -
Script
radiation.py
andwave.py
: computational tasks -
Script
plot_radiation.py
andplot_wave.py
: visualizing the computaitonal tasks -
Folder
img
: storage of the visualization results -
Project report files and bibliography
-
Makefile
:- Command
make deepclean
will remove thereport.pdf
and the figures in directoryimg
. - Command
make
will re-generalize all the files removed bymake deepclean
and delete the intermidiate data files.
- Command
The workflow of the project can be described as following: