import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import netCDF4 as nc
import datetime as dt
from salishsea_tools import evaltools as et, viz_tools
import gsw
import matplotlib.gridspec as gridspec
import matplotlib as mpl
import matplotlib.dates as mdates
import cmocean as cmo
import scipy.interpolate as sinterp
import pickle
import cmocean
mpl.rc('xtick', labelsize=12)
mpl.rc('ytick', labelsize=12)
mpl.rc('legend', fontsize=12)
mpl.rc('axes', titlesize=12)
mpl.rc('axes', labelsize=12)
mpl.rc('figure', titlesize=12)
mpl.rc('font', size=12)
mpl.rc('text', usetex=True)
mpl.rc('text.latex', preamble = ','.join(r'''
\usepackage{txfonts}
\usepackage{lmodern}
'''.split()))
mpl.rc('font', family='sans-serif', weight='normal', style='normal')
%matplotlib inline
df=et.loadDFO()
df.head()
Year | Month | Day | Hour | Lat | Lon | Pressure | Depth | Ammonium | Ammonium_units | Chlorophyll_Extracted | Chlorophyll_Extracted_units | N | Si | Silicate_units | AbsSal | ConsT | Z | dtUTC | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1982.0 | 7.0 | 16.0 | 1.35 | 49.25 | -123.943 | NaN | 12.0 | NaN | None | 5.28 | mg/m^3 | 6.6 | 13.6 | umol/L | NaN | NaN | 12.0 | 1982-07-16 01:21:00 |
1 | 1982.0 | 7.0 | 16.0 | 1.35 | 49.25 | -123.943 | NaN | 21.5 | NaN | None | 0.61 | mg/m^3 | 21.2 | 45.0 | umol/L | NaN | NaN | 21.5 | 1982-07-16 01:21:00 |
2 | 1982.0 | 7.0 | 16.0 | 1.35 | 49.25 | -123.943 | NaN | 30.5 | NaN | None | NaN | mg/m^3 | 23.5 | 47.4 | umol/L | NaN | NaN | 30.5 | 1982-07-16 01:21:00 |
3 | 1982.0 | 7.0 | 16.0 | 1.35 | 49.25 | -123.943 | NaN | 52.3 | NaN | None | NaN | mg/m^3 | 28.0 | 50.2 | umol/L | NaN | NaN | 52.3 | 1982-07-16 01:21:00 |
4 | 1982.0 | 7.0 | 16.0 | 1.35 | 49.25 | -123.943 | NaN | 75.4 | NaN | None | NaN | mg/m^3 | 26.5 | 49.1 | umol/L | NaN | NaN | 75.4 | 1982-07-16 01:21:00 |
with nc.Dataset('/ocean/eolson/MEOPAR/NEMO-forcing/grid/mesh_mask201702_noLPE.nc') as mesh:
navlon=mesh.variables['nav_lon'][:,:]
navlat=mesh.variables['nav_lat'][:,:]
tmask=mesh.variables['tmask'][:,:,:,:]
gdept=mesh.variables['gdept_1d'][0,:]
e3t0=mesh.variables['e3t_0'][0,:,:,:]
bathy=np.sum(e3t0,0)
with nc.Dataset('/results/SalishSea/hindcast.201812/01jan16/SalishSea_1h_20160101_20160101_ptrc_T.nc') as ftemp:
bounds=np.copy(ftemp.variables['deptht_bounds'][:,:])
#d1=et._gridHoriz(df.loc[df.Z>150].copy(deep=True),tmask,navlon,navlat,wrapSearch=False,resetIndex=True);
d1=et._gridHoriz(df.copy(deep=True),tmask,navlon,navlat,wrapSearch=False,resetIndex=True);
d1['k']=np.nan
for ind, row in d1.iterrows():
ik=et._getZInd_bin(row['Z'],None,boundsFlag=True)
if (not np.isnan(ik)) and (tmask[0,ik,row['j'],row['i']]==1):
d1.loc[ind,['k']]=ik
(Lat,Lon)= 47.05 -122.31666666666666 not matched to domain (Lat,Lon)= 47.1 -122.7 not matched to domain (Lat,Lon)= 47.1 -122.68333333333334 not matched to domain (Lat,Lon)= 47.166666666666664 -122.51666666666667 not matched to domain (Lat,Lon)= 49.29933333333334 -122.983 not matched to domain (Lat,Lon)= 49.30222166666667 -122.94861166666666 not matched to domain (Lat,Lon)= 49.3025 -122.939445 not matched to domain (Lat,Lon)= 49.3025 -122.93277833333333 not matched to domain (Lat,Lon)= 49.304833333333335 -122.94116666666666 not matched to domain (Lat,Lon)= 49.306945 -122.941945 not matched to domain (Lat,Lon)= 49.30722166666666 -122.93527833333333 not matched to domain (Lat,Lon)= 49.312778333333334 -122.94111166666667 not matched to domain (Lat,Lon)= 49.312778333333334 -122.9325 not matched to domain (Lat,Lon)= 50.47666666666667 -126.17833333333333 not matched to domain (Lat,Lon)= 50.4882 -126.3484 not matched to domain (Lat,Lon)= 50.49666666666667 -126.31166666666667 not matched to domain (Lat,Lon)= 50.60466666666667 -126.35616666666667 not matched to domain (Lat,Lon)= 50.60516666666667 -126.3565 not matched to domain (Lat,Lon)= 50.605333333333334 -126.3565 not matched to domain (Lat,Lon)= 50.6318 -126.4979 not matched to domain (Lat,Lon)= 50.63466666666667 -126.422 not matched to domain (Lat,Lon)= 50.63483333333333 -126.42216666666667 not matched to domain (Lat,Lon)= 50.63483333333333 -126.42166666666667 not matched to domain (Lat,Lon)= 50.63483333333333 -126.4215 not matched to domain (Lat,Lon)= 50.63483333333333 -126.42133333333334 not matched to domain (Lat,Lon)= 50.635 -126.425 not matched to domain (Lat,Lon)= 50.635 -126.4225 not matched to domain (Lat,Lon)= 50.63516666666666 -126.42233333333333 not matched to domain (Lat,Lon)= 50.6355 -126.4245 not matched to domain (Lat,Lon)= 50.63783333333333 -126.35433333333333 not matched to domain (Lat,Lon)= 50.655 -126.183 not matched to domain (Lat,Lon)= 50.655166666666666 -126.18466666666667 not matched to domain (Lat,Lon)= 50.65533333333333 -126.183 not matched to domain (Lat,Lon)= 50.65533333333333 -126.18283333333333 not matched to domain (Lat,Lon)= 50.66016666666667 -126.10983333333333 not matched to domain (Lat,Lon)= 50.66983333333334 -126.067 not matched to domain (Lat,Lon)= 50.67066666666667 -126.48383333333334 not matched to domain (Lat,Lon)= 50.671166666666664 -126.48416666666667 not matched to domain (Lat,Lon)= 50.671166666666664 -126.48383333333334 not matched to domain (Lat,Lon)= 50.671166666666664 -126.48316666666666 not matched to domain (Lat,Lon)= 50.67133333333334 -126.48333333333333 not matched to domain (Lat,Lon)= 50.6715 -126.4835 not matched to domain (Lat,Lon)= 50.6715 -126.48316666666666 not matched to domain (Lat,Lon)= 50.67283333333334 -126.48016666666666 not matched to domain (Lat,Lon)= 50.6795 -125.93683333333334 not matched to domain (Lat,Lon)= 50.68443333333333 -126.23803333333333 not matched to domain (Lat,Lon)= 50.69166666666667 -125.8445 not matched to domain (Lat,Lon)= 50.69316666666667 -125.7835 not matched to domain (Lat,Lon)= 50.693333333333335 -125.785 not matched to domain (Lat,Lon)= 50.693666666666665 -125.78316666666667 not matched to domain (Lat,Lon)= 50.72 -126.5735 not matched to domain (Lat,Lon)= 50.72 -126.57333333333334 not matched to domain (Lat,Lon)= 50.72 -126.57316666666667 not matched to domain (Lat,Lon)= 50.720166666666664 -126.5735 not matched to domain (Lat,Lon)= 50.720166666666664 -126.57316666666667 not matched to domain (Lat,Lon)= 50.720166666666664 -126.57266666666666 not matched to domain (Lat,Lon)= 50.7265 -126.18183333333333 not matched to domain (Lat,Lon)= 50.7265 -126.1815 not matched to domain (Lat,Lon)= 50.7265 -126.18116666666667 not matched to domain (Lat,Lon)= 50.72666666666667 -126.182 not matched to domain (Lat,Lon)= 50.727 -126.18116666666667 not matched to domain (Lat,Lon)= 50.72716666666667 -126.18066666666667 not matched to domain (Lat,Lon)= 50.73611666666667 -126.15408333333333 not matched to domain (Lat,Lon)= 50.783166666666666 -126.61166666666666 not matched to domain (Lat,Lon)= 50.7835 -126.61166666666666 not matched to domain (Lat,Lon)= 50.78366666666667 -126.61133333333333 not matched to domain (Lat,Lon)= 50.784 -126.61366666666666 not matched to domain (Lat,Lon)= 50.784 -126.61183333333334 not matched to domain (Lat,Lon)= 50.7845 -126.611 not matched to domain (Lat,Lon)= 50.784666666666666 -126.61933333333333 not matched to domain (Lat,Lon)= 50.78516666666667 -126.618 not matched to domain (Lat,Lon)= 50.7926 -126.48951666666666 not matched to domain (Lat,Lon)= 50.797016666666664 -126.49456666666667 not matched to domain (Lat,Lon)= 50.801 -125.62166666666667 not matched to domain (Lat,Lon)= 50.801050000000004 -126.49818333333333 not matched to domain (Lat,Lon)= 50.802533333333336 -126.49893333333333 not matched to domain (Lat,Lon)= 50.8046 -126.5291 not matched to domain (Lat,Lon)= 50.80765 -126.4941 not matched to domain (Lat,Lon)= 50.81283333333333 -126.52383333333333 not matched to domain (Lat,Lon)= 50.813 -126.52483333333333 not matched to domain (Lat,Lon)= 50.81333333333333 -126.52533333333334 not matched to domain (Lat,Lon)= 50.814 -126.52566666666667 not matched to domain (Lat,Lon)= 50.815666666666665 -126.42466666666667 not matched to domain (Lat,Lon)= 50.81763333333333 -126.2207 not matched to domain (Lat,Lon)= 50.820166666666665 -126.39266666666667 not matched to domain (Lat,Lon)= 50.839 -126.33066666666667 not matched to domain (Lat,Lon)= 50.839 -126.32833333333333 not matched to domain (Lat,Lon)= 50.839166666666664 -126.329 not matched to domain (Lat,Lon)= 50.839333333333336 -126.328 not matched to domain (Lat,Lon)= 50.84 -126.33 not matched to domain (Lat,Lon)= 50.84016666666667 -126.32883333333334 not matched to domain (Lat,Lon)= 50.840333333333334 -126.33166666666666 not matched to domain (Lat,Lon)= 50.8405 -126.3295 not matched to domain (Lat,Lon)= 50.8553 -126.51111666666667 not matched to domain (Lat,Lon)= 50.861333333333334 -126.6195 not matched to domain (Lat,Lon)= 50.8615 -126.6195 not matched to domain (Lat,Lon)= 50.8615 -126.61866666666667 not matched to domain (Lat,Lon)= 50.861666666666665 -126.62 not matched to domain (Lat,Lon)= 50.86183333333334 -126.6215 not matched to domain (Lat,Lon)= 50.862 -126.619 not matched to domain (Lat,Lon)= 50.8735 -126.552 not matched to domain (Lat,Lon)= 50.873916666666666 -126.62033333333333 not matched to domain (Lat,Lon)= 50.8762 -126.6183 not matched to domain (Lat,Lon)= 50.884966666666664 -126.42748333333333 not matched to domain (Lat,Lon)= 50.89233333333333 -126.57666666666667 not matched to domain (Lat,Lon)= 50.9086 -126.5451 not matched to domain (Lat,Lon)= 50.91466666666667 -126.24516666666666 not matched to domain (Lat,Lon)= 50.915 -126.2455 not matched to domain (Lat,Lon)= 50.91566666666667 -126.245 not matched to domain (Lat,Lon)= 50.91898333333334 -126.27181666666667 not matched to domain (Lat,Lon)= 50.935833333333335 -126.482 not matched to domain (Lat,Lon)= 50.93633333333333 -126.4815 not matched to domain (Lat,Lon)= 50.941066666666664 -126.48468333333334 not matched to domain (Lat,Lon)= 50.99816666666667 -126.72866666666667 not matched to domain (Lat,Lon)= 50.998333333333335 -126.72766666666666 not matched to domain (Lat,Lon)= 50.998333333333335 -126.7275 not matched to domain (Lat,Lon)= 50.9985 -126.7275 not matched to domain (Lat,Lon)= 51.008833333333335 -126.70366666666666 not matched to domain (Lat,Lon)= 51.009 -126.7035 not matched to domain (Lat,Lon)= 51.009 -126.70283333333333 not matched to domain (Lat,Lon)= 51.009166666666665 -126.70416666666667 not matched to domain (Lat,Lon)= 51.018 -126.523 not matched to domain (Lat,Lon)= 51.037166666666664 -126.71633333333334 not matched to domain (Lat,Lon)= 51.0375 -126.71716666666667 not matched to domain (Lat,Lon)= 51.0375 -126.717 not matched to domain (Lat,Lon)= 51.03783333333333 -126.71633333333334 not matched to domain (Lat,Lon)= 51.038333333333334 -126.7165 not matched to domain (Lat,Lon)= 51.041333333333334 -125.568 not matched to domain (Lat,Lon)= 51.062333333333335 -126.7455 not matched to domain (Lat,Lon)= 51.0625 -126.742 not matched to domain (Lat,Lon)= 51.06333333333333 -126.74333333333334 not matched to domain (Lat,Lon)= 51.0635 -126.74266666666666 not matched to domain (Lat,Lon)= 51.099666666666664 -126.74783333333333 not matched to domain (Lat,Lon)= 51.099833333333336 -126.74983333333333 not matched to domain (Lat,Lon)= 51.1 -126.75 not matched to domain (Lat,Lon)= 51.10016666666667 -126.75 not matched to domain (Lat,Lon)= 51.10066666666667 -126.74916666666667 not matched to domain (Lat,Lon)= 51.13633333333333 -126.6915 not matched to domain (Lat,Lon)= 51.1665 -126.94683333333333 not matched to domain (Lat,Lon)= 51.1665 -126.94666666666667 not matched to domain (Lat,Lon)= 51.166666666666664 -126.9465 not matched to domain (Lat,Lon)= 51.1805 -126.92416666666666 not matched to domain (Lat,Lon)= 51.18066666666667 -126.92433333333334 not matched to domain (Lat,Lon)= 51.183166666666665 -126.65833333333333 not matched to domain (Lat,Lon)= 51.183166666666665 -126.658 not matched to domain (Lat,Lon)= 51.1835 -126.65833333333333 not matched to domain (Lat,Lon)= 51.18366666666667 -126.6585 not matched to domain (Lat,Lon)= 51.3595 -127.11933333333333 not matched to domain (Lat,Lon)= 51.67433333333334 -127.28216666666667 not matched to domain (Lat,Lon)= 51.67466666666667 -127.284 not matched to domain (Lat,Lon)= 51.675 -127.28416666666666 not matched to domain (Lat,Lon)= 51.675 -127.28366666666666 not matched to domain (Lat,Lon)= 51.67516666666667 -127.28466666666667 not matched to domain (Lat,Lon)= 51.675333333333334 -127.285 not matched to domain (Lat,Lon)= 51.675333333333334 -127.2835 not matched to domain (Lat,Lon)= 51.6755 -127.2835 not matched to domain (Lat,Lon)= 51.675666666666665 -127.293 not matched to domain (Lat,Lon)= 51.6775 -127.3335 not matched to domain (Lat,Lon)= 51.678 -127.33333333333333 not matched to domain (Lat,Lon)= 51.678333333333335 -127.332 not matched to domain (Lat,Lon)= 51.678333333333335 -127.33166666666666 not matched to domain (Lat,Lon)= 51.6785 -127.332 not matched to domain (Lat,Lon)= 51.678666666666665 -127.33266666666667 not matched to domain (Lat,Lon)= 51.678666666666665 -127.332 not matched to domain (Lat,Lon)= 51.678666666666665 -127.3315 not matched to domain (Lat,Lon)= 51.67883333333333 -127.3325 not matched to domain (Lat,Lon)= 51.679 -127.33233333333334 not matched to domain
# drop Saanich Inlet
tmask2=np.copy(tmask[0,0,:,:])
tmask2[328:371,180:217]=tmask[0,0,328:371,180:217]+2
plt.pcolormesh(tmask2)
plt.xlim(150,250)
plt.ylim(310,400)
d1.drop(d1.loc[(d1.i>=180)&(d1.i<217)&(d1.j>=328)&(d1.j<371)].index.values,inplace=True)
# also drop east side Vancouver Island points:
d1.drop(d1.loc[(d1.i<10)&(d1.j>=460)&(d1.j<480)].index.values,inplace=True)
d1['YD']=[(dt.datetime(int(yy),int(mm),int(dd))-dt.datetime(int(yy),1,1)).total_seconds()/(24*3600) for yy,mm,dd in zip(d1['Year'].values,d1['Month'].values,d1['Day'].values)]
np.unique(d1.loc[(d1.N==0)&(d1.Z>20),['Year']])
array([2006.])
d1.loc[(d1.N==0)&(d1.Z>20)]
Year | Month | Day | Hour | Lat | Lon | Pressure | Depth | Ammonium | Ammonium_units | ... | Si | Silicate_units | AbsSal | ConsT | Z | dtUTC | j | i | k | YD | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11627 | 2006.0 | 6.0 | 16.0 | 6.132222 | 49.443333 | -124.337167 | 125.2 | NaN | NaN | None | ... | 17.4 | umol/L | 30.487816 | 8.774221 | 124.095477 | 2006-06-16 06:07:56 | 567 | 183 | 27.0 | 166.0 |
1 rows × 23 columns
d1.loc[(d1.Si==0)&(d1.Z>20)]
Year | Month | Day | Hour | Lat | Lon | Pressure | Depth | Ammonium | Ammonium_units | ... | Si | Silicate_units | AbsSal | ConsT | Z | dtUTC | j | i | k | YD | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21422 | 1932.0 | 4.0 | 1.0 | 22.0 | 48.866667 | -122.866667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-04-01 22:00:00 | 351 | 327 | 21.0 | 91.0 |
21423 | 1932.0 | 4.0 | 1.0 | 22.0 | 48.866667 | -122.866667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-04-01 22:00:00 | 351 | 327 | 23.0 | 91.0 |
21424 | 1932.0 | 4.0 | 1.0 | 22.0 | 48.866667 | -122.866667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-04-01 22:00:00 | 351 | 327 | NaN | 91.0 |
21425 | 1932.0 | 4.0 | 1.0 | 22.0 | 48.866667 | -122.866667 | NaN | 180.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 180.0 | 1932-04-01 22:00:00 | 351 | 327 | NaN | 91.0 |
21433 | 1932.0 | 4.0 | 1.0 | 18.0 | 48.866667 | -122.866667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-04-01 18:00:00 | 351 | 327 | 21.0 | 91.0 |
21434 | 1932.0 | 4.0 | 1.0 | 18.0 | 48.866667 | -122.866667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-04-01 18:00:00 | 351 | 327 | 23.0 | 91.0 |
21435 | 1932.0 | 4.0 | 1.0 | 18.0 | 48.866667 | -122.866667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-04-01 18:00:00 | 351 | 327 | NaN | 91.0 |
21436 | 1932.0 | 4.0 | 1.0 | 18.0 | 48.866667 | -122.866667 | NaN | 180.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 180.0 | 1932-04-01 18:00:00 | 351 | 327 | NaN | 91.0 |
21444 | 1932.0 | 4.0 | 2.0 | 5.0 | 48.866667 | -122.866667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-04-02 05:00:00 | 351 | 327 | 21.0 | 92.0 |
21445 | 1932.0 | 4.0 | 2.0 | 5.0 | 48.866667 | -122.866667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-04-02 05:00:00 | 351 | 327 | 23.0 | 92.0 |
21446 | 1932.0 | 4.0 | 2.0 | 5.0 | 48.866667 | -122.866667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-04-02 05:00:00 | 351 | 327 | NaN | 92.0 |
21447 | 1932.0 | 4.0 | 2.0 | 5.0 | 48.866667 | -122.866667 | NaN | 180.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 180.0 | 1932-04-02 05:00:00 | 351 | 327 | NaN | 92.0 |
21455 | 1932.0 | 4.0 | 17.0 | 22.0 | 48.566667 | -123.016667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-04-17 22:00:00 | 303 | 267 | 21.0 | 107.0 |
21456 | 1932.0 | 4.0 | 17.0 | 22.0 | 48.566667 | -123.016667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-04-17 22:00:00 | 303 | 267 | 23.0 | 107.0 |
21457 | 1932.0 | 4.0 | 17.0 | 22.0 | 48.566667 | -123.016667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-04-17 22:00:00 | 303 | 267 | 26.0 | 107.0 |
21465 | 1932.0 | 4.0 | 18.0 | 11.0 | 48.566667 | -123.016667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-04-18 11:00:00 | 303 | 267 | 21.0 | 108.0 |
21466 | 1932.0 | 4.0 | 18.0 | 11.0 | 48.566667 | -123.016667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-04-18 11:00:00 | 303 | 267 | 23.0 | 108.0 |
21467 | 1932.0 | 4.0 | 18.0 | 11.0 | 48.566667 | -123.016667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-04-18 11:00:00 | 303 | 267 | 26.0 | 108.0 |
21474 | 1932.0 | 5.0 | 5.0 | 7.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-05-05 07:00:00 | 728 | 126 | 21.0 | 125.0 |
21475 | 1932.0 | 5.0 | 5.0 | 7.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-05-05 07:00:00 | 728 | 126 | 23.0 | 125.0 |
21476 | 1932.0 | 5.0 | 5.0 | 7.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-05-05 07:00:00 | 728 | 126 | NaN | 125.0 |
21477 | 1932.0 | 5.0 | 5.0 | 7.0 | 49.966667 | -125.166667 | NaN | 180.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 180.0 | 1932-05-05 07:00:00 | 728 | 126 | NaN | 125.0 |
21485 | 1932.0 | 5.0 | 5.0 | 20.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-05-05 20:00:00 | 728 | 126 | 21.0 | 125.0 |
21486 | 1932.0 | 5.0 | 5.0 | 20.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-05-05 20:00:00 | 728 | 126 | 23.0 | 125.0 |
21487 | 1932.0 | 5.0 | 5.0 | 20.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-05-05 20:00:00 | 728 | 126 | NaN | 125.0 |
21488 | 1932.0 | 5.0 | 5.0 | 20.0 | 49.966667 | -125.166667 | NaN | 180.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 180.0 | 1932-05-05 20:00:00 | 728 | 126 | NaN | 125.0 |
21496 | 1932.0 | 6.0 | 24.0 | 23.0 | 48.866667 | -122.866667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-06-24 23:00:00 | 351 | 327 | 21.0 | 175.0 |
21497 | 1932.0 | 6.0 | 24.0 | 23.0 | 48.866667 | -122.866667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-06-24 23:00:00 | 351 | 327 | 23.0 | 175.0 |
21498 | 1932.0 | 6.0 | 24.0 | 23.0 | 48.866667 | -122.866667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-06-24 23:00:00 | 351 | 327 | NaN | 175.0 |
21499 | 1932.0 | 6.0 | 24.0 | 23.0 | 48.866667 | -122.866667 | NaN | 200.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 200.0 | 1932-06-24 23:00:00 | 351 | 327 | NaN | 175.0 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
21569 | 1932.0 | 8.0 | 14.0 | 18.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-14 18:00:00 | 728 | 126 | 21.0 | 226.0 |
21570 | 1932.0 | 8.0 | 14.0 | 18.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-14 18:00:00 | 728 | 126 | 23.0 | 226.0 |
21571 | 1932.0 | 8.0 | 14.0 | 18.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-08-14 18:00:00 | 728 | 126 | NaN | 226.0 |
21572 | 1932.0 | 8.0 | 14.0 | 18.0 | 49.966667 | -125.166667 | NaN | 150.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 150.0 | 1932-08-14 18:00:00 | 728 | 126 | NaN | 226.0 |
21580 | 1932.0 | 8.0 | 14.0 | 10.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-14 10:00:00 | 728 | 126 | 21.0 | 226.0 |
21581 | 1932.0 | 8.0 | 14.0 | 10.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-14 10:00:00 | 728 | 126 | 23.0 | 226.0 |
21582 | 1932.0 | 8.0 | 14.0 | 10.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-08-14 10:00:00 | 728 | 126 | NaN | 226.0 |
21583 | 1932.0 | 8.0 | 14.0 | 10.0 | 49.966667 | -125.166667 | NaN | 150.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 150.0 | 1932-08-14 10:00:00 | 728 | 126 | NaN | 226.0 |
21591 | 1932.0 | 8.0 | 14.0 | 6.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-14 06:00:00 | 728 | 126 | 21.0 | 226.0 |
21592 | 1932.0 | 8.0 | 14.0 | 6.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-14 06:00:00 | 728 | 126 | 23.0 | 226.0 |
21593 | 1932.0 | 8.0 | 14.0 | 6.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-08-14 06:00:00 | 728 | 126 | NaN | 226.0 |
21594 | 1932.0 | 8.0 | 14.0 | 6.0 | 49.966667 | -125.166667 | NaN | 150.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 150.0 | 1932-08-14 06:00:00 | 728 | 126 | NaN | 226.0 |
21602 | 1932.0 | 8.0 | 14.0 | 1.0 | 49.966667 | -125.166667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-14 01:00:00 | 728 | 126 | 21.0 | 226.0 |
21603 | 1932.0 | 8.0 | 14.0 | 1.0 | 49.966667 | -125.166667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-14 01:00:00 | 728 | 126 | 23.0 | 226.0 |
21604 | 1932.0 | 8.0 | 14.0 | 1.0 | 49.966667 | -125.166667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1932-08-14 01:00:00 | 728 | 126 | NaN | 226.0 |
21605 | 1932.0 | 8.0 | 14.0 | 1.0 | 49.966667 | -125.166667 | NaN | 150.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 150.0 | 1932-08-14 01:00:00 | 728 | 126 | NaN | 226.0 |
21613 | 1932.0 | 8.0 | 18.0 | 19.0 | 48.566667 | -123.016667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-18 19:00:00 | 303 | 267 | 21.0 | 230.0 |
21614 | 1932.0 | 8.0 | 18.0 | 19.0 | 48.566667 | -123.016667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-18 19:00:00 | 303 | 267 | 23.0 | 230.0 |
21622 | 1932.0 | 8.0 | 18.0 | 8.0 | 48.566667 | -123.016667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-18 08:00:00 | 303 | 267 | 21.0 | 230.0 |
21623 | 1932.0 | 8.0 | 18.0 | 8.0 | 48.566667 | -123.016667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-18 08:00:00 | 303 | 267 | 23.0 | 230.0 |
21631 | 1932.0 | 8.0 | 19.0 | 2.0 | 48.566667 | -123.016667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1932-08-19 02:00:00 | 303 | 267 | 21.0 | 231.0 |
21632 | 1932.0 | 8.0 | 19.0 | 2.0 | 48.566667 | -123.016667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1932-08-19 02:00:00 | 303 | 267 | 23.0 | 231.0 |
22348 | 1953.0 | 7.0 | 21.0 | 23.0 | 47.516667 | -122.466667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1953-07-21 23:00:00 | 62 | 219 | 21.0 | 201.0 |
22349 | 1953.0 | 7.0 | 21.0 | 23.0 | 47.516667 | -122.466667 | NaN | 50.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 50.0 | 1953-07-21 23:00:00 | 62 | 219 | NaN | 201.0 |
22350 | 1953.0 | 7.0 | 21.0 | 23.0 | 47.516667 | -122.466667 | NaN | 75.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 75.0 | 1953-07-21 23:00:00 | 62 | 219 | NaN | 201.0 |
22351 | 1953.0 | 7.0 | 21.0 | 23.0 | 47.516667 | -122.466667 | NaN | 100.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 100.0 | 1953-07-21 23:00:00 | 62 | 219 | NaN | 201.0 |
22360 | 1953.0 | 7.0 | 22.0 | 15.0 | 48.416667 | -122.583333 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1953-07-22 15:00:00 | 244 | 312 | NaN | 202.0 |
22542 | 1954.0 | 7.0 | 11.0 | 17.5 | 47.216667 | -122.816667 | NaN | 30.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 30.0 | 1954-07-11 17:30:00 | 28 | 132 | 21.0 | 191.0 |
22543 | 1954.0 | 7.0 | 11.0 | 17.5 | 47.216667 | -122.816667 | NaN | 35.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 35.0 | 1954-07-11 17:30:00 | 28 | 132 | 22.0 | 191.0 |
22549 | 1954.0 | 7.0 | 11.0 | 10.6 | 47.366667 | -122.666667 | NaN | 25.0 | NaN | None | ... | 0.0 | mmol/m**3 | NaN | NaN | 25.0 | 1954-07-11 10:36:00 | 47 | 172 | NaN | 191.0 |
80 rows × 23 columns
def binmean(ddf,latEdges,lonEdges):
latbins=np.digitize(ddf.Lat,latEdges)
lonbins=np.digitize(ddf.Lon,lonEdges)
midLats=.5*(latEdges[:-1]+latEdges[1:])
midLons=.5*(lonEdges[:-1]+lonEdges[1:])
xxlon,xxlat=np.meshgrid(midLons,midLats)
sums=np.zeros(np.shape(xxlon))
counts=np.zeros(np.shape(xxlon))
means=np.nan*np.ones(np.shape(xxlon))
for jj in range(0,len(midLats)):
for ii in range(0,len(midLons)):
if len(ddf.loc[(latbins==jj+1)&(lonbins==ii+1),['Si']])>=1:
means[jj,ii]=np.sum(ddf.loc[(latbins==jj+1)&(lonbins==ii+1),['Si']])/len(ddf.loc[(latbins==jj+1)&(lonbins==ii+1),['Si']])
return xxlon, xxlat, means
fig,ax=plt.subplots(12,4,figsize=(16,50))
#kk=30 #36,34,32,30
simin=40
simax=80
for mon in range(1,13):
iax=ax[mon-1,0]
kk=30
iax.contourf(navlon,navlat,tmask[0,kk,:,:],levels=(0,.5,1.5),lw=.5,colors=('darkgray','k','k'))
viz_tools.set_aspect(iax,coords='map')
idf=d1.loc[(d1.k==kk)&(d1.Si>=0)&(d1.Month==mon)]
lo,la,mm=binmean(idf,latEdges=np.linspace(47,51,31),lonEdges=np.linspace(-126,-122,41))
#iax.pcolormesh(lo,la,np.ma.masked_where(np.isnan(mm),mm))
mesh=iax.scatter(lo,la,c=mm,s=6,vmin=simin,vmax=simax)
plt.colorbar(mesh,ax=iax)
iax.set_title('Depth='+str(gdept[kk]))
iax.set_ylabel('Month='+str(mon))
iax.set_xlim(-126,-122)
iax.set_ylim(47.1,50.5)
iax=ax[mon-1,1]
kk=32
iax.contourf(navlon,navlat,tmask[0,kk,:,:],levels=(0,.5,1.5),lw=.5,colors=('darkgray','k','k'))
viz_tools.set_aspect(iax,coords='map')
idf=d1.loc[(d1.k==kk)&(d1.Si>=0)&(d1.Month==mon)]
lo,la,mm=binmean(idf,latEdges=np.linspace(47,51,31),lonEdges=np.linspace(-126,-122,41))
#iax.pcolormesh(lo,la,np.ma.masked_where(np.isnan(mm),mm))
mesh=iax.scatter(lo,la,c=mm,s=6,vmin=simin,vmax=simax)
plt.colorbar(mesh,ax=iax)
iax.set_title('Depth='+str(gdept[kk]))
iax.set_xlim(-126,-122)
iax.set_ylim(47.1,50.5)
iax=ax[mon-1,2]
kk=34
iax.contourf(navlon,navlat,tmask[0,kk,:,:],levels=(0,.5,1.5),lw=.5,colors=('darkgray','k','k'))
viz_tools.set_aspect(iax,coords='map')
idf=d1.loc[(d1.k==kk)&(d1.Si>=0)&(d1.Month==mon)]
lo,la,mm=binmean(idf,latEdges=np.linspace(47,51,31),lonEdges=np.linspace(-126,-122,41))
#iax.pcolormesh(lo,la,np.ma.masked_where(np.isnan(mm),mm))
mesh=iax.scatter(lo,la,c=mm,s=6,vmin=simin,vmax=simax)
plt.colorbar(mesh,ax=iax)
iax.set_title('Depth='+str(gdept[kk]))
iax.set_xlim(-126,-122)
iax.set_ylim(47.1,50.5)
iax=ax[mon-1,3]
kk=36
iax.contourf(navlon,navlat,tmask[0,kk,:,:],levels=(0,.5,1.5),lw=.5,colors=('darkgray','k','k'))
viz_tools.set_aspect(iax,coords='map')
idf=d1.loc[(d1.k==kk)&(d1.Si>=0)&(d1.Month==mon)]
lo,la,mm=binmean(idf,latEdges=np.linspace(47,51,31),lonEdges=np.linspace(-126,-122,41))
#iax.pcolormesh(lo,la,np.ma.masked_where(np.isnan(mm),mm))
mesh=iax.scatter(lo,la,c=mm,s=6,vmin=simin,vmax=simax)
plt.colorbar(mesh,ax=iax)
iax.set_title('Depth='+str(gdept[kk]))
iax.set_xlim(-126,-122)
iax.set_ylim(47.1,50.5)
fig,ax=plt.subplots(1,2,figsize=(10,4))
#kk=30 #36,34,32,30
simin=40
simax=80
for mon in range(1,2):
iax=ax[0];#ax[mon-1,1]
kk=32
iax.contourf(navlon,navlat,tmask[0,kk,:,:],levels=(0,.5,1.5),lw=.5,colors=('darkgray','k','k'))
viz_tools.set_aspect(iax,coords='map')
d1bath=np.array([bathy[j,i] for i,j in zip(d1['i'],d1['j'])])
df0=d1.loc[(d1.Lon<-123.3)&(d1.Lon>-123.6)&(d1.Lat<49.2)&(d1.Lat>48.85)&(d1.Si>=0)&(d1bath>400)]
lo,la,mm=binmean(df0,latEdges=np.linspace(47,51,31),lonEdges=np.linspace(-126,-122,41))
#iax.pcolormesh(lo,la,np.ma.masked_where(np.isnan(mm),mm))
mesh=iax.scatter(lo,la,c=mm,s=6,vmin=simin,vmax=simax)
plt.colorbar(mesh,ax=iax)
#iax.set_title('Depth='+str(gdept[kk]))
fig,ax=plt.subplots(1,3,figsize=(16,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=37
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs CT, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7337b4978>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=36
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7334499e8>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=34
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd73304d908>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=32
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7316bad68>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=30
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7542cae80>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=29
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd755e64940>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=28
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd756325e48>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
for valm, groupedm in df0.groupby(['Month']):
ik=34
ax[1].plot(groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['AbsSal']],
groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['Si']].values/groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['N']].values,
'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['ConsT']],
groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['Si']].values/groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['N']].values,
'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['AbsSal']],
groupedm.loc[(groupedm.k==ik)&(groupedm.N>=0),['ConsT']].values,
'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12]],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd756825ba8>
df0.loc[(df0.k==34)].groupby(['Year'])['Si'].count()
Year 1978.0 1 1996.0 7 1997.0 4 1998.0 6 1999.0 2 2000.0 9 2001.0 11 2002.0 16 2003.0 14 2004.0 11 2005.0 13 2006.0 12 2007.0 11 2008.0 12 2009.0 12 2010.0 20 2011.0 15 2012.0 12 2013.0 9 2014.0 14 2015.0 9 2016.0 12 2017.0 12 2018.0 9 Name: Si, dtype: int64
df0.loc[(df0.k==35)].groupby(['Year'])['Si'].count()
Year 1996.0 3 1997.0 3 1998.0 3 1999.0 1 2000.0 3 2001.0 3 2002.0 3 2003.0 3 2004.0 2 2005.0 2 2006.0 3 2008.0 3 2010.0 4 2011.0 3 2013.0 2 2014.0 3 2015.0 1 2016.0 2 2017.0 4 2018.0 2 Name: Si, dtype: int64
df0.loc[(df0.k==36)].groupby(['Year'])['Si'].count()
Year 1996.0 3 1997.0 2 1998.0 3 1999.0 1 2000.0 3 2001.0 5 2002.0 7 2003.0 9 2004.0 6 2005.0 6 2006.0 5 2007.0 5 2008.0 5 2009.0 8 2010.0 11 2011.0 3 2012.0 5 2013.0 4 2014.0 5 2015.0 3 2016.0 6 2017.0 4 2018.0 2 Name: Si, dtype: int64
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
df1=df0.loc[df0.Year==2010]
for valm, groupedm in df1.groupby(['Month']):
ik=34
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[ii] for ii in range(1,13) if ii in ps.keys()],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('2010 Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7380d6978>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
df1=df0.loc[df0.Year==2010]
for valm, groupedm in df1.groupby(['Month']):
ik=35
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[ii] for ii in range(1,13) if ii in ps.keys()],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title('2010 Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd75656fa58>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
df1=df0.loc[df0.Year==2002]
for valm, groupedm in df1.groupby(['Month']):
ik=34
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[ii] for ii in range(1,13) if ii in ps.keys()],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title(' 2002 Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd756726198>
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
df1=df0.loc[df0.Year==2003]
for valm, groupedm in df1.groupby(['Month']):
ik=36
ax[1].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[2].plot(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],'o',color=col[int(valm)],alpha=1)
ax[3].plot(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],'o',color=col[int(valm)],alpha=1)
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[ii] for ii in range(1,13) if ii in ps.keys()],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title(' 2003 Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
<matplotlib.text.Text at 0x7fd7560ea6d8>
df1.keys()
Index(['Year', 'Month', 'Day', 'Hour', 'Lat', 'Lon', 'Pressure', 'Depth', 'Ammonium', 'Ammonium_units', 'Chlorophyll_Extracted', 'Chlorophyll_Extracted_units', 'N', 'Si', 'Silicate_units', 'AbsSal', 'ConsT', 'Z', 'dtUTC', 'j', 'i', 'k', 'YD'], dtype='object')
fig,ax=plt.subplots(1,4,figsize=(20,4))
fig.subplots_adjust(wspace=.5)
col=('midnightblue','steelblue','darkturquoise','lime',
'seagreen','darkkhaki','darkorange','saddlebrown','firebrick',
'lightcoral','fuchsia','mediumorchid','blueviolet')
ps=dict()
df1=df0.loc[df0.Year==2003]
for valm, groupedm in df1.groupby(['Month']):
ik=36
cmin=0
cmax=365
if np.sum(groupedm.k==ik)>0:
ax[1].scatter(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['Si']],c=groupedm.loc[groupedm.k==ik,['YD']],
vmin=cmin,vmax=cmax,cmap=plt.get_cmap('hsv'))
ax[2].scatter(groupedm.loc[groupedm.k==ik,['ConsT']],groupedm.loc[groupedm.k==ik,['Si']],c=groupedm.loc[groupedm.k==ik,['YD']],
vmin=cmin,vmax=cmax,cmap=plt.get_cmap('hsv'))
m=ax[3].scatter(groupedm.loc[groupedm.k==ik,['AbsSal']],groupedm.loc[groupedm.k==ik,['ConsT']],c=groupedm.loc[groupedm.k==ik,['YD']],
vmin=cmin,vmax=cmax,cmap=plt.get_cmap('hsv'))
means=groupedm.groupby(['k']).agg({'Si':np.mean,'Z':np.mean})
stds=groupedm.groupby(['k']).agg({'Si':np.std})
ns=groupedm.groupby(['k'])['Si'].count()
ps[int(valm)],=ax[0].plot(means['Si'][ns>2],means['Z'][ns>2],'-',color=col[int(valm)],
label=str(int(valm)))
ax[0].errorbar(means['Si'][ns>2],means['Z'][ns>2],xerr=stds['Si'][ns>2],color=col[int(valm)])
ax[0].legend(handles=[ps[ii] for ii in range(1,13) if ii in ps.keys()],
bbox_to_anchor=(1.3, 1.0))
ax[0].set_ylim(400,50)
ax[0].set_xlim(30,100)
ax[0].set_ylabel('Depth (m)')
ax[0].set_xlabel('dSi ($\muup$M Si)')
ax[1].set_ylabel('dSi ($\muup$M Si)')
ax[1].set_title(' 2003 Si vs SA, '+str(int(bounds[ik,0]))+'m$<$Z$<$'+str(int(bounds[ik,1]))+'m')
fig.colorbar(m,ax=ax[3])
<matplotlib.colorbar.Colorbar at 0x7fd73870f0f0>
df1.loc[df1.k==ik,['Year','Month','Day','Lat','Lon','Pressure','Si','AbsSal','ConsT']]
Year | Month | Day | Lat | Lon | Pressure | Si | AbsSal | ConsT | |
---|---|---|---|---|---|---|---|---|---|
40566 | 2003.0 | 4.0 | 26.0 | 49.163000 | -123.550167 | 371.7 | 70.7 | 31.364321 | 9.209034 |
40599 | 2003.0 | 4.0 | 27.0 | 49.162833 | -123.549500 | 375.0 | 71.6 | 31.352728 | 9.208075 |
40699 | 2003.0 | 6.0 | 19.0 | 49.164000 | -123.548167 | 352.7 | 73.4 | 31.260225 | 9.148055 |
40700 | 2003.0 | 6.0 | 19.0 | 49.164000 | -123.548167 | 369.9 | 75.0 | 31.274537 | 9.164992 |
40732 | 2003.0 | 6.0 | 20.0 | 49.163333 | -123.549500 | 352.3 | 73.2 | 31.275391 | 9.166978 |
40733 | 2003.0 | 6.0 | 20.0 | 49.163333 | -123.549500 | 372.2 | 72.9 | 31.293075 | 9.181456 |
40807 | 2003.0 | 9.0 | 5.0 | 49.162333 | -123.547500 | 372.3 | 56.9 | 31.491569 | 9.452973 |
40914 | 2003.0 | 12.0 | 4.0 | 49.163667 | -123.547833 | 353.2 | 65.9 | 31.417017 | 9.665293 |
40915 | 2003.0 | 12.0 | 4.0 | 49.163667 | -123.547833 | 373.8 | 65.3 | 31.423961 | 9.656753 |
plt.scatter(df1.loc[df1.k==ik,['Lon']],df1.loc[df1.k==ik,['Lat']],c=df1.loc[df1.k==ik,['Si']])
plt.xlim(-123.58,-123.53)
plt.ylim(49.16,49.17)
(49.16, 49.17)
plt.scatter(xx,xx,c=xx)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-32-8fe53c5eb46c> in <module>() ----> 1 plt.scatter(xx,xx,c=xx) NameError: name 'xx' is not defined