{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plot\n", "import pandas as pd\n", "import datetime as dt\n", "from salishsea_tools import evaltools as et\n", "\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "# path to model files:\n", "PATH= '/results/SalishSea/nowcast-green.201812/'\n", "\n", "# start and end dates for analysis:\n", "start_date = dt.datetime(2015,1,1)\n", "end_date = dt.datetime(2015,3,1)\n", "\n", "# number of days per model file:\n", "flen=1\n", "\n", "# dictionary mapping desired model variables to the file types where they are found\n", "filemap={'diatoms':'ptrc_T','ciliates':'ptrc_T',\n", " 'flagellates':'ptrc_T','vosaline':'grid_T','votemper':'grid_T'}\n", "\n", "# dictionary mapping model file types to their time resolution in hours (1 is hourly files, 24 is daily)\n", "fdict={'ptrc_T':1,'grid_T':1}\n", "\n", "# results format\n", "# -- nowcast: files like 01jan15/SalishSea_1h_20150101_20150101_ptrc_T.nc\n", "# -- long: files like SalishSea_1h_20150206_20150804_ptrc_T_20150427-20150506.nc, all in one directory\n", "namfmt='nowcast'" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "5419\n" ] }, { "data": { "text/html": [ "
\n", " | Year | \n", "Month | \n", "Day | \n", "Hour | \n", "Lat | \n", "Lon | \n", "Z | \n", "SA | \n", "CT | \n", "dtUTC | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "1.983099 | \n", "29.849611 | \n", "8.942753 | \n", "2015-02-11 05:17:46 | \n", "
1 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "2.974641 | \n", "29.852177 | \n", "8.942511 | \n", "2015-02-11 05:17:46 | \n", "
2 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "3.966178 | \n", "29.869012 | \n", "8.941135 | \n", "2015-02-11 05:17:46 | \n", "
3 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "4.957711 | \n", "29.915690 | \n", "8.936661 | \n", "2015-02-11 05:17:46 | \n", "
4 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "5.949239 | \n", "29.913935 | \n", "8.936489 | \n", "2015-02-11 05:17:46 | \n", "
\n", " | Year | \n", "Month | \n", "Day | \n", "Hour | \n", "Lat | \n", "Lon | \n", "Z | \n", "SA | \n", "CT | \n", "Fl | \n", "Fl_units | \n", "dtUTC | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "1.983099 | \n", "29.849611 | \n", "8.942753 | \n", "0.504 | \n", "0.504 | \n", "2015-02-11 05:17:46 | \n", "
1 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "2.974641 | \n", "29.852177 | \n", "8.942511 | \n", "0.500 | \n", "0.500 | \n", "2015-02-11 05:17:46 | \n", "
2 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "3.966178 | \n", "29.869012 | \n", "8.941135 | \n", "0.491 | \n", "0.491 | \n", "2015-02-11 05:17:46 | \n", "
3 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "4.957711 | \n", "29.915690 | \n", "8.936661 | \n", "0.482 | \n", "0.482 | \n", "2015-02-11 05:17:46 | \n", "
4 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "5.296111 | \n", "48.613333 | \n", "-123.243833 | \n", "5.949239 | \n", "29.913935 | \n", "8.936489 | \n", "0.490 | \n", "0.490 | \n", "2015-02-11 05:17:46 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
389 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "173.453346 | \n", "33.257358 | \n", "8.676207 | \n", "0.108 | \n", "0.108 | \n", "2015-02-11 11:04:07 | \n", "
390 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "174.444086 | \n", "33.288429 | \n", "8.656075 | \n", "0.103 | \n", "0.103 | \n", "2015-02-11 11:04:07 | \n", "
391 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "175.434821 | \n", "33.325134 | \n", "8.628147 | \n", "0.105 | \n", "0.105 | \n", "2015-02-11 11:04:07 | \n", "
392 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "176.425551 | \n", "33.340536 | \n", "8.616082 | \n", "0.113 | \n", "0.113 | \n", "2015-02-11 11:04:07 | \n", "
393 | \n", "2015.0 | \n", "2.0 | \n", "11.0 | \n", "11.068611 | \n", "48.300833 | \n", "-124.000333 | \n", "177.416276 | \n", "33.335840 | \n", "8.623158 | \n", "0.107 | \n", "0.107 | \n", "2015-02-11 11:04:07 | \n", "
394 rows × 12 columns
\n", "