{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## DFO Si Plots" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import os\n", "import pandas as pd\n", "import netCDF4 as nc\n", "import datetime as dt\n", "from salishsea_tools import evaltools as et, viz_tools\n", "import gsw\n", "import matplotlib.gridspec as gridspec\n", "import matplotlib as mpl\n", "import matplotlib.dates as mdates\n", "import cmocean as cmo\n", "import scipy.interpolate as sinterp\n", "import pickle\n", "import cmocean\n", "\n", "mpl.rc('xtick', labelsize=12)\n", "mpl.rc('ytick', labelsize=12)\n", "mpl.rc('legend', fontsize=12)\n", "mpl.rc('axes', titlesize=12)\n", "mpl.rc('axes', labelsize=12)\n", "mpl.rc('figure', titlesize=12)\n", "mpl.rc('font', size=12)\n", "mpl.rc('text', usetex=True)\n", "mpl.rc('text.latex', preamble = ','.join(r'''\n", " \\usepackage{txfonts}\n", " \\usepackage{lmodern}\n", " '''.split()))\n", "mpl.rc('font', family='sans-serif', weight='normal', style='normal')\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "with nc.Dataset('/ocean/eolson/MEOPAR/NEMO-forcing/grid/mesh_mask201702_noLPE.nc') as mesh:\n", " navlon=mesh.variables['nav_lon'][:,:]\n", " navlat=mesh.variables['nav_lat'][:,:]\n", " tmask=mesh.variables['tmask'][:,:,:,:]\n", " gdept=mesh.variables['gdept_1d'][0,:]\n", "with nc.Dataset('/results/SalishSea/hindcast.201812/01jan16/SalishSea_1h_20160101_20160101_ptrc_T.nc') as ftemp:\n", " bounds=np.copy(ftemp.variables['deptht_bounds'][:,:])" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | Year | \n", "Month | \n", "Day | \n", "Hour | \n", "Lat | \n", "Lon | \n", "Pressure | \n", "Depth | \n", "Ammonium | \n", "Ammonium_units | \n", "Chlorophyll_Extracted | \n", "Chlorophyll_Extracted_units | \n", "N | \n", "Si | \n", "Silicate_units | \n", "AbsSal | \n", "ConsT | \n", "Z | \n", "dtUTC | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1982.0 | \n", "7.0 | \n", "16.0 | \n", "1.35 | \n", "49.25 | \n", "-123.943 | \n", "NaN | \n", "12.0 | \n", "NaN | \n", "None | \n", "5.28 | \n", "mg/m^3 | \n", "6.6 | \n", "13.6 | \n", "umol/L | \n", "NaN | \n", "NaN | \n", "12.0 | \n", "1982-07-16 01:21:00 | \n", "
1 | \n", "1982.0 | \n", "7.0 | \n", "16.0 | \n", "1.35 | \n", "49.25 | \n", "-123.943 | \n", "NaN | \n", "21.5 | \n", "NaN | \n", "None | \n", "0.61 | \n", "mg/m^3 | \n", "21.2 | \n", "45.0 | \n", "umol/L | \n", "NaN | \n", "NaN | \n", "21.5 | \n", "1982-07-16 01:21:00 | \n", "
2 | \n", "1982.0 | \n", "7.0 | \n", "16.0 | \n", "1.35 | \n", "49.25 | \n", "-123.943 | \n", "NaN | \n", "30.5 | \n", "NaN | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "23.5 | \n", "47.4 | \n", "umol/L | \n", "NaN | \n", "NaN | \n", "30.5 | \n", "1982-07-16 01:21:00 | \n", "
3 | \n", "1982.0 | \n", "7.0 | \n", "16.0 | \n", "1.35 | \n", "49.25 | \n", "-123.943 | \n", "NaN | \n", "52.3 | \n", "NaN | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "28.0 | \n", "50.2 | \n", "umol/L | \n", "NaN | \n", "NaN | \n", "52.3 | \n", "1982-07-16 01:21:00 | \n", "
4 | \n", "1982.0 | \n", "7.0 | \n", "16.0 | \n", "1.35 | \n", "49.25 | \n", "-123.943 | \n", "NaN | \n", "75.4 | \n", "NaN | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "26.5 | \n", "49.1 | \n", "umol/L | \n", "NaN | \n", "NaN | \n", "75.4 | \n", "1982-07-16 01:21:00 | \n", "