{ "cells": [ { "cell_type": "code", "execution_count": 71, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import netCDF4 as nc\n", "import matplotlib.pyplot as plt\n", "from salishsea_tools import viz_tools, places,geo_tools, bloomdrivers as bd, evaltools as et\n", "import xarray as xr\n", "import datetime as dt\n", "from scipy.stats import sem\n", "import scipy.stats as stats\n", "\n", "\n", "%matplotlib inline" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "from IPython.display import HTML\n", "\n", "HTML('''\n", "\n", "
''')\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load watermasks for pre- and post-September 2011 HRDPS grid" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "Watermask1 = xr.open_dataset('/ocean/ksuchy/MOAD/NEMO-forcing/grid/GEM_watermask_for_gem_files_pre_22sep11.nc')\n", "Watermask2 = xr.open_dataset('/ocean/ksuchy/MOAD/NEMO-forcing/grid/GEM_watermask_for_gem_files_22sep11_onward.nc')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# get grid corners (use 2015, pre Sept 22, 2011 and post Sept 22 2011 files)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "<xarray.DataArray (y: 33, x: 49)>\n", "dask.array<mean_agg-aggregate, shape=(33, 49), dtype=float32, chunksize=(33, 49), chunktype=numpy.ndarray>\n", "Coordinates:\n", " * x (x) float64 2.775e+05 2.8e+05 2.825e+05 ... 3.95e+05 3.975e+05\n", " * y (y) float64 3.25e+05 3.275e+05 3.3e+05 ... 4e+05 4.025e+05 4.05e+05