## take a look at ages
import pandas as pd
def check_nan(ds):
for j, index in enumerate(ds.index):
if ds.transport[j] != ds.transport[j]:
print (index)
Vic_to_PR_2015 = pd.read_csv('Vic_to_PR_2015_v3.csv', index_col=0, parse_dates=True)
print ('2015', Vic_to_PR_2015.transport.mean()/1000.); check_nan(Vic_to_PR_2015)
Vic_to_PR_2016 = pd.read_csv('Vic_to_PR_2016_v3.csv', index_col=0, parse_dates=True)
print ('2016', Vic_to_PR_2016.transport.mean()/1000.); check_nan(Vic_to_PR_2016)
Vic_to_PR_2017 = pd.read_csv('Vic_to_PR_2017_v3.csv', index_col=0, parse_dates=True)
print ('2017', Vic_to_PR_2017.transport.mean()/1000.); check_nan(Vic_to_PR_2017)
Vic_to_PR_2018 = pd.read_csv('Vic_to_PR_2018_v3.csv', index_col=0, parse_dates=True)
print ('2018', Vic_to_PR_2018.transport.mean()/1000.); check_nan(Vic_to_PR_2018)
2015 23.260960949873397 2016 23.975001880932254 2017 24.207005729799395 2018 23.2257903359523
/tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]:
PR_from_Vic_2015 = pd.read_csv('PR_from_Vic_2015_v3.csv', index_col=0, parse_dates=True)
print ('2015', PR_from_Vic_2015.transport.mean()/1000.); check_nan(PR_from_Vic_2015)
PR_from_Vic_2016 = pd.read_csv('PR_from_Vic_2016_v3.csv', index_col=0, parse_dates=True)
print ('2016', PR_from_Vic_2016.transport.mean()/1000.); check_nan(PR_from_Vic_2016)
PR_from_Vic_2017 = pd.read_csv('PR_from_Vic_2017_v3.csv', index_col=0, parse_dates=True)
print ('2017', PR_from_Vic_2017.transport.mean()/1000.); check_nan(PR_from_Vic_2017)
PR_from_Vic_2018 = pd.read_csv('PR_from_Vic_2018_v3.csv', index_col=0, parse_dates=True)
print ('2018', PR_from_Vic_2018.transport.mean()/1000.); check_nan(PR_from_Vic_2018)
2015 23.16950381813652
/tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]:
2016 23.663626086798104 2017 24.14207376302193 2018 23.6275020323928
/tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]:
PR_to_Vic_2015 = pd.read_csv('PR_to_Vic_2015_v3.csv', index_col=0, parse_dates=True)
print ('2015', PR_to_Vic_2015.transport.mean()/1000.); check_nan(PR_to_Vic_2015)
PR_to_Vic_2016 = pd.read_csv('PR_to_Vic_2016_v3.csv', index_col=0, parse_dates=True)
print ('2016', PR_to_Vic_2016.transport.mean()/1000.); check_nan(PR_to_Vic_2016)
PR_to_Vic_2017 = pd.read_csv('PR_to_Vic_2017_v3.csv', index_col=0, parse_dates=True)
print ('2017', PR_to_Vic_2017.transport.mean()/1000.); check_nan(PR_to_Vic_2017)
PR_to_Vic_2018 = pd.read_csv('PR_to_Vic_2018_v3.csv', index_col=0, parse_dates=True)
print ('2018', PR_to_Vic_2018.transport.mean()/1000.); check_nan(PR_to_Vic_2018)
2015 23.923387363466393 2016 24.191890364144417 2017 23.97470431375392 2018 23.17832074037491
/tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]:
Vic_from_PR_2015 = pd.read_csv('Vic_from_PR_2015_v3.csv', index_col=0, parse_dates=True)
print ('2015', Vic_from_PR_2015.transport.mean()/1000.); check_nan(Vic_from_PR_2015)
Vic_from_PR_2016 = pd.read_csv('Vic_from_PR_2016_v3.csv', index_col=0, parse_dates=True)
print ('2016', Vic_from_PR_2016.transport.mean()/1000.); check_nan(Vic_from_PR_2016)
Vic_from_PR_2017 = pd.read_csv('Vic_from_PR_2017_v3.csv', index_col=0, parse_dates=True)
print ('2017', Vic_from_PR_2017.transport.mean()/1000.); check_nan(Vic_from_PR_2017)
Vic_from_PR_2018 = pd.read_csv('Vic_from_PR_2018_v3.csv', index_col=0, parse_dates=True)
print ('2018', Vic_from_PR_2018.transport.mean()/1000.); check_nan(Vic_from_PR_2018)
2015 24.05030665710093 2016 24.045999770340103 2017 23.990312937788694 2018 23.092685865657987
/tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]: /tmp/ipykernel_3252/3505476923.py:3: FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]` if ds.transport[j] != ds.transport[j]:
aa = 0.25*(Vic_from_PR_2015.final_age.mean() + Vic_from_PR_2016.final_age.mean() + Vic_from_PR_2017.final_age.mean() + Vic_from_PR_2018.final_age.mean())
aa
13.566945961865464
dd = 0.25*(Vic_to_PR_2015.final_age.mean() + Vic_to_PR_2016.final_age.mean() + Vic_to_PR_2017.final_age.mean() + Vic_to_PR_2018.final_age.mean())
dd
16.867819232282763
ab = 0.25*(PR_to_Vic_2015.final_age.mean() + PR_to_Vic_2016.final_age.mean() + PR_to_Vic_2017.final_age.mean() + PR_to_Vic_2018.final_age.mean())
ab
13.71986337750608
db = 0.25*(PR_from_Vic_2015.final_age.mean() + PR_from_Vic_2016.final_age.mean() + PR_from_Vic_2017.final_age.mean() + PR_from_Vic_2018.final_age.mean())
db
16.829606137174334
(aa + ab)/2
13.643404669685772
transport | final_age | final_depth | final_salt | final_temp | final_lon | init_depth | init_salt | init_temp | init_lat | |
---|---|---|---|---|---|---|---|---|---|---|
2016-01-01 00:00:00+00:00 | 5291.494251 | 21.208800 | -38.681566 | 31.492639 | 8.969030 | -123.347175 | -84.327773 | 30.115465 | 8.910218 | 48.924583 |
2016-01-02 00:00:00+00:00 | 5550.015639 | 20.577325 | -39.410060 | 31.400583 | 8.985300 | -123.355776 | -88.367499 | 30.130296 | 8.886164 | 48.921065 |
2016-01-03 00:00:00+00:00 | 5660.882716 | 21.633671 | -38.561435 | 31.366363 | 8.996675 | -123.353684 | -87.997609 | 30.116576 | 8.843807 | 48.921006 |
2016-01-04 00:00:00+00:00 | 6210.446689 | 20.362758 | -37.484604 | 31.308099 | 9.008349 | -123.356458 | -94.903324 | 30.181858 | 8.897932 | 48.919276 |
2016-01-05 00:00:00+00:00 | 9561.456084 | 18.178807 | -42.191863 | 31.301096 | 9.008894 | -123.360976 | -94.847994 | 30.230211 | 8.885795 | 48.917318 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
2016-12-27 00:00:00+00:00 | 9239.320327 | 17.864120 | -58.749614 | 31.771817 | 9.712236 | -123.360505 | -68.746821 | 29.976041 | 8.786927 | 48.939701 |
2016-12-28 00:00:00+00:00 | 13199.439713 | 16.501642 | -57.670818 | 31.860888 | 9.585216 | -123.356184 | -73.063848 | 30.166577 | 8.816433 | 48.945536 |
2016-12-29 00:00:00+00:00 | 15173.529359 | 16.303234 | -57.925839 | 31.914344 | 9.532530 | -123.354214 | -73.855145 | 30.100272 | 8.785727 | 48.935865 |
2016-12-30 00:00:00+00:00 | 16451.476423 | 16.888965 | -59.062236 | 31.941152 | 9.512147 | -123.354540 | -74.871472 | 30.090665 | 8.789643 | 48.929824 |
2016-12-31 00:00:00+00:00 | 19745.119058 | 17.259144 | -59.706419 | 31.925776 | 9.475800 | -123.354114 | -83.349381 | 30.150163 | 8.804370 | 48.924302 |
366 rows × 10 columns