{ "cells": [ { "cell_type": "markdown", "id": "c6a29764-f39c-431c-8e77-fbc6bfe20f01", "metadata": {}, "source": [ "# Parsing data from the Sonardyne FETCH AZA\n", "\n", "The purpose of this notebook is to demonstrate the functionality of `fetchAZA` python package.\n", "\n", "The demo is organised to show\n", "\n", "- Step 1: Reading the *.csv files into xarray datasets\n", "\n", "- Step 2: Writing the xarray datasets into individual netCDF files\n", "\n", "- Step 3: Various plots\n", "\n", "\n", "Note that when you submit a pull request, you should `clear all outputs` from your python notebook for a cleaner merge.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "6a1920f3", "metadata": { "execution": { "iopub.execute_input": "2025-09-27T06:16:52.329044Z", "iopub.status.busy": "2025-09-27T06:16:52.328796Z", "iopub.status.idle": "2025-09-27T06:16:54.558606Z", "shell.execute_reply": "2025-09-27T06:16:54.558095Z" } }, "outputs": [], "source": [ "import pathlib\n", "import sys\n", "\n", "script_dir = pathlib.Path().parent.absolute()\n", "parent_dir = script_dir.parents[0]\n", "sys.path.append(str(parent_dir))\n", "\n", "import xarray as xr\n", "import os\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import importlib\n", "import datetime\n", "from fetchAZA import convertAZA, readers, writers, plotters, tools, timetools, utilities\n", "import warnings\n", "import re\n", "import glob\n", "import logging\n", "_log = logging.getLogger(__name__)\n", "\n", "# Specify the path for writing datafiles\n", "data_path = os.path.join(parent_dir, 'data')\n", "fig_path = os.path.join(parent_dir, 'figures')\n", "\n", "warnings.filterwarnings(\"ignore\", message=\"In a future version of xarray decode_timedelta will default to False rather than None. To silence this warning, set decode_timedelta to True, False, or a 'CFTimedeltaCoder' instance.\")\n", "warnings.filterwarnings(\"ignore\", category=xr.SerializationWarning, message=\"SerializationWarning: Can't decode floating point timedelta to 's' without precision loss, decoding to 'ns' instead. To silence this warning use time_unit='ns' in call to decoding function.\")\n" ] }, { "cell_type": "markdown", "id": "1508e1e7", "metadata": {}, "source": [ "## Step 1 & 2 as convertAZA.convertAZA\n", "\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "721efe8c", "metadata": { "execution": { "iopub.execute_input": "2025-09-27T06:16:54.560497Z", "iopub.status.busy": "2025-09-27T06:16:54.560212Z", "iopub.status.idle": "2025-09-27T06:16:55.276864Z", "shell.execute_reply": "2025-09-27T06:16:55.276325Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Calling convertAZA with overwrite=True...\n", "This should NOT prompt for overwrite confirmation.\n", "convertAZA function defaults: ('sample', '2000-01-01', '2099-01-01', '0', '0', '0', ['DQZ', 'PIES', 'INC', 'TMP', 'KLR'], True, None)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for join will change from join='outer' to join='exact'. This change will result in the following ValueError: cannot be aligned with join='exact' because index/labels/sizes are not equal along these coordinates (dimensions): 'new_index' ('new_index',) The recommendation is to set join explicitly for this case.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/data/sample_data*.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_KLR.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_DQZ.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_AZAseq.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_PIES.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_TMP.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_INC.nc\n", "Dataset AZAseq not included in combined datasets\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/tools.py:353: FutureWarning: In a future version of xarray the default value for join will change from join='outer' to join='exact'. This change will result in the following ValueError: cannot be aligned with join='exact' because index/labels/sizes are not equal along these coordinates (dimensions): 'RECORD_TIME' ('RECORD_TIME',) The recommendation is to set join explicitly for this case.\n", " combined_dataset = xr.merge(combined_datasets.values(), compat=\"override\")\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Deleting file: /home/runner/work/fetchAZA/fetchAZA/data/sample_data_KLR.nc\n", "Deleting file: /home/runner/work/fetchAZA/fetchAZA/data/sample_data_DQZ.nc\n", "Deleting file: /home/runner/work/fetchAZA/fetchAZA/data/sample_data_PIES.nc\n", "Deleting file: /home/runner/work/fetchAZA/fetchAZA/data/sample_data_TMP.nc\n", "Deleting file: /home/runner/work/fetchAZA/fetchAZA/data/sample_data_INC.nc\n", "Function completed successfully!\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/writers.py:129: UserWarning: Times can't be serialized faithfully to int64 with requested units 'seconds since 1970-01-01'. Resolution of 'milliseconds' needed. Serializing times to floating point instead. Set encoding['dtype'] to integer dtype to serialize to int64. Set encoding['dtype'] to floating point dtype to silence this warning.\n", " ds.to_netcdf(output_file)\n" ] } ], "source": [ "fn = 'sample_data.csv'\n", "STN = 'sample'\n", "deploy_date = '2023-02-27'\n", "recovery_date = '2023-03-08T08:00:00'\n", "latitude = 26.5\n", "longitude = -76.75\n", "water_depth = -3800\n", "\n", "print(\"Calling convertAZA with overwrite=True...\")\n", "print(\"This should NOT prompt for overwrite confirmation.\")\n", "\n", "# Force reload the module to pick up any changes\n", "import importlib\n", "importlib.reload(convertAZA)\n", "\n", "# Test the overwrite parameter directly first\n", "print(f\"convertAZA function defaults: {convertAZA.convertAZA.__defaults__}\")\n", "\n", "ds_pressure, ds_AZA = convertAZA.convertAZA(\n", " data_path,\n", " fn,\n", " STN,\n", " deploy_date,\n", " recovery_date,\n", " latitude,\n", " longitude,\n", " water_depth,\n", " cleanup=True,\n", " overwrite=True\n", ")\n", "\n", "print(\"Function completed successfully!\")" ] }, { "cell_type": "markdown", "id": "a4fe211d", "metadata": {}, "source": [ "## Step 1: Read the *csv file for Logging Events. \n", "\n", "This is done with readers.process_csv_to_xarray(). All logging events are read into individual xarray datasets, stored as a dictionary of datasets where the key. In addition, the AZA sequence (events following the pattern AZS-AZA-AZA-AZA-AZS) are read into an additional dataset with key 'AZAseq'. Since this dataset does not contain every individual AZA or AZS event, it does not replace the individual datasets.\n", "\n", "A log of the processing is also generated.\n", "\n", "Optionally, the deployment and recovery dates can be passed. If they are, then the datasets will be sliced to these dates." ] }, { "cell_type": "code", "execution_count": 3, "id": "73497da9", "metadata": { "execution": { "iopub.execute_input": "2025-09-27T06:16:55.278564Z", "iopub.status.busy": "2025-09-27T06:16:55.278342Z", "iopub.status.idle": "2025-09-27T06:16:55.559998Z", "shell.execute_reply": "2025-09-27T06:16:55.559529Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for join will change from join='outer' to join='exact'. This change will result in the following ValueError: cannot be aligned with join='exact' because index/labels/sizes are not equal along these coordinates (dimensions): 'new_index' ('new_index',) The recommendation is to set join explicitly for this case.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n", "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/readers.py:375: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.\n", " combined_dataset = xr.merge(list(datasets.values()))\n" ] } ], "source": [ "fn = 'sample_data.csv'\n", "STN = 'sample'\n", "deploy_date = '2023-02-27'\n", "recovery_date = '2023-03-08T08:00:00'\n", "\n", "# Process filename\n", "file_path = os.path.join(data_path, fn)\n", "file_root = fn.split('.')[0]\n", "platform_id = file_root\n", "today = datetime.datetime.now()\n", "start_time = today.strftime(\"%Y%m%dT%H\")\n", "\n", "# Create a log file\n", "log_file = os.path.join(data_path, f\"{platform_id}_{start_time}_read.log\")\n", "logf_with_path = os.path.join(data_path, log_file)\n", "logging.basicConfig(\n", " filename=logf_with_path,\n", " encoding='utf-8',\n", " format=\"%(asctime)s %(levelname)-8s %(funcName)s %(message)s\",\n", " filemode=\"w\", # 'w' to overwrite, 'a' to append\n", " level=logging.INFO,\n", " datefmt=\"%Y%m%dT%H%M%S\",\n", " force=True,\n", " )\n", "_log.info('Reading AZA from CSV to netCDF')\n", "_log.info('Processing data from: %s', file_path)\n", "\n", "\n", "# Process the CSV file and create xarray datasets containing the data\n", "datasets = readers.read_csv_to_xarray(file_path)\n" ] }, { "cell_type": "markdown", "id": "1f7a84ba", "metadata": {}, "source": [ "## Step 2: Write the data to netCDF" ] }, { "cell_type": "code", "execution_count": 4, "id": "affaa641", "metadata": { "execution": { "iopub.execute_input": "2025-09-27T06:16:55.561578Z", "iopub.status.busy": "2025-09-27T06:16:55.561411Z", "iopub.status.idle": "2025-09-27T06:16:55.669454Z", "shell.execute_reply": "2025-09-27T06:16:55.668959Z" } }, "outputs": [], "source": [ "writers.save_datasets(datasets, file_path, overwrite=True)" ] }, { "cell_type": "markdown", "id": "ad927bb2", "metadata": {}, "source": [ "## Step 3: Further processing of pressure records and AZA sequence records\n", "\n", "Note that in the steps above, the original data were not changed, with the exception of changes noted in the log file.\n", "\n", "This means that each of the newly created *.nc mirrors--almost exactly--the original data.\n", "\n", "Here we carry out additional steps including:\n", "\n", "1. Load netCDF datasets based on provided keys. (`readers.load_netcdf_datasets(data_path, file_root, keys)`)\n", "2. Convert units and adjust time formats. (`timetools.convert_seconds_to_float(ds)`)\n", "3. Assign sampling time for the AZA sequence dataset. (`timetools.assign_sample_time()`)\n", "4. Filter datasets to the deployment period. (`timetools.cut_to_deployment(datasets, deploy_date, recovery_date)`)\n", "5. Reindex datasets on time. (`timetools.reindex_on_time(ds)`)\n", "6. Rename variables in datasets using predefined mappings. (using `vars_to_rename`, a dict)\n", "7. Add dataset-specific attributes to variables.\n", "8. Combine selected datasets into a single dataset. (using `xr.merge()`)\n", "9. Interpolate the combined dataset to an evenly spaced time grid. (after determining median interval of hourly with `timetools.calculate_sample_rate(ds)`)\n", "10. Clean and organize dataset attributes and variables.\n", "11. Process the AZA sequence dataset, including renaming attributes and cleaning variables.\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "54879aeb", "metadata": { "execution": { "iopub.execute_input": "2025-09-27T06:16:55.671234Z", "iopub.status.busy": "2025-09-27T06:16:55.671080Z", "iopub.status.idle": "2025-09-27T06:16:55.802223Z", "shell.execute_reply": "2025-09-27T06:16:55.801785Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/fetchAZA/tools.py:353: FutureWarning: In a future version of xarray the default value for join will change from join='outer' to join='exact'. This change will result in the following ValueError: cannot be aligned with join='exact' because index/labels/sizes are not equal along these coordinates (dimensions): 'RECORD_TIME' ('RECORD_TIME',) The recommendation is to set join explicitly for this case.\n", " combined_dataset = xr.merge(combined_datasets.values(), compat=\"override\")\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "/home/runner/work/fetchAZA/fetchAZA/data/sample_data*.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_KLR.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_DQZ.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_AZAseq.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_PIES.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_TMP.nc\n", "/home/runner/work/fetchAZA/fetchAZA/data/sample_data_INC.nc\n", "Dataset AZAseq not included in combined datasets\n" ] }, { "data": { "text/html": [ "
<xarray.Dataset> Size: 7kB\n", "Dimensions: (TIME: 103)\n", "Coordinates:\n", " * TIME (TIME) datetime64[ns] 824B 2023-03-03T23:00:00 ... ...\n", "Data variables: (12/14)\n", " TIME_OF_FLIGHT_RMLE (TIME) float64 824B 5.11 5.11 5.11 ... 5.148 5.146\n", " TIME_OF_FLIGHT_XCORR (TIME) float64 824B 5.11 5.11 5.109 ... 5.109 5.109\n", " HALFLIFE (TIME) float32 412B 251.4 230.3 229.1 ... 345.3 335.9\n", " MAGNITUDE (TIME) float32 412B 6.903e+03 9.485e+03 ... 1.506e+03\n", " PEAK_POSITION (TIME) float32 412B 0.008512 0.008704 ... 0.007808\n", " PITCH (TIME) float32 412B -1.875 -1.862 ... -1.853 -1.847\n", " ... ...\n", " PRETRIGGER_NOISE (TIME) float32 412B 82.88 82.62 86.51 ... 64.36 65.5\n", " RDIFF (TIME) float32 412B 178.6 183.0 169.2 ... 86.83 89.4\n", " ROLL (TIME) float32 412B -0.1813 -0.1906 ... -0.1844\n", " TEMPERATURE (TIME) float32 412B 3.073 2.9 2.756 ... 2.372 2.378\n", " TEMPERATURE_DQZ (TIME) float32 412B 5.63 4.87 4.27 ... 2.43 2.43 2.43\n", " TEMPERATURE_KLR (TIME) float32 412B 7.012 5.885 4.936 ... 2.215 2.214\n", "Attributes:\n", " Calculation_Version_PIES: 3\n", " Index_DQZ: 3\n", " Index_INC: 1\n", " Index_KLR: 5\n", " Index_PIES: 3\n", " Index_TMP: 4\n", " Serial Number: 1262636\n", " Serial_Number_DQZ: 155399\n", " Serial_Number_INC: 0\n", " Serial_Number_KLR: 1262636\n", " Serial_Number_TMP: 0\n", " UID: 007217