{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## DFO Nutrient Comparison" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import sqlalchemy\n", "from sqlalchemy import (create_engine, Column, String, Integer, Float, MetaData, \n", " Table, type_coerce, ForeignKey, case)\n", "from sqlalchemy.orm import mapper, create_session, relationship, aliased, Session\n", "from sqlalchemy.ext.declarative import declarative_base\n", "from sqlalchemy import case\n", "import numpy as np\n", "from sqlalchemy.ext.automap import automap_base\n", "import matplotlib.pyplot as plt\n", "import sqlalchemy.types as types\n", "from sqlalchemy.sql import and_, or_, not_, func\n", "from sqlalchemy.sql import select\n", "import os\n", "from os.path import isfile\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 datetime\n", "import glob\n", "import gsw\n", "import matplotlib.gridspec as gridspec\n", "import matplotlib as mpl\n", "import matplotlib.dates as mdates\n", "\n", "mpl.rc('xtick', labelsize=16)\n", "mpl.rc('ytick', labelsize=16)\n", "mpl.rc('legend', fontsize=12)\n", "mpl.rc('axes', titlesize=16)\n", "mpl.rc('axes', labelsize=16)\n", "mpl.rc('figure', titlesize=16)\n", "mpl.rc('font', size=16)\n", "\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": null, "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", "T | \n", "T_units | \n", "Z | \n", "dtUTC | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "1.9 | \n", "NaN | \n", "None | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "15.31 | \n", "32.14 | \n", "umol/L | \n", "29.227507 | \n", "9.7647 | \n", "'deg_C_(ITS90)' | \n", "1.883998 | \n", "2015-02-11 11:04:07 | \n", "
1 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "6.6 | \n", "NaN | \n", "None | \n", "None | \n", "2.57 | \n", "mg/m^3 | \n", "17.13 | \n", "33.90 | \n", "umol/L | \n", "29.484341 | \n", "9.6880 | \n", "'deg_C_(ITS90)' | \n", "6.544340 | \n", "2015-02-11 11:04:07 | \n", "
2 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "6.7 | \n", "NaN | \n", "None | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "NaN | \n", "NaN | \n", "umol/L | \n", "29.484839 | \n", "9.6828 | \n", "'deg_C_(ITS90)' | \n", "6.643495 | \n", "2015-02-11 11:04:07 | \n", "
3 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "11.0 | \n", "NaN | \n", "None | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "NaN | \n", "NaN | \n", "umol/L | \n", "30.144549 | \n", "9.3646 | \n", "'deg_C_(ITS90)' | \n", "10.907117 | \n", "2015-02-11 11:04:07 | \n", "
4 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "11.0 | \n", "NaN | \n", "None | \n", "None | \n", "NaN | \n", "mg/m^3 | \n", "20.62 | \n", "37.65 | \n", "umol/L | \n", "30.157913 | \n", "9.3586 | \n", "'deg_C_(ITS90)' | \n", "10.907117 | \n", "2015-02-11 11:04:07 | \n", "