In [1]:
import xarray as xr
import numpy as np
import pandas as pd
%matplotlib inline
from matplotlib import pyplot as plt
from dask.diagnostics import ProgressBar
import seaborn as sns
from matplotlib.colors import LogNorm

In [2]:
# resampling frequency in number of days
freq=2

preprocessing :

  • inference
    • basemap
    • Synthetic Data for inference and variable {mean}
    • Synthetic Data for std {BT}
    • check pair-wise cr, remove redundant?
    • GAM degree < 3, Chap 7 & Chap 1-7
    • BR & GB, $J=1,2,3,4,5,6 (J<6)$, $\lambda$, $d(LOSS)$
      • DB is not applicable here; Loss is based on expected empirical margin error
      • paper & manual
    • RF & BG
      • BG = RF with m=p
    • add prediction maps

In [15]:
# let's check data quality without float data structure
# load preprocessed float data, and start the interpolation right here!!!!
var7 = "chlrateweekno"
var6 = "sst4"
var5 = "par"
var4 = "t865"
var3 = "kd490"
var2 = "cdm"
var1 = "chl"
vardist = "dist"

indir_prefix = "../data_collector_globcolour/output.data.interpolate/2017GDPfloat/" + "df_Globcolor_"
indir = indir_prefix + var1 + vardist + var2 + var3 + var4 + var5 + var6 + var7 + "_" + str(freq) + "d.csv"

floatDF_tmp = pd.read_csv(indir,index_col=0)
print(floatDF_tmp)


### plot for id 125776, which will be fit by LDS
#plt.figure(figsize=(10,12))
floatDF_tmp[floatDF_tmp.id == 135776].plot(x='time', y ='chl_rate', title=('id - %d' % 135776), figsize=(12,10), fontsize=12 )
plt.show();
plt.close("all")


             time        id        lat        lon       temp         ve  \
0      2002-07-04     10206  16.229625  66.330375        NaN  13.064500   
1      2002-07-04     10208  13.891875  69.552375        NaN   8.505125   
2      2002-07-04     11089  16.354375  64.683750  27.954125  12.168000   
3      2002-07-04     15703  13.903250  69.583125  28.552250   8.685875   
4      2002-07-04     27069  20.169750  68.737500  29.012000  26.958750   
5      2002-07-04     28842  18.878875  60.694625  27.701750  10.499125   
6      2002-07-04     34159  12.548125  58.914250        NaN  27.354250   
7      2002-07-04     34210   6.476750  56.925000  26.694875  -9.666750   
8      2002-07-04     34211   8.602375  67.929125  28.278000  20.618125   
9      2002-07-04     34212   6.232000  64.750250  28.470750  14.641875   
10     2002-07-04     34708  10.167500  59.691500  27.185500  47.792000   
11     2002-07-04     34710  12.933625  49.905250  30.910625 -34.754625   
12     2002-07-04     34714  13.594750  63.649625  27.686625  38.417625   
13     2002-07-04     34716   7.491000  65.384500  28.801750  38.942875   
14     2002-07-04     34718  16.328750  72.396375  29.153625  21.462750   
15     2002-07-04     34719  17.764375  70.946250  28.922500  19.908500   
16     2002-07-04     34720  14.825375  69.187000  28.644250  10.269000   
17     2002-07-04     34721  17.190250  65.375250  27.943750   8.379375   
18     2002-07-04     34722  11.729625  70.472250  28.734000  10.214125   
19     2002-07-04     34723  16.749625  66.254750  28.475000   0.856250   
20     2002-07-04   2134712   9.742125  63.583375  27.970125  18.412375   
21     2002-07-06     10206  16.162625  66.489250        NaN   5.785500   
22     2002-07-06     10208  13.612125  69.713375        NaN  12.205750   
23     2002-07-06     11089  16.257125  64.871250  27.814125  12.088375   
24     2002-07-06     15703  13.629125  69.731500  28.564000  10.980875   
25     2002-07-06     27069  20.178125  69.169625  28.880500  26.281500   
26     2002-07-06     28842  18.739000  60.853750  27.637250   6.151625   
27     2002-07-06     34159  12.652750  59.301875        NaN  25.588000   
28     2002-07-06     34210   6.190250  56.802375  26.767625 -11.306375   
29     2002-07-06     34211   8.339625  68.264250  28.402750  20.324125   
...           ...       ...        ...        ...        ...        ...   
16631  2017-06-27  63158530   7.997625  57.333250  28.894000  23.081625   
16632  2017-06-27  63255180   6.398625  63.172750  29.623625  14.311500   
16633  2017-06-27  63258900  10.842000  67.534125  29.245750  11.606750   
16634  2017-06-27  63259180  10.016625  70.727750  29.638375  16.026250   
16635  2017-06-27  63348720   7.019250  59.563125  28.293500  16.261714   
16636  2017-06-27  64111550  16.077625  67.230375  29.273250  11.756000   
16637  2017-06-27  64113560  14.108875  62.652875  28.146125   4.833125   
16638  2017-06-27  64115560  16.656250  73.162375  29.016250  12.874750   
16639  2017-06-27  64117500   6.640500  71.276250  29.393625  14.076000   
16640  2017-06-29    147140  11.545571  60.831429  28.257286  69.951333   
16641  2017-06-29    147144  14.329714  70.836571  29.282000  18.335667   
16642  2017-06-29  62321990  12.929125  61.603375  28.041750  25.157375   
16643  2017-06-29  63157510   8.115125  60.306500  28.645750  15.762250   
16644  2017-06-29  63158530   7.722750  57.568750  28.544625   5.937500   
16645  2017-06-29  63255180   6.441750  63.398750  29.582375  15.888000   
16646  2017-06-29  63258900  10.620143  67.673000  29.257714  11.542333   
16647  2017-06-29  63259180   9.759875  70.961250  29.514125  16.910429   
16648  2017-06-29  64111550  15.617125  67.449250  28.957125  15.281250   
16649  2017-06-29  64113560  13.945625  62.713375  28.018750   2.225375   
16650  2017-06-29  64115560  16.782375  73.270500  28.640875   1.515571   
16651  2017-06-29  64117500   6.388125  71.361375  29.419250   1.644500   
16652  2017-07-01  62321990  12.811000  61.820000  27.924000        NaN   
16653  2017-07-01  63157510   8.179500  60.531000  28.568000  27.193000   
16654  2017-07-01  63158530   7.426000  57.606000  28.339000        NaN   
16655  2017-07-01  64111550  15.195875  67.680875  28.690625  13.977625   
16656  2017-07-01  64113560  13.792625  62.749375  27.973625  -1.289625   
16657  2017-07-01  64117500   6.087750  71.436125  29.238250   2.928875   
16658  2017-07-03  64111550  15.032000  67.807000  28.605000        NaN   
16659  2017-07-03  64113560  13.760000  62.716000  27.871000        NaN   
16660  2017-07-03  64117500   5.869000  71.419000  29.169000        NaN   

              vn        spd   var_lat   var_lon     ...            sst4  \
0      -8.650875  15.915625  0.000724  0.002281     ...             NaN   
1     -20.755000  22.603500  0.000052  0.000093     ...       27.679999   
2      -7.286875  14.582375  0.000076  0.000150     ...             NaN   
3     -20.195125  22.251500  0.000053  0.000098     ...       26.326951   
4       7.891750  28.453250  0.000058  0.000108     ...       26.866739   
5      -0.333875  23.813750  0.000118  0.000254     ...       25.931666   
6       4.591750  28.099500  0.000063  0.000119     ...       23.185548   
7     -13.510125  17.964875  0.000081  0.000168     ...       26.106709   
8     -12.301625  24.182875  0.000047  0.000084     ...       26.824478   
9      13.108750  20.799125  0.000050  0.000090     ...             NaN   
10      2.521375  47.992125  0.000052  0.000096     ...       25.766874   
11     24.402875  48.126875  0.000038  0.000067     ...       30.530624   
12     12.527125  40.572875  0.000058  0.000109     ...       24.548584   
13     -0.596250  39.294625  0.000052  0.000094     ...       27.967499   
14    -24.061500  32.457375  0.000048  0.000085     ...       26.124999   
15     -7.665125  22.295250  0.000052  0.000094     ...       28.239999   
16    -36.005250  37.705250  0.000061  0.000113     ...       27.593749   
17     -9.067750  13.409375  0.000063  0.000120     ...       27.090923   
18     -3.672500  11.342750  0.000067  0.000126     ...       27.518025   
19    -18.028625  18.277250  0.000054  0.000097     ...             NaN   
20    -38.201500  43.777750  0.000077  0.000153     ...       26.827336   
21     -0.843625   5.920625  0.003351  0.013747     ...       25.738749   
22    -13.799125  18.548875  0.000053  0.000095     ...       27.260026   
23     -4.507000  13.862375  0.000067  0.000128     ...       26.151249   
24    -13.594250  17.705125  0.000052  0.000095     ...       26.892363   
25     -6.339500  27.692625  0.000054  0.000100     ...       26.858637   
26     -9.741000  20.743375  0.000072  0.000140     ...       26.451495   
27      8.732750  27.544625  0.000046  0.000082     ...       26.247955   
28    -22.919375  25.629375  0.000049  0.000090     ...       25.878650   
29    -18.374000  27.596750  0.000064  0.000120     ...       27.853989   
...          ...        ...       ...       ...     ...             ...   
16631  -0.354875  25.096125  0.000323  0.000173     ...       27.812369   
16632  -2.392750  15.469375  0.000162  0.000075     ...       28.109068   
16633 -29.286625  31.665250  0.000350  0.000188     ...       28.037535   
16634 -21.843500  27.312750  0.001487  0.000982     ...       27.769999   
16635   6.473714  17.652143  0.018954  0.019842     ...       27.088428   
16636 -30.442125  33.551625  0.000003  0.000005     ...       27.989999   
16637 -10.537750  12.237625  0.000088  0.000043     ...             NaN   
16638  -0.748125  14.893000  0.000003  0.000005     ...             NaN   
16639 -16.882750  22.510000  0.000003  0.000005     ...       29.216249   
16640   9.009667  73.304667  0.000030  0.000013     ...       26.658746   
16641  -8.413667  21.134333  0.000106  0.000045     ...       28.160668   
16642 -13.650750  28.625000  0.014405  0.013842     ...       27.217637   
16643  10.527000  21.550250  0.000012  0.000009     ...       27.825140   
16644 -30.928625  31.896250  0.000039  0.000019     ...       25.643298   
16645   3.841429  19.316571  0.000260  0.000145     ...       27.619999   
16646  -3.944333  13.488667  0.000901  0.000537     ...       27.625468   
16647 -13.129429  21.434429  0.001296  0.000834     ...       28.358735   
16648 -28.283750  32.795500  0.000012  0.000008     ...             NaN   
16649 -10.275625  10.859125  0.000170  0.000080     ...             NaN   
16650  20.525714  20.780571  0.000003  0.000005     ...             NaN   
16651 -14.334875  15.014500  0.000003  0.000005     ...       29.101168   
16652        NaN        NaN  0.000225  0.000110     ...       25.446249   
16653  -0.191000  27.194000  0.000003  0.000006     ...       27.499455   
16654        NaN        NaN  0.000004  0.000006     ...       27.632053   
16655 -24.009750  28.425250  0.000003  0.000005     ...             NaN   
16656  -7.703625  10.490625  0.000096  0.000045     ...       26.389999   
16657 -24.823750  25.831125  0.000003  0.000005     ...       28.769138   
16658        NaN        NaN  0.000003  0.000005     ...             NaN   
16659        NaN        NaN  0.000120  0.000049     ...       26.002942   
16660        NaN        NaN  0.000003  0.000005     ...       28.652562   

       chlor_a_log_e  chl_rate  chl_log_e_rate  chl_rate_week  \
0                NaN       NaN             NaN            NaN   
1                NaN       NaN             NaN            NaN   
2                NaN       NaN             NaN            NaN   
3                NaN       NaN             NaN            NaN   
4                NaN       NaN             NaN            NaN   
5                NaN       NaN             NaN            NaN   
6                NaN       NaN             NaN            NaN   
7          -1.277676       NaN             NaN            NaN   
8          -3.120588       NaN             NaN            NaN   
9          -2.522997       NaN             NaN            NaN   
10         -1.074562       NaN             NaN            NaN   
11               NaN       NaN             NaN            NaN   
12               NaN       NaN             NaN            NaN   
13         -2.813881       NaN             NaN            NaN   
14               NaN       NaN             NaN            NaN   
15               NaN       NaN             NaN            NaN   
16               NaN       NaN             NaN            NaN   
17               NaN       NaN             NaN            NaN   
18               NaN       NaN             NaN            NaN   
19               NaN       NaN             NaN            NaN   
20         -1.220918       NaN             NaN            NaN   
21               NaN       NaN             NaN            NaN   
22               NaN       NaN             NaN            NaN   
23               NaN       NaN             NaN            NaN   
24               NaN       NaN             NaN            NaN   
25               NaN       NaN             NaN            NaN   
26               NaN       NaN             NaN            NaN   
27               NaN       NaN             NaN            NaN   
28         -1.156915  0.017885        0.060381       0.125197   
29               NaN       NaN             NaN            NaN   
...              ...       ...             ...            ...   
16631            NaN       NaN             NaN            NaN   
16632            NaN       NaN             NaN            NaN   
16633            NaN       NaN             NaN            NaN   
16634            NaN       NaN             NaN            NaN   
16635            NaN       NaN             NaN            NaN   
16636            NaN       NaN             NaN            NaN   
16637            NaN       NaN             NaN            NaN   
16638            NaN       NaN             NaN            NaN   
16639      -2.815971       NaN             NaN            NaN   
16640            NaN       NaN             NaN            NaN   
16641            NaN       NaN             NaN            NaN   
16642            NaN       NaN             NaN            NaN   
16643            NaN       NaN             NaN            NaN   
16644            NaN       NaN             NaN            NaN   
16645            NaN       NaN             NaN            NaN   
16646            NaN       NaN             NaN            NaN   
16647            NaN       NaN             NaN            NaN   
16648            NaN       NaN             NaN            NaN   
16649            NaN       NaN             NaN            NaN   
16650            NaN       NaN             NaN            NaN   
16651      -2.144169  0.028659        0.335901       0.200616   
16652            NaN       NaN             NaN            NaN   
16653            NaN       NaN             NaN            NaN   
16654            NaN       NaN             NaN            NaN   
16655            NaN       NaN             NaN            NaN   
16656            NaN       NaN             NaN            NaN   
16657      -2.045949  0.006046        0.049110       0.042322   
16658            NaN       NaN             NaN            NaN   
16659            NaN       NaN             NaN            NaN   
16660      -1.941810  0.007093        0.052069       0.049653   

       chl_log_e_rate_week  chl_rate_stand  chl_log_e_rate_stand  week  \
0                      NaN             NaN                   NaN    27   
1                      NaN             NaN                   NaN    27   
2                      NaN             NaN                   NaN    27   
3                      NaN             NaN                   NaN    27   
4                      NaN             NaN                   NaN    27   
5                      NaN             NaN                   NaN    27   
6                      NaN             NaN                   NaN    27   
7                      NaN             NaN                   NaN    27   
8                      NaN             NaN                   NaN    27   
9                      NaN             NaN                   NaN    27   
10                     NaN             NaN                   NaN    27   
11                     NaN             NaN                   NaN    27   
12                     NaN             NaN                   NaN    27   
13                     NaN             NaN                   NaN    27   
14                     NaN             NaN                   NaN    27   
15                     NaN             NaN                   NaN    27   
16                     NaN             NaN                   NaN    27   
17                     NaN             NaN                   NaN    27   
18                     NaN             NaN                   NaN    27   
19                     NaN             NaN                   NaN    27   
20                     NaN             NaN                   NaN    27   
21                     NaN             NaN                   NaN    27   
22                     NaN             NaN                   NaN    27   
23                     NaN             NaN                   NaN    27   
24                     NaN             NaN                   NaN    27   
25                     NaN             NaN                   NaN    27   
26                     NaN             NaN                   NaN    27   
27                     NaN             NaN                   NaN    27   
28                0.422665        0.013801              0.344767    27   
29                     NaN             NaN                   NaN    27   
...                    ...             ...                   ...   ...   
16631                  NaN             NaN                   NaN    26   
16632                  NaN             NaN                   NaN    26   
16633                  NaN             NaN                   NaN    26   
16634                  NaN             NaN                   NaN    26   
16635                  NaN             NaN                   NaN    26   
16636                  NaN             NaN                   NaN    26   
16637                  NaN             NaN                   NaN    26   
16638                  NaN             NaN                   NaN    26   
16639                  NaN             NaN                   NaN    26   
16640                  NaN             NaN                   NaN    26   
16641                  NaN             NaN                   NaN    26   
16642                  NaN             NaN                   NaN    26   
16643                  NaN             NaN                   NaN    26   
16644                  NaN             NaN                   NaN    26   
16645                  NaN             NaN                   NaN    26   
16646                  NaN             NaN                   NaN    26   
16647                  NaN             NaN                   NaN    26   
16648                  NaN             NaN                   NaN    26   
16649                  NaN             NaN                   NaN    26   
16650                  NaN             NaN                   NaN    26   
16651             2.351309        0.025321              1.738723    26   
16652                  NaN             NaN                   NaN    26   
16653                  NaN             NaN                   NaN    26   
16654                  NaN             NaN                   NaN    26   
16655                  NaN             NaN                   NaN    26   
16656                  NaN             NaN                   NaN    26   
16657             0.343771        0.001143              0.287745    26   
16658                  NaN             NaN                   NaN    27   
16659                  NaN             NaN                   NaN    27   
16660             0.364484        0.002263              0.302716    27   

       week_rotate  
0               37  
1               37  
2               37  
3               37  
4               37  
5               37  
6               37  
7               37  
8               37  
9               37  
10              37  
11              37  
12              37  
13              37  
14              37  
15              37  
16              37  
17              37  
18              37  
19              37  
20              37  
21              37  
22              37  
23              37  
24              37  
25              37  
26              37  
27              37  
28              37  
29              37  
...            ...  
16631           36  
16632           36  
16633           36  
16634           36  
16635           36  
16636           36  
16637           36  
16638           36  
16639           36  
16640           36  
16641           36  
16642           36  
16643           36  
16644           36  
16645           36  
16646           36  
16647           36  
16648           36  
16649           36  
16650           36  
16651           36  
16652           36  
16653           36  
16654           36  
16655           36  
16656           36  
16657           36  
16658           37  
16659           37  
16660           37  

[16661 rows x 27 columns]

In [16]:
# https://stackoverflow.com/questions/16780014/import-file-from-parent-directory
# https://stackoverflow.com/questions/16771894/python-nameerror-global-name-file-is-not-defined
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath("__file__"))))

from tools import chl_rates  # del(chl_rates)
import importlib
importlib.reload(chl_rates)


Out[16]:
<module 'tools.chl_rates' from '/Users/vyan2000/work_linux/2Archive/myproject/20161024xray_oceancolor/ocean_color-master/tools/chl_rates.py'>

In [17]:
print("\n ******* Reduce the Dataset to 'Nov-01 to Mar-31' ******* \n" )
floatsDF_NovMar = chl_rates.reduce_to_NovMar(floatDF_tmp)

# necessary for modification
floatsDF_NovMar.id = floatsDF_NovMar.id.astype(float)

floatsDF_NovMar


 ******* Reduce the Dataset to 'Nov-01 to Mar-31' ******* 

all the data count in [11-01, 03-31]  is  (3932,)
Out[17]:
time id lat lon temp ve vn spd var_lat var_lon ... sst4 chlor_a_log_e chl_rate chl_log_e_rate chl_rate_week chl_log_e_rate_week chl_rate_stand chl_log_e_rate_stand week week_rotate
907 2002-11-01 10206.0 10.737250 67.512250 NaN -4.832250 6.374250 9.069875 0.000272 0.000719 ... 29.292499 -1.921645 -0.005333 -0.035171 -0.037333 -0.246199 -0.011023 -0.138664 44 1
908 2002-11-01 11089.0 14.163375 65.330375 29.059750 -9.491125 6.442875 13.878500 0.000057 0.000106 ... 28.683749 NaN NaN NaN NaN NaN NaN NaN 44 1
909 2002-11-01 15707.0 14.197250 68.405375 NaN -22.495125 1.167000 22.872625 0.000071 0.000140 ... 29.338992 -1.861949 NaN NaN NaN NaN NaN NaN 44 1
910 2002-11-01 34315.0 6.824250 58.284375 29.299375 11.405750 -34.943250 39.244250 0.000045 0.000081 ... 28.621874 NaN NaN NaN NaN NaN NaN NaN 44 1
911 2002-11-01 34710.0 16.764500 63.115250 29.013125 0.536625 14.745500 15.588375 0.000062 0.000119 ... 27.504999 -0.967747 0.023261 0.065307 0.162824 0.457150 0.019548 0.369692 44 1
912 2002-11-01 34721.0 12.577000 67.553000 29.335125 1.065000 7.905750 10.247000 0.000066 0.000125 ... 29.138749 -1.702484 0.020277 0.125864 0.141940 0.881048 0.016359 0.676070 44 1
913 2002-11-03 10206.0 10.818500 67.399375 NaN -8.207500 7.311375 12.395125 0.000295 0.000778 ... 28.825901 -2.134598 -0.014037 -0.106476 -0.098258 -0.745333 -0.020329 -0.499421 44 1
914 2002-11-03 11089.0 14.247750 65.189625 28.986625 -9.065625 4.137875 12.149875 0.000060 0.000116 ... 28.817188 NaN NaN NaN NaN NaN NaN NaN 44 1
915 2002-11-03 15707.0 14.162000 68.048125 NaN -21.659125 -5.021500 22.922125 0.000074 0.000144 ... 28.937047 -1.890368 -0.002177 -0.014210 -0.015237 -0.099467 -0.007648 -0.032612 44 1
916 2002-11-03 34315.0 6.310750 58.277125 29.485250 -7.001500 -29.505125 30.616000 0.000054 0.000099 ... 28.617658 -2.041916 NaN NaN NaN NaN NaN NaN 44 1
917 2002-11-03 34710.0 16.965375 63.133750 28.976250 2.729500 11.047250 12.281625 0.000070 0.000138 ... 28.396272 -0.894924 0.014350 0.036411 0.100452 0.254880 0.010022 0.223498 44 1
918 2002-11-03 34721.0 12.647250 67.570000 29.435500 3.303000 2.865500 8.211375 0.000069 0.000135 ... 29.144785 -1.873593 -0.014330 -0.085554 -0.100308 -0.598881 -0.020642 -0.393570 44 1
919 2002-11-05 10206.0 10.902250 67.291000 NaN -7.410625 5.807000 11.830125 0.000666 0.002068 ... 29.225624 -2.149920 -0.000899 -0.007661 -0.006295 -0.053627 -0.006283 0.000520 45 2
920 2002-11-05 11089.0 14.298875 65.041250 28.893250 -10.529750 4.507125 12.297250 0.000053 0.000097 ... 28.795907 -1.865120 NaN NaN NaN NaN NaN NaN 45 2
921 2002-11-05 15707.0 14.019875 67.721875 NaN -19.399000 -13.877625 24.275125 0.000075 0.000149 ... 29.024374 -1.864933 0.001945 0.012717 0.013616 0.089021 -0.003242 0.103621 45 2
922 2002-11-05 34315.0 5.841500 58.012625 29.795625 -28.546625 -27.135500 40.240250 0.000064 0.000123 ... 29.368056 -2.034749 0.000467 0.003584 0.003267 0.025086 -0.004822 0.057411 45 2
923 2002-11-05 34710.0 17.127000 63.160750 28.991250 0.491500 10.219250 10.749875 0.000050 0.000088 ... 27.783765 -0.875778 0.003950 0.009573 0.027648 0.067013 -0.001098 0.087715 45 2
924 2002-11-05 34721.0 12.609750 67.649875 29.602625 5.022500 -1.856250 13.987000 0.000053 0.000098 ... 29.115064 -2.085555 -0.014666 -0.105981 -0.102665 -0.741867 -0.021002 -0.496915 45 2
925 2002-11-07 10206.0 11.036625 67.202125 NaN -6.844125 6.546875 11.460500 0.000174 0.000420 ... 29.025417 -2.102331 0.002839 0.023795 0.019873 0.166562 -0.002286 0.159665 45 2
926 2002-11-07 11089.0 14.366875 64.835375 28.939625 -15.401500 2.263500 16.392000 0.000056 0.000105 ... 27.886989 -1.535189 0.030269 0.164965 0.211880 1.154756 0.027041 0.873897 45 2
927 2002-11-07 15707.0 13.739500 67.399125 NaN -19.144750 -21.695125 29.499000 0.000063 0.000118 ... 29.260836 -1.836321 0.002248 0.014306 0.015737 0.100145 -0.002918 0.111661 45 2
928 2002-11-07 34315.0 5.613000 57.375375 29.647125 -49.749875 4.788500 52.729375 0.000048 0.000085 ... 29.195337 -2.075284 -0.002596 -0.020268 -0.018174 -0.141874 -0.008097 -0.063262 45 2
929 2002-11-07 34710.0 17.297375 63.170375 28.900250 -0.728375 10.725375 11.110875 0.000075 0.000148 ... 28.606822 -0.856919 0.003965 0.009429 0.027755 0.066006 -0.001082 0.086987 45 2
930 2002-11-07 34721.0 12.580125 67.781000 29.472625 8.845375 -2.604625 14.461750 0.000054 0.000099 ... 29.259667 -1.980757 0.006863 0.052399 0.048043 0.366790 0.002017 0.304383 45 2
931 2002-11-09 10206.0 11.130625 67.113250 NaN -0.825125 4.402625 5.688125 0.000866 0.002828 ... 28.841013 -1.995330 0.006899 0.053500 0.048291 0.374501 0.002055 0.309956 45 2
932 2002-11-09 11089.0 14.356250 64.586375 29.047125 -14.547875 -3.024000 15.786125 0.000090 0.000189 ... 28.048855 -1.580114 -0.004732 -0.022462 -0.033122 -0.157237 -0.010380 -0.074365 45 2
933 2002-11-09 15707.0 13.350625 67.213250 NaN -5.045875 -23.739500 24.623250 0.000089 0.000183 ... 28.893479 -1.858515 -0.001749 -0.011097 -0.012246 -0.077680 -0.007192 -0.016864 45 2
934 2002-11-09 34315.0 6.049750 56.695500 29.710625 -29.849375 44.451750 55.129000 0.000077 0.000159 ... 28.687650 NaN NaN NaN NaN NaN NaN NaN 45 2
935 2002-11-09 34710.0 17.463125 63.118375 28.698000 -5.637625 10.323375 13.189250 0.000097 0.000205 ... 28.364551 -0.836818 0.004309 0.010050 0.030165 0.070353 -0.000714 0.090128 45 2
936 2002-11-09 34721.0 12.587500 67.965125 29.499125 13.566000 1.321875 15.994875 0.000099 0.000215 ... 29.200982 -2.101805 -0.007865 -0.060524 -0.055052 -0.423665 -0.013730 -0.266930 45 2
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
15651 2017-03-29 64111550.0 19.850750 64.315375 27.278875 5.573625 -7.352375 20.865500 0.000003 0.000005 ... 27.145468 1.557945 2.233403 1.411465 15.633821 9.880254 2.382582 7.180378 13 23
15652 2017-03-29 64113560.0 17.910875 59.501250 27.885125 -45.015125 -5.034250 45.709500 0.000003 0.000005 ... 27.311041 -0.577762 0.043583 0.084406 0.305078 0.590842 0.041276 0.466319 13 23
15653 2017-03-29 64115560.0 17.650250 69.228250 28.060375 -22.306750 -9.626250 26.436750 0.000003 0.000005 ... 27.976964 NaN NaN NaN NaN NaN NaN NaN 13 23
15654 2017-03-31 145717.0 24.538375 60.574250 25.710000 -3.185125 28.984000 29.772000 0.000039 0.000018 ... 25.640085 0.014130 -1.268185 -0.626493 -8.877295 -4.385452 -1.361236 -3.130370 13 23
15655 2017-03-31 147136.0 22.011625 61.420500 27.670625 -14.775125 22.321250 28.106125 0.000104 0.000045 ... 27.334644 -0.579046 -0.087553 -0.135947 -0.612873 -0.951632 -0.098931 -0.648526 13 23
15656 2017-03-31 147142.0 19.456500 63.255250 27.754625 -7.044250 -6.666750 12.780125 0.000060 0.000026 ... 27.287339 -0.518476 -0.274849 -0.326995 -1.923944 -2.288966 -0.299184 -1.615104 13 23
15657 2017-03-31 147144.0 15.325250 69.624500 29.061500 -8.864750 8.417500 12.771250 0.000139 0.000060 ... 28.587319 NaN NaN NaN NaN NaN NaN NaN 13 23
15658 2017-03-31 147145.0 12.425500 70.965500 29.762875 10.273000 -17.926500 21.083750 0.000081 0.000036 ... 28.902694 NaN NaN NaN NaN NaN NaN NaN 13 23
15659 2017-03-31 147148.0 21.705000 66.760625 27.259500 23.339125 4.597375 24.474500 0.000210 0.000100 ... 27.289503 -0.693417 -0.084731 -0.145967 -0.593116 -1.021770 -0.095914 -0.699220 13 23
15660 2017-03-31 62321990.0 10.417000 55.695875 28.562625 25.497500 0.376375 26.685750 0.000012 0.000009 ... 27.869659 -1.635502 NaN NaN NaN NaN NaN NaN 13 23
15661 2017-03-31 63254850.0 6.924500 53.523250 28.841250 24.137500 -48.817000 56.003125 0.000017 0.000011 ... 28.066730 NaN NaN NaN NaN NaN NaN NaN 13 23
15662 2017-03-31 63254860.0 8.781375 53.103000 28.822250 29.053875 -8.353500 33.998375 0.000017 0.000011 ... 28.127196 NaN NaN NaN NaN NaN NaN NaN 13 23
15663 2017-03-31 63255180.0 9.366875 52.636625 28.981625 13.862125 -16.487625 22.569250 0.000003 0.000006 ... 28.037125 NaN NaN NaN NaN NaN NaN NaN 13 23
15664 2017-03-31 63255200.0 9.840750 53.939750 28.739750 19.588500 -0.673000 20.007625 0.000017 0.000011 ... 27.762937 -2.007172 NaN NaN NaN NaN NaN NaN 13 23
15665 2017-03-31 63255860.0 9.666250 53.522500 28.736250 26.541750 -6.531250 27.547500 0.000017 0.000011 ... 27.919621 -2.180236 NaN NaN NaN NaN NaN NaN 13 23
15666 2017-03-31 63258870.0 14.143625 63.236500 28.961375 -1.973500 12.808000 23.359625 0.000003 0.000006 ... 27.463835 -1.798567 NaN NaN NaN NaN NaN NaN 13 23
15667 2017-03-31 63258880.0 14.004750 68.857875 29.522875 12.952500 25.762250 29.288125 0.000003 0.000006 ... 28.180794 -1.720021 NaN NaN NaN NaN NaN NaN 13 23
15668 2017-03-31 63258900.0 11.807500 62.031500 28.755250 2.690375 4.064000 5.863000 0.000003 0.000006 ... 27.854867 -1.487665 NaN NaN NaN NaN NaN NaN 13 23
15669 2017-03-31 63258950.0 12.239375 62.138500 28.568875 0.500250 2.718250 5.349500 0.000003 0.000006 ... 27.865371 -1.464630 NaN NaN NaN NaN NaN NaN 13 23
15670 2017-03-31 63259180.0 11.417125 70.103875 29.880875 4.329375 -17.674375 18.418125 0.000003 0.000006 ... 28.430617 NaN NaN NaN NaN NaN NaN NaN 13 23
15671 2017-03-31 63259190.0 10.705500 65.618250 29.385000 20.701125 -4.742250 22.256250 0.000017 0.000011 ... 28.588633 -2.171569 NaN NaN NaN NaN NaN NaN 13 23
15672 2017-03-31 63259200.0 14.062500 68.586375 29.417125 24.212750 35.918250 43.947000 0.000003 0.000006 ... 27.716300 -1.858387 NaN NaN NaN NaN NaN NaN 13 23
15673 2017-03-31 63259230.0 14.468250 63.114000 28.795500 8.622125 11.534375 18.325000 0.000003 0.000006 ... 28.047337 -1.885800 NaN NaN NaN NaN NaN NaN 13 23
15674 2017-03-31 63259240.0 11.680250 66.618500 29.874875 -8.343500 5.845125 11.086750 0.000003 0.000006 ... 29.048350 NaN NaN NaN NaN NaN NaN NaN 13 23
15675 2017-03-31 63259260.0 11.514625 69.493250 30.027625 -4.889625 -29.803625 30.370375 0.000003 0.000006 ... 29.295099 NaN NaN NaN NaN NaN NaN NaN 13 23
15676 2017-03-31 63348720.0 14.531875 51.841875 28.395625 37.919000 -18.311250 42.449125 0.000017 0.000011 ... 27.898946 -1.444446 0.020225 0.094061 0.141574 0.658427 0.016303 0.515168 13 23
15677 2017-03-31 63348750.0 8.398375 55.643250 29.008875 2.571250 25.454125 26.355875 0.000003 0.000006 ... 28.144893 NaN NaN NaN NaN NaN NaN NaN 13 23
15678 2017-03-31 64111550.0 19.762750 64.301500 27.579375 -6.491000 -5.845500 15.939000 0.000003 0.000005 ... 27.311756 0.361613 -1.656703 -0.598166 -11.596920 -4.187159 -1.776630 -2.987051 13 23
15679 2017-03-31 64113560.0 17.815000 58.661000 28.167000 -43.153000 -5.924000 43.694625 0.000003 0.000005 ... 28.046490 -0.862712 -0.069568 -0.142475 -0.486979 -0.997326 -0.079702 -0.681553 13 23
15680 2017-03-31 64115560.0 17.418375 69.049750 28.281875 -0.882500 -14.698375 17.005750 0.000003 0.000005 ... 27.912761 -1.820611 NaN NaN NaN NaN NaN NaN 13 23

5903 rows × 27 columns


In [18]:
# check the float data [done]
# think about the data structure...

In [19]:
# check nan values in the spatial-temporal info
print("---------------------------------------")
print("sampling freq: "+ str(freq) + "D")
print("length of series: ", len(floatsDF_NovMar.chlor_a))
print("---------------------------------------")
cols = floatsDF_NovMar.columns.values
for col in cols:
    print("count of nans in " + col + ":" + str(floatsDF_NovMar[col].isnull().sum()) )


---------------------------------------
sampling freq: 2D
length of series:  5903
---------------------------------------
count of nans in time:0
count of nans in id:0
count of nans in lat:0
count of nans in lon:0
count of nans in temp:315
count of nans in ve:39
count of nans in vn:39
count of nans in spd:39
count of nans in var_lat:0
count of nans in var_lon:0
count of nans in var_tmp:0
count of nans in chlor_a:1240
count of nans in dist:0
count of nans in cdm:1601
count of nans in kd490:1268
count of nans in t865:1274
count of nans in par:1
count of nans in sst4:195
count of nans in chlor_a_log_e:1240
count of nans in chl_rate:1971
count of nans in chl_log_e_rate:1971
count of nans in chl_rate_week:1971
count of nans in chl_log_e_rate_week:1971
count of nans in chl_rate_stand:1971
count of nans in chl_log_e_rate_stand:1971
count of nans in week:0
count of nans in week_rotate:0

In [21]:
# dropna by default drops any row containing a missing value
# drop uncessary variables
# drop {'temp'}  => sst4
# drop {'ve', 'vn', 'spd'}
# drop {'var_lat', 'var_lon', 'var_tmp'}
# drop {'chlor_a'}
# drop {'chlor_a_log_e', 'chl_log_e_rate',
#       'chl_rate_week', 'chl_log_e_rate_week'
#       'chl_rate_stand', 'chl_log_e_rate_stand'}
# drop {'week'}       
col_listLDS_final = ['time', 'id', 'lat', 'lon',   
                     'dist', 'cdm', 'kd490', 't865',
                     'par', 'sst4', 'chl_rate', 'week_rotate']
floatsDF_NovMarInference = floatsDF_NovMar[col_listLDS_final].dropna()
# check nan values in the spatial-temporal info
print("---------------------------------------")
print("sampling freq: "+ str(freq) + "D")
print("length of series: ", len(floatsDF_NovMarInference.chl_rate))
print("---------------------------------------")
cols = floatsDF_NovMarInference.columns.values
for col in cols:
    print("count of nans in " + col + ":" + str(floatsDF_NovMarInference[col].isnull().sum()) )


---------------------------------------
sampling freq: 2D
length of series:  3533
---------------------------------------
count of nans in time:0
count of nans in id:0
count of nans in lat:0
count of nans in lon:0
count of nans in dist:0
count of nans in cdm:0
count of nans in kd490:0
count of nans in t865:0
count of nans in par:0
count of nans in sst4:0
count of nans in chl_rate:0
count of nans in week_rotate:0

In [22]:
# save the data and printout
print(floatsDF_NovMarInference)
outpath = "../data/" + "floatsDF_list_final_" + "inference_chlrate_"+ str(freq) + "d.csv"
floatsDF_NovMarInference.to_csv(outpath, sep=',')
test = pd.read_csv(outpath)
print("------------------")
print("------------------")
print("------------------")
print(test)


             time          id        lat        lon        dist       cdm  \
907    2002-11-01     10206.0  10.737250  67.512250  502.866078  0.010704   
911    2002-11-01     34710.0  16.764500  63.115250  600.162084  0.050956   
912    2002-11-01     34721.0  12.577000  67.553000  515.387804  0.013400   
913    2002-11-03     10206.0  10.818500  67.399375  514.302886  0.011303   
915    2002-11-03     15707.0  14.162000  68.048125  530.500765  0.015929   
917    2002-11-03     34710.0  16.965375  63.133750  587.351839  0.039706   
918    2002-11-03     34721.0  12.647250  67.570000  515.200394  0.011598   
919    2002-11-05     10206.0  10.902250  67.291000  525.418388  0.012077   
921    2002-11-05     15707.0  14.019875  67.721875  553.117249  0.014776   
922    2002-11-05     34315.0   5.841500  58.012625  832.817475  0.011090   
923    2002-11-05     34710.0  17.127000  63.160750  578.481759  0.038319   
924    2002-11-05     34721.0  12.609750  67.649875  505.835975  0.013121   
925    2002-11-07     10206.0  11.036625  67.202125  534.353712  0.011535   
926    2002-11-07     11089.0  14.366875  64.835375  853.620219  0.018591   
927    2002-11-07     15707.0  13.739500  67.399125  570.777775  0.017469   
928    2002-11-07     34315.0   5.613000  57.375375  824.823456  0.010102   
929    2002-11-07     34710.0  17.297375  63.170375  567.977556  0.036027   
930    2002-11-07     34721.0  12.580125  67.781000  491.213813  0.013277   
931    2002-11-09     10206.0  11.130625  67.113250  543.770628  0.010748   
932    2002-11-09     11089.0  14.356250  64.586375  878.499730  0.017420   
933    2002-11-09     15707.0  13.350625  67.213250  573.718591  0.015601   
935    2002-11-09     34710.0  17.463125  63.118375  552.699065  0.037364   
936    2002-11-09     34721.0  12.587500  67.965125  471.864626  0.011854   
937    2002-11-11     10206.0  11.153750  67.132250  541.655587  0.010009   
938    2002-11-11     11089.0  14.287500  64.346000  867.802259  0.018360   
939    2002-11-11     15707.0  13.006500  67.183625  565.489050  0.015084   
941    2002-11-11     34710.0  17.688000  63.006500  528.110232  0.037131   
942    2002-11-11     34721.0  12.704750  68.167500  453.669336  0.012019   
944    2002-11-13     11089.0  14.201750  64.063625  849.930489  0.021606   
945    2002-11-13     15707.0  12.726000  67.009375  576.564319  0.011520   
...           ...         ...        ...        ...         ...       ...   
15576  2017-03-25    147136.0  22.282875  61.552875  177.318688  0.098906   
15577  2017-03-25    147142.0  20.036875  63.500375  452.198910  0.162208   
15581  2017-03-25  62321990.0  11.301875  55.099500  149.147320  0.019585   
15582  2017-03-25  63254850.0   8.359000  53.387500  304.725372  0.011622   
15584  2017-03-25  63255200.0   9.840000  53.111250  197.477359  0.011018   
15585  2017-03-25  63255860.0   9.858625  52.955875  180.782828  0.013907   
15586  2017-03-25  63258870.0  13.723375  63.784625  862.377668  0.017331   
15589  2017-03-25  63258950.0  12.072000  62.165000  830.881300  0.035851   
15591  2017-03-25  63259190.0  11.066875  65.272500  744.981804  0.011207   
15593  2017-03-25  63259230.0  13.830750  63.338125  819.474780  0.018535   
15594  2017-03-25  63259240.0  10.294750  67.003750  564.994718  0.010359   
15597  2017-03-25  63348750.0   7.541375  55.549750  552.996743  0.012410   
15598  2017-03-25  64111550.0  19.798250  64.205000  529.771074  0.050730   
15599  2017-03-25  64113560.0  17.821000  60.225125  283.626499  0.072274   
15602  2017-03-27    147136.0  21.945375  61.255875  152.342767  0.071261   
15603  2017-03-27    147142.0  19.791125  63.470875  463.074257  0.134586   
15607  2017-03-27  62321990.0  10.854375  55.171250  196.800357  0.021827   
15609  2017-03-27  63255180.0   9.639000  52.472375  144.434017  0.011977   
15614  2017-03-27  63258900.0  11.610500  61.919625  809.839451  0.021566   
15615  2017-03-27  63258950.0  12.118250  62.176500  831.744404  0.030955   
15622  2017-03-27  63348720.0  14.534875  50.585875   50.242077  0.034725   
15623  2017-03-27  63348750.0   7.692875  55.612375  538.939427  0.011941   
15624  2017-03-27  64111550.0  19.883000  64.249375  529.148162  0.062739   
15625  2017-03-27  64113560.0  17.914625  60.008875  258.528917  0.096332   
15632  2017-03-29    147148.0  21.650250  66.366625  272.585871  0.085176   
15649  2017-03-29  63348720.0  14.647000  51.226500   58.286722  0.030311   
15654  2017-03-31    145717.0  24.538375  60.574250   82.572049  0.111960   
15659  2017-03-31    147148.0  21.705000  66.760625  234.238068  0.080092   
15676  2017-03-31  63348720.0  14.531875  51.841875   91.040683  0.034365   
15678  2017-03-31  64111550.0  19.762750  64.301500  540.534538  0.062564   

          kd490      t865        par       sst4   chl_rate  week_rotate  
907    0.058466  0.090026  48.871585  29.292499  -0.005333            1  
911    0.088284  0.157933  45.852026  27.504999   0.023261            1  
912    0.065985  0.132240  44.268523  29.138749   0.020277            1  
913    0.052617  0.079041  47.527239  28.825901  -0.014037            1  
915    0.056548  0.145857  45.791923  28.937047  -0.002177            1  
917    0.089402  0.207249  45.603785  28.396272   0.014350            1  
918    0.058269  0.092809  47.282861  29.144785  -0.014330            1  
919    0.052540  0.092725  47.921435  29.225624  -0.000899            2  
921    0.058343  0.131145  46.080526  29.024374   0.001945            2  
922    0.054780  0.027596  50.857459  29.368056   0.000467            2  
923    0.088361  0.197466  44.948934  27.783765   0.003950            2  
924    0.052806  0.118735  46.209565  29.115064  -0.014666            2  
925    0.053097  0.085974  49.394569  29.025417   0.002839            2  
926    0.065009  0.076205  46.360723  27.886989   0.030269            2  
927    0.058897  0.119493  47.325370  29.260836   0.002248            2  
928    0.053223  0.026693  51.863900  29.195337  -0.002596            2  
929    0.090009  0.087398  44.664059  28.606822   0.003965            2  
930    0.054401  0.070653  46.945509  29.259667   0.006863            2  
931    0.056504  0.070622  48.403054  28.841013   0.006899            2  
932    0.063859  0.115550  46.387414  28.048855  -0.004732            2  
933    0.059013  0.081903  46.968241  28.893479  -0.001749            2  
935    0.093519  0.157636  42.704866  28.364551   0.004309            2  
936    0.053030  0.090497  47.872641  29.200982  -0.007865            2  
937    0.054486  0.069279  36.044779  29.428974  -0.003929            3  
938    0.062675  0.115013  45.015117  28.449999  -0.002893            3  
939    0.058577  0.107861  46.376697  28.772730  -0.004112            3  
941    0.101223  0.230042  43.309708  27.682225  -0.004546            3  
942    0.054262  0.142354  44.163554  28.358547  -0.000345            3  
944    0.070681  0.087129  44.628295  27.996330   0.024797            3  
945    0.054814  0.142975  46.394542  28.628068  -0.015169            3  
...         ...       ...        ...        ...        ...          ...  
15576  0.119381  0.104375  50.760101  24.234907  -0.239722           22  
15577  0.143545  0.109096  53.096065  25.997383 -16.659540           22  
15581  0.058572  0.106390  56.317506  27.405014  -0.002131           22  
15582  0.053536  0.128439  56.451283  28.109755   0.002495           22  
15584  0.053068  0.126847  54.917548  28.039476   0.005246           22  
15585  0.058567  0.120298  55.487878  27.932650   0.004807           22  
15586  0.056032  0.180970  54.585438  28.081115   0.009481           22  
15589  0.066112  0.171142  55.551156  27.853495  -0.014409           22  
15591  0.048551  0.228426  54.726214  27.837628   0.001835           22  
15593  0.057462  0.160258  54.897268  28.076979   0.001935           22  
15594  0.056003  0.139500  54.771745  28.322714   0.003326           22  
15597  0.052392  0.182456  54.980778  28.230682   0.020209           22  
15598  0.070693  0.113462  53.441116  26.642138  -0.167745           22  
15599  0.092620  0.132532  54.412794  27.237585  -0.008814           22  
15602  0.124951  0.121294  53.883543  26.439547   0.034245           23  
15603  0.124012  0.101542  54.780039  25.863687   0.024218           23  
15607  0.058087  0.194627  56.221009  28.080732  -0.003206           23  
15609  0.051580  0.092989  56.628231  28.018442  -0.008415           23  
15614  0.059851  0.117996  55.142958  27.400409   0.045325           23  
15615  0.063546  0.164199  55.908021  26.839286  -0.007838           23  
15622  0.058701  0.096315  55.848300  27.072313  -0.042465           23  
15623  0.052002  0.178230  54.812597  28.225404  -0.000646           23  
15624  0.072152  0.112464  54.594444  26.844335   0.001079           23  
15625  0.096049  0.131930  55.446921  27.388195   0.015991           23  
15632  0.122592  0.153307  54.334331  27.014142   0.048546           23  
15649  0.061381  0.110296  56.031899  27.591736   0.002136           23  
15654  0.140800  0.102760  53.800018  25.640085  -1.268185           23  
15659  0.099930  0.109592  54.644512  27.289503  -0.084731           23  
15676  0.067028  0.129169  56.174979  27.898946   0.020225           23  
15678  0.102903  0.143759  55.713502  27.311756  -1.656703           23  

[3533 rows x 12 columns]
------------------
------------------
------------------
      Unnamed: 0        time          id        lat        lon        dist  \
0            907  2002-11-01     10206.0  10.737250  67.512250  502.866078   
1            911  2002-11-01     34710.0  16.764500  63.115250  600.162084   
2            912  2002-11-01     34721.0  12.577000  67.553000  515.387804   
3            913  2002-11-03     10206.0  10.818500  67.399375  514.302886   
4            915  2002-11-03     15707.0  14.162000  68.048125  530.500765   
5            917  2002-11-03     34710.0  16.965375  63.133750  587.351839   
6            918  2002-11-03     34721.0  12.647250  67.570000  515.200394   
7            919  2002-11-05     10206.0  10.902250  67.291000  525.418388   
8            921  2002-11-05     15707.0  14.019875  67.721875  553.117249   
9            922  2002-11-05     34315.0   5.841500  58.012625  832.817475   
10           923  2002-11-05     34710.0  17.127000  63.160750  578.481759   
11           924  2002-11-05     34721.0  12.609750  67.649875  505.835975   
12           925  2002-11-07     10206.0  11.036625  67.202125  534.353712   
13           926  2002-11-07     11089.0  14.366875  64.835375  853.620219   
14           927  2002-11-07     15707.0  13.739500  67.399125  570.777775   
15           928  2002-11-07     34315.0   5.613000  57.375375  824.823456   
16           929  2002-11-07     34710.0  17.297375  63.170375  567.977556   
17           930  2002-11-07     34721.0  12.580125  67.781000  491.213813   
18           931  2002-11-09     10206.0  11.130625  67.113250  543.770628   
19           932  2002-11-09     11089.0  14.356250  64.586375  878.499730   
20           933  2002-11-09     15707.0  13.350625  67.213250  573.718591   
21           935  2002-11-09     34710.0  17.463125  63.118375  552.699065   
22           936  2002-11-09     34721.0  12.587500  67.965125  471.864626   
23           937  2002-11-11     10206.0  11.153750  67.132250  541.655587   
24           938  2002-11-11     11089.0  14.287500  64.346000  867.802259   
25           939  2002-11-11     15707.0  13.006500  67.183625  565.489050   
26           941  2002-11-11     34710.0  17.688000  63.006500  528.110232   
27           942  2002-11-11     34721.0  12.704750  68.167500  453.669336   
28           944  2002-11-13     11089.0  14.201750  64.063625  849.930489   
29           945  2002-11-13     15707.0  12.726000  67.009375  576.564319   
...          ...         ...         ...        ...        ...         ...   
3503       15576  2017-03-25    147136.0  22.282875  61.552875  177.318688   
3504       15577  2017-03-25    147142.0  20.036875  63.500375  452.198910   
3505       15581  2017-03-25  62321990.0  11.301875  55.099500  149.147320   
3506       15582  2017-03-25  63254850.0   8.359000  53.387500  304.725372   
3507       15584  2017-03-25  63255200.0   9.840000  53.111250  197.477359   
3508       15585  2017-03-25  63255860.0   9.858625  52.955875  180.782828   
3509       15586  2017-03-25  63258870.0  13.723375  63.784625  862.377668   
3510       15589  2017-03-25  63258950.0  12.072000  62.165000  830.881300   
3511       15591  2017-03-25  63259190.0  11.066875  65.272500  744.981804   
3512       15593  2017-03-25  63259230.0  13.830750  63.338125  819.474780   
3513       15594  2017-03-25  63259240.0  10.294750  67.003750  564.994718   
3514       15597  2017-03-25  63348750.0   7.541375  55.549750  552.996743   
3515       15598  2017-03-25  64111550.0  19.798250  64.205000  529.771074   
3516       15599  2017-03-25  64113560.0  17.821000  60.225125  283.626499   
3517       15602  2017-03-27    147136.0  21.945375  61.255875  152.342767   
3518       15603  2017-03-27    147142.0  19.791125  63.470875  463.074257   
3519       15607  2017-03-27  62321990.0  10.854375  55.171250  196.800357   
3520       15609  2017-03-27  63255180.0   9.639000  52.472375  144.434017   
3521       15614  2017-03-27  63258900.0  11.610500  61.919625  809.839451   
3522       15615  2017-03-27  63258950.0  12.118250  62.176500  831.744404   
3523       15622  2017-03-27  63348720.0  14.534875  50.585875   50.242077   
3524       15623  2017-03-27  63348750.0   7.692875  55.612375  538.939427   
3525       15624  2017-03-27  64111550.0  19.883000  64.249375  529.148162   
3526       15625  2017-03-27  64113560.0  17.914625  60.008875  258.528917   
3527       15632  2017-03-29    147148.0  21.650250  66.366625  272.585871   
3528       15649  2017-03-29  63348720.0  14.647000  51.226500   58.286722   
3529       15654  2017-03-31    145717.0  24.538375  60.574250   82.572049   
3530       15659  2017-03-31    147148.0  21.705000  66.760625  234.238068   
3531       15676  2017-03-31  63348720.0  14.531875  51.841875   91.040683   
3532       15678  2017-03-31  64111550.0  19.762750  64.301500  540.534538   

           cdm     kd490      t865        par       sst4   chl_rate  \
0     0.010704  0.058466  0.090026  48.871585  29.292499  -0.005333   
1     0.050956  0.088284  0.157933  45.852026  27.504999   0.023261   
2     0.013400  0.065985  0.132240  44.268523  29.138749   0.020277   
3     0.011303  0.052617  0.079041  47.527239  28.825901  -0.014037   
4     0.015929  0.056548  0.145857  45.791923  28.937047  -0.002177   
5     0.039706  0.089402  0.207249  45.603785  28.396272   0.014350   
6     0.011598  0.058269  0.092809  47.282861  29.144785  -0.014330   
7     0.012077  0.052540  0.092725  47.921435  29.225624  -0.000899   
8     0.014776  0.058343  0.131145  46.080526  29.024374   0.001945   
9     0.011090  0.054780  0.027596  50.857459  29.368056   0.000467   
10    0.038319  0.088361  0.197466  44.948934  27.783765   0.003950   
11    0.013121  0.052806  0.118735  46.209565  29.115064  -0.014666   
12    0.011535  0.053097  0.085974  49.394569  29.025417   0.002839   
13    0.018591  0.065009  0.076205  46.360723  27.886989   0.030269   
14    0.017469  0.058897  0.119493  47.325370  29.260836   0.002248   
15    0.010102  0.053223  0.026693  51.863900  29.195337  -0.002596   
16    0.036027  0.090009  0.087398  44.664059  28.606822   0.003965   
17    0.013277  0.054401  0.070653  46.945509  29.259667   0.006863   
18    0.010748  0.056504  0.070622  48.403054  28.841013   0.006899   
19    0.017420  0.063859  0.115550  46.387414  28.048855  -0.004732   
20    0.015601  0.059013  0.081903  46.968241  28.893479  -0.001749   
21    0.037364  0.093519  0.157636  42.704866  28.364551   0.004309   
22    0.011854  0.053030  0.090497  47.872641  29.200982  -0.007865   
23    0.010009  0.054486  0.069279  36.044779  29.428974  -0.003929   
24    0.018360  0.062675  0.115013  45.015117  28.449999  -0.002893   
25    0.015084  0.058577  0.107861  46.376697  28.772730  -0.004112   
26    0.037131  0.101223  0.230042  43.309708  27.682225  -0.004546   
27    0.012019  0.054262  0.142354  44.163554  28.358547  -0.000345   
28    0.021606  0.070681  0.087129  44.628295  27.996330   0.024797   
29    0.011520  0.054814  0.142975  46.394542  28.628068  -0.015169   
...        ...       ...       ...        ...        ...        ...   
3503  0.098906  0.119381  0.104375  50.760101  24.234907  -0.239722   
3504  0.162208  0.143545  0.109096  53.096065  25.997383 -16.659540   
3505  0.019585  0.058572  0.106390  56.317506  27.405014  -0.002131   
3506  0.011622  0.053536  0.128439  56.451283  28.109755   0.002495   
3507  0.011018  0.053068  0.126847  54.917548  28.039476   0.005246   
3508  0.013907  0.058567  0.120298  55.487878  27.932650   0.004807   
3509  0.017331  0.056032  0.180970  54.585438  28.081115   0.009481   
3510  0.035851  0.066112  0.171142  55.551156  27.853495  -0.014409   
3511  0.011207  0.048551  0.228426  54.726214  27.837628   0.001835   
3512  0.018535  0.057462  0.160258  54.897268  28.076979   0.001935   
3513  0.010359  0.056003  0.139500  54.771745  28.322714   0.003326   
3514  0.012410  0.052392  0.182456  54.980778  28.230682   0.020209   
3515  0.050730  0.070693  0.113462  53.441116  26.642138  -0.167745   
3516  0.072274  0.092620  0.132532  54.412794  27.237585  -0.008814   
3517  0.071261  0.124951  0.121294  53.883543  26.439547   0.034245   
3518  0.134586  0.124012  0.101542  54.780039  25.863687   0.024218   
3519  0.021827  0.058087  0.194627  56.221009  28.080732  -0.003206   
3520  0.011977  0.051580  0.092989  56.628231  28.018442  -0.008415   
3521  0.021566  0.059851  0.117996  55.142958  27.400409   0.045325   
3522  0.030955  0.063546  0.164199  55.908021  26.839286  -0.007838   
3523  0.034725  0.058701  0.096315  55.848300  27.072313  -0.042465   
3524  0.011941  0.052002  0.178230  54.812597  28.225404  -0.000646   
3525  0.062739  0.072152  0.112464  54.594444  26.844335   0.001079   
3526  0.096332  0.096049  0.131930  55.446921  27.388195   0.015991   
3527  0.085176  0.122592  0.153307  54.334331  27.014142   0.048546   
3528  0.030311  0.061381  0.110296  56.031899  27.591736   0.002136   
3529  0.111960  0.140800  0.102760  53.800018  25.640085  -1.268185   
3530  0.080092  0.099930  0.109592  54.644512  27.289503  -0.084731   
3531  0.034365  0.067028  0.129169  56.174979  27.898946   0.020225   
3532  0.062564  0.102903  0.143759  55.713502  27.311756  -1.656703   

      week_rotate  
0               1  
1               1  
2               1  
3               1  
4               1  
5               1  
6               1  
7               2  
8               2  
9               2  
10              2  
11              2  
12              2  
13              2  
14              2  
15              2  
16              2  
17              2  
18              2  
19              2  
20              2  
21              2  
22              2  
23              3  
24              3  
25              3  
26              3  
27              3  
28              3  
29              3  
...           ...  
3503           22  
3504           22  
3505           22  
3506           22  
3507           22  
3508           22  
3509           22  
3510           22  
3511           22  
3512           22  
3513           22  
3514           22  
3515           22  
3516           22  
3517           23  
3518           23  
3519           23  
3520           23  
3521           23  
3522           23  
3523           23  
3524           23  
3525           23  
3526           23  
3527           23  
3528           23  
3529           23  
3530           23  
3531           23  
3532           23  

[3533 rows x 13 columns]

In [ ]: