Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"affiliation": "University of Oxford",
"orcid": "0000-0001-9786-3723"
},

{
"name": "Kukulies, Julia",
"affiliation": "NSF National Center for Atmospheric Research",
Expand Down Expand Up @@ -66,7 +65,6 @@
"affiliation": "Leibniz Institute for Tropospheric Research, Leipzig (Germany)",
"orcid": "0000-0002-4524-8152"
},

{
"name": "Pfeifer, Nils",
"affiliation": "Leibniz Institute for Tropospheric Research, Leipzig (Germany)",
Expand All @@ -81,6 +79,10 @@
"name": "Zhang, Xin",
"affiliation": "Nanjing University of Information Science & Technology (China)",
"orcid": "0000-0002-1756-6620"
},
{
"name": "Ziegner, Fabian",
"affiliation":"Leibniz Institute for Tropospheric Research, Leipzig (Germany)"
}
],
"license": "BSD-3-Clause",
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
### Tobac Changelog

_**Version 1.6.0:**_

**Enhancements for Users**

- MAJOR CHANGE: Feature detection and segmentation have been changed to use xarray DataArrays for representation of spatial fields instead of Iris Cubes. This change will allow for increased flexibility for input data and ease development. Support for Iris Cube input is maintained through a conversion wrapper. [#354](https://github.com/tobac-project/tobac/pull/354) & [#417](https://github.com/tobac-project/tobac/pull/417)
- Some differences in the output of feature detection are present in the output from feature detection: when using xarray, the column names for coordinates will use the variable names, while with iris the columns will use the standard names. This differences reflects the different ways in which coordinates are named in xarray and iris, and can be overridden by the user using the `use_standard_names` parameter. [#489](https://github.com/tobac-project/tobac/pull/489)

**Bug fixes**

- An issue with datetime output from feature detection being converted to `cftime` format erroneously was fixed, and datetime formats should now match the formatting in the input field. Time matching within a tolerance range now works with any combination of datetime formats [#489](https://github.com/tobac-project/tobac/pull/489)

**Documentation**

- Example notebooks have been converted to use `xarray`, and have had minor enhancements to descriptions and visualisations. A notebook showing the legacy approach using Iris Cube input is retained [#487](https://github.com/tobac-project/tobac/pull/487)

**Internal Enhancements**

- `tobac.utils.internal.basic` was restructured into `coordinates` and `label_props` utils, and new `datetime` and `generators` utils were added [#489](https://github.com/tobac-project/tobac/pull/489)

_**Version 1.5.5:**_

**Bug fixes**
Expand Down
147 changes: 111 additions & 36 deletions doc/big_datasets_examples/notebooks/parallel_processing_tobac.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:16.501369Z",
"iopub.status.busy": "2025-04-30T07:18:16.501086Z",
"iopub.status.idle": "2025-04-30T07:18:17.565771Z",
"shell.execute_reply": "2025-04-30T07:18:17.565431Z"
}
},
"outputs": [],
"source": [
"# Import libraries\n",
Expand All @@ -32,7 +39,14 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:17.567849Z",
"iopub.status.busy": "2025-04-30T07:18:17.567643Z",
"iopub.status.idle": "2025-04-30T07:18:17.569643Z",
"shell.execute_reply": "2025-04-30T07:18:17.569414Z"
}
},
"outputs": [],
"source": [
"# Disable a few warnings:\n",
Expand All @@ -47,13 +61,20 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:17.570755Z",
"iopub.status.busy": "2025-04-30T07:18:17.570666Z",
"iopub.status.idle": "2025-04-30T07:18:19.524830Z",
"shell.execute_reply": "2025-04-30T07:18:19.523995Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"using tobac version 1.5.5\n"
"using tobac version 1.6.0\n"
]
}
],
Expand All @@ -67,7 +88,14 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:19.567555Z",
"iopub.status.busy": "2025-04-30T07:18:19.567028Z",
"iopub.status.idle": "2025-04-30T07:18:19.580798Z",
"shell.execute_reply": "2025-04-30T07:18:19.580503Z"
}
},
"outputs": [],
"source": [
"data_out=Path('../../../examples')\n",
Expand All @@ -89,7 +117,14 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:19.582191Z",
"iopub.status.busy": "2025-04-30T07:18:19.582100Z",
"iopub.status.idle": "2025-04-30T07:18:19.584081Z",
"shell.execute_reply": "2025-04-30T07:18:19.583837Z"
}
},
"outputs": [],
"source": [
"# Set up directory to save output:\n",
Expand All @@ -104,7 +139,14 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:19.585354Z",
"iopub.status.busy": "2025-04-30T07:18:19.585255Z",
"iopub.status.idle": "2025-04-30T07:18:20.646076Z",
"shell.execute_reply": "2025-04-30T07:18:20.645629Z"
}
},
"outputs": [],
"source": [
"Precip = xr.open_dataset(data_file[0])[\"surface_precipitation_average\"]"
Expand All @@ -120,7 +162,14 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:20.648419Z",
"iopub.status.busy": "2025-04-30T07:18:20.648078Z",
"iopub.status.idle": "2025-04-30T07:18:20.728846Z",
"shell.execute_reply": "2025-04-30T07:18:20.728484Z"
}
},
"outputs": [],
"source": [
"parameters_features = {}\n",
Expand All @@ -139,13 +188,26 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:20.730511Z",
"iopub.status.busy": "2025-04-30T07:18:20.730416Z",
"iopub.status.idle": "2025-04-30T07:18:21.584926Z",
"shell.execute_reply": "2025-04-30T07:18:21.584671Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"starting feature detection based on multiple thresholds\n",
"starting feature detection based on multiple thresholds\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"feature detection done\n",
"features saved\n"
]
Expand Down Expand Up @@ -179,7 +241,14 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:21.586340Z",
"iopub.status.busy": "2025-04-30T07:18:21.586188Z",
"iopub.status.idle": "2025-04-30T07:18:21.590613Z",
"shell.execute_reply": "2025-04-30T07:18:21.590392Z"
}
},
"outputs": [],
"source": [
"# Dictionary containing keyword arguments for segmentation step:\n",
Expand Down Expand Up @@ -208,7 +277,14 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:21.591702Z",
"iopub.status.busy": "2025-04-30T07:18:21.591636Z",
"iopub.status.idle": "2025-04-30T07:18:21.593200Z",
"shell.execute_reply": "2025-04-30T07:18:21.592985Z"
}
},
"outputs": [],
"source": [
"statistics = {}\n",
Expand All @@ -227,7 +303,14 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:21.594255Z",
"iopub.status.busy": "2025-04-30T07:18:21.594194Z",
"iopub.status.idle": "2025-04-30T07:18:21.595656Z",
"shell.execute_reply": "2025-04-30T07:18:21.595446Z"
}
},
"outputs": [],
"source": [
"statistics[\"percentiles\"] = (np.percentile, {\"q\": [95, 99]})"
Expand All @@ -236,14 +319,33 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:21.596645Z",
"iopub.status.busy": "2025-04-30T07:18:21.596565Z",
"iopub.status.idle": "2025-04-30T07:18:22.769124Z",
"shell.execute_reply": "2025-04-30T07:18:22.768880Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Starting segmentation based on surface precipitation\n",
"segmentation based on surface precipitation performed, start saving results to files\n",
"Starting segmentation based on surface precipitation\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"segmentation based on surface precipitation performed, start saving results to files\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"segmentation surface precipitation performed and saved\n"
]
}
Expand Down Expand Up @@ -272,7 +374,14 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"metadata": {
"execution": {
"iopub.execute_input": "2025-04-30T07:18:22.770491Z",
"iopub.status.busy": "2025-04-30T07:18:22.770404Z",
"iopub.status.idle": "2025-04-30T07:18:22.780761Z",
"shell.execute_reply": "2025-04-30T07:18:22.780565Z"
}
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -487,11 +596,6 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:tobathon_2025]",
"language": "python",
"name": "conda-env-tobathon_2025-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand Down
Loading
Loading