# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import xarray as xr

# %matplotlib inline
# -

carp = xr.open_dataset('/data/sallen/results/MEOPAR/202007/SalishSea_1h_20150221_20150225_carp_T_20150221-20150221.nc')
ptrc = xr.open_dataset('/data/sallen/results/MEOPAR/202007/SalishSea_1h_20150221_20150225_ptrc_T_20150221-20150221.nc')

carp.dissolved_oxygen[0, 0].plot();

carp.Fraser_tracer[0, 0].plot();

carp.dissolved_inorganic_carbon[0, 0].plot();

print(carp.dissolved_oxygen[0].sum())

print(carp.Fraser_tracer[0].sum())

print(carp.dissolved_inorganic_carbon[0].sum())

print(carp.total_alkalinity[0].sum())

print(ptrc.nitrate[0].sum())

print(ptrc.biogenic_silicon[0].sum())

print(ptrc.mesozooplankton[0].sum())

print(ptrc.particulate_organic_nitrogen[0].sum())

print(ptrc.dissolved_organic_nitrogen[0].sum())

print(ptrc.microzooplankton[0].sum())

print(ptrc.ciliates[0].sum())

print(ptrc.flagellates[0].sum())

print(ptrc.diatoms[0].sum())

print(ptrc.silicon[0].sum())

print(ptrc.ammonium[0].sum())

brestart = xr.open_dataset('/data/sallen/results/MEOPAR/202007/SalishSea_03263760_restart_trc.nc')
arestart = xr.open_dataset('/data/sallen/results/MEOPAR/202007/SalishSea_03274560_restart_trc.nc')

for key in brestart.keys():
    print (key, brestart[key].sum())
    if (brestart[key].sum() != brestart[key].sum()):
        print ('***HERE***')

for key in arestart.keys():
    print (key, arestart[key].sum())
    if (arestart[key].sum() != arestart[key].sum()):
        print ('***HERE***')

# Its the 20 m depth tracer.  I need to strip this.



StarcoderdataJupyterScriptsDedupFiltered