From 378ddcc9c4c36bfcb8e853c85b51bf9bb34302e2 Mon Sep 17 00:00:00 2001 From: b380459 <aiko.voigt@kit.edu> Date: Wed, 23 Jun 2021 14:21:00 +0200 Subject: [PATCH] Rename from cctrigrid to TriCCo --- README.md | 4 ++-- examples/example-2d.ipynb | 12 ++++++------ examples/example-3d.ipynb | 10 +++++----- {cctrigrid => tricco}/config.py | 0 {cctrigrid => tricco}/cubulation_functions.py | 0 {cctrigrid => tricco}/grid_functions.py | 0 {cctrigrid => tricco}/prepare.py | 4 ++-- cctrigrid/cctrigrid.py => tricco/tricco.py | 0 8 files changed, 15 insertions(+), 15 deletions(-) rename {cctrigrid => tricco}/config.py (100%) rename {cctrigrid => tricco}/cubulation_functions.py (100%) rename {cctrigrid => tricco}/grid_functions.py (100%) rename {cctrigrid => tricco}/prepare.py (96%) rename cctrigrid/cctrigrid.py => tricco/tricco.py (100%) diff --git a/README.md b/README.md index 5b96ba8..5eaa6e2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# cctrigrid +# TriCCo -A library for computing connected components on an unstructured triangular grid +A library for computing connected components on an unstructured triangular grid. Authors: * Aiko Voigt (University of Vienna) diff --git a/examples/example-2d.ipynb b/examples/example-2d.ipynb index 2875354..0a070fa 100644 --- a/examples/example-2d.ipynb +++ b/examples/example-2d.ipynb @@ -20,7 +20,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Need to add cctrigrid functions to the system path" + "## Need to add tricco functions to the system path" ] }, { @@ -30,7 +30,7 @@ "outputs": [], "source": [ "import sys\n", - "sys.path.append( '../cctrigrid/' )" + "sys.path.append( '../tricco/' )" ] }, { @@ -90,8 +90,8 @@ "metadata": {}, "outputs": [], "source": [ - "import cctrigrid \n", - "cubulation = cctrigrid.make_cubulation(start_triangle=5738, radius=102, print_progress=False)" + "import tricco \n", + "cubulation = tricco.make_cubulation(start_triangle=5738, radius=102, print_progress=False)" ] }, { @@ -183,7 +183,7 @@ "metadata": {}, "outputs": [], "source": [ - "components_vertex = cctrigrid.make_connected_components_2d(cubulation, field_cube, connectivity = 'vertex')" + "components_vertex = tricco.make_connected_components_2d(cubulation, field_cube, connectivity = 'vertex')" ] }, { @@ -217,7 +217,7 @@ "metadata": {}, "outputs": [], "source": [ - "components_edge = cctrigrid.make_connected_components_2d(cubulation, field_cube, connectivity = 'edge')\n", + "components_edge = tricco.make_connected_components_2d(cubulation, field_cube, connectivity = 'edge')\n", "\n", "field_cc_edge = np.zeros(field.size)\n", "for icomp in range(len(components_edge)):\n", diff --git a/examples/example-3d.ipynb b/examples/example-3d.ipynb index 10bee0c..2930049 100644 --- a/examples/example-3d.ipynb +++ b/examples/example-3d.ipynb @@ -30,7 +30,7 @@ "outputs": [], "source": [ "import sys\n", - "sys.path.append( '../cctrigrid/' )" + "sys.path.append( '../tricco/' )" ] }, { @@ -66,8 +66,8 @@ "metadata": {}, "outputs": [], "source": [ - "import cctrigrid \n", - "cubulation = cctrigrid.make_cubulation(start_triangle=5738, radius=102, print_progress=False)" + "import tricco \n", + "cubulation = tricco.make_cubulation(start_triangle=5738, radius=102, print_progress=False)" ] }, { @@ -106,7 +106,7 @@ "metadata": {}, "outputs": [], "source": [ - "components_vertex = cctrigrid.make_connected_components_3d(cubulation, field_cube, connectivity = 'vertex')" + "components_vertex = tricco.make_connected_components_3d(cubulation, field_cube, connectivity = 'vertex')" ] }, { @@ -129,7 +129,7 @@ "metadata": {}, "outputs": [], "source": [ - "components_edge = cctrigrid.make_connected_components_3d(cubulation, field_cube, connectivity = 'edge')" + "components_edge = tricco.make_connected_components_3d(cubulation, field_cube, connectivity = 'edge')" ] }, { diff --git a/cctrigrid/config.py b/tricco/config.py similarity index 100% rename from cctrigrid/config.py rename to tricco/config.py diff --git a/cctrigrid/cubulation_functions.py b/tricco/cubulation_functions.py similarity index 100% rename from cctrigrid/cubulation_functions.py rename to tricco/cubulation_functions.py diff --git a/cctrigrid/grid_functions.py b/tricco/grid_functions.py similarity index 100% rename from cctrigrid/grid_functions.py rename to tricco/grid_functions.py diff --git a/cctrigrid/prepare.py b/tricco/prepare.py similarity index 96% rename from cctrigrid/prepare.py rename to tricco/prepare.py index 0194327..8332de0 100644 --- a/cctrigrid/prepare.py +++ b/tricco/prepare.py @@ -21,7 +21,7 @@ def grid_icon(path, file): ds_grid = ds_grid[['neighbor_cell_index', 'edge_of_cell', 'edge_vertices']] # in the ICON model grid, the indexing of the triangle cells and vertices - # starts with 1 and not with 0 as assumed by cctrigrid --> we need to subtract 1 here + # starts with 1 and not with 0 as assumed by tricco --> we need to subtract 1 here ds_grid['neighbor_cell_index'] = ds_grid['neighbor_cell_index'] - 1 ds_grid['edge_of_cell'] = ds_grid['edge_of_cell'] - 1 ds_grid['edge_vertices'] = ds_grid['edge_vertices'] - 1 @@ -97,4 +97,4 @@ def field_icon_lev(path, file, var, threshold, cubulation): cube = entry[1] # cube coordinate field_cube[lev, cube[0], cube[1], cube[2]] = field[lev, triangle] - return field, field_cube \ No newline at end of file + return field, field_cube diff --git a/cctrigrid/cctrigrid.py b/tricco/tricco.py similarity index 100% rename from cctrigrid/cctrigrid.py rename to tricco/tricco.py -- GitLab