Example Project Overview
To highlight the difference between NumPy and CuPy, a 3D temperature diffusion model is used to highlight the difference in performance that can be achieved for computationally intensive tasks.
Data
For this task, starting data of 3-dimensional Ocean Temperatures are required, which we can download from the Copernicus Marine Data Service.
Downloading Data
A utility function has been included with the repo for this course bundled with poetry, as explained in the Setup Guide.
poetry run download_data
will download the required dataset for this course into nthe ./data
directory. The dataset that is downloaded is:
Description:
This dataset was downloaded from the Global Ocean Physics Analysis and Forecast service. It provides data for global ocean physics, focusing on sea water potential temperature.
- Product Identifier:
GLOBAL_ANALYSISFORECAST_PHY_001_024
- Product Name: Global Ocean Physics Analysis and Forecast
- Dataset Identifier:
cmems_mod_glo_phy-thetao_anfc_0.083deg_PT6H-i
Variable Visualized:
- Sea Water Potential Temperature (thetao): Measured in degrees Celsius [°C].
Geographical Area of Interest:
- Region: Around the United Kingdom
- Coordinates:
- Northern Latitude: 65.312
- Eastern Longitude: 6.1860
- Southern Latitude: 46.829
- Western Longitude: -13.90
Depth Range:
- Minimum Depth: 0.49 meters
- Maximum Depth: 5727.9 meters
File Size:
- 267.5 MB
Visualising Data
To make the process of visualising the data easier, three different utility functions have been created. The defeault output locations for the visualisations is within the output
directory.
Visualise Slice (Static)
Visualizing a 2D temperature slice. The depth that will be targetted is the surface, e.g. 0.49m.
poetry run visualise_slice_static
The output producded will be a .png
file, such as:
Visualise Slice - Interactive HTML file
Visualizing a 2D temperature slice in an interactive HTML file, allowing for a time series to be visualised.
poetry run visualise_slice --target_depth 0 --animation_speed 100
The command above will create an interactive HTML file, that will have each timestep in the animation last for 100 milliseconds (--animation_speed
) at the nearest depth to the closest depth (--target_depth
), in this case 0.49m. For the above command the output producded will be:
When run within your own space the file produced will be output/original_temperature_2d_interactive.html
.
Visualise Cube - Interactive HTML file
Visualizing a 3D temperature slice in an interactive HTML file, allowing for a time series to be visualised.
poetry run visualise_cube --num_depths 5 --num_time_steps 3
The command above will create an interactive HTML file, that will visualise the first 5 depth, for 3 time steps. For the above command the output producded will be: