{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import numpy as np\n", "import dask\n", "import xarray as xr\n", "import matplotlib.pyplot as plt\n", "import os\n", "from os.path import isfile\n", "import datetime as dt\n", "from salishsea_tools import evaltools as et, viz_tools\n", "import glob\n", "import dask\n", "import netCDF4 as nc\n", "from dask.distributed import Client, progress\n", "import dask.array as da\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "meshPath='/ocean/eolson/MEOPAR/NEMO-forcing/grid/mesh_mask201702_noLPE.nc'\n", "maskName='tmask'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "j0=230;j1=470;i0=0;i1=200;\n", "#ct=240;cz=40;cy=50;cx=200;" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "
\n", "

Client

\n", "\n", "
\n", "

Cluster

\n", "
    \n", "
  • Workers: 2
  • \n", "
  • Cores: 4
  • \n", "
  • Memory: 16.77 GB
  • \n", "
\n", "
" ], "text/plain": [ "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "client = dask.distributed.Client(\n", " n_workers=2, threads_per_worker=2, processes=True)\n", "client" ] }, { "cell_type": "raw", "metadata": { "collapsed": false }, "source": [ "mesh=xr.open_mfdataset(meshPath,parallel=True)\n", "e3t0=mesh.e3t_0.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "tmask=mesh.tmask.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "mesh2=mesh.loc[{'z':0}]" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "with nc.Dataset(\"/ocean/eolson/MEOPAR/NEMO-forcing/grid/mesh_mask201702_noLPE.nc\") as mesh:\n", " tmask=np.copy(mesh.variables['tmask'][:,:,j0:j1,i0:i1])\n", " e3t0=np.copy(mesh.variables['e3t_0'][:,:,j0:j1,i0:i1])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "first file starts on 2015-05-31 00:00:00\n" ] } ], "source": [ "flistmuZ=et.index_model_files(dt.datetime(2015,6,1),dt.datetime(2015,9,1),\n", " '/data/eolson/results/MEOPAR/SS36runs/CedarRuns/testmuZ/',\n", " 'long',10,'ptrc_T',1)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "flistHC=et.index_model_files(flistmuZ['t_0'][0],flistmuZ['t_n'][len(flistmuZ)-1]-dt.timedelta(days=1),\n", " '/results/SalishSea/hindcast.201905/',\n", " 'nowcast',1,'ptrc_T',1)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "chunks = {\"time_counter\": 3, \"deptht\": 40*3, \"y\": 898*3, \"x\": 398*3}" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/eolson/anaconda3/envs/py37/lib/python3.7/site-packages/ipykernel/__main__.py:4: FutureWarning: In xarray version 0.15 the default behaviour of `open_mfdataset`\n", "will change. To retain the existing behavior, pass\n", "combine='nested'. To use future default behavior, pass\n", "combine='by_coords'. See\n", "http://xarray.pydata.org/en/stable/combining.html#combining-multi\n", "\n", "/home/eolson/.local/lib/python3.7/site-packages/xarray/backends/api.py:933: FutureWarning: The datasets supplied have global dimension coordinates. You may want\n", "to use the new `combine_by_coords` function (or the\n", "`combine='by_coords'` option to `open_mfdataset`) to order the datasets\n", "before concatenation. Alternatively, to continue concatenating based\n", "on the order the datasets are supplied in future, please use the new\n", "`combine_nested` function (or the `combine='nested'` option to\n", "open_mfdataset).\n", " from_openmfds=True,\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "0:01:31.213300\n" ] } ], "source": [ "t0=dt.datetime.now()\n", "dataHC=xr.open_mfdataset(flistHC['paths'],data_vars=('diatoms','microzooplankton'),chunks=chunks,\n", " drop_variables=('nitrate','ammonium','silicon','flagellates','ciliates','dissolved_organic_nitrogen',\n", " 'particulate_organic_nitrogen','biogenic_silicon','mesozooplankton'),parallel=True,`combine='by_coords')\n", "diatoms = dataHC.diatoms.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "diatoms_int = (diatoms * tmask * e3t0).sum(axis=1).mean(axis=0)\n", "uZ = dataHC.microzooplankton.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "uZ_int = (uZ * tmask * e3t0).sum(axis=1).mean(axis=0)\n", "t1=dt.datetime.now()\n", "print(t1-t0)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset>\n",
       "Dimensions:               (axis_nbounds: 2, deptht: 40, nvertex: 4, time_counter: 2400, x: 398, y: 898)\n",
       "Coordinates:\n",
       "    nav_lat               (y, x) float32 dask.array<chunksize=(898, 398), meta=np.ndarray>\n",
       "    nav_lon               (y, x) float32 dask.array<chunksize=(898, 398), meta=np.ndarray>\n",
       "  * deptht                (deptht) float32 0.5000003 1.5000031 ... 441.4661\n",
       "    time_centered         (time_counter) datetime64[ns] dask.array<chunksize=(3,), meta=np.ndarray>\n",
       "  * time_counter          (time_counter) datetime64[ns] 2015-05-31T00:30:00 ... 2015-09-07T23:30:00\n",
       "Dimensions without coordinates: axis_nbounds, nvertex, x, y\n",
       "Data variables:\n",
       "    bounds_lon            (y, x, nvertex) float32 dask.array<chunksize=(898, 398, 4), meta=np.ndarray>\n",
       "    deptht_bounds         (deptht, axis_nbounds) float32 dask.array<chunksize=(40, 2), meta=np.ndarray>\n",
       "    bounds_lat            (y, x, nvertex) float32 dask.array<chunksize=(898, 398, 4), meta=np.ndarray>\n",
       "    area                  (y, x) float32 dask.array<chunksize=(898, 398), meta=np.ndarray>\n",
       "    time_centered_bounds  (time_counter, axis_nbounds) datetime64[ns] dask.array<chunksize=(3, 2), meta=np.ndarray>\n",
       "    time_counter_bounds   (time_counter, axis_nbounds) datetime64[ns] dask.array<chunksize=(3, 2), meta=np.ndarray>\n",
       "    diatoms               (time_counter, deptht, y, x) float32 dask.array<chunksize=(3, 40, 898, 398), meta=np.ndarray>\n",
       "    microzooplankton      (time_counter, deptht, y, x) float32 dask.array<chunksize=(3, 40, 898, 398), meta=np.ndarray>\n",
       "Attributes:\n",
       "    name:         SalishSea_1h_20150526_20150531\n",
       "    description:  biogeochemical variables\n",
       "    title:        biogeochemical variables\n",
       "    Conventions:  CF-1.6\n",
       "    timeStamp:    2019-Sep-25 01:38:45 GMT\n",
       "    uuid:         7abb4fe2-2cf5-475e-b3c2-b5200adfd953
" ], "text/plain": [ "\n", "Dimensions: (axis_nbounds: 2, deptht: 40, nvertex: 4, time_counter: 2400, x: 398, y: 898)\n", "Coordinates:\n", " nav_lat (y, x) float32 dask.array\n", " nav_lon (y, x) float32 dask.array\n", " * deptht (deptht) float32 0.5000003 1.5000031 ... 441.4661\n", " time_centered (time_counter) datetime64[ns] dask.array\n", " * time_counter (time_counter) datetime64[ns] 2015-05-31T00:30:00 ... 2015-09-07T23:30:00\n", "Dimensions without coordinates: axis_nbounds, nvertex, x, y\n", "Data variables:\n", " bounds_lon (y, x, nvertex) float32 dask.array\n", " deptht_bounds (deptht, axis_nbounds) float32 dask.array\n", " bounds_lat (y, x, nvertex) float32 dask.array\n", " area (y, x) float32 dask.array\n", " time_centered_bounds (time_counter, axis_nbounds) datetime64[ns] dask.array\n", " time_counter_bounds (time_counter, axis_nbounds) datetime64[ns] dask.array\n", " diatoms (time_counter, deptht, y, x) float32 dask.array\n", " microzooplankton (time_counter, deptht, y, x) float32 dask.array\n", "Attributes:\n", " name: SalishSea_1h_20150526_20150531\n", " description: biogeochemical variables\n", " title: biogeochemical variables\n", " Conventions: CF-1.6\n", " timeStamp: 2019-Sep-25 01:38:45 GMT\n", " uuid: 7abb4fe2-2cf5-475e-b3c2-b5200adfd953" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dataHC" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/eolson/anaconda3/envs/py37/lib/python3.7/site-packages/ipykernel/__main__.py:4: FutureWarning: In xarray version 0.15 the default behaviour of `open_mfdataset`\n", "will change. To retain the existing behavior, pass\n", "combine='nested'. To use future default behavior, pass\n", "combine='by_coords'. See\n", "http://xarray.pydata.org/en/stable/combining.html#combining-multi\n", "\n", "/home/eolson/.local/lib/python3.7/site-packages/xarray/backends/api.py:933: FutureWarning: The datasets supplied have global dimension coordinates. You may want\n", "to use the new `combine_by_coords` function (or the\n", "`combine='by_coords'` option to `open_mfdataset`) to order the datasets\n", "before concatenation. Alternatively, to continue concatenating based\n", "on the order the datasets are supplied in future, please use the new\n", "`combine_nested` function (or the `combine='nested'` option to\n", "open_mfdataset).\n", " from_openmfds=True,\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "0:00:08.125841\n" ] } ], "source": [ "t0=dt.datetime.now()\n", "datamuZ=xr.open_mfdataset(flistmuZ['paths'],data_vars=('diatoms','microzooplankton'),chunks=chunks,\n", " drop_variables=('nitrate','ammonium','silicon','flagellates','ciliates','dissolved_organic_nitrogen',\n", " 'particulate_organic_nitrogen','biogenic_silicon','mesozooplankton'),parallel=True)\n", "datamuZ=datamuZ.rename({'time_counter':'t','deptht':'z'})\n", "diatoms = datamuZ.diatoms.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "diatoms_int = (diatoms * tmask * e3t0).sum(axis=1).mean(axis=0)\n", "uZ = datamuZ.microzooplankton.isel(y=slice(j0, j1), x=slice(i0, i1))\n", "uZ_int = (uZ * tmask * e3t0).sum(axis=1).mean(axis=0)\n", "t1=dt.datetime.now()\n", "print(t1-t0)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray 'diatoms' (t: 2400, z: 40, y: 240, x: 200)>\n",
       "dask.array<getitem, shape=(2400, 40, 240, 200), dtype=float32, chunksize=(3, 40, 240, 200), chunktype=numpy.ndarray>\n",
       "Coordinates:\n",
       "    nav_lat        (y, x) float32 dask.array<chunksize=(240, 200), meta=np.ndarray>\n",
       "    nav_lon        (y, x) float32 dask.array<chunksize=(240, 200), meta=np.ndarray>\n",
       "  * z              (z) float32 0.5000003 1.5000031 ... 414.5341 441.4661\n",
       "    time_centered  (t) datetime64[ns] dask.array<chunksize=(3,), meta=np.ndarray>\n",
       "  * t              (t) datetime64[ns] 2015-05-31T00:30:00 ... 2015-09-07T23:30:00\n",
       "Dimensions without coordinates: y, x\n",
       "Attributes:\n",
       "    standard_name:       mole_concentration_of_diatoms_expressed_as_nitrogen_...\n",
       "    long_name:           Diatoms Concentration\n",
       "    units:               mmol m-3\n",
       "    online_operation:    average\n",
       "    interval_operation:  40 s\n",
       "    interval_write:      1 h\n",
       "    cell_methods:        time: mean (interval: 40 s)\n",
       "    cell_measures:       area: area
" ], "text/plain": [ "\n", "dask.array\n", "Coordinates:\n", " nav_lat (y, x) float32 dask.array\n", " nav_lon (y, x) float32 dask.array\n", " * z (z) float32 0.5000003 1.5000031 ... 414.5341 441.4661\n", " time_centered (t) datetime64[ns] dask.array\n", " * t (t) datetime64[ns] 2015-05-31T00:30:00 ... 2015-09-07T23:30:00\n", "Dimensions without coordinates: y, x\n", "Attributes:\n", " standard_name: mole_concentration_of_diatoms_expressed_as_nitrogen_...\n", " long_name: Diatoms Concentration\n", " units: mmol m-3\n", " online_operation: average\n", " interval_operation: 40 s\n", " interval_write: 1 h\n", " cell_methods: time: mean (interval: 40 s)\n", " cell_measures: area: area" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "diatoms" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "ename": "NameError", "evalue": "name 'diatomsmuZInt' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mt0\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdatetime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mfig\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msubplots\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mfigsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m15\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mm0\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpcolormesh\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdiatomsmuZInt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolorbar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_title\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'muZ Diatoms'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNameError\u001b[0m: name 'diatomsmuZInt' is not defined" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAA3IAAAD8CAYAAAAyhZbUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAEsxJREFUeJzt3V+Ipfd5H/Dv090IGieNTLQJzkqmapEjb4tV7IliQtIqCa21ysUS8IXkUFMREIIo5FIikD/gm+QiEIxlL4sRwjfRTUyqBCWitCQuOGo0AlvW2shMZWptFNAqDinYULH204s5SY5mZzXv7J4z8/6OPh8YmPe8v53z/Dh7vpzvnHPmVHcHAACAcfyz4x4AAACAw1HkAAAABqPIAQAADEaRAwAAGIwiBwAAMBhFDgAAYDAHFrmqeqKqXq+ql65xvqrqk1W1U1UvVtUHVz8mw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n+edJ/rKqnuvur697uImm7OEjSb6U5OeS/Osk/62q/md3/991D7dCm3C/3oQ97C6cbzYlm5FPsmkcc79fJ/JpLmTTfLwT8um67tPrLnKXkty2dHxrdpvyYdccp0nzVdUHknw2ydnu/tsjmm2qKXvYSvLUIohuSXJfVV3p7j86mhEnmfr/6Y3u/naSb1fVF5LclWQugTRlDw8m+Z3efdH0TlV9I8mdSf7qaEZciU24X2/CHuaeTclm5JNsGsfc79eJfJoL2TQf74R8ur779GHfrHeYr+wWxVeS3J5/enPiv9mz5hfy1jf3/dU6Z1rTHt6bZCfJTx33vNe7hz3rn8zM3rB7iNvi/Un++2Lt9yd5Kcm/Pe7ZD7mHzyT57cX3P5rkr5Pcctyz77OXf5lrv2l3E+7Xm7CHWWfT1H3sWT+7fJJNxz//njmHzaZD3Baz3scm5JNsOv75D7mP2efTOrJprc/IdfeVqnokybPZ/YszT3T3xap6eHH+fHb/ys992b0zfye7jXo2Ju7hN5P8cJJPL34rc6W7t45r5r0m7mH2puyju79WVX+W5MUk30vy2e7e90+9HoeJt8UnkjxZVV/J7h360e5+49iG3kdV/UGSe5LcUlWXkvxWku9LNup+vQl7mHU2JZuRT7JpPkbPpkQ+HdfMe8mm+diEfFpXNtWiBQIAADCItX8gOAAAAKulyAEAAAxGkQMAABiMIgcAADAYRQ4AAGAwihwAAMBgFDkAAIDB/H8UHzR+cH+fvAAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "t0=dt.datetime.now()\n", "fig,ax=plt.subplots(1,3,figsize=(15,4))\n", "m0=ax[0].pcolormesh(diatomsmuZInt)\n", "plt.colorbar(m0,ax=ax[0])\n", "ax[0].set_title('muZ Diatoms')\n", "m1=ax[1].pcolormesh(diatomsHCInt)\n", "plt.colorbar(m1,ax=ax[1])\n", "ax[1].set_title('HC Diatoms')\n", "m2=ax[2].pcolormesh(diatomsmuZInt-diatomsHCInt)\n", "plt.colorbar(m2,ax=ax[2])\n", "ax[2].set_title('Diff')\n", "t1=dt.datetime.now()\n", "print(t1-t0)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "client.close()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python [conda env:py37]", "language": "python", "name": "conda-env-py37-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 1 }