{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "23f65325-f0b4-4e2f-9aad-807f22388add", "metadata": {}, "outputs": [], "source": [ "import cmocean.cm as cm\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import xarray as xr\n", "from netCDF4 import Dataset\n", "from sklearn.decomposition import PCA\n", "import pandas as pd\n", "\n", "from salishsea_tools import viz_tools" ] }, { "cell_type": "code", "execution_count": 3, "id": "7da68a15-c49d-462b-ac10-e0b2d195b799", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[[0. 0. 0. ... 0. 0. 0.]\n", " [0. 0. 0. ... 0. 0. 0.]\n", " [0. 0. 0. ... 0. 0. 0.]\n", " ...\n", " [0. 0. 0. ... 0. 0. 0.]\n", " [0. 0. 0. ... 0. 0. 0.]\n", " [0. 0. 0. ... 0. 0. 0.]]\n" ] }, { "data": { "text/html": [ "
<xarray.Dataset>\n", "Dimensions: (time: 366, depth: 1, gridY: 898, gridX: 398)\n", "Coordinates:\n", " * time (time) datetime64[ns] 2021-01-01T12:00:00 ... 2022-01-01T12:00:00\n", " * depth (depth) float32 76.59\n", " * gridY (gridY) int64 0 1 2 3 4 5 6 7 ... 890 891 892 893 894 895 896 897\n", " * gridX (gridX) int64 0 1 2 3 4 5 6 7 ... 390 391 392 393 394 395 396 397\n", "Data variables:\n", " vosaline (time, depth, gridY, gridX) float32 nan nan nan ... nan nan nan\n", "Attributes:\n", " name: SalishSeaCast daily salinity_test_20210101_20220101\n", " description: Daily extracted from SalishSeaCast v201905 hindcast\n", " history: 2022-11-12 14:34 -08:00: Generated by `reshapr extract /oce...\n", " Conventions: CF-1.6
<xarray.Dataset>\n", "Dimensions: (time: 366, depth: 1, gridY: 898, gridX: 398)\n", "Coordinates:\n", " * time (time) datetime64[ns] 2021-01-01T12:00:00 ... 2022-01-01T12:00:00\n", " * depth (depth) float32 76.59\n", " * gridY (gridY) int64 0 1 2 3 4 5 6 7 ... 890 891 892 893 894 895 896 897\n", " * gridX (gridX) int64 0 1 2 3 4 5 6 7 ... 390 391 392 393 394 395 396 397\n", "Data variables:\n", " vosaline (time, depth, gridY, gridX) float32 nan nan nan ... nan nan nan\n", "Attributes:\n", " name: SalishSeaCast daily salinity_test_20210101_20220101\n", " description: Daily extracted from SalishSeaCast v201905 hindcast\n", " history: 2022-11-12 14:34 -08:00: Generated by `reshapr extract /oce...\n", " Conventions: CF-1.6