{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "95ab64e6-253c-4bca-a747-d0753217a8e1", "metadata": {}, "outputs": [], "source": [ "## check mean file ##" ] }, { "cell_type": "code", "execution_count": 165, "id": "c1816805-1e35-46a3-bee4-988418ea7d99", "metadata": {}, "outputs": [], "source": [ "import cmocean.cm as cm\n", "import copy\n", "import matplotlib.pyplot as plt\n", "from matplotlib.collections import PatchCollection\n", "from matplotlib.patches import Rectangle\n", "import numpy as np\n", "import xarray as xr" ] }, { "cell_type": "code", "execution_count": 179, "id": "1888b4b8-2a40-4773-9546-a321fb252698", "metadata": {}, "outputs": [], "source": [ "plt.rcParams['font.size'] = 15\n", "cm_balance = copy.copy(cm.balance)\n", "cm_balance.set_bad('grey')" ] }, { "cell_type": "code", "execution_count": 11, "id": "6336ad35-7649-4b6b-b28b-4e72e9ea5550", "metadata": {}, "outputs": [], "source": [ "data = xr.open_dataset('/data/sallen/results/Reshapr/output/SalishSeaCast_hour_vvelocity_20150725_20150804.nc')" ] }, { "cell_type": "code", "execution_count": 4, "id": "413067c5-9e76-4029-858c-26beb502c847", "metadata": {}, "outputs": [], "source": [ "igrid = 386\n", "j1, j2 = 210, 320" ] }, { "cell_type": "code", "execution_count": 12, "id": "f6fe07be-1151-45b7-b750-69e416e882c8", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray 'vomecrty' (time: 264, depth: 40, gridY: 1, gridX: 110)>\n",
"[1161600 values with dtype=float32]\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 2015-07-25T00:30:00 ... 2015-08-04T23:30:00\n",
" * depth (depth) float32 0.5 1.5 2.5 3.5 4.5 ... 360.7 387.6 414.5 441.5\n",
" * gridY (gridY) int64 386\n",
" * gridX (gridX) int64 210 211 212 213 214 215 ... 314 315 316 317 318 319\n",
"Attributes:\n",
" units: m s-1\n",
" standard_name: sea_water_y_velocity\n",
" long_name: Ocean Current Along y-Axis<xarray.Dataset>\n",
"Dimensions: (time: 4, depth: 40, gridY: 1, gridX: 110)\n",
"Coordinates:\n",
" * depth (depth) float32 0.5 1.5 2.5 3.5 4.5 ... 360.7 387.6 414.5 441.5\n",
" * gridY (gridY) int64 386\n",
" * gridX (gridX) int64 210 211 212 213 214 215 ... 314 315 316 317 318 319\n",
" * time (time) datetime64[ns] 2015-06-15 ... 2015-09-15\n",
"Data variables:\n",
" vomecrty (time, depth, gridY, gridX) float32 ...\n",
"Attributes:\n",
" name: SalishSeaCast_hour_vvelocity_20150601_20150901\n",
" description: Hourly v velocity extracted from SalishSeaCast v202111\n",
" history: 2024-07-03 14:15 -07:00: Generated by `reshapr extract /dat...\n",
" Conventions: CF-1.6<xarray.Dataset>\n",
"Dimensions: (time: 48, depth: 40, gridY: 1, gridX: 110)\n",
"Coordinates:\n",
" * depth (depth) float32 0.5 1.5 2.5 3.5 4.5 ... 360.7 387.6 414.5 441.5\n",
" * gridY (gridY) int64 386\n",
" * gridX (gridX) int64 210 211 212 213 214 215 ... 314 315 316 317 318 319\n",
" * time (time) datetime64[ns] 2015-01-15T12:00:00 ... 2018-12-15T12:00:00\n",
"Data variables:\n",
" vomecrty (time, depth, gridY, gridX) float32 0.0 0.0 0.0 ... 0.0 0.0 0.0\n",
"Attributes:\n",
" name: SalishSeaCast_hour_vvelocity_20150101_20151231\n",
" description: Hourly v velocity extracted from SalishSeaCast v202111\n",
" history: 2024-07-03 16:05 -07:00: Generated by `reshapr extract /dat...\n",
" Conventions: CF-1.6<xarray.Dataset>\n",
"Dimensions: (time: 24, depth: 40, gridY: 1, gridX: 110)\n",
"Coordinates:\n",
" * depth (depth) float32 0.5 1.5 2.5 3.5 4.5 ... 360.7 387.6 414.5 441.5\n",
" * gridY (gridY) int64 386\n",
" * gridX (gridX) int64 210 211 212 213 214 215 ... 314 315 316 317 318 319\n",
" * time (time) datetime64[ns] 2015-01-15T12:00:00 ... 2015-12-15T12:00:00\n",
"Data variables:\n",
" vomecrty (time, depth, gridY, gridX) float32 0.0 0.0 0.0 ... 0.0 0.0 0.0\n",
"Attributes:\n",
" name: SalishSeaCast_hour_vvelocity_20150101_20151231\n",
" description: Hourly v velocity extracted from SalishSeaCast v202111\n",
" history: 2024-07-03 16:05 -07:00: Generated by `reshapr extract /dat...\n",
" Conventions: CF-1.6