{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Accessing trajectory data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Within the folder for each float there is also a netCDF file with the data during the time the float was drifting, this is the data not included during the profiling part of the cycle. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First, import libraries:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import xarray as xr\n", "import netCDF4\n", "from matplotlib import pyplot as plt\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "Rtraj = xr.open_dataset('../../Data/202107-ArgoData/dac/coriolis/6901254/6901254_Rtraj.nc')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset> Size: 2MB\n", "Dimensions: (N_PARAM: 3, N_MEASUREMENT: 6853,\n", " N_CYCLE: 103, N_HISTORY: 1774)\n", "Dimensions without coordinates: N_PARAM, N_MEASUREMENT, N_CYCLE, N_HISTORY\n", "Data variables: (12/102)\n", " DATA_TYPE object 8B ...\n", " FORMAT_VERSION object 8B ...\n", " HANDBOOK_VERSION object 8B ...\n", " REFERENCE_DATE_TIME object 8B ...\n", " DATE_CREATION object 8B ...\n", " DATE_UPDATE object 8B ...\n", " ... ...\n", " HISTORY_PARAMETER (N_HISTORY) object 14kB ...\n", " HISTORY_PREVIOUS_VALUE (N_HISTORY) float32 7kB ...\n", " HISTORY_INDEX_DIMENSION (N_HISTORY) object 14kB ...\n", " HISTORY_START_INDEX (N_HISTORY) float64 14kB ...\n", " HISTORY_STOP_INDEX (N_HISTORY) float64 14kB ...\n", " HISTORY_QCTEST (N_HISTORY) object 14kB ...\n", "Attributes:\n", " title: Argo float trajectory file\n", " institution: CORIOLIS\n", " source: Argo float\n", " history: 2019-01-15T11:25:20Z creation; 2021-06-30T1...\n", " references: http://www.argodatamgt.org/Documentation\n", " user_manual_version: 3.1\n", " Conventions: Argo-3.1 CF-1.6\n", " featureType: trajectory\n", " decoder_version: CODA_043b\n", " comment_on_resolution: JULD and PRES variable resolutions depend o...\n", " comment_on_measurement_code: Meaning of some specific measurement codes ...