From 26fefc73670de90625191d9c1995045c0f6bc8b0 Mon Sep 17 00:00:00 2001 From: Julia Kukulies Date: Mon, 23 Sep 2024 08:45:35 -0600 Subject: [PATCH 1/6] updated reference --- doc/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 1b215f20..d4f4b4e7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,14 +10,14 @@ The software is set up in a modular way to include different algorithms for feat Individual features are identified as either maxima or minima in a 2D or 3D time-varying field (see :doc:`feature_detection_overview`). An associated volume can then be determined using these features with a separate (or identical) time-varying 2D or 3D field and a threshold value (see :doc:`segmentation`). The identified objects are linked into consistent trajectories representing the cloud over its lifecycle in the tracking step. Analysis and visualization methods provide a convenient way to use and display the tracking results. -Version 1.2 of tobac and some example applications are described in a peer-reviewed article in Geoscientific Model Development as: +**Version 1.2 of tobac** and some example applications are described in a peer-reviewed article in Geoscientific Model Development as: Heikenfeld, M., Marinescu, P. J., Christensen, M., Watson-Parris, D., Senf, F., van den Heever, S. C., and Stier, P.: tobac 1.2: towards a flexible framework for tracking and analysis of clouds in diverse datasets, Geosci. Model Dev., 12, 4551–4570, https://doi.org/10.5194/gmd-12-4551-2019, 2019. -Version 1.5 of tobac and the major enhancements that came with that version are currently under review in Geoscientific Model Development: +**Version 1.5 of tobac** and the major enhancements that came with that version are described in the following peer-reviewed article in Geoscientific Model Development: +Sokolowsky, G. A., Freeman, S. W., Jones, W. K., Kukulies, J., Senf, F., Marinescu, P. J., Heikenfeld, M., Brunner, K. N., Bruning, E. C., Collis, S. M., Jackson, R. C., Leung, G. R., Pfeifer, N., Raut, B. A., Saleeby, S. M., Stier, P., and van den Heever, S. C.: tobac v1.5: Introducing Fast 3D Tracking, Splits and Mergers, and Other Enhancements for Identifying and Analysing Meteorological Phenomena. Geoscientific Model Development, 17(13), 5309-5330. https://doi.org/10.5194/gmd-17-5309-2024, 2024. -Sokolowsky, G. A., Freeman, S. W., Jones, W. K., Kukulies, J., Senf, F., Marinescu, P. J., Heikenfeld, M., Brunner, K. N., Bruning, E. C., Collis, S. M., Jackson, R. C., Leung, G. R., Pfeifer, N., Raut, B. A., Saleeby, S. M., Stier, P., and van den Heever, S. C.: tobac v1.5: Introducing Fast 3D Tracking, Splits and Mergers, and Other Enhancements for Identifying and Analysing Meteorological Phenomena, EGUsphere [preprint], https://doi.org/10.5194/egusphere-2023-1722, 2023. The project is currently being extended by several contributors to include additional workflows and algorithms using the same structure, syntax, and data formats. From 27817139aef6ec2c08449de875f315bcd59dff9d Mon Sep 17 00:00:00 2001 From: William Jones Date: Tue, 24 Sep 2024 13:19:16 +0100 Subject: [PATCH 2/6] Fix bug in transform_feature_points when warning of dropped features but no features have been removed --- tobac/utils/general.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tobac/utils/general.py b/tobac/utils/general.py index 394034c4..63f40706 100644 --- a/tobac/utils/general.py +++ b/tobac/utils/general.py @@ -714,8 +714,7 @@ def transform_feature_points( the new grid, suitable for use in segmentation """ - from .. import analysis as tb_analysis - + RADIUS_EARTH_M = 6371000 is_3D = "vdim" in features if is_3D: @@ -812,14 +811,11 @@ def transform_feature_points( ) if warn_dropped_features: - returned_features = ret_features["feature"] - all_features = features["feature"] - removed_features = np.delete( - all_features, np.where(np.any(all_features == returned_features)) - ) - warnings.warn( - "Dropping feature numbers: " + str(removed_features.values), UserWarning - ) + removed_features = np.setdiff1d(features["feature"], ret_features["feature"]) + if len(removed_features): + warnings.warn( + "Dropping feature numbers: " + str(removed_features.tolist()), UserWarning + ) # make sure that feature points are converted back to int64 ret_features["feature"] = ret_features.feature.astype(int) From 1dd17227aa36964bb66612902a036b887d6bf8be Mon Sep 17 00:00:00 2001 From: William Jones Date: Tue, 24 Sep 2024 13:20:22 +0100 Subject: [PATCH 3/6] Formatting --- tobac/utils/general.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tobac/utils/general.py b/tobac/utils/general.py index 63f40706..89ab6aa1 100644 --- a/tobac/utils/general.py +++ b/tobac/utils/general.py @@ -714,7 +714,7 @@ def transform_feature_points( the new grid, suitable for use in segmentation """ - + RADIUS_EARTH_M = 6371000 is_3D = "vdim" in features if is_3D: @@ -814,7 +814,8 @@ def transform_feature_points( removed_features = np.setdiff1d(features["feature"], ret_features["feature"]) if len(removed_features): warnings.warn( - "Dropping feature numbers: " + str(removed_features.tolist()), UserWarning + "Dropping feature numbers: " + str(removed_features.tolist()), + UserWarning, ) # make sure that feature points are converted back to int64 From 6470db8002036d6528326fd5aaea3323c7a146b9 Mon Sep 17 00:00:00 2001 From: William Jones Date: Tue, 24 Sep 2024 13:24:23 +0100 Subject: [PATCH 4/6] Fix depreciation warnings in tests --- tobac/tests/test_segmentation.py | 4 ++-- tobac/tests/test_utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tobac/tests/test_segmentation.py b/tobac/tests/test_segmentation.py index 887d3e4b..862e0a3b 100644 --- a/tobac/tests/test_segmentation.py +++ b/tobac/tests/test_segmentation.py @@ -630,8 +630,8 @@ def test_segmentation_multiple_features(): out_seg_mask_arr = out_seg_mask.core_data() # assure that the number of grid cells belonging to each feature (ncells) are consistent with segmentation mask - assert int(out_df[out_df.feature == 1].ncells.values) == size_feature1 - assert int(out_df[out_df.feature == 2].ncells.values) == size_feature2 + assert int(out_df[out_df.feature == 1].ncells.values[0]) == size_feature1 + assert int(out_df[out_df.feature == 2].ncells.values[0]) == size_feature2 # assure that bulk statistic columns are created in output (one column added after segmentation) assert out_df.columns.size - fd_output.columns.size > 1 # assure that statistics are calculated everywhere where an area for ncells is found diff --git a/tobac/tests/test_utils.py b/tobac/tests/test_utils.py index e9953d7f..157bfdf2 100644 --- a/tobac/tests/test_utils.py +++ b/tobac/tests/test_utils.py @@ -559,7 +559,7 @@ def test_transform_feature_points_3D(): 5, 105, 20, max_h1=1000, max_h2=1000 ) - orig_feat_df = tb_utils.combine_tobac_feats([orig_feat_df_1, orig_feat_df_2]) + orig_feat_df = tb_utils.combine_feature_dataframes([orig_feat_df_1, orig_feat_df_2]) orig_feat_df["latitude"] = orig_feat_df["hdim_1"] orig_feat_df["longitude"] = orig_feat_df["hdim_2"] From 81a580b7d878dbc25565a3d45d50b92b1bb379e1 Mon Sep 17 00:00:00 2001 From: William Jones Date: Tue, 24 Sep 2024 13:25:44 +0100 Subject: [PATCH 5/6] Add python 3.12 to matrix testing --- .github/workflows/matrix_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix_ci.yml b/.github/workflows/matrix_ci.yml index 2da6b38f..953acc27 100644 --- a/.github/workflows/matrix_ci.yml +++ b/.github/workflows/matrix_ci.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [macos, ubuntu, windows] steps: From 0eac773b7c7997280e45522f6f59ef4cc6dd2f8d Mon Sep 17 00:00:00 2001 From: Julia Kukulies Date: Tue, 24 Sep 2024 11:39:39 -0600 Subject: [PATCH 6/6] added the main tobac publications to top of publication list --- doc/publications.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/publications.rst b/doc/publications.rst index 0a0d4776..b22d7856 100644 --- a/doc/publications.rst +++ b/doc/publications.rst @@ -11,6 +11,10 @@ Refereed Publications :widths: 30 :class: wy-table-responsive + * - Sokolowsky, G. A., Freeman, S. W., Jones, W. K., Kukulies, J., Senf, F., Marinescu, P. J., Heikenfeld, M., Brunner, K. N., Bruning, E. C., Collis, S. M., Jackson, R. C., Leung, G. R., Pfeifer, N., Raut, B. A., Saleeby, S. M., Stier, P., and van den Heever, S. C.: tobac v1.5 (2024). Introducing Fast 3D Tracking, Splits and Mergers, and Other Enhancements for Identifying and Analysing Meteorological Phenomena. Geoscientific Model Development, 17(13), 5309-5330. https://doi.org/10.5194/gmd-17-5309-2024. + + * - Heikenfeld, M., Marinescu, P. J., Christensen, M., Watson-Parris, D., Senf, F., van den Heever, S. C., and Stier, P. (2019). tobac 1.2: towards a flexible framework for tracking and analysis of clouds in diverse datasets, Geosci. Model Dev., 12, 4551–4570, https://doi.org/10.5194/gmd-12-4551-2019 + * - Bukowski, J., & van den Heever, S. C. (2021). Direct radiative effects in haboobs. *Journal of Geophysical Research: Atmospheres*, 126(21), e2021JD034814, doi:10.1029/2021JD034814. * - Bukowski, J. (2021). Mineral Dust Lofting and Interactions with Cold Pools (Doctoral dissertation, Colorado State University).