{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## DFO Nutrient Comparison" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false, "scrolled": true }, "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", "\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "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", "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", "14.30 | \n", "'deg_C_(IPTS68)' | \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", "10.76 | \n", "'deg_C_(IPTS68)' | \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", "10.06 | \n", "'deg_C_(IPTS68)' | \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", "8.85 | \n", "'deg_C_(IPTS68)' | \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", "8.32 | \n", "'deg_C_(IPTS68)' | \n", "75.4 | \n", "1982-07-16 01:21:00 | \n", "