Skip to content
Snippets Groups Projects
Commit ad40b2bd authored by Aiko Voigt's avatar Aiko Voigt
Browse files

Updated gitignore

parent 53fc6116
Branches
Tags
No related merge requests found
dist/ dist/
*/.ipynb_checkpoints
**/.ipynb_checkpoints
tricco/__pycache__ tricco/__pycache__
%% Cell type:markdown id: tags:
# Notebook for benchmarking runtime of cubulation
Tests are performed on an exclusive compute node of the DKRZ supercomputer Mistral in Hamburg, Germany.
A compute node has the following specs (https://www.dkrz.de/up/systems/mistral/configuration):
* 2x 12-core Intel Xeon E5-2680 v3 (Haswell) @ 2.5GHz
* 24 cores (48 logical CPUs)
* 64 GB main memory
As for the grids we consider limited-area ICON grids that cover a large part of the North Atlantic. They were for example used for the NAWDEX simulations described Senf, F., A. Voigt et al, 2020: Increasing Resolution and Resolving Convection Improve the Simulation of Cloud‐Radiative Effects Over the North Atlantic, JGR Atmospheres. https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2020JD032667.
%% Cell type:markdown id: tags:
Load required packages. Note: adding cc3d to system path is needed because it is required by tricco.
%% Cell type:code id: tags:
``` python
import timeit
import sys
sys.path.append('/pf/b/b380459/connected-components-3d/')
sys.path.append('/pf/b/b380459/BigDataClouds/tricco/')
import tricco
```
%% Cell type:markdown id: tags:
Define the start triangle and radius of outward search as a function of grid resolution.
%% Cell type:code id: tags:
``` python
dict_start = {'80000m': 5783, '40000m': 18538, '20000m': 69309, '10000m': 264792}
dict_radius = {'80000m': 102 , '40000m': 230 , '20000m': 460 , '10000m': 2000 }
```
%% Cell type:code id: tags:
``` python
# path to grid files
gridpath = '/work/bb1018/b380459/NAWDEX/grids/'
# model resolutions under investigation
for res in ['80000m', '40000m', '20000m', '10000m']:
print('Working on resolution of', res)
gridfile = 'icon-grid_nawdex_78w40e23n80n_R'+res+'.nc'
print('Time to read the grid:')
%timeit -r 1 -n 1 tricco.grid_functions.grid = tricco.prepare_grid(model='ICON',path=gridpath, file=gridfile)
print('Time to compute cubulation:')
%timeit -r 1 -n 1 tricco.compute_cubulation(start_triangle=dict_start[res], radius=dict_radius[res], print_progress=False)
```
%% Output
Working on resolution of 80000m
Time to read the grid:
310 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Time to compute cubulation:
11.7 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Working on resolution of 40000m
Time to read the grid:
163 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Time to compute cubulation:
1min 13s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Working on resolution of 20000m
Time to read the grid:
144 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Time to compute cubulation:
11min 34s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Working on resolution of 10000m
Time to read the grid:
312 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)
Time to compute cubulation:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment