diff --git a/.gitignore b/.gitignore
index 90ab4a98b..334b86fb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@ cy_*.c
empty_BW_image.png
.DS_Store
.cache/
+*.swn
+*.swo
*.ipynb_checkpoints/
@@ -53,6 +55,98 @@ py_gnome/junk_tiny.txt
py_gnome/tests/unit_tests/test_utilities/test_file_tools/test.bna
py_gnome/tests/unit_tests/test_utilities/test_file_tools/test_bad.bna
+# ignore gnerated and sample data for tests
+
+py_gnome/tests/junk.txt
+py_gnome/tests/junk_large.txt
+py_gnome/tests/unit_tests/ElementType_6.json
+py_gnome/tests/unit_tests/Emulsification_1.json
+py_gnome/tests/unit_tests/Evaporation_0.json
+py_gnome/tests/unit_tests/LongIslandSoundMap.BNA
+py_gnome/tests/unit_tests/Model.json
+py_gnome/tests/unit_tests/Model.zip
+py_gnome/tests/unit_tests/Skim_2.json
+py_gnome/tests/unit_tests/Spill_0.json
+py_gnome/tests/unit_tests/Water_0.json
+py_gnome/tests/unit_tests/Waves_3.json
+py_gnome/tests/unit_tests/Wind_1.json
+py_gnome/tests/unit_tests/Wind_1_data.WND
+py_gnome/tests/unit_tests/junk.txt
+py_gnome/tests/unit_tests/junk_conda_list.txt
+py_gnome/tests/unit_tests/junk_large.txt
+py_gnome/tests/unit_tests/test_environment/sample_data/3D_circular.nc
+py_gnome/tests/unit_tests/test_environment/sample_data/currents/
+py_gnome/tests/unit_tests/test_environment/sample_data/staggered_sine_channel.nc
+py_gnome/tests/unit_tests/test_environment/sample_data/tri_ring.nc
+py_gnome/tests/unit_tests/test_weatherers/ElementType_6.json
+py_gnome/tests/unit_tests/test_weatherers/Emulsification_1.json
+py_gnome/tests/unit_tests/test_weatherers/Evaporation_0.json
+py_gnome/tests/unit_tests/test_weatherers/LongIslandSoundMap.BNA
+py_gnome/tests/unit_tests/test_weatherers/Model.json
+py_gnome/tests/unit_tests/test_weatherers/Model.zip
+py_gnome/tests/unit_tests/test_weatherers/Skim_2.json
+py_gnome/tests/unit_tests/test_weatherers/Spill_0.json
+py_gnome/tests/unit_tests/test_weatherers/Water_0.json
+py_gnome/tests/unit_tests/test_weatherers/Waves_3.json
+py_gnome/tests/unit_tests/test_weatherers/Wind_1.json
+py_gnome/tests/unit_tests/test_weatherers/Wind_1_data.WND
+
+#ignore generated and downloaded files from scripts
+py_gnome/scripts/arctic_avg2_0001_gnome.nc
+py_gnome/scripts/arctic_avg2_0002_gnome.nc
+py_gnome/scripts/script_animation_demo/images/
+py_gnome/scripts/script_animation_demo/raster.bmp
+py_gnome/scripts/script_boston/EbbTides.cur
+py_gnome/scripts/script_boston/EbbTidesShio.txt
+py_gnome/scripts/script_boston/MassBayMap.bna
+py_gnome/scripts/script_boston/MassBaySewage.cur
+py_gnome/scripts/script_boston/MerrimackMassCoast.cur
+py_gnome/scripts/script_boston/MerrimackMassCoastOSSM.txt
+py_gnome/scripts/script_boston/WAC10msNW.cur
+py_gnome/scripts/script_boston/WAC10msSW.cur
+py_gnome/scripts/script_boston/gnome_profile
+py_gnome/scripts/script_boston/script_boston.kmz
+py_gnome/scripts/script_boston/script_boston.nc
+py_gnome/scripts/script_boston/script_boston_uncertain.nc
+py_gnome/scripts/script_chesapeake_bay/ChesapeakeBay.bna
+py_gnome/scripts/script_chesapeake_bay/ChesapeakeBay.dat
+py_gnome/scripts/script_chesapeake_bay/ChesapeakeBay.nc
+py_gnome/scripts/script_chesapeake_bay/script_chesapeake_bay.nc
+py_gnome/scripts/script_chesapeake_bay/script_chesapeake_bay_uncertain.nc
+py_gnome/scripts/script_columbia_river/COOPSu_CREOFS24.nc
+py_gnome/scripts/script_columbia_river/COOPSu_CREOFS24.nc.dat
+py_gnome/scripts/script_columbia_river/columbia_river.bna
+py_gnome/scripts/script_delaware_bay/DelawareRiverMap.bna
+py_gnome/scripts/script_delaware_bay/FloodTides.cur
+py_gnome/scripts/script_delaware_bay/FloodTidesShio.txt
+py_gnome/scripts/script_delaware_bay/NW30ktwinds.cur
+py_gnome/scripts/script_delaware_bay/Offshore.cur
+py_gnome/scripts/script_delaware_bay/SW30ktwinds.cur
+py_gnome/scripts/script_delaware_bay/script_delaware_bay.nc
+py_gnome/scripts/script_guam/GuamMap.bna
+py_gnome/scripts/script_guam/OutsideWAC.cur
+py_gnome/scripts/script_guam/WACFTideShioHts.txt
+py_gnome/scripts/script_guam/WACFloodTide.cur
+py_gnome/scripts/script_guam/script_guam.nc
+py_gnome/scripts/script_guam_get_data_test/GuamMap.bna
+py_gnome/scripts/script_guam_get_data_test/OutsideWAC.cur
+py_gnome/scripts/script_guam_get_data_test/WACFTideShioHts.txt
+py_gnome/scripts/script_guam_get_data_test/WACFloodTide.cur
+py_gnome/scripts/script_guam_get_data_test/script_guam.nc
+py_gnome/scripts/script_ice/ak_arctic.bna
+py_gnome/scripts/script_ice/script_ice.nc
+py_gnome/scripts/script_plume/images/
+py_gnome/scripts/script_plume/script_plume.nc
+py_gnome/scripts/script_tamoc/HYCOM_3d.nc
+py_gnome/scripts/script_tamoc/HYCOM_3d.nc.dat
+py_gnome/scripts/script_tamoc/Input/case_01
+py_gnome/scripts/script_tamoc/KIKT.osm
+py_gnome/scripts/script_tamoc/cat
+py_gnome/scripts/script_tamoc/diff.txt
+py_gnome/scripts/script_tamoc/gulf_tamoc.nc
+py_gnome/scripts/script_tamoc/images/
+
+
# ignore generated oildb
oil_library/oil_library/OilLib.db
oil_library/temp.txt
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 724ed4f60..2acc84fc7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,22 +1,27 @@
-before_script:
+before_script:
- yum update -y
- yum install gcc gcc-c++ -y
- yum install netcdf-devel -y # needed by the C++ code -- it can't find the conda versions
+ - yum install libXext libSM libXrender -y # needed by matplotlib on CentOS
+
# make sure the conda channels are set up right
# the last channel you add will be first on the list
- - conda config --add channels NOAA-ORR-ERD
- conda config --add channels defaults
+ - conda config --add channels NOAA-ORR-ERD
- conda config --add channels conda-forge
+
+ # install the requirements
- conda install --file conda_requirements.txt
+
# get the oil libary package from gitlab
- pip install -U git+https://srccontrol.orr.noaa.gov/gnome/OilLibrary.git@v0.0.9#egg=oil_library
- cd ./py_gnome
- python ./setup.py develop
-master:
+master:
script:
- py.test -runslow
- only:
+ only:
- master
develop:
diff --git a/InstallingWithAnaconda.rst b/InstallingWithAnaconda.rst
index 06de802fc..b9418e900 100644
--- a/InstallingWithAnaconda.rst
+++ b/InstallingWithAnaconda.rst
@@ -58,7 +58,7 @@ manager that Anaconda is built on. So when working with Anaconda, you
use the conda package manager for installing conda packages. ``pip``
can also be used with conda, but it's best to use use conda if you can.
-We have made sure that every pacakge you need is available for conda.
+We have made sure that every package you need is available for conda.
Setting up
..........
@@ -122,13 +122,21 @@ install a package, conda will first look in conda-forge, then NOAA-ORR-ERD, and
then in the default channel. This order should work well for PyGNOME. Be sure to add the channels in the order we specify. You can see what channels you have with::
> conda config --get channels
+<<<<<<< HEAD
+=======
It should return something like this::
--add channels 'defaults' # lowest priority
--add channels 'NOAA-ORR-ERD'
--add channels 'conda-forge' # highest priority
+>>>>>>> develop
+It should return something like this::
+
+ --add channels 'defaults' # lowest priority
+ --add channels 'conda-forge'
+ --add channels 'NOAA-ORR-ERD' # highest priority
conda environments
------------------
@@ -170,7 +178,11 @@ and kept separate from your main Anaconda install.
You will need to activate the environment any time you want to work with
``py_gnome`` in the future
+<<<<<<< HEAD
**NOTE:** Again, if you are only using Python / Anaconda for GNOME, there is not reason to deal with the complications of environments.
+=======
+**NOTE:** Again, if you are only using Python / Anaconda for GNOME, it is not necessary to deal with the complications of environments.
+>>>>>>> develop
Download GNOME
--------------
@@ -185,9 +197,19 @@ you can "clone" the git repository. If you clone the repository, you will
be able to update the code with the latest version with a simple command,
rather than having to re-download the whole package.
+Downloading a single release
+----------------------------
+
+zip and tar archives of the PyGnome source code can be found here:
+
+https://github.com/NOAA-ORR-ERD/PyGnome/releases
+
+This will get you the entire source archive of a given release, which is a fine way to work with PyGnome. However, if you want to be able to quickly include changes as we update the code, you may want to work with a git "clone" of the source code instead.
+
Cloning the PyGNOME git repository
----------------------------------
+
git
...
@@ -266,7 +288,7 @@ If you want to use py_gnome with "real oil", rather than inert particles, you wi
https://github.com/NOAA-ORR-ERD/OilLibrary
-This is under active development along with ``py_gnome``, so you are best off downloading the sources from gitHub and installing it from source -- similar to ``py_gnome``.
+This is under active development along with ``py_gnome``, so you are best off downloading the sources from gitHub and installing it from source -- similar to ``py_gnome``. Though the lated releases of each should be compatible.
cloning the repository ::
@@ -308,10 +330,13 @@ Store.
[you may be able to install only the command line tools -- Apple keeps changing its mind]
After installing XCode, you still need to install the "Command Line
-Tools". XCode includes a new "Downloads" preference pane to install
+Tools". XCode includes a new "Downloads" preference pane to install
optional components such as command line tools, and previous iOS
Simulators.
+**NOTE:** This may be slightly different on different versions of OS-X
+and XCode -- google is your friend.
+
To install the XCode command line tools: - Start XCode from the
launchpad - Click the "XCode" dropdown menu button in the top left of
the screen near the Apple logo - Click "Preferences", then click
@@ -398,7 +423,7 @@ cleans files generated by the build as well as files auto-generated by
cython. It is a good idea to run ``cleanall`` after updating from the
gitHub repo -- particularly if strange errors are occurring.
-You will need to re-run "develop" or "install" after running "cleanall"
+You will need to re-run ``develop`` or ``install`` after running ``cleanall``
Testing ``py_gnome``
--------------------
diff --git a/NormalInstall.rst b/NormalInstall.rst
index 78899300b..881d1b475 100644
--- a/NormalInstall.rst
+++ b/NormalInstall.rst
@@ -1,5 +1,5 @@
-Installation in Development Mode
-================================
+Installation without conda / Anaconda
+=====================================
Since this is development work, it might be good to create and run this
in a virtual environment. `Virtualenv `__ and `Virtual envwrapper `__ eases
@@ -12,9 +12,9 @@ may require a virtualenv in order to freely install python packages in
python's site-packages area. (site-packages is the standard place where
python installers will put packages after building them)
-You may also want to consider using conda environments.
+You may also want to consider using conda environments -- see above.
-There is C++/Cython code that must be built - you will need the corect C compiler and recent setuptools, etc.
+There is C++/Cython code that must be built - you will need the correct C compiler and recent setuptools, etc. See "Installing With Anaconda" for more detail.
python.org
==========
@@ -22,32 +22,28 @@ python.org
The following has been tested against `Python
2.7 `__
-Linux (Tested in 32-bit, Ubuntu raring 13.04)
----------------------------------------------
+Linux (Tested in 64-bit, CentOS)
+--------------------------------
-For Linux use appropriate package manager (apt-get on ubuntu) to
+For Linux use appropriate package manager (yum on CentOS, apt-get on Ubuntu) to
download/install binary dependencies.
+
Binary Dependencies
...................
1. setuptools is required.
``> sudo apt-get install python-setuptools``
\` \`
-2. `Pillow `__
- has binary dependencies. Visit the docs to get list of dependencies
- for your system. Pillow requires Python's development libraries::
+
+2. To compile Python extensions, you need the development libs for Python:
> sudo apt-get install python-dev
-This did not build symlinks to libraries for me in /usr/lib, so had to manually create them::
+3. netCDF4 python module requires NetCDF libraries:
- > sudo ln -s /usr/lib/``\ uname
- -i``-linux-gnu/libfreetype.so /usr/lib/`` ``> sudo ln -s /usr/lib/``\ uname
- -i``-linux-gnu/libjpeg.so /usr/lib/`` ``> sudo ln -s /usr/lib/``\ uname
- -i``-linux-gnu/libz.so /usr/lib/```` \`
+ libhdf5-serial-dev
-3. netCDF4 python module requires NetCDF libraries: libhdf5-serial-dev,
libnetcdf-dev
4. The following python packages, documented in PyGnome's
@@ -56,6 +52,7 @@ This did not build symlinks to libraries for me in /usr/lib, so had to manually
Binaries for
`Numpy `__ and
+
`Cython `__
can be installed using apt-get.
@@ -71,7 +68,6 @@ latest packages in your virtualenv once the above dependencies are met::
> pip install numpy
> pip install cython
> pip install netCDF4
- > pip install Pillow
The remaining dependencies are python packages and can be installed using::
@@ -129,7 +125,7 @@ installed packages::
> pip
- Usage:
+ Usage:
pip [options]
Commands:
@@ -185,7 +181,7 @@ Build PyGnome
4. build the ``py_gnome`` module in develop mode first as install mode may
still need some testing/work.
-
+
The other option you may need is ``cleanall``, which should clean the development environment -- good to do after puling new code from git.
5. If this successfully completes, then run the unit tests::
diff --git a/conda_requirements.txt b/conda_requirements.txt
index 176544f9e..3517a0bb0 100644
--- a/conda_requirements.txt
+++ b/conda_requirements.txt
@@ -23,8 +23,14 @@ colander>=1.2
sqlalchemy>=0.7.6
zope.interface>=4.1
zope.sqlalchemy>=0.7.6
+<<<<<<< HEAD
gdal>=2.1.1
netCDF4=1.2.7
+=======
+hdf5=1.8.*
+netCDF4=1.2.7
+gdal>=2.1.1
+>>>>>>> develop
awesome-slugify>=1.6
regex>=2014.12
unidecode>=0.04.19
diff --git a/experiments/Spreading/ChrisSpreading.ipynb b/experiments/Spreading/ChrisSpreading.ipynb
index 4e5a610a2..1235c2596 100644
--- a/experiments/Spreading/ChrisSpreading.ipynb
+++ b/experiments/Spreading/ChrisSpreading.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 229,
+ "execution_count": 1,
"metadata": {
"collapsed": false
},
@@ -13,44 +13,91 @@
"%matplotlib inline"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Initial Area\n",
+ "\n",
+ "We want the initial area to be the end of Fay's Gravity-inertial phase.\n",
+ "\n",
+ "From Dodge(1983):\n",
+ "\n",
+ "$A_0 = \\pi \\frac{{K_2}^4}{{K_1}^2}\\left(\\frac{g \\cdot \\Delta \\rho \\cdot V_0^5 }{\\nu_w^2}\\right)^{1/6}$\n",
+ "\n",
+ "with:\n",
+ "\n",
+ "$K_1 = 1.53$ (inertial phase constant)\n",
+ "\n",
+ "$K_2 = 1.21$ (viscous phase constant)\n",
+ "\n",
+ "We can combine the various constants, and get:\n",
+ "\n",
+ "$A_0 = C_{ia} \\cdot {\\Delta \\rho}^6 \\cdot V_0^{5/6}$\n",
+ "\n",
+ "$C_{ia} = \\pi \\frac{{K_2}^4}{{K_1}^2} \\left(\\frac{g}{\\nu_w^2}\\right)^{1/6} \\approx 42.09$\n"
+ ]
+ },
{
"cell_type": "code",
- "execution_count": 230,
+ "execution_count": 3,
"metadata": {
- "collapsed": true
+ "collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "initial area constant: 420.878887158\n"
+ ]
+ }
+ ],
"source": [
"# a few utilities and constants\n",
"\n",
"# Constants\n",
- "## fixme: check where these came from -- slightly different than Fay (1971)\n",
- "## Fay(1971) has 1.45 and 1.14 (I think -- nomenclature not clear)\n",
- "## I'm not even sure what K1 and K2 are -- in Fay (1971) K1 is one-dimensional, and k2 is axisymetric\n",
+ "## These came from Dodge(1983) -- slightly different than Fay (1971)\n",
+ "## Fay(1971) has 1.45 for viscous, and 1.14 for gravity\n",
+ "## but the Dodge numbers are derived from experiments, so what the heck\n",
"\n",
- "K1=1.53\n",
- "K2=1.21\n",
+ "K1=1.53 # Intertial phase\n",
+ "K2=1.21 # Viscous phase\n",
"\n",
- "\n",
- "visc_w = 1e-6 # viscoscity of water: m^2/s\n",
+ "visc_w = 1e-6 # viscosity of water: m^2/s\n",
"\n",
"g = 9.806 # gravity, m/s^2\n",
+ "\n",
"rho_water = 1025.0 # kg/m^3 (typical seawater)\n",
"\n",
+ "rho_oil = 900 # kg/m^3 -- arbitrary number\n",
+ "\n",
+ "# Combining the contants for the initial area:\n",
+ "C_ia = np.pi * (K2**4 / K1**2) * (g / visc_w**2)**(1.0/6.0)\n",
+ "\n",
+ "print \"initial area constant:\", C_ia\n",
+ "\n",
"def Delta(rho_oil):\n",
+ " \"\"\"difference between oil and seawater density\"\"\"\n",
" return (float(rho_water) - rho_oil) / rho_water\n",
"\n",
"def init_area(V0, rho_oil):\n",
" \"\"\"\n",
" initial area -- end of Fay gravity-inertial\n",
" \"\"\"\n",
- " return np.pi * (K1**4/K2**2) * ((g * V0**5 * Delta(rho_oil))/visc_w**2 )**(1./6.) \n",
+ " return np.pi * (K2**4 / K1**2) * (g * Delta(rho_oil) * V0**5 / visc_w**2 )**(1./6.) \n",
+ "\n",
+ "def init_area2(V0, rho_oil):\n",
+ " \"\"\"\n",
+ " initial area -- end of Fay gravity-inertial with constants combined\n",
+ " \"\"\"\n",
+ " return C_ia * Delta(rho_oil)**(1.0/6.0) * V0**(5.0/6.0) \n",
"\n",
"def init_radius(V0, rho_oil):\n",
" \"\"\"\n",
" initial radius -- end of Fay gravity-inertial\n",
" \"\"\"\n",
- " return (K1**2/K2) * ((g * V0**5 * delta())/visc_w**2 )**(1./12.) \n",
+ " return (K2**2/K1) * ((g * V0**5 * delta())/visc_w**2 )**(1./12.) \n",
"\n",
"def min_thickness(visc_oil):\n",
" if visc_oil <= 1e-6:\n",
@@ -60,7 +107,6 @@
" else:\n",
" return 1e-5 + (90.0 / 99.0) * (visc_oil - 1e-6)\n",
"\n",
- "\n",
"def max_area(volume, visc_oil):\n",
" return volume / min_thickness(visc_oil)\n",
"\n",
@@ -68,57 +114,277 @@
" \"\"\"\n",
" Fay Gravity-viscous phase analytical solution\n",
" \"\"\"\n",
- " # fixme: why is K2 squared???\n",
- " return np.pi * K2**2 * (Delta(rho_oil) * g * V0**2/np.sqrt(visc_w))**(1./3) * np.sqrt(t)\n",
- "\n"
+ " return np.pi * K1**2 * (Delta(rho_oil) * g / np.sqrt(visc_w))**(1./3.) * V0**(2./3.) * np.sqrt(t)\n",
+ "\n",
+ "## dont need these anymore:\n",
+ "# def bill_area2(V0, rho_oil):\n",
+ "# \"\"\" from Jan 2017 spreading doc\n",
+ "# this constant is wrong, but I can see where it came from. the actual value is:\n",
+ "# 420.87 -- so off by a factor of 100 (units?)\n",
+ "# \"\"\"\n",
+ "# return 4.2 * (Delta(rho_oil) * V0**5)**(1.0 / 6.0)\n",
+ " \n",
+ "# def bill_radius2(V0, rho_oil):\n",
+ "# np.sqrt(bill_area2(V0, rho_oil) / np.pi)\n",
+ "\n",
+ "# def bill_area1(V0, rho_oil):\n",
+ "# \"\"\" from May 2016 spreading doc\n",
+ "# wrong constant -- no idea where it came from\n",
+ "# \"\"\"\n",
+ "# return 16 * ((Delta(rho_oil) * g * V0**5) / visc_w**2)**(1.0 / 6.0)\n",
+ "\n",
+ " "
]
},
{
"cell_type": "code",
- "execution_count": 239,
+ "execution_count": 7,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaYAAAEeCAYAAADB6LEbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1GXd//HXG0FRAwRNSFBQxLNppIKpuHTS0jIrS7I8\npHWXUaa3Fd1WUncnrcz8WZTehFqmYuWhbu+00g3NAxGRykEIU0ATNUA3ywT5/P74XrMMw8zu7O7M\nzuzM+/l47GNnrvkeru93Zuez13V9vtdXEYGZmVm96FfrCpiZmeVzYDIzs7riwGRmZnXFgcnMzOqK\nA5OZmdUVByYzM6srDkzWLZJuk/SBDl6fIemCMrd1l6QPVq52fZukEyWtkPS8pIN6cb/vk/Sr3tpf\n3n5fJ2lpOt63V3jbp0m6u5LbtOpzYLJ2kv4q6fXlLBsRb42IH6X1tvjjj4iPRsRXqlHPJvAN4OyI\nGBwRf67GDiSNlrRRUvt3QET8JCKOrcb+OvEl4LJ0vLfmvyDpV5KmF64g6QRJf8uvfwd8sWYf48Bk\nlSDq4I9f0la1rkOFjAYWVXkfufdMVd5POTo63quAYi3z9wM/ioiN1aqU1Y4DkxWVawVJ+oakNZKW\nSzo27/W7JH1Q0j7ADOBwSW2S1qTXZ0n6Unq8g6RfSHpa0t/T45Fl1uNQSfdKWivpCUn/T1L/vNc3\nSjpb0lJgaSrbR9IdaV+LJZ2Ut/xbJc2X9JykxyVd2MG+O6y3pNPTeXk+/Z7SnWPIW25rSW1kf5cP\nSlqWd4x75C2Xf26PlrRS0nmSVqftn5637EBJ35L0mKR1kuZIGgj8Li2yLtV/QmHLN3WxzU31fkDS\n4Xmv3SXpS5LuSev/StKwDs7lhyQtk/SspJsljUjlfwF2B36ZtjOgYNWbgWGSjsx/X4Dj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8dy++23A/C5z32Ou+++m6lTpzJ48GA+8YlP9Oi9MGs2Dz8MCxdWeKO1npG2\n3n6yU7KlUuU5zz8fce+92e/u6On6kydPjksvvTQiIqZOnRqzZs2Kz33uc5uVnXnmme3L9+vXL5Yv\nXx4REaeffnp8/vOf32x7Y8aMiQkTJsRTTz0Va9eujX333Td+8IMfFN337NmzY9SoUfHHP/4xIiKW\nL18eK1asiPXr18eee+4ZX//612P9+vVx5513xqBBg2Lp0qXt+91xxx1j3rx58fLLL8cpp5wSU6ZM\niYiI22+/PQ455JB4Pp2QJUuWxFNPPVWyvj/96U/bX589e3Zsv/327c+vuuqq2HrrrWPmzJmxcePG\nmDFjRuyyyy7t67a0tMTMmTNLntvO3nuzZvb88xEHHdT+d1KR72G3mCog15SdNCn73dX+1p6uD3D0\n0UczZ84cAO6++26OOuoojjzyyM3Kjj766Pblo4wLRs8555z2Fsvb3va29lZQoZkzZ/LpT3+a8ePH\nA7DHHnuw6667cv/99/PCCy/wmc98hv79+zN58mSOP/54rrvuuvZ13/nOd/La176Wfv36ccopp7Tv\nY8CAAbS1tbFo0SIigr333pvhw4eXrOu73vWu9tdPOukkxo0bx9y5c9tfHz16NB/84AeRxGmnncbf\n/vY3nn666C25zKyItja4774tv58GDYK7767svhyYKiDXlN2wARYt6nqztqfrQzbOdM8997Bu3Tqe\nffZZxo4dy+te9zruvfde1q1bx8MPP9zl8aX8QLDddtvxj3/8o+hyK1euZOzYsVuUP/nkk+y6666b\nlY0ePZonnnii/Xmua7FwH5MnT2bq1Kl87GMfY8SIEXzkIx8puX+Aa665hte85jUMHTqUoUOHsnDh\nQp599tmi+9l2220BOtyemW3S2T/PgwZVdn8OTBVwwAGw//4wYADst1/2uDfXBzj88MNZt24dV1xx\nBUcccQSQpYTvsssuXHHFFYwcOZLRo0cXXTe7p2L37brrrixfvnyL8l122YWVK1duVrZixQpGjhxZ\n1nanTp3KvHnzWLhwIY888gjf+MY3itZ3xYoVfPjDH+Z73/sea9euZe3atey///5l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n7AO8FXhcRL0v6Llng+HFuIylo7h4RK9LzI4F3A61k/6y2\nALeRuuxyQRq4h+zeTC+S3XIc4OF0PGYV4xaT2eZK3XW0X4nyYq5nU/fWyWQ3HwQ4ErgpIl6MiBfI\nugyPyttvZx6NiEXp8ULgt+nxQ2R3WYXsnkHjgT9I+hPZTQ/3KNjOTsC6vOe543oiIn4OHEgWhH4J\nHNy+UMS9EXF3RHw+Il5KZRuBf0vavoz6m5XFgclscwspaAFIGkx2182/UF4AuRl4g6TXAAMju2U7\nnaybCw4byFpTOQPzHv877/HGvOcb2dT7IeDqiBgfEa+JiH0j4ksF+/pX/nYj4vfAnhHxB0kDgb9H\nxD+ACaTxpE5sQ9aKMqsIByazPBHxW2BbSe+H9ltkfxOYFRGFX75FA01qDf2O7O7A1+W9NAd4R8qI\n2x44MZXlb2s18EpJQyVtAxzf2f4KXvst8G5Jr0z1Hyop/7bWRMQ6YKt0p2YkbQu8kF4+lOwmgQDH\nAb+TdFDJnUrDgGciu/W4WUU4MJlt6UTgPZKWAkvIWhgXpNfyu/M66tq7Dng1WbdetnDEn4CryL74\n7wOuiIgH87cVERuAL6Vl7iC7e2qx/RXuO7f+YuBzwB2S/py2MaJI/e4g61qEbFzt7vT4QLJbhwM8\nBryZ7O6tpUwmG48yqxjfwdasCUk6GDg3Ik7r4XZ+BkyLiGWVqZmZW0xmTSmNe93VxQtsN5Oy+25y\nULJKc4vJzMzqiltMZmZWVxyYzMysrjgwmZlZXXFgMjOzuuLAZGZmdcWByczM6ooDk5mZ1RUHJjMz\nqyv/HwfHEP1g0TmhAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
- "# Simple Euler method integration for area as a function of area\n",
- "def Euler(f, T, A_0):\n",
- " dt = T[1] - T[0] # assume it's the same...\n",
- " A = [A_0]\n",
- " for t in enumerate(T[1:]):\n",
- " A.append(A[-1] + f(A[-1]) * dt)\n",
- " return np.array(A)\n",
- "\n"
+ "# plot initial area\n",
+ "V0 = np.linspace(1,1000) # volume in m^3\n",
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(V0, init_area2(V0, rho_oil), \".\", label=\"With constant\")\n",
+ "#ax.set_xlim(1e-7, 1e-3)\n",
+ "#ax.set_ylim(0, 110)\n",
+ "ax.set_title(\"Initial area as a function of Volume\")\n",
+ "ax.set_xlabel(\"Oil Volume ($m^3$)\")\n",
+ "ax.set_ylabel(\"Initial Area ($m^2$)\")\n",
+ "ax.legend(loc='upper left')"
]
},
{
"cell_type": "code",
- "execution_count": 240,
+ "execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/ipykernel/__main__.py:38: RuntimeWarning: invalid value encountered in power\n"
+ ]
+ },
{
"data": {
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 240,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEOCAYAAABIESrBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYVNW57/HvCzigiQwOOIAYNYITRgUFr0MrHoc4XY2a\nOEXNjSY50ZiYGyWJ56E1MTd6TBxIHML1cNQ44gBqIJoQKkAcEBQFFAfiZVAEjCCKiHTz3j/Wbmzb\nhq5dtWvvXVW/z/PU01W7hv32pptfr7X2XsvcHRERkVJ0yroAERGpXgoREREpmUJERERKphAREZGS\nKURERKRkXbIuIAlmplPMRERK4O5WzvtrpiXi7hW9DR8+vOLvLeZ163tNnO1tt3X0uFaP54aeL/Z4\ndnR80ziW5ewnzvuSPp71/LNZzvFM8nc9CTUTIpXW0NBQ8fcW87r1vSbO9rbbyvneSpWH47mh54s9\nnsUc3zSUus8470v6eNbzz2Yxr62W33VLKo2yZGZeC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a function of oil density\n",
+ "# V0 = np.linspace(1000) # volume in m^3\n",
+ "V0 = 1000 # volume in m^3\n",
+ "rho_oil = np.linspace(800, 1200) # density in kg/m^3\n",
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(rho_oil, init_area2(V0, rho_oil))\n",
+ "#ax.set_xlim(1e-7, 1e-3)\n",
+ "#ax.set_ylim(0, 110)\n",
+ "ax.set_title(\"Initial area as a function of Density\")\n",
+ "ax.set_xlabel(\"Oil Density ($kg/m^3$)\")\n",
+ "ax.set_ylabel(\"Initial Area ($m^2$)\")\n",
+ "# ax.legend(loc='upper right')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Intial area -- matching Inertial and Viscous phases\n",
+ "\n",
+ "from Fay (1971):\n",
+ "\n",
+ "$r_i = K_i (\\Delta g V t^2)^{1/4}$\n",
+ "\n",
+ "$r_v = K_v ( \\frac{ \\Delta g V t^{3/2}}{\\nu_w^{1/2}})^{1/6}$\n",
+ "\n",
+ "where:\n",
+ "\n",
+ "$ K_i=1.14 $\n",
+ "\n",
+ "$ K_v=1.45 $\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "ename": "NameError",
+ "evalue": "name 'a_v3' 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 29\u001b[0m \u001b[0;31m#ax.plot(t, r_i(Vol, rho_oil, t), label=\"Inertial\")\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ma_v\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mVol\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrho_oil\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Area2\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 31\u001b[0;31m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0ma_v3\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mVol\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrho_oil\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'.'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Area3\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 32\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFay_gv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mVol\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrho_oil\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Area1\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 33\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
+ "\u001b[0;31mNameError\u001b[0m: name 'a_v3' is not defined"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEACAYAAAB27puMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuclVXZ//HPF8+lAVpCgaYZnjIDTaSyHDUV4ZfYAbUT\naOqjaWnlk2IHgbQe7ck0UyQVOZiGpKlUFqgwaiYHAwQVOWQeRmM8AT5qFuL1+2Ot0e24h9nD7Jm9\nZ+b7fr3mxb2vfR+ufTMz16y17vteigjMzMxao1ulEzAzs47PxcTMzFrNxcTMzFrNxcTMzFrNxcTM\nzFrNxcTMzFqt5GIiqZukhZKm59eTJD2aYwsk7V2w7qWSVkhaJKl/QXykpOWSlkkaURDfR9Li/N4l\nBfGekmbm9WdI6t76j2xmZuXWkpbJGcBDBa8DODMiBkTEPhGxGEDSEcAuEdEPOBkYn+M9gXOB/YD9\ngdEFxeEK4MSI2BXYVdLhOT4KuCMidgNmAedszIc0M7O2VVIxkdQXGAJcXcL2w4ApABExF+guqRdw\nODAzItZGxBpgJjBYUm9gm4iYl7efAhxVsK/JeXlyQdzMzKpIqS2Ti4Hvklojhc7PXVkXSdosx/oA\nTxasU5djjeNPFcTriqwP0Csi6gEiYhXwnhLzNTOzdtRsMZE0FKiPiEWACt4aFRF7kLqttgPObtik\n8S5IRahxnGbiZmbWQWxawjqfAI6UNATYCthG0pSIGAEQEeskTQTOzOvXATsUbN8XeDrHaxrFZ29g\nfYBVknpFRH3uDnumWIKSXHzMzDZCRBT7g77Fmm2ZRMT3ImLHiPgAcCwwKyJG5F/uSBJpLOPBvMl0\nYER+bxCwJndVzQAOldQ9D8YfCszI3VcvShqY9zUCuLVgX8fl5ZEF8WJ5Vv3X6NGjK56D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"\"radius of Fay inertial phase\"\"\"\n",
+ " return K_i * (Delta(rho_oil) * g * Vol * t**2)**(0.25)\n",
+ "\n",
+ "def r_v(Vol, rho_oil, t):\n",
+ " \"\"\"radius of Fay viscous phase\"\"\"\n",
+ " #return K_v * (Delta(rho_oil) * g * Vol**2 * t**1.5 / np.sqrt(visc_w))**(1.0 / 6.0)\n",
+ " return K_v * (Delta(rho_oil) * g / np.sqrt(visc_w))**(1./6.) * Vol**(1./3.) * t**0.25\n",
+ "\n",
+ "def a_v(Vol, rho_oil, t):\n",
+ " \"\"\"area of Fay viscous phase: pi r^2\"\"\"\n",
+ " return np.pi * r_v(Vol, rho_oil, t)**2\n",
+ "\n",
+ "def Fay_gv(V0, rho_oil, t):\n",
+ " \"\"\"\n",
+ " Fay Gravity-viscous phase analytical solution\n",
+ " \"\"\"\n",
+ " return np.pi * K_v**2 * (Delta(rho_oil) * g / np.sqrt(visc_w))**(1./3.) * V0**(2./3.) * np.sqrt(t)\n",
+ "\n",
+ "\n",
+ "rho_oil = 900\n",
+ "Vol = 1000\n",
+ "t = np.linspace(0, 3600*1)\n",
+ "\n",
+ "fig, ax = plt.subplots()\n",
+ "#ax.plot(t, r_i(Vol, rho_oil, t), label=\"Inertial\")\n",
+ "ax.plot(t, a_v(Vol, rho_oil, t), label=\"Area2\")\n",
+ "ax.plot(t, a_v3(Vol, rho_oil, t), '.',label=\"Area3\")\n",
+ "ax.plot(t, Fay_gv(Vol, rho_oil, t), label=\"Area1\")\n",
+ "\n",
+ "#ax.set_xlim(1e-7, 1e-3)\n",
+ "#ax.set_ylim(0, 110)\n",
+ "ax.set_xlabel(\"time (s)\")\n",
+ "ax.set_ylabel(\"radius ($m$)\")\n",
+ "ax.legend(loc='upper left')\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Fay -- matching rate of change of radius\n",
+ "\n",
+ "Where does viscous take over?\n",
+ "\n",
+ "Hmm -- this looks like the viscous phase starts stronger, then inertial pahse takes over -- backwards??"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "K_i = 1.14\n",
+ "K_v = 1.45\n",
+ "\n",
+ "C_i = 0.5 * K_i * (Delta(rho_oil) * g * Vol)**0.25\n",
+ "C_v = 0.25 * K_v * (Delta(rho_oil) * g * Vol**2 / np.sqrt(visc_w))**(1.0/6.0)\n",
+ "\n",
+ "def drdt_i(t):\n",
+ " return C_i * t**(-0.5)\n",
+ "\n",
+ "def drdt_v(t):\n",
+ " return C_v * t**(-.75)\n",
+ "\n",
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(t, drdt_i(t), label=\"inertial\")\n",
+ "ax.plot(t, drdt_v(t), label=\"viscous\")\n",
+ "\n",
+ "ax.set_title(\"derivative of radius change\")\n",
+ "#ax.set_xlim(1e-7, 1e-3)\n",
+ "#ax.set_ylim(0, 110)\n",
+ "ax.set_xlabel(\"time (s)\")\n",
+ "ax.set_ylabel(\"dr/dt\")\n",
+ "ax.legend()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# Simple Euler method integration for area as a function of area\n",
+ "def Euler(f, T, A_0):\n",
+ " dt = T[1] - T[0] # assume it's the same...\n",
+ " A = [A_0]\n",
+ " for t in enumerate(T[1:]):\n",
+ " A.append(A[-1] + f(A[-1]) * dt)\n",
+ " return np.array(A)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
"source": [
"# plot thickness computation\n",
"nu_oil = np.logspace(-7,-3, 1000)\n",
@@ -134,26 +400,11 @@
},
{
"cell_type": "code",
- "execution_count": 241,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "nu: 9.99900000e-07, delta: 1.00000000e-05\n",
- "nu: 1.00000000e-06, delta: 1.00000000e-05\n",
- "nu: 1.00000010e-06, delta: 1.00000001e-05\n",
- "nu: 1.00000000e-05, delta: 1.81818182e-05\n",
- "nu: 5.05000000e-05, delta: 5.50000000e-05\n",
- "nu: 9.99999990e-05, delta: 9.99999991e-05\n",
- "nu: 1.00000000e-04, delta: 1.00000000e-04\n",
- "nu: 1.10000000e-04, delta: 1.00000000e-04\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"half = (1e-4 - 1e-6) / 2.0 + 1e-6\n",
"for nu in [9.999e-7, 1e-6, 1.0000001e-6, 1e-5, half, 9.9999999e-5, 1e-4, 1.1e-4]:\n",
@@ -195,32 +446,11 @@
},
{
"cell_type": "code",
- "execution_count": 242,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
- ]
- },
- "execution_count": 242,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEPCAYAAABoekJnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH8RJREFUeJzt3XecVdW5//HPA4ggKqAJYAUssaMSKRrwDsYCJgqKqKhU\n/UlULHgt4I0BU/SX3MQWIliIQhQpNlBBEGFiiYOKEpAmJTQjKAgMSlDKc/9YGzngDAxzyj7l+369\n5sU+e/bMPGez4Ttrrb3WNndHRESksqrEXYCIiOQ2BYmIiCRFQSIiIklRkIiISFIUJCIikhQFiYiI\nJCWtQWJmh5rZZDObbWYzzeymaH9dM5toZvPMbIKZ1U74mofNbL6ZTTezU9JZn4iIJC/dLZLNwK3u\nfjxwOnCDmR0L9AUmufsxwGSgH4CZtQOOdPejgV7A4DTXJyIiSUprkLj7CnefHm1/BcwBDgXaA0Oj\nw4ZGr4n+HBYdPxWobWb101mjiIgkJ2NjJGbWCDgFKAHqu/tKCGED1IsOOwRYlvBln0b7REQkS2Uk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egWbXcCJifsvzy6e6cxcBRhomvOiP5Ol5nZj6Jd\nPwVmUYDXBaFLq6WZ1TAzY/u5KKTrYueWeUqug6hbrNTMmkfntmvC9ypf3INGlRhkaku4k2k+0Dfu\netLw/n4CbCHckfYRoe+3LXAAMCl6768DdRK+ZiDhjpN/Ak0T9nePztMnQNe431uS5+W/2D7Y3phw\nZ8knhDt19or27w2Mit5zCdAo4ev7RedoDnBu3O+nkufgZMIvU9OBFwh33BTkdQH0j/4uZwBDCXdx\nFsR1AQwntBK+IYRqD8KNBym5DoAfAzOjzz1UkZo0IVFERJKSa11bIiKSZRQkIiKSFAWJiIgkRUEi\nIiJJUZCIiEhSFCQiIpIUBYlIBUQTt66Ltg8ys1Fx1ySSLTSPRKQCogU0X3b3k2IuRSTrZN2jdkWy\n1H3AEWb2IWGW8HHufpKZdQM6EBYOPIqwKm11oAuwETjf3dea2RHAX4AfABuA/+fun8TwPkRSTl1b\nIhXTl/A8kKYkLGsfOYEQJs2B3wFfRceVEK1zBDwG9Hb3ZtHXD8pU4SLpphaJSPKmuPsGYIOZrQVe\nifbPBE4ys1qE1WlHRwvhQVgbSiQvKEhEkvdNwrYnvN5K+DdWhfAwrqaZLkwkE9S1JVIx6wmPu4Wy\nH/5TLndfD/zLzC7Zts/MmqSwNpFYKUhEKsDdvwTeMbMZwB8o/6lx5e2/CrjazKab2cfAhWkoUyQW\nuv1XRESSohaJiIgkRUEiIiJJUZCIiEhSFCQiIpIUBYmIiCRFQSIiIklRkIiISFIUJCIikpT/A/Hr\nRmig62PIAAAAAElFTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# as a function of time:\n",
"C = 2 # shouldn't be 1! more likely to find errors this way!\n",
@@ -236,32 +466,11 @@
},
{
"cell_type": "code",
- "execution_count": 243,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
- ]
- },
- "execution_count": 243,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEPCAYAAABoekJnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8VNW99/HPL1y8gOGqXIYIQ5SKoChWBa9JaahaL31E\nKjYB4Zye+mqh9mjPOQUfU/M49dbnHOuFemut4gG84QW1PdYoRmufRo4CioIgYQIYJAoEEuhBBNbz\nx+wkkzCBJJPJnsv3/Xrl5Z41e/asvdnml7XWb61tzjlERETaK8vvCoiISGpTIBERkbgokIiISFwU\nSEREJC4KJCIiEhcFEhERiUtCA4mZDTGzJWa2ysxWmtn1XnkfM3vNzNaY2Z/NrFfUZ+4zs0/NbIWZ\nnZbI+omISPwS3SLZB9zonDsZGA/MNLOTgNnA6865bwBLgDkAZnYxkOucOxG4DngowfUTEZE4JTSQ\nOOe2OOdWeNu7gNXAEOAKYJ632zzvNd5/n/D2fxfoZWYDEllHERGJT6eNkZjZMOA0oBwY4Jyrhkiw\nAY7zdgsAm6I+VuWViYhIkuqUQGJmPYFFwM+8lklL67JYjDKt4SIiksS6JvoLzKwrkSDyn865xV5x\ntZkNcM5Vm9lA4Auv/DMgJ+rjQ4DNMY6p4CIi0g7OuVh/sMelM1okfwBWOefujSp7CZjubU8HFkeV\nTwMws3HAjvousOacc/pxjltuucX3OiTLj66FrkWmXov14fUMuygXbgJKgJug5zdzeeR367lgal6k\nrKRDf683kej033OBQuBbZrbczJaZ2UXAXUCBma0BJgB3Ajjn/gSEzWwd8DDwk0TWT0QklW3dCg8/\nDOMvKaZybAV0997oDrsmVvDWh8Xk9A7A3sTWI6FdW865vwJdWnj72y18ZlbiaiQikrrClWH+7c5i\nVoar2FkVoG5DiEu/G+TYYBXV3Zvt3B02127m0ZJHKZ9VTsWYioTVSzPbU1xeXp7fVUgauhaNdC0a\npcO1qK2Fu38TZvSkAhb1W8Cac8rYcsUC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r0jvrMXCIZJx8AY6PKp3vXaS0w\nze9zi/O6XEjjYHuQSGbJWiKZOt288iOAZ7xzLgeGRX1+jneNVgMT/T6fdl6DMUT+mFoBPE8k4yYj\n7wvgFu/f8kNgHpEszoy4L4CFRFoJXxEJqjOIJB50yH0AnAGs9N67tzV10oREERGJS6p1bYmISJJR\nIBERkbgokIiISFwUSEREJC4KJCIiEhcFEhERiYsCiUgreBO3fuxtDzKzZ/yuk0iy0DwSkVbwFtB8\n2Tl3is9VEUk6SfeoXZEkdQcw3MyWEZklPNI5d4qZXQt8j8jCgScQWZW2OzAV2ANc4pzbYWbDgd8C\n/YG/A//knFvrw3mIdDh1bYm0zmwizwMZS9Sy9p5RRILJWcBtwC5vv3K8dY6AR4BZzrkzvc8/2FkV\nF0k0tUhE4vemc+7vwN/NbAfwile+EjjFzHoQWZ32WW8hPIisDSWSFhRIROL3VdS2i3p9gMj/Y1lE\nHsY1trMrJtIZ1LUl0jp1RB53C7Ef/tMi51wdEDazq+rLzOzUDqybiK8USERawTm3HfirmX0I/JqW\nnxrXUnkR8I9mtsLMPgIuT0A1RXyh9F8REYmLWiQiIhIXBRIREYmLAomIiMRFgUREROKiQCIiInFR\nIBERkbgokIiISFwUSEREJC7/H1RRI/QC4XkmAAAAAElFTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# as a differential equation:\n",
"def dadt(t):\n",
@@ -295,38 +504,11 @@
},
{
"cell_type": "code",
- "execution_count": 245,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "ename": "ValueError",
- "evalue": "x and y must have same first dimension",
- "output_type": "error",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[0;31mValueError\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 20\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;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mA1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"Fay\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 22\u001b[0;31m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mA3\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'o'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"differential area\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 23\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlegend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_xlabel\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"time\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/__init__.pyc\u001b[0m in \u001b[0;36minner\u001b[0;34m(ax, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1817\u001b[0m warnings.warn(msg % (label_namer, func.__name__),\n\u001b[1;32m 1818\u001b[0m RuntimeWarning, stacklevel=2)\n\u001b[0;32m-> 1819\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0max\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1820\u001b[0m \u001b[0mpre_doc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minner\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__doc__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1821\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mpre_doc\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc\u001b[0m in \u001b[0;36mplot\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1380\u001b[0m \u001b[0mkwargs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcbook\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnormalize_kwargs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_alias_map\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1381\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1382\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mline\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_lines\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\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 1383\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1384\u001b[0m \u001b[0mlines\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/axes/_base.pyc\u001b[0m in \u001b[0;36m_grab_next_args\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 379\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 380\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mremaining\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m<=\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 381\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mseg\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_plot_args\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mremaining\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\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 382\u001b[0m \u001b[0;32myield\u001b[0m \u001b[0mseg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 383\u001b[0m \u001b[0;32mreturn\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/axes/_base.pyc\u001b[0m in \u001b[0;36m_plot_args\u001b[0;34m(self, tup, kwargs)\u001b[0m\n\u001b[1;32m 357\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mindex_of\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 358\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 359\u001b[0;31m \u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_xy_from_xy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 360\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 361\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcommand\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'plot'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/axes/_base.pyc\u001b[0m in \u001b[0;36m_xy_from_xy\u001b[0;34m(self, x, y)\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0my\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_check_1d\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 218\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\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[0m\n\u001b[0;32m--> 219\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"x and y must have same first dimension\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 220\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m2\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 221\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"x and y can be no greater than 2-D\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;31mValueError\u001b[0m: x and y must have same first dimension"
- ]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEACAYAAABRQBpkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHJBJREFUeJzt3XmYVNWdxvHvD5BgwAcIGWCEqKgoLoOoYXWZ1qAsJgIi\nCqJs+khUXHCigBNDq5nMJJNoNESIgAoiuxhaBVkCHdTQiCiCgC3LiGBCo7IqYT/zx7lIiQ3ddFf1\nuVX1fp6nH6tv3+r61eXab51z7jnXnHOIiEh2qxS6ABERCU9hICIiCgMREVEYiIgICgMREUFhICIi\nlCIMzKyhmc0zs5VmttzM7om21zaz2WZWaGazzKxmwnOeMrPVZrbUzJql8g2IiEj5laZlsB+43zl3\nLtAauMvMmgCDgbnOubOBecAQADPrAJzhnGsM9AdGpKRyERFJmhLDwDm3yTm3NHr8JbAKaAh0AsZE\nu42Jvif679ho/0VATTOrl+S6RUQkiY5rzMDMTgOaAQVAPedcEfjAAOpGuzUANiQ87dNom4iIxFSp\nw8DMagBTgXujFsLR1rGwYrZpzQsRkRirUpqdzKwKPghecM5NjzYXmVk951yRmdUHNkfbNwI/SHh6\nQ+DvxfxOBYSISBk454r70F0upW0ZPAusdM49mbAtD+gTPe4DTE/Y3gvAzFoB2w51Jx3JOacv5xg6\ndGjwGuLypWOhY5HNx2LTJsewYY7LL3fUquW45RZHXp5j9+7D+6RKiS0DM7sE6AksN7P38F0+DwG/\nBiabWT/gE6Bb9Ad+hpl1N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GvNbB0wAbgS+D1QM1rQEL75vr4+FtF8lZrOua0c/Rilk43ABufcO9H3L+HDIRvPi7bAOufcluiT\n/stAG6BWFp4XhyTrPCjTMQkRBouBM83sVDOriu/PygtQR6o9i++3ezJhWx7QJ3rcB5iesL0XfD17\ne1vUXJwFXBVdgVIb36c6K/WlJ49z7iHn3CnOudPx/9bznHM3A/OBbtFuvfnmsegdPe4GzEvY3j26\nqqQRcCZ+MmPaiP5NN5jZWdGmHwEryMLzAt891MrMqpmZcfhYZNN5cWQLOSnnQdTFtMPMWkTHtlfC\n7zq6QAMn7fFX2KwGBoceyEnB+7sEOIC/Uuo9fF9oe+B7wNzovc8BaiU8Zxj+Soj3gYsStveJjtNH\nQK/Q762cx+XfOTyA3Ah/xcNH+CtIToi2fweYHL3nAuC0hOcPiY7RKuDq0O+njMfgAvwHoqXANPyV\nIFl5XgBDo3/LZcAY/NWFWXFeAOPxn9b34IOxL34wPSnnAXAxsDz62ZOlqUmTzkREJOxtL0VEJB4U\nBiIiojAQERGFgYiIoDAQEREUBiIigsJARERQGIiICPD/rtD5h/Z0gjUAAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# differential equation in terms of Area\n",
"\n",
@@ -523,6 +705,19 @@
"ax.legend(loc=\"upper left\")\n"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Okubo: constant for Richardson spreading\n",
+ "\n",
+ "Okubu (1971) is the key paper for asertign and getting constants for Richardson's 4/3 diffusion.\n",
+ "\n",
+ "However, while it has a line-fit, they don't seem to have published the constant. So this is a little code to try to match the figure."
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
diff --git a/experiments/Spreading/Richardson.ipynb b/experiments/Spreading/Richardson.ipynb
index db49583c7..21f117aa5 100644
--- a/experiments/Spreading/Richardson.ipynb
+++ b/experiments/Spreading/Richardson.ipynb
@@ -20,7 +20,13 @@
"\n",
"where: $\\alpha$ is a constant that appears to be pretty consistent with environmental flows:\n",
"\n",
- "(0.002 < $\\alpha$ < 0.01 $cm^{2/3}s^{-1}$ )\n",
+ "(0.002 < $\\alpha$ < 0.01 \\; \\; $cm^{2/3}s^{-1}$ )\n",
+ "\n",
+ "From Okubu(1971) -- for length scales less than a km or so:\n",
+ "\n",
+ "$\\alpha \\approx 0.0019 \\; cm^{2/3}s^{-1}$ (taken by eye off Figure 4.)\n",
+ "\n",
+ "($ 8.816 \\times 10^{-5} \\; m^{2/3}s^{-1}$)\n",
"\n",
"Once all put together, you get the variance of the \"plume\" growing as:\n",
"\n",
@@ -38,16 +44,34 @@
"\n",
"$ D = \\frac{4}{9} \\alpha^3 t^2 $\n",
"\n",
+ "### note on units:\n",
+ "\n",
+ "$\\alpha$ is in units of Length to the two-thirds over time. So we need to convert between CGS and SI units:\n",
+ "\n",
+ "$1.0 \\; cm^{2/3}s^{-1} = 0.0464 \\; m^{2/3}s^{-1}$\n",
+ "\n",
+ "or \n",
+ "\n",
+ "$1.0 \\; m^{2/3}s^{-1} = 21.54 \\; cm^{2/3}s^{-1}$\n",
"\n"
]
},
{
"cell_type": "code",
- "execution_count": 58,
+ "execution_count": 2,
"metadata": {
- "collapsed": true
+ "collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/chris.barker/miniconda2/envs/gnome/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n",
+ " warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n"
+ ]
+ }
+ ],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
@@ -56,7 +80,7 @@
},
{
"cell_type": "code",
- "execution_count": 59,
+ "execution_count": 3,
"metadata": {
"collapsed": true
},
@@ -98,7 +122,7 @@
},
{
"cell_type": "code",
- "execution_count": 60,
+ "execution_count": 4,
"metadata": {
"collapsed": false
},
@@ -156,7 +180,7 @@
},
{
"cell_type": "code",
- "execution_count": 61,
+ "execution_count": 5,
"metadata": {
"collapsed": false
},
@@ -164,10 +188,10 @@
{
"data": {
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 61,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
@@ -175,7 +199,7 @@
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEPCAYAAAC6Kkg/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmclXXd//HXWwVzJTSVW1BJxLU7CVNRLCcNBS21cs81\n86Y0l8z9Z4F35dbthlZqoeKCC26AIeDCqKggLigGCLiBCoQLarnE8vn98b1GxmmAOTNzznXmnPfz\n8TgPr/M91znXZy4P85nvrojAzMysEKvkHYCZmbU9Th5mZlYwJw8zMyuYk4eZmRXMycPMzArm5GFm\nZgUravKQNFjSfEkvNvLa6ZKWSlqvXtkgSTMlTZbUo1750ZJmSHpZ0lHFjNnMzFau2DWPG4C9GxZK\n6gJ8F3ijXlk/oFtEdAf6A9dk5R2B3wA7AjsDAyR1KHLcZma2AkVNHhExHni/kZcuB85oULY/cFP2\nvolAB0kbkZLP2Ij4ICIWAmOBvsWL2szMVqbkfR6Svg/MiYgpDV7qDMyp9/zNrKxh+VtZmZmZ5WS1\nUl5M0hrA/wP6NPZyI8+jkXKycjMzy0lJkwfQDegKvCBJQBfgOUk7kWoam9Q7twvwdlZe06B8XGMf\nLslJxcysGSKisT/Ul6sUzVbKHkTESxHRKSI2j4ivkhLDNyLiH8AI4CgASb2AhRExHxgD9JHUIes8\n75OVNSoi/IhgwIABucdQLg/fC98L34sVP5qj2EN1hwJPAltKmi3p2AanfN4sFRGjgNckzQKuBU7I\nyt8Hfgs8A0wEzo/UcW5mZjkparNVRBy+ktc3b/D8F8s570bgxlYLzMzMWsQzzCtUTU1N3iGUDd+L\nZXwvlvG9aBk1t72rHEmK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O456z5eS/h2tArxfV3NZgU+AdVfw2fWXkv/X5xeMmClpB9IGX7+T9HBE/DZ7+UvZ55qVjNtJ\nzZKPgHWa++aI+Ah4TdKBdWWSvt7IqdOA7iv4qEb3kJb0X8AnETEU+AOpSavOlsDfCw7arAWcPMyA\niHgPeCLrjL54Zacvp/wI4LhsD+iXgP0aOecxUt/J8j5reZ/938DTkp4HfgP8DiBr5vq4GvbksPLi\n/TzMSkzS5cDIiHikFT7rVOCDiLih5ZGZNZ1rHmaldwFp1FZreB8Y0kqfZdZkrnmYmVnBXPMwM7OC\nOXmYmVnBnDzMzKxgTh5mZlYwJw8zMyvY/wemIkmJFWUmQQAAAABJRU5ErkJggg==\n",
"text/plain": [
- ""
+ ""
]
},
"metadata": {},
@@ -206,7 +230,7 @@
},
{
"cell_type": "code",
- "execution_count": 62,
+ "execution_count": 6,
"metadata": {
"collapsed": false
},
@@ -217,7 +241,7 @@
},
{
"cell_type": "code",
- "execution_count": 63,
+ "execution_count": 7,
"metadata": {
"collapsed": false
},
@@ -225,10 +249,10 @@
{
"data": {
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 63,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
},
@@ -236,7 +260,7 @@
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEVCAYAAADkckIIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecVPW9//HXG3sPdoRELFiwRCWxl7HEqEnwp4k9P42a\nxIjdRJNrYlxzNVFvYs+1BXuIGuNV7OXqghIRVBAUsHcFUboV8HP/+A6wrLNsmzNnZuf9fDzOY8+c\nOXPmw9lhPvvtigjMzMzm6ZZ3AGZmVl2cGMzMbCFODGZmthAnBjMzW4gTg5mZLcSJwczMFlJTiUHS\nQEmTJI1pw7kXShol6VlJL0qaUokYzcxqnWppHIOkHYFZwI0RsXk7Xnc8sEVE/DSz4MzMuoiaKjFE\nxBPA1KbHJK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LWr3J8RER8VaT9/kvSX8C7i2uzjbPZGAtnBisgpwYzODzJvvR5PGX\npP8j3YCp80oci/ApsOIirt10uvCP579hxMuS+pEWXzpH0v9GxH8Wn166eF2zinHdpdWDmcAKHX1x\nRMwEXpf0o3nHJG1e4tTxQJ9FXKrkuruSegCfRsQg4L9I1UzzbAC80O6gzTrBicG6vIiYAgwrNuye\n39rpLRz/MXB0cd3c54H+Jc4ZSmqraOlaLV17M2CEpFHA74FzAIpVT5909TUVrPp4PQazMpJ0EXB3\nRDxahmudDEyPiOs6H5lZ27nEYFZefyT1biqHqcANZbqWWZu5xGBmZgtxicHMzBbixGBmZgtxYjAz\ns4U4MZiZ2UKcGMzMbCH/BwvaP+q1/nDOAAAAAElFTkSuQmCC\n",
"text/plain": [
- ""
+ ""
]
},
"metadata": {},
@@ -282,7 +306,7 @@
},
{
"cell_type": "code",
- "execution_count": 64,
+ "execution_count": 8,
"metadata": {
"collapsed": false
},
@@ -304,7 +328,7 @@
},
{
"cell_type": "code",
- "execution_count": 65,
+ "execution_count": 9,
"metadata": {
"collapsed": false
},
@@ -312,10 +336,10 @@
{
"data": {
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 65,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
},
@@ -323,7 +347,7 @@
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAEZCAYAAABICyhRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4FOX2wPHvCU1Beq8Bg6iggAVEwZ9BL9hQFKV3rCBi\nQe8FFQGx4rWCWBCBANJEBa4oTYKiAgJSpRNaEKS3ICU5vz9mEjZhUyDJzmZzPs+TJ7vvTjk7Mztn\n3nfemRFVxRhjjAmkMK8DMMYYk/tY8jHGGBNwlnyMMcYEnCUfY4wxAWfJxxhjTMBZ8jHGGBNwlnwu\nkIi0E5EfvI4jkYhcJCLTReSQiEwM8LxjROTWCxz3YxF5M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zJQSz5GGOMCThLPsYYYwLOko8xxpiAs+RjjDEm4Cz5GGOMCThLPsYYYwLOko8xKYhI\nURHp7vO+vIhMyqZ5NReRl9zXI0WkRQbGySci891HiRiTI9nGa8y5igM9Et+o6l+q2iqb5vVv4KOM\nDiwiYe5jQ+bg3EbKmBzJko8x53oDuNR9muNb7j0DVwGISGcR+cZ9+uUWEXlCRJ5xh/1VRIq5w10q\nIt+7j7WYLyI1Us5ERC4D/knx0L9bROQXEdmUWAsSkVtE5CcRmQr86Q43FWifnQvBmOyU1+sAjAlC\nfYBaqnotgIiEk/zW+7Vw7oFVENgEPK+q14rIu0An4EPgM5x7Y20WkfrAxzhP2vXVEFiWoqycqjYU\nkStxbnr5tVt+jRvTdvf9anLRHalN6LHkY8z5m6eqcUCciBwC/ueWrwKudu8mfhMwWUQS7yidz890\nygN7U5R9C6Cqa0WkjE/5Yp/Eg6omiMhJESmkqsez4DsZE1CWfIw5fyd9XqvP+wSc31QYcDCx5pSG\nEwuuczkAAADUSURBVECRNKbt+1gIfwmmAPBPutEaE4TsnI8x5zoKFL7QkVX1KBAjIg8mlolIbT+D\nrgUuS2NS/p7Qmzi9EsBeVY2/0DiN8ZIlH2NSUNUDwC8islJE3kpv8FTKOwAPichyEVkN3OtnmJ9w\nzh2lNq20nnfSGJiRTmzGBC17no8xHhKR94DpqvrjeY43BeijqhuzJzJjspfVfIzx1us4veYyTETy\nAd9Y4jE5mdV8jDHGBJzVfIwxxgScJR9jjDEBZ8nHGGNMwFnyMcYYE3CWfIwxxgTc/wNuqZJBTvmz\ntwAAAABJRU5ErkJggg==\n",
"text/plain": [
- ""
+ ""
]
},
"metadata": {},
@@ -354,7 +378,7 @@
},
{
"cell_type": "code",
- "execution_count": 66,
+ "execution_count": 10,
"metadata": {
"collapsed": true
},
@@ -382,7 +406,7 @@
},
{
"cell_type": "code",
- "execution_count": 67,
+ "execution_count": 11,
"metadata": {
"collapsed": false
},
@@ -390,10 +414,10 @@
{
"data": {
"text/plain": [
- ""
+ ""
]
},
- "execution_count": 67,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
@@ -401,7 +425,7 @@
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEZCAYAAAC0HgObAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VNX5wPHvGyAFhAiiLAkCMYIF/aGCIrQuQQuCiOAC\nsomgVlqkLmgrLhEwaJVWpFbRVnFBQMQFRUUWC0FQFkFWBcQQRBJAETAgSlje3x/nJkzGyT7JnSTv\n53nmycy52zt3buade86594iqYowxxoRLlN8BGGOMqVgssRhjjAkrSyzGGGPCyhKLMcaYsLLEYowx\nJqwssRhjjAkrSyyVkIj0E5HZfseRTUSqi8h7IrJPRF4v422nicilxVz2WRF5oITbv0REvi3JOoqw\nrZdE5OGy2Fa4ich+EWlWwnUU+v2LSFMROSYiUd7rWSJyQ8D0MSLyvYhkeK+vFpFtIpIpImeXIMb1\nInJxcZePFFX9DqA8E5F+wF3Ab4FMYDXwqKp+4mtgBVDVqcBUv+MIcB1wClBXI/TCKhG5EbhFVS/K\nLlPVP4dp9RH5niOJqtb2Y7MB278i+7mINAaGA6eq6g9e8T+Aoar6fok2qHpWSZaPFHbGUkwiMhwY\nB4wB6gNNgAnAVX7GVRARqeJ3DCE0Bb6K1KTiESwBlLkIPV6bAbsDkgq4Y/hLf8KJQKpqjyI+gBhg\nP3BNPvNEA+OBdGA78CRQzZt2CfAt8FdglzdPD6ArsAnYDdwXsK6RwBvANNyZ0QqgdcD0e4GvvWnr\ngZ4B024EFuOS4A/Aw17ZooB5nvTi2Ic762oV8D4nAd8BacADQetdhPultgdIBbrksz9+CywA9gLr\ngO5e+SjgEJDlxT84xLLnA596y6YD/waqBkw/BgwBvvLe49MB004D/uft0++AyUBMwPQ04FKgAfAT\n7qwpe1pbb5kzgZ+Bw97nvseb/hLwcMD8PYBVwI/AZqCzVz4I96WT6X1OtwYscw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u2wv/3225znqsr27duJi4sD3Jf3wYMHc6bv3Lkz53moarI///nPtGzZ\nktTUVPbt28cjjzxS6LOe2NjYXLEAbNu2LSeW/CxatIixY8fy5ptvsnfvXvbu3UtMTIzdpsWUe+Ul\nqYAllogWExPD6NGjue2223j33Xf5+eefOXLkCLNnz+bee++lb9++jBkzht27d7N7926Sk5NLdI3G\nypUreeeddzh69ChPPvkk1atX54ILLgDg3HPPZerUqRw7dozZs2fnqtZq0KABP/zwA5mZmTll+/fv\nJyYmhpo1a7Jx40aeffbZXNtq2LBhru7GgS644AJOOOEExo4dy5EjR0hJSeH999+nbyE66B84cIBq\n1apRr149srKyePjhh9m/f39xdocxESO7S3F5SCpgiSXi3XXXXYwbN44xY8ZQv359mjRpwjPPPMPV\nV1/Ngw8+SNu2bWndujVnn3025513Xq5G7GDBZxbBr3v06MHrr79O3bp1mTJlCjNmzKBKlSoAjB8/\nnpkzZ1K3bl1ee+01rg64X8QZZ5xB3759Oe200zjppJPYuXMn//znP5kyZQoxMTEMGTKEPn365NrW\nqFGjGDhwICeddBJvvvlmrmnVqlVj5syZzJo1i5NPPplhw4bx6quv0rx585BxB7r88svp0qULLVq0\nID4+npo1axb5GhtjIkl2Uhk9unwkFbC7G9vdbD2jR48mNTWVSZMm+R2Kr+x4MJEkEpKK3d3YGGMq\niEhIKsVlicUYYyJMeU4qYFVhVvVhcrHjwfgt0pKKVYUZY0w5FmlJpbgssRhjTATYsAE6diz/SQVK\nObGIyEQR2SUiawPKxorIBhFZLSJviUhMwLT7RGSzN71zQHkXEdkoIl+JyL0B5c1EZKmIbBKR10Sk\namm+H2OMKQ3r17szlcceK/9JBUr/jOUl4PKgsrnAmap6DrAZuA9ARFoBvYGWQFdggjhRwNPees4E\n+orIb711PQ48oapnAPuAm0v5/RhjTFitXg2dOsETT0TOeColVaqJRVUXA3uDyj5S1eybXy0FGnvP\nrwKmqeoRVd2KSzrtvMdmVf1GVQ8D04Ae3jKXAm95z18BfBzl2RhjimblSrj8cj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metadata": {},
@@ -420,13 +444,27 @@
]
},
{
- "cell_type": "code",
- "execution_count": null,
+ "cell_type": "markdown",
"metadata": {
"collapsed": true
},
+ "source": [
+ "# Okubo plots\n",
+ "Okubo (1971) and referenced in Thorpe (2007) shows plot of the 4/3 law on top of various data, indicating a contant ($\\alpha$) that varies with length scale, but constant within a range -- i.e. $L \\lt 10^5 cm$.\n",
+ "\n",
+ "But while there is a fitted line on the plot, I don't see the constant in the paper anywhere. So this tries to approcimate it from teh figure."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
"outputs": [],
- "source": []
+ "source": [
+ "L = np.logspace(3, 6)"
+ ]
},
{
"cell_type": "code",
@@ -454,7 +492,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.12"
+ "version": "2.7.11"
}
},
"nbformat": 4,
diff --git a/experiments/Spreading/SpreadingUtilities.ipynb b/experiments/Spreading/SpreadingUtilities.ipynb
index b966e4ba0..d52703fd0 100644
--- a/experiments/Spreading/SpreadingUtilities.ipynb
+++ b/experiments/Spreading/SpreadingUtilities.ipynb
@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 36,
"metadata": {
"collapsed": true
},
@@ -51,7 +51,7 @@
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 37,
"metadata": {
"collapsed": false
},
@@ -68,18 +68,21 @@
"def delta():\n",
" rho_oil = 0.8 # density of oil\n",
" rho_water = 1 # density of water\n",
- " return (pw-po)/pw\n",
+ " return (rho_water-rho_oil)/rho_water\n",
"\n",
"def init_area(V0):\n",
" return np.pi * (K1**4/K2**2) * ((g * V0**5 * delta())/visc_w**2 )**(1./6.) \n",
"\n",
"def init_radius(V0):\n",
- " return (K1**2/K2) * ((g * V0**5 * delta())/visc_w**2 )**(1./12.) \n"
+ " return (K1**2/K2) * ((g * V0**5 * delta())/visc_w**2 )**(1./12.)\n",
+ "\n",
+ "def old_init_area(V0):\n",
+ " return np.pi*(K2**4/K1**2)*((V0**5*g*delta())/(visc_w**2))**(1./6.)\n"
]
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": 38,
"metadata": {
"collapsed": false
},
@@ -87,31 +90,37 @@
"source": [
"vol = np.linspace(1,100) # 1 to 100 cubic meters\n",
"area = init_area(vol)\n",
+ "old_area = old_init_area(vol)\n",
"radius = init_radius(vol)"
]
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": 39,
"metadata": {
"collapsed": false
},
"outputs": [
{
- "data": {
- "text/plain": [
- "[]"
- ]
- },
- "execution_count": 33,
- "metadata": {},
- "output_type": "execute_result"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[ 0.54390769 0.45164263 0.40277741 0.36826818 0.3412104 0.31878132\n",
+ " 0.29953158 0.28261209 0.26748015 0.25376655 0.24120815 0.22961034\n",
+ " 0.21882497 0.20873648 0.19925288 0.19029971 0.18181578 0.17375017\n",
+ " 0.16606003 0.15870892 0.15166561 0.14490309 0.13839786 0.13212931\n",
+ " 0.1260793 0.12023173 0.11457228 0.10908811 0.10376772 0.09860071\n",
+ " 0.09357769 0.0886901 0.08393018 0.07929079 0.07476543 0.0703481\n",
+ " 0.06603329 0.06181591 0.05769125 0.05365492 0.04970289 0.04583136\n",
+ " 0.04203681 0.03831597 0.03466574 0.03108325 0.02756579 0.02411082\n",
+ " 0.02071594 0.01737891]\n"
+ ]
},
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEACAYAAACtVTGuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xmcj/X+//HHayzRQlSopFQ40rekjk6rOUeRFqpzEpUl\nZE0pkdFiVBJtJER2KQflUEdIzHEqWUKUiWmxliFC2piZ1++PudTnzI/ZzTUzn+f9dnPr+rx6v695\nXZcxz7m2z8fcHRERkSOJCbsBEREp3BQUIiKS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EXge+RnLFIquvYVwH5px1XruzRXEsUUoKOZtTOzRkA/YHTCdapPjwNz3P3B\ntLLRQGG03R8YVfakhsbdb3b3tu5+AOEz8Jq7nw+8RP7FYjWwzMw6R0W9gHfJw88FocnpaDPbOeqY\n7UUY7JBPsTBK32VXdO2jgX7RqLD9gY6ECc6Vv3muzKOInlfxIPGEvHsTrlK9MLNjgP8Cswi3jw7c\nTPif+yzhr4OlwLnunjfLZZrZ8cD17n6Gme1JHsbCzA4ldOrvCLwHXEjo1M3HWAwm/PHwNTADuARo\nTB7EwsyeAQqAvYDVwGDgn8BzlHPtZjYIuJgQq6vdfXyVvyNXEoWIiCQjV5qeREQkIUoUIiJSKSUK\nERGplBKFiIhUSolCREQqpUQhIiKVUqIQEZFKKVGIiEil/j8DD0rvG57nHwAAAABJRU5ErkJggg==\n",
"text/plain": [
- ""
+ ""
]
},
"metadata": {},
@@ -120,13 +129,18 @@
],
"source": [
"fig, ax = plt.subplots(1,1)\n",
- "ax.plot(vol, area)\n",
- "ax.plot(vol, np.pi * radius**2)"
+ "ax.plot(vol, area, c='r')\n",
+ "# ax.plot(vol, np.pi * radius**2)\n",
+ "ax.plot(vol, old_area, c='b')\n",
+ "# ax.plot(vol, 600* vol)\n",
+ "# ax.plot(vol, area - 600*vol)\n",
+ "ax.grid(True)\n",
+ "print((area - 600*vol)/area)\n"
]
},
{
"cell_type": "code",
- "execution_count": 36,
+ "execution_count": 40,
"metadata": {
"collapsed": false
},
@@ -160,7 +174,7 @@
},
{
"cell_type": "code",
- "execution_count": 74,
+ "execution_count": 41,
"metadata": {
"collapsed": true
},
@@ -172,11 +186,24 @@
},
{
"cell_type": "code",
- "execution_count": 75,
+ "execution_count": 42,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "ename": "NameError",
+ "evalue": "global name 'k2' 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[0mV0\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;36m100\u001b[0m \u001b[1;31m# cubic meters ~ 16kgal\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mtime\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlinspace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m24\u001b[0m\u001b[1;33m*\u001b[0m\u001b[1;36m3600\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mfay_area\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mFay\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mV0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtime\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;32m\u001b[0m in \u001b[0;36mFay\u001b[0;34m(V0, t)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mFay\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mV0\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mt\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[1;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpi\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mk2\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m \u001b[1;33m*\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mdelta\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mg\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mV0\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m/\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvisc_w\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m**\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1.\u001b[0m\u001b[1;33m/\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msqrt\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mt\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
+ "\u001b[0;31mNameError\u001b[0m: global name 'k2' is not defined"
+ ]
+ }
+ ],
"source": [
"V0 = 100 # cubic meters ~ 16kgal\n",
"time = np.linspace(1, 24*3600)\n",
@@ -185,32 +212,11 @@
},
{
"cell_type": "code",
- "execution_count": 85,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
- ]
- },
- "execution_count": 85,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAAETCAYAAAClegbPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcVmX9//HXW1RwAYQMMVDcsDT9qiioaTZoKmYKmSim\niEtlLmXf+vZLbQGy1KzMJWlRU8QFcQtNv4CKY+EGKAiKIuoXFQxUUARXls/vj+sM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ry8wypqToRmZmVEEvfddx/vvfce\nixcv5r333qNz5855h1XUnAjNzMpM7akNEUH//v3Zeuut6dixIwcffDAvvPACAE888QRduqy+Neuo\nUaPYZ599WizevDkRmplVgKOOOoqXX36ZefPmsdtuuzFw4EAA9ttvP9q1a8dDDz208tybbrqJU045\nJadIW54n1NfBE+rNrD7rMqFeTTClvLH/BG2//fYsWLCADTdMC4dVVVVx1113rXbO22+/TadOnXj/\n/ffZZJNNuOiii3jxxRe54YYbePvtt9luu+2YPXs2W265ZZ3vUW4T6r3EmplZE8v7/9GjR4+md+/e\nK39fsWIF5513HnfeeScLFixAEpJ4++232WabbRg4cCB77LEHH3/8MSNHjqR37971JsFy5K5RM7My\nU7u1duONNzJmzBiqq6t59913eemll1Y7b5tttmHvvffm7rvv5qabblrZbVop3CI0MytzixcvpnXr\n1nTo0IH333+fCy644FPnDBw4kIsvvpjXXnuNvn375hBlftwiNDMrI6rjAeWpp57K1ltvzec+9zl2\n3313DjzwwE+d881vfpNXXnmF/v3707p165YItWh4sEwdPFjGzOpTzrtPbL/99gwfPpyDDjpojeeV\n22AZtwjNzIzbbruNNm3arDUJlqMWTYSSWkt6UtIUSdMlDc7KB0uaI+np7KdPQZ3zJc2S9LykwwrK\ne0iaJulFSZcXlG8saWRW53FJ2xa8Nig7f6akk1vqc5uZFbMvf/nL/PCHP2TYsGF5h5KLFu8albRp\nRHwgqRXwKPAD4AhgcURcVuvcXYBbgJ5AV+BBoHtEhKQngXMiYpKk+4ErImKspDOB3SPiLEnHA9+I\niAGSOgCTgR6AgKeAHhGxqI4Y3TVqZnUq567RdeWu0fUUER9kh61Jo1Zr7mZdN68vMDIilkXEbGAW\n0EtSZ6BtREzKzrsR6FdQZ3h2fAdwcHZ8ODAuIhZFxLvAOGBly9PMzCpTiydCSRtImgLMAx4oSGbn\nSJoq6VpJ7bOyLsDrBdXnZmVdgDkF5XOystXqRMRyYJGkjmu4lpmZVbA8WoQrImIvUldnL0m7AsOA\nHSJiT1KC/EM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syYUEQuBxyRNk3QpaefulS/Xc7zy94h4Hvg5ME7SM8A4oHMdbzUOqBmR\nugtQnR3PAQ4jdbduCzxVUOdNUhfoccDtBeW9gfvW5fOZlSMPljErQZL2An4YEYOa4Fp3Aj+NiJfW\nPzKz0uMWoVkJiogpwMP1TK1YZ9kI1LudBK2SuUVoZmYVzS1CMzOraE6EZmZW0ZwIzcysojkRmplZ\nRXMiNDOziuZEaGZmFc2J0MzMKtr/BzJC4mBOaZmhAAAAAElFTkSuQmCC\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"fig, ax = plt.subplots(1,1)\n",
"ax.plot(time / 3600, fay_area)\n",
@@ -232,7 +238,7 @@
},
{
"cell_type": "code",
- "execution_count": 77,
+ "execution_count": null,
"metadata": {
"collapsed": true
},
@@ -273,32 +279,11 @@
},
{
"cell_type": "code",
- "execution_count": 80,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
- ]
- },
- "execution_count": 80,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZkAAAEGCAYAAAC3lehYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VOXd//H3N2EXwiphlUDZBQVBikEloFRAFHBHxIIo\nSMWlLn2s9an81LpVW7Vo3VAWpaiooLLoUyCGRRaDIIhhJ4gSkLBkAQJJ7t8fGTBCICNk5szyeV3X\nXJk5c2fOh+Nxvrnv+yzmnENERCQQYrwOICIikUtFRkREAkZFRkREAkZFRkREAkZFRkREAkZFRkRE\nAiboRcbMxpnZDjP7xo+2Z5nZf81spZnNNbMGwcgoIiJlw4uezFvAZX62fRYY75w7F3gUeCpgqURE\npMwFvcg45xYAe4ovM7NmZjbLzJaZ2Rdm1tL3Vltgnu/3koH+QQ0rIiKnJVTmZF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dP+p14Hwv8wSL77IlU4FJzrnpvsVRuV+UtC3Ceb8I\nVpE5ekKnmVWg6ITOk97zIFKZWRXfXylY0b0gfges9jZV0Bm/HF/+GBjqe/57iu6PES1+sS18X6ZH\nXEX07BtvAmuccy8UWxat+8Vx2yKc94ugnSfjO+TuBX4+ofOpoKw4xJhZU4p6L46ik2HfiaZtYWaT\ngSSgNkUXUH0EmAa8DzQG0oHrnHN7vcoYLCfYFj0oGocvBLYAIyP9auZm1g1IAVaB78KE8BBF18d6\njyjaL06yLW4kTPcLnYwpIiIBo4l/EREJGBUZEREJGBUZEREJGBUZEREJGBUZEREJGBUZEREJGBUZ\nEREJGBUZEREJmP8PD91LoYzBBL4AAAAASUVORK5CYII=\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"fig, ax = plt.subplots(1,1)\n",
"ax.plot(time / 3600, fay_area,label='Fay')\n",
@@ -336,7 +321,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.12"
+ "version": "2.7.11"
}
},
"nbformat": 4,
diff --git a/experiments/gnome_weathering/Evaporation.ipynb b/experiments/gnome_weathering/Evaporation.ipynb
new file mode 100644
index 000000000..9e485ab4f
--- /dev/null
+++ b/experiments/gnome_weathering/Evaporation.ipynb
@@ -0,0 +1,75 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# some experiments with evaporation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "from matplotlib import pyplot as plt\n",
+ "%matplotlib inline"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### transfer coeff:\n",
+ "\n",
+ "We are considering a transfer coeff that scales iwth \"sea spray\" -- i.e. it goes up with high wind speed.\n",
+ "\n",
+ "I (nor Robert) am not sure there is a basius for this -- water evaporated faster with sea spray, which I think is where Bill got the idea an coeff, but oil is no linger a surface film under these conditions, so who the heck knows? and if anything, I might expect morre atomization of the oil, rather than evaporation -- some of Joe Katz' work, and other GOMRI folks seem to indicate that.\n",
+ "\n",
+ "atomozatino woudl be a mass loss mechnism, but it would be the whole oil, not jsut teh light ends, like evaporation.\n",
+ "\n",
+ "but what difference does it actually make?\n",
+ "\n",
+ "Here's what we got:\n",
+ "\n",
+ "\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/experiments/property_experiments/gridcurrent/script_columbia_pymover.py b/experiments/property_experiments/gridcurrent/script_columbia_pymover.py
index 83d0829d4..4e08ca34c 100644
--- a/experiments/property_experiments/gridcurrent/script_columbia_pymover.py
+++ b/experiments/property_experiments/gridcurrent/script_columbia_pymover.py
@@ -22,8 +22,8 @@
from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover
from gnome.movers.py_wind_movers import PyWindMover
-from gnome.environment.property_classes import WindTS, GridCurrent
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.environment import WindTS, GridCurrent
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer
import gnome.utilities.profiledeco as pd
@@ -54,7 +54,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
# default is 'forecast' LEs draw on top
renderer = Renderer(
mapfile, images_dir, image_size=(600, 1200))
- renderer.delay=15
+ renderer.delay = 15
# renderer.viewport = ((-123.35, 45.6), (-122.68, 46.13))
# renderer.viewport = ((-122.9, 45.6), (-122.6, 46.0))
@@ -86,7 +86,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
series.append((start_time + timedelta(hours=i[0]), i[1]))
wind1 = WindTS.constant_wind('wind1', 0.5, 0, 'm/s')
- wind2 = WindTS(timeseries = series, units='knots', extrapolate=True)
+ wind2 = WindTS(timeseries=series, units='knots', extrapolate=True)
# wind = Wind(timeseries=series, units='knots')
@@ -100,7 +100,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
curr_file = get_datafile('COOPSu_CREOFS24.nc')
curr = GridCurrent.from_netCDF(name='gc2', filename=curr_file,)
- c_mover = PyGridCurrentMover(curr, extrapolate = True, default_num_method='Trapezoid')
+ c_mover = PyCurrentMover(curr, extrapolate=True, default_num_method='Trapezoid')
# renderer.add_grid(curr.grid)
# renderer.add_vec_prop(curr)
diff --git a/experiments/property_experiments/gridcurrent/script_roms_pymover.py b/experiments/property_experiments/gridcurrent/script_roms_pymover.py
index 0b96f39b7..1d8b95e7e 100644
--- a/experiments/property_experiments/gridcurrent/script_roms_pymover.py
+++ b/experiments/property_experiments/gridcurrent/script_roms_pymover.py
@@ -18,8 +18,8 @@
from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover
from gnome.outputters import Renderer
-from gnome.environment.property_classes import GridCurrent
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.environment import GridCurrent
+from gnome.movers.py_current_movers import PyCurrentMover
import gnome.utilities.profiledeco as pd
# define base directory
@@ -34,7 +34,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
model = Model(start_time=start_time,
duration=timedelta(hours=12),
- time_step=.25*3600)
+ time_step=.25 * 3600)
mapfile = (os.path.join(base_dir, 'coast.bna'))
@@ -63,39 +63,39 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
27.5475,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
spill2 = point_line_release_spill(num_elements=500,
start_position=(-82.73888,
27.545,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
spill3 = point_line_release_spill(num_elements=500,
start_position=(-82.73888,
27.5425,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
spill4 = point_line_release_spill(num_elements=500,
start_position=(-82.73988,
27.5475,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
spill5 = point_line_release_spill(num_elements=500,
start_position=(-82.73988,
27.5450,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
spill6 = point_line_release_spill(num_elements=500,
start_position=(-82.73988,
27.5425,
0.0),
release_time=start_time,
- end_release_time=start_time+timedelta(hours=24))
+ end_release_time=start_time + timedelta(hours=24))
model.spills += spill1
@@ -110,11 +110,11 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
print 'adding a current mover:'
fn = 'nos.tbofs.fields.n000.20160406.t00z_sgrid.nc'
- #fn = 'dbofs_newFormat.nc'
+ # fn = 'dbofs_newFormat.nc'
cf = GridCurrent.from_netCDF(filename=fn)
- u_mover = PyGridCurrentMover(cf, extrapolate=True)
- #u_mover = GridCurrentMover(fn)
+ u_mover = PyCurrentMover(cf, extrapolate=True)
+ # u_mover = GridCurrentMover(fn)
renderer.add_grid(cf.grid)
# renderer.add_vec_prop(cf)
model.movers += u_mover
diff --git a/experiments/property_experiments/num_method_scripts/script_multi_model.py b/experiments/property_experiments/num_method_scripts/script_multi_model.py
index 531fb274e..e956cd8ae 100644
--- a/experiments/property_experiments/num_method_scripts/script_multi_model.py
+++ b/experiments/property_experiments/num_method_scripts/script_multi_model.py
@@ -23,7 +23,7 @@
from gnome.movers.py_wind_movers import PyWindMover
from gnome.environment.property_classes import GridCurrent
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer, NetCDFOutput
from gnome.environment.vector_field import ice_field
@@ -72,7 +72,7 @@ def make_models():
release_time=start_time)
mod.spills += spill
mod.movers += RandomMover(diffusion_coef=100)
- mod.movers += PyGridCurrentMover(current=curr, default_num_method=method)
+ mod.movers += PyCurrentMover(current=curr, default_num_method=method)
images_dir = method + '-' + str(time_step / 60) + 'min-' + str(num_steps) + 'steps'
renderer = Renderer(mapfile, images_dir, image_size=(1024, 768))
diff --git a/experiments/property_experiments/test_grid_gen_scripts/circular.py b/experiments/property_experiments/test_grid_gen_scripts/circular.py
index 1f853373f..b495ecc35 100644
--- a/experiments/property_experiments/test_grid_gen_scripts/circular.py
+++ b/experiments/property_experiments/test_grid_gen_scripts/circular.py
@@ -1,28 +1,23 @@
import numpy as np
-from datetime import datetime
from pysgrid import SGrid
from gnome.environment.grid_property import GriddedProp
import os
from datetime import datetime, timedelta
-import numpy as np
from gnome import scripting
from gnome import utilities
-from gnome.utilities.remote_data import get_datafile
from gnome.model import Model
-from gnome.map import MapFromBNA, GnomeMap
-from gnome.environment import Wind
from gnome.spill import point_line_release_spill
from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover
-from gnome.environment.property_classes import GridCurrent
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.environment import GridCurrent
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer, NetCDFOutput
x, y = np.mgrid[-30:30:61j, -30:30:61j]
@@ -33,13 +28,13 @@
g = SGrid(node_lon=x,
node_lat=y)
g.build_celltree()
-t = datetime(2000,1,1,0,0)
-angs = -np.arctan2(y,x)
-mag = np.sqrt(x**2 + y**2)
+t = datetime(2000, 1, 1, 0, 0)
+angs = -np.arctan2(y, x)
+mag = np.sqrt(x ** 2 + y ** 2)
vx = np.cos(angs) * mag
vy = np.sin(angs) * mag
-vx = vx[np.newaxis,:] * 20
-vy = vy[np.newaxis,:] * 20
+vx = vx[np.newaxis, :] * 20
+vy = vy[np.newaxis, :] * 20
# vx = 1/x[np.newaxis,:]
# vy = 1/y[np.newaxis,:]
# vx[vx == np.inf] = 0
@@ -54,18 +49,18 @@
# value[:,0] = x
# value[:,1] = y
-vels_x = GriddedProp(name='v_x',units='m/s',time=[t], grid=g, data=vx)
-vels_y = GriddedProp(name='v_y',units='m/s',time=[t], grid=g, data=vy)
-vg = GridCurrent(variables = [vels_y, vels_x], time=[t], grid=g, units='m/s')
-point = np.zeros((1,2))
-print vg.at(point,t)
+vels_x = GriddedProp(name='v_x', units='m/s', time=[t], grid=g, data=vx)
+vels_y = GriddedProp(name='v_y', units='m/s', time=[t], grid=g, data=vy)
+vg = GridCurrent(variables=[vels_y, vels_x], time=[t], grid=g, units='m/s')
+point = np.zeros((1, 2))
+print vg.at(point, t)
# define base directory
base_dir = os.path.dirname(__file__)
def make_model():
- duration_hrs=48
- time_step=900
+ duration_hrs = 48
+ time_step = 900
num_steps = duration_hrs * 3600 / time_step
mod = Model(start_time=t,
duration=timedelta(hours=duration_hrs),
@@ -78,13 +73,13 @@ def make_model():
0.5,
0.0),
release_time=t,
- end_release_time=t+timedelta(hours=4)
+ end_release_time=t + timedelta(hours=4)
)
mod.spills += spill
- method='Trapezoid'
+ method = 'Trapezoid'
images_dir = method + '-' + str(time_step / 60) + 'min-' + str(num_steps) + 'steps'
- renderer = Renderer(output_dir=images_dir, image_size=(800,800))
+ renderer = Renderer(output_dir=images_dir, image_size=(800, 800))
renderer.delay = 5
renderer.add_grid(g)
renderer.add_vec_prop(vg)
@@ -92,7 +87,7 @@ def make_model():
renderer.graticule.set_max_lines(max_lines=0)
mod.outputters += renderer
- mod.movers += PyGridCurrentMover(current=vg, default_num_method=method, extrapolate=True)
+ mod.movers += PyCurrentMover(current=vg, default_num_method=method, extrapolate=True)
mod.movers += RandomMover(diffusion_coef=10)
netCDF_fn = os.path.join(base_dir, images_dir + '.nc')
@@ -109,7 +104,7 @@ def make_model():
startTime = datetime.now()
for step in model:
if step['step_num'] == 0:
- rend.set_viewport(((-10,-10), (10,10)))
+ rend.set_viewport(((-10, -10), (10, 10)))
# if step['step_num'] == 0:
# rend.set_viewport(((-175, 65), (-160, 70)))
print "step: %.4i -- memuse: %fMB" % (step['step_num'],
diff --git a/experiments/wave_checks/check_waves.ipynb b/experiments/wave_checks/check_waves.ipynb
index ca7d66c56..ede378e78 100644
--- a/experiments/wave_checks/check_waves.ipynb
+++ b/experiments/wave_checks/check_waves.ipynb
@@ -1,270 +1,420 @@
{
- "metadata": {
- "name": "",
- "signature": "sha256:7e6322ff77095b3775b1c7fad8eafef1265e8ec326f69cf9bce56f277117b631"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
+ "cells": [
{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Notebook to check waves code\n",
- "\n",
- "Is doing reasonable things?\n",
- "\n",
- "Does it match SPM?\n",
- "\n",
- "etc...."
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# plotting imports\n",
- "import numpy as np\n",
- "%pylab inline"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Populating the interactive namespace from numpy and matplotlib\n"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stderr",
- "text": [
- "WARNING: pylab import has clobbered these variables: ['f']\n",
- "`%matplotlib` prevents importing * from pylab and numpy\n"
- ]
- }
- ],
- "prompt_number": 146
- },
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Notebook to check waves code\n",
+ "\n",
+ "Is doing reasonable things?\n",
+ "\n",
+ "Does it match SPM?\n",
+ "\n",
+ "etc...."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# plotting imports\n",
+ "import numpy as np\n",
+ "%matplotlib inline\n",
+ "from matplotlib import pyplot as plt"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "import datetime\n",
+ "# first imort stuff from GNOME:\n",
+ "import gnome\n",
+ "import gnome.environment.waves\n",
+ "reload(gnome.environment.waves)\n",
+ "Waves = gnome.environment.waves.Waves\n",
+ "\n",
+ "from gnome.environment import wind\n",
+ "from gnome.environment import Water\n",
+ "from gnome.basic_types import datetime_value_2d"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## fetch unlimited wave height"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "# create some sample wind and water objects\n",
+ "#start_time = datetime.datetime(2014, 12, 1, 0)\n",
+ "# 5 m/s\n",
+ "#series = np.array((start_time, (5, 45)),\n",
+ "# dtype=datetime_value_2d).reshape((1, ))\n",
+ "test_wind_5 = wind.constant_wind(5, 45)\n",
+ "default_water = Water()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "w = Waves(test_wind_5, default_water)\n",
+ "U = range(40)\n",
+ "H = [w.compute_H(u) for u in U]\n",
+ "#print H"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "import datetime\n",
- "# first imort stuff from GNOME:\n",
- "import gnome\n",
- "import gnome.environment.waves\n",
- "reload(gnome.environment.waves)\n",
- "Waves = gnome.environment.waves.Waves\n",
- "\n",
- "from gnome.environment import wind\n",
- "from gnome.environment import Water\n",
- "from gnome.basic_types import datetime_value_2d"
- ],
- "language": "python",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 5,
"metadata": {},
- "outputs": [],
- "prompt_number": 147
+ "output_type": "execute_result"
},
{
- "cell_type": "markdown",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEnCAYAAABL6S/qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XeYVeW5/vHvjRpsJ4ol4rGgxkokQaxHUQdUgr3FiscW\nTTNqNGqMMT8wxxSTqFETTTwaxW5iCYINCyOCgoggoAhJjCg5iiaCggWBeX5/vGtkO+wZZobZs9ae\nuT/Xta9Ze+1VnlkM69lvWe+riMDMzDq3LnkHYGZm+XMyMDMzJwMzM3MyMDMznAzMzAwnAzMzw8nA\nKkDSKEl9WrD9hpL+1Izt5jey/lBJ27YkxpJ9D5Z0QbnjtPT3aME5T5J0dbb8TUkntHD/MdnPHpKO\na8X5b5J0RJn120iaJGmipM2b2P+HrT2HFZeTgeUuIt6MiKObs2kj6w8DvtTKcw+PiF+u6HFaKyL+\nEBG3tXCfvtni5sDxbRjOYcCfI2LHiPhHE9td1IbntIJwMujAJJ0v6bvZ8pWSnsiW+0u6JVu+VtJz\nkqZKGpytGyjp7pLj7C3pgWx5gKRnJD0v6W5Jqzdy+qMljZf0iqQ9sn27SPpltn6ypNOz9T0kTc2W\nV8uOO03SfZLGlXw7l6RLs32fkbS+pP8CDgF+KemF0m+02fn+ni2vLWmJpL7Z+9GStsi+pV9T5jhb\nNPZ7NLjGe0saXvL+GkknZsv/kDQk+6b9oqSty+w/WNK52fIoSVdImiDpJUk7SbpX0gxJ/1OyT30J\n6edA3yzesxu7vtk+v5U0XdJI4Atl4tgf+B7w7ZK/k0HZsV6QdF12/J8Dq2Xrbs22OzH7/SZJGlpy\n2L0ljZX0N5cSis/JoGMbDeyZLe8IrCFpJaAv8HS2/qKI2AX4ClAjaXvgMWBXSatl2xwD3ClpXeBH\nwD4RsRMwEfh+I+deKSJ2Bc4BhmTrvg7My9bvAnxDUo/ss/pv/d8B3o2I7YEfA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BELgWdJN7Q9WZoMICWEVyNiasl+m2XLewL3R8TC\niJhP+fkwpgL7Svq5pL7ZdvVej4hx2fJt2fH2ISWnCdlUiP2BLZpY35wYIA2HXDrsdX1V0T8j4j6g\nFzAGGEEahrreThExseT914FXgE+ANSHN1AUszObbMGuSk4EVSkQsBmYBpwBjSQmgH7BFRLzSYPOF\nJctLSPNKfHqo5Zznr6Sb+FTSnLYXN7F5/VyyN0dEn6w0sV1E/IRUQim3frkxZD4CVi2JayywZURM\nyKqn/p1NXbkr8HwTx7mdNJ3l4RFROuNaV+DjZsRhnZyTgRXRaOC87OcY4FukiUTqqcHPcvsfLqmr\npP8ADm64gaQNgY8i4g7gV0Cfko83lbRrtnxcFsOTwNckrZ/t303SpsATjaxfbgwA2WQ4K2Wz+tXP\nqvVB9vHOLK0KOhB4SlJvSVsDM0p+l/2A7bOG9X+VrF8HeCcilte2YOZkYIX0NNAdeDb7lvsR6eZa\nLxr8/IyImATcDUwBHiTNSNZQL+C5rGrn/wGXlnw2AzhD0sukmaKui4jpwMXASEkvAiOB7k2sn0Sa\nBa2pGOqNJLWJAHyJpdVhvUjTF0KaoWwA8CKppFRbsv/bpOqgo0mz2dXrBzzUxHnNPuWZzsxKSOoB\njIiIXu14zt7AORFxUjO3/25E/LYZ290LXJhViZk1ySUDs2W16zekiJgMjGrOQ2dZ9dY/m7HdKqQG\nbCcCaxaXDMyqSFYVNKIok7Bbx+FkYGZmriYyMzMnAzMzw8nAzMxwMjAzM5wMzMwMJwMzM8PJwMzM\ncDIwMzPg/wO6PWqCWDEA4AAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
"metadata": {},
- "source": [
- "## fetch unlimited wave height"
- ]
- },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(U,H)\n",
+ "fig.suptitle('wave height with unlimited fetch')\n",
+ "ax.set_xlabel('wind speed ($m/s$)')\n",
+ "ax.set_ylabel('H (m)')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "**NOTE:** This seem to be pretty high for the large wind speeds -- which we dont really expect to do well anyway, but still. I think there are issues with wave hieght being depth limitied, etc, when it gets big. Also tiem scale -- a 3 or 6 or whatever time average isn't going to cut it with waves potentially this big."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "water = Water()\n",
+ "w = Waves(test_wind_5, water)\n",
+ "H = []\n",
+ "# fetch range from 1km to 100km\n",
+ "fetch = range(1000, 100000, 1000)\n",
+ "for f in fetch:\n",
+ " water.fetch = f\n",
+ " H.append(w.compute_H(10))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "# create some sample wind and water objects\n",
- "#start_time = datetime.datetime(2014, 12, 1, 0)\n",
- "# 5 m/s\n",
- "#series = np.array((start_time, (5, 45)),\n",
- "# dtype=datetime_value_2d).reshape((1, ))\n",
- "test_wind_5 = wind.constant_wind(5, 45)\n",
- "default_water = Water()"
- ],
- "language": "python",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 7,
"metadata": {},
- "outputs": [],
- "prompt_number": 148
+ "output_type": "execute_result"
},
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "w = Waves(test_wind_5, default_water)\n",
- "U = range(40)\n",
- "H = [w.compute_H(u) for u in U]\n",
- "#print H"
- ],
- "language": "python",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEhCAYAAAC6Hk0fAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFOW1x/HvQcFdiCZxQQUMKGKiqBE3NCNwWeKCelXA\nCKLGqHFJzDWK2cTEuEASNCoYjKKCiBgX0Iji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jfdzGab2Qlm1hj4I3B6NAX8aWa2\nnZndFa1KN8/MTq4+pV0b7ZtqZv81VbeZtQG+dvePo8cjzGxotBLg62Z2TBTDq2Z2V8pLHwP6xHtF\nRBqOkomUDHe/kLCeQ5mHyTV/Czzr7ocRZir+C2EK+D8AD7j7we7+IPB7wsR5B7h7e6onENwOmBrt\nmwKcV8PbHkWYdy1VM3c/AvgVIWn81d3bAQeY2QFRrJ8CTaLJ+UTynpKJlJrUWVi7AgPMbC5QDjTh\nm9N1V+kC3Fb1wN0/izbXuvsT0fZswpKw6XYjrBiZ6rHo3wXAf9z91ejxK2nn+ICwjodI3tsy6QBE\nEva/7r40dUc0hXe6mtpH1qdsV1Dz/6c1wI5p+9ZG/1ambFc9Tj3H1tHrRfKeSiZSyp4CLq16YGbt\no83VfDMBTAQuSTmuWdVmBu+xCGhTx/N1nWMX4O0M3kMkcUomUmpSSxjXAo2jhvX5hIZ3CIsvtatq\ngI+O+5aZLYiqxMpqOFdtJhN6h9X0/umPN26b2SHANK9e61wkr2k9E5GYmdkQ4DF3f67eg6tfcxMw\nzt0nxReZSMNRyUQkftcB227iaxYokUghUclERESyppKJiIhkTclERESypmQiIiJZUzIREZGsKZmI\niEjW/h8BxcXuolqjRwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
"metadata": {},
- "outputs": [],
- "prompt_number": 149
- },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(fetch, H)\n",
+ "fig.suptitle('wave height for 10 m/s wind')\n",
+ "ax.set_xlabel('fetch (m)')\n",
+ "ax.set_ylabel('H (m)')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## NOTE:\n",
+ "\n",
+ "This seems kind of small -- only just over 1 m waves for 20 knot wind?\n",
+ "\n",
+ "We need to check against the SPM.\n",
+ "\n",
+ "This calculator:\n",
+ "https://woodshole.er.usgs.gov/project-pages/coastal_model/Tools/fetch_limited.html\n",
+ "\n",
+ "gives 1.8m for 10m/s and very high fetch and duration (and deep water).\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Whitecap Fraction\n",
+ "\n",
+ "Note that the slolution for $U < 4$ is pretty fudged -- used to be zero for $U < 3$, now it is a linear interpolation form 0 to the $U=4$ value. maybe an exponential or quadratic would be better?"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "water = Water()\n",
+ "w = Waves(test_wind_5, water)\n",
+ "wf = [] # whitecap fraction\n",
+ "U = np.arange(0,20,0.2)\n",
+ "for u in U:\n",
+ " wf.append(w.whitecap_fraction(u))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "fig, ax = plt.subplots()\n",
- "ax.plot(U,H)\n",
- "fig.suptitle('wave height with unlimited fetch')\n",
- "ax.set_xlabel('wind speed ($m/s$)')\n",
- "ax.set_ylabel('H (m)')"
- ],
- "language": "python",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 15,
"metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 150,
- "text": [
- ""
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEnCAYAAABPHP/XAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcXuP9//HXW6xJVJtaog2iVUqTNiGWWscStdfeUoTW\nUhRdqKVfRPFTiu70a22KSlFLLCWRZmSpJYlEFkRt/aIkIUWCrPP5/XGdkdtkZjIzmXvOued+Px+P\n+3Gf+9xn+dwnk/M513Wdc12KCMzMrDqtlHcAZmaWHycBM7Mq5iRgZl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/fzVgCVZicCsWU4CViRjgJ7A4xExC/iI\nT1YFRYP3T8yPNOj2X0kjPz3E0hNpqb7Ak1kVzgXAxSXfzQBOlfQssBZwbUQ8B/wPMFzSM6TRmno2\nM78lMRARS4BpJff7f4WlbR99gFHZ9JuksWynkm4NrS3ZzCxgYda4fUfJ/P6k6jSz5fLIYmaku4OA\n+7PG4o7a57GkIQovb+Hyp0XE71qw3P8DxkfEPSsYolUBlwTMluroK6K/APu25GExSZ8D3mjBcquR\nGqdzHazdKodLAmYVQNK3SA+WfZB3LNa5OAmYmVUxVweZmVUxJwEzsyrmJGBmVsWcBMzMqpiTgJlZ\nFXMSMDOrYk4CZmZVzEnAzKyK/X9vTJEcSXyLqwAAAABJRU5ErkJggg==\n",
- "text": [
- ""
- ]
- }
- ],
- "prompt_number": 150
+ "output_type": "execute_result"
},
{
- "cell_type": "markdown",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZMAAAEhCAYAAAC6Hk0fAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYVNWZx/HvDxQ1iaJGs4lojEQFV6K4BtsdEw3GuGCM\nW4yJQcfBLa4ZYSYZl1GjiWMSHXSMmhCjEsRxX9oNZJFFRFCSKIKgMQKKC4vNO3+c21h2qulqqqtv\nV/Xv8zz9cOvWubfeW3T32+ecuu9RRGBmZlaOLnkHYGZm1c/JxMzMyuZkYmZmZXMyMTOzsjmZmJlZ\n2ZxMzMysbE4mVjUkXS3pjILHD0i6oeDxlZKGSNpb0uhmznGDpK2z7QsqH3Vxkl6VNFXSZEmTJO3W\nBufcW9LuBY9/JOl75Z7XrBROJlZNxgB7AEgSsBHQp+D5PYBnsu2iN1BFxA8jYmb28MIKxVmKFUBd\nROwUEX0j4tnCJyWtzs9mHdn7AxARv42I28oL06w0TiZWTZ4B9sy2+wAvAIsldZfUDdgamJw9v66k\nP0maIenWxhNIelxSX0mXAutkvYJbs+eOlTQu2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mpTY9myc\nj5C0jqRewEvAxpJ2y/avIal3RLwDvCNpj+yczc1dvAx8uRXX1mj7iJiaveaXI+KViPgVaZ5k+2z/\nhsBbEdGwGue3TsbJxGrJNFJZ8rFN9i1qHLJqQcDKxcCGkhLAU8CLzbQfImmapCnAMj7+ZNRE4Dpg\nOvDXiBgZEf8grQ/xB0lTsxi3yuY6jgAuz84zmZT8AL4PXC9pUrMBp+Gsv0jaYlXXVEjS14DCcx4t\n6YVsor8P8Lts/z7Afc29tlkhl6A3a0OS9gbOjohvteNrDgS+FhH/VmL7i4BZEbHK+20k3QWcHxGz\n2iBMq3GegDerchExKvt0Vqntf95Sm2x4b6QTiZXKPRMzMyub50zMzKxsTiZmZlY2JxMzMyubk4mZ\nmZXNycTMzMrmZGJmZmX7fzMAw+HYFDRuAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ ""
+ ]
+ },
"metadata": {},
- "source": [
- "**NOTE:** This seem to be pretty high for the large wind speeds -- which we dont really expect to do well anyway, but still. I think there are issues with wave hieght being depth limitied, etc, when it gets big. Also tiem scale -- a 3 or 6 or whatever time average isn't going to cut it with waves potentially this big."
- ]
- },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(U, wf)\n",
+ "fig.suptitle('Whitecap Fraction')\n",
+ "ax.set_xlabel('Wind speed (m/s)')\n",
+ "ax.set_ylabel('Fraction')\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "## Energy Disspation rate\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": [
+ "water = Water()\n",
+ "w = Waves(test_wind_5, water)\n",
+ "H = np.linspace(0, 3, 10)\n",
+ "eps = w.dissipative_wave_energy(H)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "water = Water()\n",
- "w = Waves(test_wind_5, water)\n",
- "H = []\n",
- "# fetch range from 1km to 100km\n",
- "fetch = range(1000, 100000, 1000)\n",
- "for f in fetch:\n",
- " water.fetch = f\n",
- " H.append(w.compute_H(10))"
- ],
- "language": "python",
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 18,
"metadata": {},
- "outputs": [],
- "prompt_number": 151
+ "output_type": "execute_result"
},
{
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "fig, ax = plt.subplots()\n",
- "ax.plot(fetch, H)\n",
- "fig.suptitle('wave height for 10 m/s wind')\n",
- "ax.set_xlabel('fetch (m)')\n",
- "ax.set_ylabel('H (m)')"
- ],
- "language": "python",
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEhCAYAAACOZ4wDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xe8VNW5//HPF1TsiL1jicYSFdSrKCYerFgIEUs0akSN\nScy9tlhi/N0ETGKMxm6iiYm9xBoVsaHisYsoVUEvCRpLRO5FEREi5Ty/P9Y+MpzMmZlT5szMOd/3\n6zWvs2fXZzM6z6y19lpLEYGZmVkh3SodgJmZVT8nCzMzK8rJwszMinKyMDOzopwszMysKCcLMzMr\nysnCykLSYknjJI3P/p5T6ZgAJD0t6U1JEyRNkXSVpJ45259vxTnPl7RXK+PZU9JuOe9/IOmY1pyr\ntST9tCOvZ7VJ7mdh5SBpTkSs2s7n7B4Ri9t4jqeBH0fEeEnLAL8Bdo6IuvaIsRXxDAPmRsSlZbxG\nt4hoKLD9s4hYpVzXt87BJQsrF+VdKb0tabik1yRNlLRltn5FSddLGpNtG5StP07Sg5KeAp5Uck1W\nKhgl6WFJQyTtJemvOdfZR9J9hWKLiEXAOcDGkrbLjvss+7uupGeyUtEkSf0ldZN0Y/Z+oqT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1U0hgD7AbsTJqIaBHwL+BbEbEzsBdwWXaKO1l62IYjgHsk\n7QtsERG7AH2BnSXtkSeElYAXs1GAnwNOytZfCVwWEbsCh5GGUvgy7Jx9Lo+IHUiD8OWWJvoApwLb\nAJtL2j0iriYN+10XEfnmGuhPGhk1N7YnI+JrwFzgl6Q5CoZky41eBb6e53xmBVXt2FBmzWgsXewO\nXEoa7bQ/8CkpeUAa3O9CSd8AGoD1Ja0dERMkrZUN0Lg28HFEvC/pNGBfSeOyY1cCtgCeb3LtLyLi\nkWz5NdIAbWR/t86qxgBWlrRSk2N3Y8nkVncAv83Z9kqWCJE0Adgku5dCAzGuB/xvk9hGZcuTgX9F\nRIOkyaQxjxrNJJVYzFrEycJqzUukRPE1UjXU+8CZpGRxQ7bP0aT2jL7ZF+bbQGND8b2kUTbXJZU0\nIEsuEfGnItdemLO8mCX//wjoFxELcndekjuApUsSTRPAF82ct5B5LLmnprE1NJ4zIiIbjrvR8qSB\n8cxaxNVQVmteAA4mlQoiG4N/NdIv95eyfXoCM7NEMYClf1nfRaqzP5SUOAAeB05oLA1IWr+xPaKJ\n5n7ljyJVI5Edv0OefV4mVVFB6W0Gc4BVm9k2FfhKCbE13bYlKcmatYiThdWaycAaLEkMjetm58w3\ncDvwH5ImAseQvlgBiIgpwCrA+43zL0TEE6SqoZckTQLuAVbOc+3mnlo6jdTOMVHS68AP8uxzBvDj\nrJppc1JJKJ/ca/wJeLSZBu5HgAElxNZ02wDg4QL7muXlIcrNOoCkFSJifrb8beDIiDikDedbnjRh\nTf8o8X/i7ImxemCPiGho7bWta3KyMOsA2dNVvyNVCX0CnBAR09t4zn2BqRHxfon7fwVYPyKebct1\nrWtysjAzs6LcZmFmZkU5WZiZWVFOFmZmVpSThZmZFeVkYWZmRTlZmJlZUf8ffgU8vGBlPpEAAAAA\nSUVORK5CYII=\n",
+ "text/plain": [
+ ""
+ ]
+ },
"metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 152,
- "text": [
- ""
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAEhCAYAAAC+650iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYFOW1x/HvCaARlSAhARWMxiWKAiIKuMURXBAVcEXi\nrkE0MdF4jUsSdZKYKNFcE6MiAURcABUNgiDKFUZZFWQVQUE0AUFU3BBlP/ePt0aayczQ00x19fL7\nPM88VFdVV52qYfr0u9T7mrsjIiKSiW8lHYCIiOQvJREREcmYkoiIiGRMSURERDKmJCIiIhlTEhER\nkYwpiUhOMLMyM2tbg/33MLOn0tjvyyrWdzOzg6rY9j0ze9XMXjezo9ONqcIxzjGz+Wa2ycwOq7Dt\nZjNbZGYLzeykTI5f4XjPm9ketXCctmb29xq+p9TM/md7zy35S0lEckWNHlhy9+Xufs52HPcMoEUV\n2zoBc929rbtPTiceM6v4tzQvOscrFfZrAfSIzt0ZeKCS96bNzHYCGrn78kyPUc7dX3f3a2r6tu09\nr+Q3JRHZipn92sx+ES3fY2YvRcsdzeyxaLmvmU03szfMrDRa19nMnkw5TomZjYqWTzKzKdE3+yfN\nbOcqTn9OVAJ4y8yOid5bx8zuMrPXzGyOmV0Rrd/bzOZFy/Wj4843s2fMbFrqt38zu93MZpvZVDP7\nvpkdBZwO3GVms8zshyn7Hgr0AbqZ2Uwz+7aZ9TSzuWY2z8zuTNn3SzO728xmAx1SL8TdF7r725Vc\nYzdgqLtvcPf3gMVAu0p+D++Z2Z+j+GaY2WFm9qKZLTaz3im7lgATovfcGd2DOWZ2VyXHnGtmDSxY\nZWYXRusfMbMTKvzOSs3sITObYGbvlP+fiLb9NvodTQR+VMk1ShFREpGKXgGOjZYPB3Y2s7rRupej\n9b9x9yOA1sBxZnYIMA5oH30zhvBte6iZNQZ+C3Ry97bA68B1VZy7jru3B64FbovWXQ585u7tCB+2\nvcxs7wrv+xmwyt0PBm4B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EjOUxKRouDuVxKGkSjxMF7Z74CX3L090BG4izCs\nxi2ECXrauPtT0etP3b2Vu7cGJkSH3BmY6u6HAq9QecnhaGBmahiEoSqOBH5FSBZ/AQ4GWppZ6yjW\nlUDjaBh4kZymJCLF6iTgJjObRUgMOxJGNTW2HpK+E3B/+Qt3/yxaXO/uo6Pl1wlDlle0F7CiwrpR\n0b9vAB+4+3wPYw/Nr3CMlWw9mqpITqqbdAAiCTrT3RelrjCz9pXsV9k8JxtSljdT9d9SxfeuT3nP\numqOYeTIfBEi1VFJRIrVC8Avy1+YWZtocTWQ2jNqHPDzlP0a1uAc/yZMY5qJJhTQ/DlSuJREpJik\nfrP/I1AvajB/A/h9tH4C0KK8YR24HdjNzOaZ2WygpJJjVTXL3GTCpFJVxVDxPQ4QTTy0yt3XpHdZ\nIsnRUPAiMTKz8cD57l6xbaS691wB7Ozu98QXmUjtUElEJF53A1fW8D09gP4xxCJS61QSERGRjKkk\nIiIiGVMSERGRjCmJiIhIxpREREQkY0oiIiKSMSURERHJ2P8D8x0A0xVnuZgAAAAASUVORK5CYII=\n",
- "text": [
- ""
- ]
- }
- ],
- "prompt_number": 152
- },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, ax = plt.subplots()\n",
+ "ax.plot(H, eps)\n",
+ "fig.suptitle('Energy Dissipation rate')\n",
+ "ax.set_xlabel('Wave height (m)')\n",
+ "ax.set_ylabel('Energy Dissipatioin rate (kg/s^3)')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Whitecap Fraction\n",
- "\n",
- "Note that the slolution for $U < 4$ is pretty fudged -- used to be zero or $U < 3$, now it is a linear interpolation form 0 to the $U=4$ value. maybe an exponential or quadratic would be better?"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "rate for 1m wave: 34.099243 kg/m^3\n"
]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "water = Water()\n",
- "w = Waves(test_wind_5, water)\n",
- "wf = [] # whitecap fraction\n",
- "U = np.arange(0,20,0.2)\n",
- "for u in U:\n",
- " wf.append(w.comp_whitecap_fraction(u))"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 153
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "fig, ax = plt.subplots()\n",
- "ax.plot(U, wf)\n",
- "fig.suptitle('Whitecap Fraction')\n",
- "ax.set_xlabel('Wind speed (m/s)')\n",
- "ax.set_ylabel('Fraction')\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "metadata": {},
- "output_type": "pyout",
- "prompt_number": 154,
- "text": [
- ""
- ]
- },
- {
- "metadata": {},
- "output_type": "display_data",
- "png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmclWXdx/HPV9yXJM1IEZcCC9zCBcElpzQeRJM09y2p\nxyXDrfRRM5OnekytXHAlQ0PTqNw1VNQcN5BF2TdFQ0UEcUERF7bf88d1D56mmcOZYc7cc2a+79fr\nvObc97nuc35nOMzvXNd1379LEYGZmVl91sg7ADMza9mcKMzMrCgnCjMzK8qJwszMinKiMDOzopwo\nzMysKCcKa3EkXSnpzILtRyTdVLD9e0lnS9pX0gP1PMdNkr6W3f9Z+aOum6TZkiZJGp/deq7m820t\n6eiC7V0lXb36kZrVz4nCWqJngD0BJK0BbAp0K3i8F/BssSeIiJMiYka2eUE5gixRAFUR0T27PVf4\nYPb+GmJb4JiVTx7xfEScWaS92WpzorCWaBQpGQBsD0wBFklqL2kdoCvwAiBgQ0l/lzRd0p9rnkBS\ndfZt+1Jgvezb/G3ZY8dJGp3tu7Hmj7WkPpKelzRB0qPZvh6SRkp6QdKzkrbL9p8o6T5JT0h6UdIv\nirwf/duG9KGk30maAPSS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4GDgHey5QneA9qThl7qSxR1eQo4UtIaWQnrb9ZukJVn\n3ioiqknrCW9MGmoS0E/SOpI2JVU2HUOaNP5BVqodSR0lbUZaj/iw7H7NovZbkVYZ2zfbXov65wpe\nJQ2PlUqStgdmZD0mJH0lIsZExMXAAmDLrO3m2fOb1ctDT1ZpppDOdvpzwb5JwPoR8W62XfsMpv+4\nHxH3SPoWaVz/NepOMu2A2yRtTEoOV0fE+5Iie80nSKWwfxkR84B52TzIqGyIaRFwXDbk9XNgRDZ3\nsRQ4LSLGZBPeo4CFwHjq/nb/LHBGrX31vb8aB5AmqmtcLqlL9j4ey854gjT89VQdx5ut5DLjZg0k\n6WLgw4hotuU4szmUY2tWIiyh/Qjg+FWt2SCpmrQOgVfgs3p56MmscZr7G9bvSGcnlSQiepeQJHYC\nZjlJ2Kq4R2FmZkW5R2FmZkU5UZiZWVFOFGZmVpQThZmZFeVEYWZmRTlRmJlZUf8PiZuu5/VEV6AA\nAAAASUVORK5CYII=\n",
- "text": [
- ""
- ]
- }
- ],
- "prompt_number": 154
- },
+ }
+ ],
+ "source": [
+ "eps = w.dissipative_wave_energy(1)\n",
+ "print \"rate for 1m wave: %f kg/m^3\"%eps"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Whitecap decay constant\n",
+ "\n",
+ "We use a formula from Monahan (JPO, 1971)\n",
+ "\n",
+ "The saltwater value for this constant is 3.85 sec while the freshwater value is 2.54 sec.\n",
+ "\n",
+ "this code interpolated for other salinities.\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "# make sure we get what we think we should get.\n",
+ "\n",
+ "from gnome.utilities.weathering.monahan import Monahan"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
{
- "cell_type": "code",
- "collapsed": false,
- "input": [],
- "language": "python",
- "metadata": {},
- "outputs": [],
- "prompt_number": 154
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fresh water value: 2.54\n",
+ "salt water value: 3.84999995\n"
+ ]
}
],
- "metadata": {}
+ "source": [
+ "print \"fresh water value:\", Monahan.whitecap_decay_constant(0)\n",
+ "print \"salt water value:\", Monahan.whitecap_decay_constant(35)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
}
- ]
-}
\ No newline at end of file
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/gnome1/gui_gnome/TVectMap.cpp b/gnome1/gui_gnome/TVectMap.cpp
index f0cef8713..1ff4ccc17 100644
--- a/gnome1/gui_gnome/TVectMap.cpp
+++ b/gnome1/gui_gnome/TVectMap.cpp
@@ -504,7 +504,7 @@ OSErr TVectorMap::ImportMap (char *path)
while (err == 0 && !InterruptFlag)
{
MySpinCursor(); // JLM 8/4/99
- if (++line >= numLinesText - 1)
+ if (++line > numLinesText - 1)
ReadErrCode = 1;
else
{
@@ -536,7 +536,7 @@ OSErr TVectorMap::ImportMap (char *path)
{
for (PointIndex = 1; PointIndex <= labs(PointCount); ++PointIndex)
{
- if (++line >= numLinesText - 1)
+ if (++line > numLinesText - 1)
ReadErrCode = 1;
else
{
@@ -588,7 +588,7 @@ OSErr TVectorMap::ImportMap (char *path)
for (PointIndex = 1; PointIndex <= PointCount && err == 0; ++PointIndex)
{
// InterruptFlag = Progress ((long) (((double) TotalBytesRead / (double) FileSize) * 100.0 + 1), "", &ProgressWPtr);
- if (++line >= numLinesText - 1)
+ if (++line > numLinesText - 1)
ReadErrCode = 1;
else
{
@@ -981,7 +981,7 @@ OSErr TVectorMap::ImportESIData (char *path)
while (err == 0 && !InterruptFlag)
{
MySpinCursor(); // JLM 8/4/99
- if (++line >= numLinesText - 1)
+ if (++line > numLinesText - 1)
ReadErrCode = 1;
else
{
@@ -1034,7 +1034,7 @@ OSErr TVectorMap::ImportESIData (char *path)
for (PointIndex = 1; PointIndex <= PointCount && err == 0; ++PointIndex)
{
// InterruptFlag = Progress ((long) (((double) TotalBytesRead / (double) FileSize) * 100.0 + 1), "", &ProgressWPtr);
- if (++line >= numLinesText - 1)
+ if (++line > numLinesText - 1)
ReadErrCode = 1;
else
{
diff --git a/lib_gnome/GridCurrentMover_c.cpp b/lib_gnome/GridCurrentMover_c.cpp
index 7751f60ab..970b6244a 100644
--- a/lib_gnome/GridCurrentMover_c.cpp
+++ b/lib_gnome/GridCurrentMover_c.cpp
@@ -287,7 +287,8 @@ WorldPoint3D GridCurrentMover_c::GetMove(const Seconds& model_time, Seconds time
{
OSErr err = 0;
char errmsg[256];
- if (num_method == EULER) { //EULER
+ if (num_method == EULER)
+ {
WorldPoint3D deltaPoint = {{0,0},0.};
WorldPoint3D refPoint;
double dLong, dLat;
@@ -320,44 +321,77 @@ WorldPoint3D GridCurrentMover_c::GetMove(const Seconds& model_time, Seconds time
deltaPoint.p.pLat = dLat * 1000000;
return deltaPoint;
- } else { //RK4
+ }
+ else if (num_method == TRAPEZOID)
+ {
+ WorldPoint3D startPoint, p1, deltaPoint;
+ startPoint.p = (*theLE).p;
+ startPoint.z = (*theLE).z;
+ p1.p = (*theLE).p;
+ p1.z = (*theLE).z;
+ VelocityRec v0, v1;
+ double dLong, dLat;
+ if(!fIsOptimizedForStep)
+ {
+ err = timeGrid->SetInterval(errmsg, model_time + timeStep);
+ if (err) return deltaPoint;
+ }
+ v0 = timeGrid->GetScaledPatValue(model_time, startPoint);
+ v0.u *= fCurScale;
+ v0.v *= fCurScale;
+ dLong = ((v0.u / METERSPERDEGREELAT) * timeStep) / LongToLatRatio3 (startPoint.p.pLat);
+ dLat = (v0.v / METERSPERDEGREELAT) * timeStep;
+ p1.p.pLong = p1.p.pLong + dLong * 1000000;
+ p1.p.pLat = p1.p.pLat + dLat * 1000000;
+ v1 = timeGrid->GetScaledPatValue(model_time + timeStep, p1);
+ v1.u *= fCurScale;
+ v1.v *= fCurScale;
+ v1.u += v0.u;
+ v1.v += v0.v;
+ dLong = ((v1.u / METERSPERDEGREELAT) * timeStep/2) / LongToLatRatio3 (startPoint.p.pLat);
+ dLat = (v0.v / METERSPERDEGREELAT) * timeStep/2;
+ deltaPoint.p.pLong = dLong * 1000000;
+ deltaPoint.p.pLat = dLat * 1000000;
+ return deltaPoint;
+ }
+ else
+ {
WorldPoint3D deltaD[5] = {{0,0},0}; // [ dummy, dy1, dy2, dy3, dy4 ]
- double RK_dy_Factors[4] = {0, .5, .5, 1};
- double RK_Factors[4] = {1./6., 1./3., 1./3., 1./6.};
- WorldPoint3D finalDelta = {{0,0},0};
- WorldPoint3D startPoint; // yn
- startPoint.p = (*theLE).p;
- startPoint.z = (*theLE).z;
- VelocityRec scaledVel[4];
- double dLong, dLat;
- Boolean useEddyUncertainty = false;
- // check the interval and set if necessary each time
- /*if(!fIsOptimizedForStep)
- {
- err = timeGrid->SetInterval(errmsg, model_time);
-
- if (err) return finalDelta;
- }*/
-
- for (int i = 0; i < 4; i++) {
- WorldPoint3D RKDelta = scale_WP(deltaD[i], RK_dy_Factors[i]);
- // could check the end time and only set interval if RK time is past the end time
- err = timeGrid->SetInterval(errmsg, model_time + (Seconds)(timeStep*RK_dy_Factors[i]));
- if (err) return finalDelta;
- scaledVel[i] = timeGrid->GetScaledPatValue(model_time + (Seconds)(timeStep*RK_dy_Factors[i]), add_two_WP3D(startPoint, RKDelta));
- scaledVel[i].u *= fCurScale;
- scaledVel[i].v *= fCurScale;
- dLong = ((scaledVel[i].u / METERSPERDEGREELAT) * timeStep) / LongToLatRatio3 (startPoint.p.pLat);
- dLat = (scaledVel[i].v / METERSPERDEGREELAT) * timeStep;
- deltaD[i+1].p.pLong = dLong * 1000000;
- deltaD[i+1].p.pLat = dLat * 1000000;
- }
+ double RK_dy_Factors[4] = {0, .5, .5, 1};
+ double RK_Factors[4] = {1./6., 1./3., 1./3., 1./6.};
+ WorldPoint3D finalDelta = {{0,0},0};
+ WorldPoint3D startPoint; // yn
+ startPoint.p = (*theLE).p;
+ startPoint.z = (*theLE).z;
+ VelocityRec scaledVel[4];
+ double dLong, dLat;
+ Boolean useEddyUncertainty = false;
+ // check the interval and set if necessary each time
+ /*if(!fIsOptimizedForStep)
+ {
+ err = timeGrid->SetInterval(errmsg, model_time);
- for (int i = 0; i <4; i++) {
- finalDelta = add_two_WP3D(finalDelta, scale_WP(deltaD[i+1], RK_Factors[i]));
- }
+ if (err) return finalDelta;
+ }*/
+
+ for (int i = 0; i < 4; i++) {
+ WorldPoint3D RKDelta = scale_WP(deltaD[i], RK_dy_Factors[i]);
+ // could check the end time and only set interval if RK time is past the end time
+ err = timeGrid->SetInterval(errmsg, model_time + (Seconds)(timeStep*RK_dy_Factors[i]));
+ if (err) return finalDelta;
+ scaledVel[i] = timeGrid->GetScaledPatValue(model_time + (Seconds)(timeStep*RK_dy_Factors[i]), add_two_WP3D(startPoint, RKDelta));
+ scaledVel[i].u *= fCurScale;
+ scaledVel[i].v *= fCurScale;
+ dLong = ((scaledVel[i].u / METERSPERDEGREELAT) * timeStep) / LongToLatRatio3 (startPoint.p.pLat);
+ dLat = (scaledVel[i].v / METERSPERDEGREELAT) * timeStep;
+ deltaD[i+1].p.pLong = dLong * 1000000;
+ deltaD[i+1].p.pLat = dLat * 1000000;
+ }
- return finalDelta;
+ for (int i = 0; i <4; i++) {
+ finalDelta = add_two_WP3D(finalDelta, scale_WP(deltaD[i+1], RK_Factors[i]));
+ }
+ return finalDelta;
}
}
diff --git a/lib_gnome/GridWindMover_c.cpp b/lib_gnome/GridWindMover_c.cpp
index 4c6725952..5001192a4 100644
--- a/lib_gnome/GridWindMover_c.cpp
+++ b/lib_gnome/GridWindMover_c.cpp
@@ -285,6 +285,36 @@ OSErr GridWindMover_c::TextRead(char *path, char *topFilePath)
}
+OSErr GridWindMover_c::GetScaledVelocities(Seconds model_time, VelocityFRec *velocities)
+{
+ return timeGrid->GetScaledVelocities(model_time, velocities);
+}
+
+LongPointHdl GridWindMover_c::GetPointsHdl(void)
+{
+ if ((timeGrid->fVar.gridType)==CURVILINEAR)
+ {
+ return timeGrid->fGrid->GetPointsHdl();
+ }
+ else
+ {
+ return timeGrid->GetPointsHdl();
+ }
+}
+
+GridCellInfoHdl GridWindMover_c::GetCellDataHdl(void)
+{
+ return timeGrid->GetCellData();
+}
+
+WORLDPOINTH GridWindMover_c::GetCellCenters(void)
+{ // should rename this function...
+ //if (IsTriangleGrid())
+ //return timeGrid->fGrid->GetCenterPointsHdl();
+ //else
+ return timeGrid->GetCellCenters();
+}
+
long GridWindMover_c::GetNumTriangles(void)
{
long numTriangles = 0;
@@ -294,3 +324,12 @@ long GridWindMover_c::GetNumTriangles(void)
return numTriangles;
}
+long GridWindMover_c::GetNumPoints(void)
+{
+ long numPoints = 0;
+
+ numPoints = (timeGrid->fNumRows) * (timeGrid->fNumCols);
+
+ return numPoints;
+}
+
diff --git a/lib_gnome/GridWindMover_c.h b/lib_gnome/GridWindMover_c.h
index b3be7c328..3913ffc9c 100644
--- a/lib_gnome/GridWindMover_c.h
+++ b/lib_gnome/GridWindMover_c.h
@@ -73,9 +73,16 @@ class DLL_API GridWindMover_c : virtual public WindMover_c {
OSErr TextRead(char *path,char *topFilePath);
OSErr ExportTopology(char* path){return timeGrid->ExportTopology(path);}
+ OSErr GetScaledVelocities(Seconds model_time, VelocityFRec *velocity);
+ LongPointHdl GetPointsHdl(void);
+ WORLDPOINTH GetCellCenters();
+ GridCellInfoHdl GetCellDataHdl(void);
+ bool IsRegularGrid(){return timeGrid->IsRegularGrid();}
+
OSErr get_move(int n, Seconds model_time, Seconds step_len, WorldPoint3D* ref, WorldPoint3D* delta, double* windages, short* LE_status, LEType spillType, long spill_ID);
long GetNumTriangles(void);
+ long GetNumPoints(void);
};
#endif
diff --git a/lib_gnome/TimeGridVel_c.cpp b/lib_gnome/TimeGridVel_c.cpp
index e1e713c1e..8085eceda 100644
--- a/lib_gnome/TimeGridVel_c.cpp
+++ b/lib_gnome/TimeGridVel_c.cpp
@@ -2732,7 +2732,11 @@ float TimeGridVelCurv_c::GetTotalDepth(WorldPoint refPoint,long ptIndex)
{
//if (triNum < 0) useTriNum = false;
if (bVelocitiesOnNodes)
- err = (dynamic_cast(fGrid))->GetRectCornersFromTriIndexOrPoint(&index1, &index2, &index3, &index4, refPoint, triNum, useTriNum, fVerdatToNetCDFH, fNumCols);
+ {
+ totalDepth = GetInterpolatedTotalDepth(refPoint);
+ return totalDepth;
+ }
+ //err = (dynamic_cast(fGrid))->GetRectCornersFromTriIndexOrPoint(&index1, &index2, &index3, &index4, refPoint, triNum, useTriNum, fVerdatToNetCDFH, fNumCols);
else
err = (dynamic_cast(fGrid))->GetRectCornersFromTriIndexOrPoint(&index1, &index2, &index3, &index4, refPoint, triNum, useTriNum, fVerdatToNetCDFH, fNumCols+1);
diff --git a/lib_gnome/TimeGridVel_c.h b/lib_gnome/TimeGridVel_c.h
index e83a10ad2..ab231c5e4 100644
--- a/lib_gnome/TimeGridVel_c.h
+++ b/lib_gnome/TimeGridVel_c.h
@@ -119,6 +119,7 @@ class DLL_API TimeGridVel_c
virtual OSErr GetScaledVelocities(Seconds time, VelocityFRec *velocity){return -1;}
virtual GridCellInfoHdl GetCellData() {return 0;}
virtual WORLDPOINTH GetCellCenters() {return 0;}
+ virtual LongPointHdl GetPointsHdl() {return 0;}
long GetNumTimesInFile();
long GetNumFiles();
@@ -140,6 +141,7 @@ class DLL_API TimeGridVel_c
void DisposeAllLoadedData();
virtual bool IsTriangleGrid(){return false;}
+ virtual bool IsRegularGrid(){return false;}
virtual bool IsDataOnCells(){return true;}
virtual OSErr get_values(int n, Seconds model_time, WorldPoint3D* ref, VelocityRec* vels) {return 0;}
};
@@ -199,6 +201,8 @@ class TimeGridVelRect_c : virtual public TimeGridVel_c
virtual long GetNumDepthLevelsInFile(); // eventually get rid of this
virtual OSErr TextRead(const char *path, const char *topFilePath);
+
+ virtual bool IsRegularGrid(){return true;}
};
@@ -219,7 +223,7 @@ class TimeGridVelCurv_c : virtual public TimeGridVelRect_c
//virtual ClassID GetClassID () { return TYPE_TIMEGRIDVELCURV; }
//virtual Boolean IAm(ClassID id) { if(id==TYPE_TIMEGRIDVELCURV) return TRUE; return TimeGridVelRect_c::IAm(id); }
- LongPointHdl GetPointsHdl();
+ virtual LongPointHdl GetPointsHdl();
TopologyHdl GetTopologyHdl();
OSErr ReadTimeData(long index,VelocityFH *velocityH, char* errmsg);
VelocityRec GetScaledPatValue(const Seconds& model_time, WorldPoint3D refPoint);
@@ -268,7 +272,7 @@ class TimeGridVelTri_c : virtual public TimeGridVelCurv_c
virtual void Dispose ();
//virtual ClassID GetClassID () { return TYPE_TIMEGRIDVELTRI; }
//virtual Boolean IAm(ClassID id) { if(id==TYPE_TIMEGRIDVELTRI) return TRUE; return TimeGridVelCurv_c::IAm(id); }
- LongPointHdl GetPointsHdl();
+ virtual LongPointHdl GetPointsHdl();
void GetDepthIndices(long ptIndex, float depthAtPoint, long *depthIndex1, long *depthIndex2);
OSErr ReadTimeData(long index,VelocityFH *velocityH, char* errmsg);
VelocityRec GetScaledPatValue(const Seconds& model_time, WorldPoint3D refPoint);
@@ -425,6 +429,10 @@ class DLL_API TimeGridWindRect_c : virtual public TimeGridVel_c
{
public:
+ LongPointHdl fPtsH;
+ WORLDPOINTH fCenterPtsH;
+ GridCellInfoHdl fGridCellInfoH;
+
TimeGridWindRect_c();
virtual ~TimeGridWindRect_c() { Dispose (); }
virtual void Dispose();
@@ -437,6 +445,14 @@ class DLL_API TimeGridWindRect_c : virtual public TimeGridVel_c
virtual OSErr ReadTimeData(long index,VelocityFH *velocityH, char* errmsg);
virtual OSErr TextRead(const char *path, const char *topFilePath);
+
+ virtual LongPointHdl GetPointsHdl();
+ virtual WORLDPOINTH GetCellCenters();
+ virtual GridCellInfoHdl GetCellData();
+
+ virtual OSErr GetScaledVelocities(Seconds time, VelocityFRec *velocity);
+
+ virtual bool IsRegularGrid(){return true;}
};
@@ -446,6 +462,8 @@ class DLL_API TimeGridWindCurv_c : virtual public TimeGridWindRect_c
LONGH fVerdatToNetCDFH; // for curvilinear
WORLDPOINTFH fVertexPtsH; // for curvilinear, all vertex points from file
+ //WORLDPOINTH fCenterPtsH; // for curvilinear, all vertex points from file
+ //GridCellInfoHdl fGridCellInfoH;
Boolean bVelocitiesOnNodes; // default is velocities on cells
@@ -475,6 +493,12 @@ class DLL_API TimeGridWindCurv_c : virtual public TimeGridWindRect_c
virtual OSErr TextRead(const char *path, const char *topFilePath);
virtual OSErr get_values(int n, Seconds model_time, WorldPoint3D* ref, VelocityRec* vels);
+
+ virtual LongPointHdl GetPointsHdl();
+ TopologyHdl GetTopologyHdl();
+ virtual WORLDPOINTH GetCellCenters();
+ virtual GridCellInfoHdl GetCellData();
+ virtual OSErr GetScaledVelocities(Seconds time, VelocityFRec *velocity);
};
diff --git a/lib_gnome/TimeGridWind_c.cpp b/lib_gnome/TimeGridWind_c.cpp
index 45accc027..447e2c4be 100644
--- a/lib_gnome/TimeGridWind_c.cpp
+++ b/lib_gnome/TimeGridWind_c.cpp
@@ -59,16 +59,62 @@
}*/
TimeGridWindRect_c::TimeGridWindRect_c() : TimeGridVel_c()
-{
-
+{
+ fPtsH = 0;
+ fGridCellInfoH = 0;
+ fCenterPtsH = 0;
}
void TimeGridWindRect_c::Dispose()
{
+ if(fPtsH) {DisposeHandle((Handle)fPtsH); fPtsH=0;}
+ if(fGridCellInfoH) {DisposeHandle((Handle)fGridCellInfoH); fGridCellInfoH=0;}
+ if(fCenterPtsH) {DisposeHandle((Handle)fCenterPtsH); fCenterPtsH=0;}
+
TimeGridVel_c::Dispose ();
}
+LongPointHdl TimeGridWindRect_c::GetPointsHdl()
+{
+ long i, j, numPoints;
+ float fLat, fLong, dLong, dLat;
+ WorldRect gridBounds = fGridBounds; // loLong, loLat, hiLong, hiLat
+ LongPoint vertex;
+ OSErr err = 0;
+
+ if (fPtsH) return fPtsH;
+
+ numPoints = fNumRows*fNumCols;
+ dLong = (gridBounds.hiLong - gridBounds.loLong) / (fNumCols-1);
+ dLat = (gridBounds.hiLat - gridBounds.loLat) / (fNumRows-1);
+ fPtsH = (LongPointHdl)_NewHandle(numPoints * sizeof(LongPoint));
+ if (!fPtsH) {
+ err = -1;
+ TechError("TriGridWindRect_c::GetPointsHdl()", "_NewHandle()", 0);
+ goto done;
+ }
+
+ for (i=0; i(fGrid));
+ VelocityFRec velocity;
+
+ err = this -> SetInterval(errmsg, time);
+ if(err) return err;
+
+ loaded = this -> CheckInterval(timeDataInterval, time);
+
+ if(!loaded) return -1;
+
+ ptsHdl = this->GetPointsHdl();
+ if(ptsHdl)
+ numPoints = _GetHandleSize((Handle)ptsHdl)/sizeof(**ptsHdl);
+ else
+ numPoints = 0;
+
+ // Check for time varying current
+ if((GetNumTimesInFile()>1 || GetNumFiles()>1) && loaded && !err)
+ {
+ // Calculate the time weight factor
+ if (GetNumFiles()>1 && fOverLap)
+ startTime = fOverLapStartTime + fTimeShift;
+ else
+ startTime = (*fTimeHdl)[fStartData.timeIndex] + fTimeShift;
+
+ if (fEndData.timeIndex == UNASSIGNEDINDEX && (time > startTime || time < startTime) && fAllowExtrapolationInTime)
+ {
+ timeAlpha = 1;
+ }
+ else
+ {
+ endTime = (*fTimeHdl)[fEndData.timeIndex] + fTimeShift;
+ timeAlpha = (endTime - time)/(double)(endTime - startTime);
+ }
+ }
+ // for now just get every other one since each pair of triangles corresponds to a cell
+ for (i = 0 ; i< numPoints; i+=1)
+ //for (i = 0 ; i< numTri; i++)
+ {
+
+ longPt = (*ptsHdl)[i];
+ wp.pLat = longPt.v;
+ wp.pLong = longPt.h;
+ index = GetVelocityIndex(wp); // regular grid
+
+ //if (index < 0) {scaled_velocity[i].u = 0; scaled_velocity[i].v = 0;}// should this be an error?
+ //index = i;
+ // Should check vs fFillValue
+ // Check for constant current
+ if(((GetNumTimesInFile()==1 && !(GetNumFiles()>1)) || timeAlpha == 1) && index!=-1)
+ {
+ velocity.u = GetStartUVelocity(index);
+ velocity.v = GetStartVVelocity(index);
+ }
+ else if (index!=-1)// time varying current
+ {
+ velocity.u = timeAlpha*GetStartUVelocity(index) + (1-timeAlpha)*GetEndUVelocity(index);
+ velocity.v = timeAlpha*GetStartVVelocity(index) + (1-timeAlpha)*GetEndVVelocity(index);
+ }
+ if (velocity.u == fFillValue) velocity.u = 0.;
+ if (velocity.v == fFillValue) velocity.v = 0.;
+ /*if ((velocity.u != 0 || velocity.v != 0) && (velocity.u != fFillValue && velocity.v != fFillValue)) // should already have handled fill value issue
+ {
+ // code goes here, fill up arrays with data
+ float inchesX = (velocity.u * refScale * fVar.fileScaleFactor) / arrowScale;
+ float inchesY = (velocity.v * refScale * fVar.fileScaleFactor) / arrowScale;
+ }*/
+ //u[i] = velocity.u * fVar.fileScaleFactor;
+ //v[i] = velocity.v * fVar.fileScaleFactor;
+ scaled_velocity[i].u = velocity.u * fVar.fileScaleFactor / 100.;
+ scaled_velocity[i].v = velocity.v * fVar.fileScaleFactor / 100.;
+ //vel_index++;
+ }
+ return err;
+}
+
+WORLDPOINTH TimeGridWindRect_c::GetCellCenters()
+{
+ OSErr err = 0;
+ LongPointHdl ptsH = 0;
+ WORLDPOINTH wpH = 0;
+ //TopologyHdl topH ;
+ LongPoint wp1,wp2,wp3,wp4;
+ WorldPoint wp;
+ int32_t numPts = 0, numTri = 0, numCells;
+ int32_t i, index1, index2;
+ //Topology tri1, tri2;
+
+ if (fCenterPtsH) return fCenterPtsH;
+
+ //topH = GetTopologyHdl();
+ ptsH = GetPointsHdl();
+ //numTri = _GetHandleSize((Handle)topH)/sizeof(Topology);
+ numPts = _GetHandleSize((Handle)ptsH)/sizeof(LongPoint);
+ numCells = (fNumCols-1)*(fNumRows-1);
+ // for now just return the points since velocities are on the points
+ //fCenterPtsH = (WORLDPOINTH)_NewHandle(numCells * sizeof(WorldPoint));
+ fCenterPtsH = (WORLDPOINTH)_NewHandle(numPts * sizeof(WorldPoint));
+ if (!fCenterPtsH) {
+ err = -1;
+ TechError("TriGridWindRect_c::GetCellCenters()", "_NewHandle()", 0);
+ goto done;
+ }
+
+ //for (i=0; i(fGrid)) -> GetPointsHdl();
+ //return ((TTriGridVel*)fGrid) -> GetPointsHdl();
+}
+
+TopologyHdl TimeGridWindCurv_c::GetTopologyHdl()
+{
+ return (dynamic_cast(fGrid)) -> GetTopologyHdl();
+ //return ((TTriGridVel*)fGrid) -> GetPointsHdl();
+}
+
long TimeGridWindCurv_c::GetVelocityIndex(WorldPoint wp)
{
long index = -1;
@@ -2526,6 +2775,215 @@ OSErr TimeGridWindCurv_c::GetLatLonFromIndex(long iIndex, long jIndex, WorldPoin
}
+OSErr TimeGridWindCurv_c::GetScaledVelocities(Seconds time, VelocityFRec *scaled_velocity)
+{ // use for curvilinear
+ double timeAlpha;
+ Seconds startTime,endTime;
+ OSErr err = 0;
+ char errmsg[256];
+
+ long numVertices,i,numTri,index=-1,vel_index=0;
+ InterpolationVal interpolationVal;
+ LongPointHdl ptsHdl = 0;
+ TopologyHdl topH ;
+ long timeDataInterval;
+ Boolean loaded;
+ //TTriGridVel* triGrid = (TTriGridVel*)fGrid;
+ TTriGridVel* triGrid = (dynamic_cast(fGrid));
+ VelocityFRec velocity;
+
+ err = this -> SetInterval(errmsg, time);
+ if(err) return err;
+
+ loaded = this -> CheckInterval(timeDataInterval, time);
+
+ if(!loaded) return -1;
+
+ //topH = triGrid -> GetTopologyHdl();
+ topH = fGrid -> GetTopologyHdl();
+ if(topH)
+ numTri = _GetHandleSize((Handle)topH)/sizeof(**topH);
+ else
+ numTri = 0;
+
+ /*ptsHdl = triGrid -> GetPointsHdl();
+ if(ptsHdl)
+ numVertices = _GetHandleSize((Handle)ptsHdl)/sizeof(**ptsHdl);
+ else
+ numVertices = 0;*/
+
+ // Check for time varying current
+ if((GetNumTimesInFile()>1 || GetNumFiles()>1) && loaded && !err)
+ {
+ // Calculate the time weight factor
+ if (GetNumFiles()>1 && fOverLap)
+ startTime = fOverLapStartTime + fTimeShift;
+ else
+ startTime = (*fTimeHdl)[fStartData.timeIndex] + fTimeShift;
+
+ if (fEndData.timeIndex == UNASSIGNEDINDEX && (time > startTime || time < startTime) && fAllowExtrapolationInTime)
+ {
+ timeAlpha = 1;
+ }
+ else
+ {
+ endTime = (*fTimeHdl)[fEndData.timeIndex] + fTimeShift;
+ timeAlpha = (endTime - time)/(double)(endTime - startTime);
+ }
+ }
+ // for now just get every other one since each pair of triangles corresponds to a cell
+ for (i = 0 ; i< numTri; i+=2)
+ //for (i = 0 ; i< numTri; i++)
+ {
+ if (bVelocitiesOnNodes)
+ {
+ //index = ((TTriGridVel*)fGrid)->GetRectIndexFromTriIndex(refPoint,fVerdatToNetCDFH,fNumCols);// curvilinear grid
+ //interpolationVal = triGrid -> GetInterpolationValues(refPoint.p);
+ interpolationVal = triGrid -> GetInterpolationValuesFromIndex(i);
+ if (interpolationVal.ptIndex1<0) {scaled_velocity[i].u = 0; scaled_velocity[i].v = 0;}// should this be an error?
+ //ptIndex1 = (*fVerdatToNetCDFH)[interpolationVal.ptIndex1];
+ //ptIndex2 = (*fVerdatToNetCDFH)[interpolationVal.ptIndex2];
+ //ptIndex3 = (*fVerdatToNetCDFH)[interpolationVal.ptIndex3];
+ index = (*fVerdatToNetCDFH)[interpolationVal.ptIndex1];
+ }
+ else // for now just use the u,v at left and bottom midpoints of grid box as velocity over entire gridbox
+ //index = (dynamic_cast(fGrid))->GetRectIndexFromTriIndex(refPoint.p,fVerdatToNetCDFH,fNumCols+1);// curvilinear grid
+ index = triGrid->GetRectIndexFromTriIndex2(i,fVerdatToNetCDFH,fNumCols+1);// curvilinear grid
+
+ if (index < 0) {scaled_velocity[i].u = 0; scaled_velocity[i].v = 0;}// should this be an error?
+
+ // Should check vs fFillValue
+ // Check for constant current
+ if(((GetNumTimesInFile()==1 && !(GetNumFiles()>1)) || timeAlpha == 1) && index!=-1)
+ {
+ velocity.u = GetStartUVelocity(index);
+ velocity.v = GetStartVVelocity(index);
+ }
+ else if (index!=-1)// time varying current
+ {
+ velocity.u = timeAlpha*GetStartUVelocity(index) + (1-timeAlpha)*GetEndUVelocity(index);
+ velocity.v = timeAlpha*GetStartVVelocity(index) + (1-timeAlpha)*GetEndVVelocity(index);
+ }
+ if (velocity.u == fFillValue) velocity.u = 0.;
+ if (velocity.v == fFillValue) velocity.v = 0.;
+ /*if ((velocity.u != 0 || velocity.v != 0) && (velocity.u != fFillValue && velocity.v != fFillValue)) // should already have handled fill value issue
+ {
+ // code goes here, fill up arrays with data
+ float inchesX = (velocity.u * refScale * fVar.fileScaleFactor) / arrowScale;
+ float inchesY = (velocity.v * refScale * fVar.fileScaleFactor) / arrowScale;
+ }*/
+ //u[i] = velocity.u * fVar.fileScaleFactor;
+ //v[i] = velocity.v * fVar.fileScaleFactor;
+ // will want to do the extra scaling in the client eventually
+ scaled_velocity[vel_index].u = velocity.u * fVar.fileScaleFactor / 100.;
+ scaled_velocity[vel_index].v = velocity.v * fVar.fileScaleFactor / 100.;
+ vel_index++;
+ }
+ return err;
+}
+
+WORLDPOINTH TimeGridWindCurv_c::GetCellCenters()
+{
+ OSErr err = 0;
+ LongPointHdl ptsH = 0;
+ WORLDPOINTH wpH = 0;
+ TopologyHdl topH ;
+ LongPoint wp1,wp2,wp3,wp4;
+ WorldPoint wp;
+ int32_t numPts = 0, numTri = 0, numCells;
+ int32_t i, index1, index2;
+ Topology tri1, tri2;
+
+ if (fCenterPtsH) return fCenterPtsH;
+
+ topH = GetTopologyHdl();
+ ptsH = GetPointsHdl();
+ numTri = _GetHandleSize((Handle)topH)/sizeof(Topology);
+ numPts = _GetHandleSize((Handle)ptsH)/sizeof(LongPoint);
+ numCells = numTri / 2;
+ fCenterPtsH = (WORLDPOINTH)_NewHandle(numCells * sizeof(WorldPoint));
+ if (!fCenterPtsH) {
+ err = -1;
+ TechError("TriGridWind_c::GetCenterPointsHdl()", "_NewHandle()", 0);
+ goto done;
+ }
+
+ for (i=0; i GetTopologyHdl();
+ if(topH)
+ numTri = _GetHandleSize((Handle)topH)/sizeof(**topH);
+ else
+ numTri = 0;
+
+ numCells = numTri / 2;
+ GridCellInfoHdl fGridCellInfoH = (GridCellInfoHdl)_NewHandleClear(numCells * sizeof(**fGridCellInfoH));
+ if (!fGridCellInfoH)
+ {
+ err = memFullErr;
+ goto done;
+ }
+
+ for (i=0; i`_.
-Briefly, it has 3 header lines, followed by comma seperated data. An example is given here with
+Briefly, it has 3 header lines, followed by comma seperated data. Alternatively, the An example is given here with
annotations in brackets at the end of the lines:
| 23NM W Cape Mohican AK *(Location name, can be blank)*
@@ -83,6 +49,7 @@ annotations in brackets at the end of the lines:
| 14, 10, 2015, 11, 0, 16.00, 20
| 14, 10, 2015, 12, 0, 16.00, 20
| 14, 10, 2015, 13, 0, 13.00, 20
+|
Gridded wind movers
@@ -184,3 +151,38 @@ with the same value for high and low parameters. Here's a complete example where
model.full_run()
+PyMovers
+----------
+
+This new type of mover includes the gnome.environment.PyGridCurrentMover and gnome.environment.PyWindMover. They are
+being developed to work more seamlessly with native model grids (e.g. staggered grids) and will ultimately replace GridCurrentMover and GridWindMover. However, they are still under active development and this documentation may not
+accurately reflect the current state of development.
+
+PyMovers are built to work with the Property objects, and also provide multiple types of numerical methods for moving the particles. ::
+
+ from gnome.environment.property_classes import GridCurrent
+ from gnome.movers import PyGridCurrentMover
+ fn = 'my_data.nc'
+ current = GridCurrent.from_netCDF(filename=fn)
+ curr_mover = PyGridCurrentMover(current)
+
+There are three types of numerical methods currently supported.
+
+1. Euler method ('Euler')
+2. Trapezoidal/Heun's 2nd order method ('Trapezoid')
+3. Runge-Kutta 4th order method ('RK4')
+
+To use them, set the 'default_num_method' argument when constructing a mover. Alternatively, you may alter the mover as follows: ::
+
+ fn = 'my_data.nc'
+ current = GridCurrent.from_netCDF(filename=fn)
+ curr_mover = PyGridCurrentMover(current, default_num_method = 'RK4')
+
+ #RK4 is too slow, so lets go to the 2nd order method.
+ curr_mover.default_num_method = 'Trapezoid'
+
+The get_move function has the same interface as previous movers. You may also pass in a numerical method here and it will use it instead
+of the default. ::
+
+ curr_mover.get_move(sc, time_step, model_time_datetime, num_method = 'Euler')
+
\ No newline at end of file
diff --git a/py_gnome/documentation/scripting/scripting_intro.rst b/py_gnome/documentation/scripting/scripting_intro.rst
index 9422571d8..42ab1c090 100644
--- a/py_gnome/documentation/scripting/scripting_intro.rst
+++ b/py_gnome/documentation/scripting/scripting_intro.rst
@@ -82,7 +82,7 @@ can do a full run::
View the results
----------------
-The renderer that we added was png images every 6 hours. Since we did not specify an output directory for these images,
+The renderer that we added generated png images every 6 hours. Since we did not specify an output directory for these images,
they will have been saved in the same directory that the script was executed from. The sequence of images should show a cloud
of particles moving east and spreading.
diff --git a/py_gnome/documentation/scripting/utilities.rst b/py_gnome/documentation/scripting/utilities.rst
index 39c55a90a..5074945b7 100644
--- a/py_gnome/documentation/scripting/utilities.rst
+++ b/py_gnome/documentation/scripting/utilities.rst
@@ -5,6 +5,9 @@ GNOME has a scripting module where many utilties and helper functions can be acc
common tasks. These include helper functions for easier creation of certain types of spills and movers.
To use these functions import gnome.scripting
+NOTE: the scripting utilities are under active development as we determine which helper functions will
+be useful to make setting up and running pyGNOME easier.
+
:mod:`gnome.scripting`
----------------------
diff --git a/py_gnome/documentation/structure.rst b/py_gnome/documentation/structure.rst
index 23e656f78..ed0e27686 100644
--- a/py_gnome/documentation/structure.rst
+++ b/py_gnome/documentation/structure.rst
@@ -83,14 +83,23 @@ equal.
Movers
-------------
-Movers are any physical process that moves or effects the particles. These can
-be ocean currents, winds, turbulent diffusion, and weathering processes
-(evaporation, etc). Each move is initialized with the the data it needs to
-compute the movement. (or links to files with data in them)
+Movers are any physical process that moves the particles. These can
+be ocean currents, winds, and/or turbulent diffusion. Each mover is
+initialized with the the data it needs to compute the movement or
+with links to appropriate files in the case of gridded model output.
The Mover API is defined so that you can write your own movers -- for instance
to model fish swimming behavior, etc. See the reference docs for the the API.
+
+Weatherers
+--------------
+
+Weatherers are processes that change the mass of the floating oil or of oil droplets
+within the water column. These include processes that are traditionally described as
+"weathering" (e.g. evaporation, dispersion) and response options (e.g. skimming,
+burning oil).
+
Outputters
------------
diff --git a/py_gnome/documentation/units.rst b/py_gnome/documentation/units.rst
index 5c92e1a8b..c6c932a20 100644
--- a/py_gnome/documentation/units.rst
+++ b/py_gnome/documentation/units.rst
@@ -11,13 +11,13 @@ Conversion is done on I/O or occasionally within a class (i.e the class may stor
Time
Time is expressed in integer seconds -- stored in a C ``unsigned long``
-
+
Date-times are in seconds since 1904 (1904-01-01T00:00) -- stored in a C ``unsigned long``
-
+
(NOTE: much of the Python code uses ``datetime.datetime`` objects and/or numpy ``datetime64`` objects, but the internal C++ code uses integer seconds)
Length
- Lengths are in meters
+ Lengths are in meters
Mass
Mass is in grams
@@ -29,8 +29,8 @@ Density
Density is in grams per cubic centimeter (g/cm^3)
Velocity
- Velocities are in meters per second
-
+ Velocities are in meters per second
+
Latitude-Longitude
Lat-long is in floating point degrees -- range generally -360 to 360, so we can do stuff across the date line.
@@ -43,6 +43,8 @@ Droplet Diameter
Viscosity
Viscosity is usually kinematic viscosity, and is in units of m^2/s
+Salinity
+ Salinity is used in various calculations for sedimentiaon, wave formation, etc. Standard units is Practical Salinity Units (PSU) -- more or less parts per thousand -- i.e. fresh is 0, typical seawater is 35.
diff --git a/py_gnome/gnome/array_types.py b/py_gnome/gnome/array_types.py
index db019afa9..4b93add3e 100644
--- a/py_gnome/gnome/array_types.py
+++ b/py_gnome/gnome/array_types.py
@@ -251,6 +251,7 @@ def split_element(self, num, value, l_frac=None):
'bulk_init_volume': ((), np.float64, 'bulk_init_volume', 0,
ArrayTypeDivideOnSplit),
'density': ((), np.float64, 'density', 0),
+ 'oil_density': ((), np.float64, 'oil_density', 0),
'evap_decay_constant': (None, np.float64,
'evap_decay_constant', None),
@@ -268,6 +269,7 @@ def split_element(self, num, value, l_frac=None):
'at_max_area': ((), np.uint8, 'at_max_area', False),
'viscosity': ((), np.float64, 'viscosity', 0),
+ 'oil_viscosity': ((), np.float64, 'oil_viscosity', 0),
# fractional water content in emulsion
'frac_water': ((), np.float64, 'frac_water', 0),
'interfacial_area': ((), np.float64, 'interfacial_area', 0),
diff --git a/py_gnome/gnome/basic_types.py b/py_gnome/gnome/basic_types.py
index 9eacfba19..447bddee3 100644
--- a/py_gnome/gnome/basic_types.py
+++ b/py_gnome/gnome/basic_types.py
@@ -46,7 +46,7 @@
# value has two components: (u, v) or (r, theta) etc
datetime_value_2d = np.dtype([('time', 'datetime64[s]'),
- ('value', mover_type, (2, ))], align=True)
+ ('value', mover_type, (2,))], align=True)
# value has one component: (u,)
# convert from datetime_value_1d to time_value_pair by setting 2nd component
@@ -71,8 +71,9 @@
disperse=32, # marked for chemical_dispersion
)
-numerical_methods = enum(euler=0,
- rk4=1)
+numerical_methods = {'Euler': 0,
+ 'Trapezoid': 1,
+ 'RK4': 2}
# ----------------------------------------------------------------
# Mirror C++ structures, following are used by cython code
diff --git a/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pxd b/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pxd
new file mode 100644
index 000000000..4632d81d8
--- /dev/null
+++ b/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pxd
@@ -0,0 +1,10 @@
+cimport numpy as cnp
+import numpy as np
+
+from current_movers cimport CurrentCycleMover_c
+from gnome.cy_gnome.cy_mover cimport CyMover
+
+
+cdef class CyCurrentCycleMover(CyMover):
+ cdef CurrentCycleMover_c *current_cycle
+ cdef char *_num_method
diff --git a/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pyx b/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pyx
index e138d9abd..cafa4badf 100644
--- a/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pyx
+++ b/py_gnome/gnome/cy_gnome/cy_currentcycle_mover.pyx
@@ -1,26 +1,26 @@
+import os
+
cimport numpy as cnp
import numpy as np
-import os
from type_defs cimport *
-from movers cimport Mover_c
-from current_movers cimport CurrentCycleMover_c
from gnome import basic_types
+
+from gnome.cy_gnome.cy_helpers cimport to_bytes
from gnome.cy_gnome.cy_ossm_time cimport CyOSSMTime
from gnome.cy_gnome.cy_shio_time cimport CyShioTime
-from gnome.cy_gnome cimport cy_mover
-from gnome.cy_gnome.cy_helpers cimport to_bytes
+
+from movers cimport Mover_c
+from current_movers cimport CurrentCycleMover_c
+from gnome.cy_gnome.cy_mover cimport CyMover
cdef extern from *:
CurrentCycleMover_c* dynamic_cast_ptr "dynamic_cast" (Mover_c *) except NULL
-cdef class CyCurrentCycleMover(cy_mover.CyMover):
-
- cdef CurrentCycleMover_c *current_cycle
-
- # note - current_cycle is derived from grid_current
+cdef class CyCurrentCycleMover(CyMover):
+ # note - current_cycle is derived from grid_current
def __cinit__(self):
self.mover = new CurrentCycleMover_c()
self.current_cycle = dynamic_cast_ptr(self.mover)
@@ -58,7 +58,7 @@ cdef class CyCurrentCycleMover(cy_mover.CyMover):
# def export_topology(self, topology_file):
# """
# .. function::export_topology
-#
+#
# """
# cdef OSErr err
# topology_file = os.path.normpath(topology_file)
@@ -66,114 +66,139 @@ cdef class CyCurrentCycleMover(cy_mover.CyMover):
# err = self.current_cycle.ExportTopology(topology_file)
# if err != 0:
# """
-# For now just raise an OSError - until the types of possible errors
-# are defined and enumerated
+# For now just raise an OSError - until the types of
+# possible errors are defined and enumerated
# """
-# raise OSError("CurrentCycleMover_c.ExportTopology returned an error.")
-#
- def __init__(self, current_scale=1, uncertain_duration=24*3600, uncertain_time_delay=0,
- uncertain_along = .5, uncertain_cross = .25, num_method = 0):
+# raise OSError('CurrentCycleMover_c.ExportTopology '
+# 'returned an error.')
+#
+ def __init__(self, current_scale=1,
+ uncertain_duration=24*3600,
+ uncertain_time_delay=0,
+ uncertain_along=.5,
+ uncertain_cross=.25,
+ num_method='Euler'):
"""
- .. function:: __init__(self, current_scale=1, uncertain_duration=24*3600, uncertain_time_delay=0,
- uncertain_along = .5, uncertain_cross = .25)
-
+ .. function:: __init__(self, current_scale=1,
+ uncertain_duration=24*3600,
+ uncertain_time_delay=0,
+ uncertain_along=.5,
+ uncertain_cross = .25)
+
initialize a current cycle mover
-
- :param uncertain_duation: time in seconds after which the uncertainty values are updated
- :param uncertain_time_delay: wait this long after model_start_time to turn on uncertainty
- :param uncertain_cross: used in uncertainty computation, perpendicular to current flow
- :param uncertain_along: used in uncertainty computation, parallel to current flow
+
+ :param uncertain_duation: time in seconds after which the
+ uncertainty values are updated
+ :param uncertain_time_delay: wait this long after model_start_time
+ to turn on uncertainty
+ :param uncertain_cross: used in uncertainty computation, perpendicular
+ to current flow
+ :param uncertain_along: used in uncertainty computation, parallel
+ to current flow
:param current_scale: scale factor applied to current values
-
"""
+ self.num_method = num_method
+
self.current_cycle.fCurScale = current_scale
- #self.current_cycle.fUncertainParams.durationInHrs = uncertain_duration
+ # self.current_cycle.fUncertainParams.durationInHrs = uncertain_duration
self.current_cycle.fDuration = uncertain_duration
- #self.current_cycle.fUncertainParams.startTimeInHrs = uncertain_time_delay
+ # self.current_cycle.fUncertainParams.startTimeInHrs = uncertain_time_delay
self.current_cycle.fUncertainStartTime = uncertain_time_delay
- #self.current_cycle.fUncertainParams.crossCurUncertainty = uncertain_cross
- #self.current_cycle.fUncertainParams.alongCurUncertainty = uncertain_along
+ # self.current_cycle.fUncertainParams.crossCurUncertainty = uncertain_cross
+ # self.current_cycle.fUncertainParams.alongCurUncertainty = uncertain_along
self.current_cycle.fDownCurUncertainty = -1*uncertain_along
self.current_cycle.fUpCurUncertainty = uncertain_along
self.current_cycle.fLeftCurUncertainty = -1*uncertain_cross
self.current_cycle.fRightCurUncertainty = uncertain_cross
- self.current_cycle.num_method = num_method
-
+
self.current_cycle.fIsOptimizedForStep = 0
def __repr__(self):
"""
unambiguous repr of object, reuse for str() method
"""
- info = "CyCurrentCycleMover(uncertain_duration=%s,uncertain_time_delay=%s,uncertain_along=%s,uncertain_cross=%s)" \
- % (self.current_cycle.fDuration, self.current_cycle.fUncertainStartTime, self.current_cycle.fUpCurUncertainty, self.current_cycle.fRightCurUncertainty)
+ info = ('CyCurrentCycleMover(uncertain_duration={}, '
+ 'uncertain_time_delay={}, '
+ 'uncertain_along={}, uncertain_cross={})'
+ .format(self.current_cycle.fDuration,
+ self.current_cycle.fUncertainStartTime,
+ self.current_cycle.fUpCurUncertainty,
+ self.current_cycle.fRightCurUncertainty))
return info
-
+
def __str__(self):
"""Return string representation of this object"""
-
- info = "CyCurrentCycleMover object - \n uncertain_duration: %s \n uncertain_time_delay: %s \n uncertain_along: %s\n uncertain_cross: %s" \
- % (self.current_cycle.fDuration, self.current_cycle.fUncertainStartTime, self.current_cycle.fUpCurUncertainty, self.current_cycle.fRightCurUncertainty)
-
+
+ info = ('CyCurrentCycleMover object - \n'
+ '\tuncertain_duration: %s \n'
+ '\tuncertain_time_delay: %s \n'
+ '\tuncertain_along: %s\n'
+ '\tuncertain_cross: %s'
+ .format(self.current_cycle.fDuration,
+ self.current_cycle.fUncertainStartTime,
+ self.current_cycle.fUpCurUncertainty,
+ self.current_cycle.fRightCurUncertainty))
+
return info
-
+
property current_scale:
def __get__(self):
return self.current_cycle.fCurScale
-
+
def __set__(self, value):
self.current_cycle.fCurScale = value
-
+
property uncertain_duration:
def __get__(self):
return self.current_cycle.fDuration
-
- def __set__(self,value):
+
+ def __set__(self, value):
self.current_cycle.fDuration = value
-
+
property uncertain_time_delay:
def __get__(self):
return self.current_cycle.fUncertainStartTime
-
+
def __set__(self, value):
self.current_cycle.fUncertainStartTime = value
-
+
property uncertain_cross:
def __get__(self):
return self.current_cycle.fRightCurUncertainty
-
+
def __set__(self, value):
self.current_cycle.fRightCurUncertainty = value
self.current_cycle.fLeftCurUncertainty = -1.*value
-
+
property uncertain_along:
def __get__(self):
return self.current_cycle.fUpCurUncertainty
-
+
def __set__(self, value):
self.current_cycle.fUpCurUncertainty = value
self.current_cycle.fDownCurUncertainty = -1.*value
-
+
property extrapolate:
def __get__(self):
return self.current_cycle.GetExtrapolationInTime()
-
+
def __set__(self, value):
self.current_cycle.SetExtrapolationInTime(value)
-
+
property time_offset:
def __get__(self):
return self.current_cycle.GetTimeShift()
-
+
def __set__(self, value):
self.current_cycle.SetTimeShift(value)
property num_method:
def __get__(self):
- return self.current_cycle.num_method
-
+ return self._num_method
+
def __set__(self, value):
- self.current_cycle.num_method = value
+ self._num_method = value
+ self.current_cycle.num_method = basic_types.numerical_methods[value]
def extrapolate_in_time(self, extrapolate):
self.current_cycle.SetExtrapolationInTime(extrapolate)
@@ -186,22 +211,24 @@ cdef class CyCurrentCycleMover(cy_mover.CyMover):
def set_shio(self, CyShioTime cy_shio):
"""
- Takes a CyShioTime object as input and sets C++ CurrentCycle mover properties from the Shio object.
+ Takes a CyShioTime object as input and sets C++ CurrentCycle
+ mover properties from the Shio object.
"""
self.current_cycle.SetTimeDep(cy_shio.shio)
self.current_cycle.SetRefPosition(cy_shio.shio.GetStationLocation())
self.current_cycle.bTimeFileActive = True
- #self.current_cycle.scaleType = 1
+ # self.current_cycle.scaleType = 1
return True
-
+
def set_ossm(self, CyOSSMTime ossm):
"""
- Takes a CyOSSMTime object as input and sets C++ CurrentCycle mover properties from the OSSM object.
+ Takes a CyOSSMTime object as input and sets C++ CurrentCycle
+ mover properties from the OSSM object.
"""
self.current_cycle.SetTimeDep(ossm.time_dep)
self.current_cycle.bTimeFileActive = True # What is this?
return True
-
+
def get_move(self,
model_time,
step_len,
@@ -236,17 +263,22 @@ cdef class CyCurrentCycleMover(cy_mover.CyMover):
N = len(ref_points)
err = self.current_cycle.get_move(N, model_time, step_len,
- &ref_points[0],
- &delta[0],
- &LE_status[0],
- spill_type,
- 0)
+ &ref_points[0],
+ &delta[0],
+ &LE_status[0],
+ spill_type,
+ 0)
+
if err == 1:
- raise ValueError("Make sure numpy arrays for ref_points and delta are defined")
+ raise ValueError('Make sure numpy arrays for ref_points '
+ 'and delta are defined')
"""
Can probably raise this error before calling the C++ code,
but the C++ also throwing this error
"""
if err == 2:
- raise ValueError("The value for spill type can only be 'forecast' or 'uncertainty' - you've chosen: " + str(spill_type))
+ raise ValueError('The value for spill type can only be '
+ '"forecast" or "uncertainty" - '
+ 'you\'ve chosen: {}'
+ .format(spill_type))
diff --git a/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pxd b/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pxd
index 57454ff5f..e3acdbb82 100644
--- a/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pxd
+++ b/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pxd
@@ -1,8 +1,10 @@
cimport numpy as cnp
import numpy as np
+
from current_movers cimport GridCurrentMover_c
from gnome.cy_gnome.cy_mover cimport CyCurrentMoverBase
cdef class CyGridCurrentMover(CyCurrentMoverBase):
- cdef GridCurrentMover_c *grid_current
\ No newline at end of file
+ cdef GridCurrentMover_c *grid_current
+ cdef char *_num_method
diff --git a/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pyx b/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pyx
index 55b26320c..bbf225d2e 100644
--- a/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pyx
+++ b/py_gnome/gnome/cy_gnome/cy_gridcurrent_mover.pyx
@@ -2,16 +2,18 @@ import os
cimport numpy as cnp
import numpy as np
+
from libc.string cimport memcpy
from type_defs cimport *
+from gnome import basic_types
+
from utils cimport _GetHandleSize
from movers cimport Mover_c
from current_movers cimport GridCurrentMover_c, CurrentMover_c
-from gnome import basic_types
-from gnome.cy_gnome.cy_mover cimport CyCurrentMoverBase
from gnome.cy_gnome.cy_helpers cimport to_bytes
+from gnome.cy_gnome.cy_mover cimport CyCurrentMoverBase
cdef extern from *:
@@ -22,9 +24,6 @@ cdef extern from *:
cdef class CyGridCurrentMover(CyCurrentMoverBase):
-
- #cdef GridCurrentMover_c *grid_current
-
def __cinit__(self):
self.mover = new GridCurrentMover_c()
self.grid_current = dc_mover_to_gc(self.mover)
@@ -83,7 +82,7 @@ cdef class CyGridCurrentMover(CyCurrentMoverBase):
uncertain_time_delay=0,
uncertain_along=.5,
uncertain_cross=.25,
- num_method = 0):
+ num_method='Euler'):
"""
.. function:: __init__(self, current_scale=1,
uncertain_duration=24*3600, uncertain_time_delay=0,
@@ -110,7 +109,8 @@ cdef class CyGridCurrentMover(CyCurrentMoverBase):
self.grid_current.fCurScale = current_scale
self.grid_current.fIsOptimizedForStep = 0
- self.grid_current.num_method = num_method
+
+ self.num_method = num_method
def __repr__(self):
return ('CyGridCurrentMover(uncertain_duration={0}, '
@@ -172,14 +172,14 @@ cdef class CyGridCurrentMover(CyCurrentMoverBase):
def __set__(self, value):
self.grid_current.SetTimeShift(value)
-
- #Does this need to be here? - Jay
+
property num_method:
def __get__(self):
- return self.grid_current.num_method
-
+ return self._num_method
+
def __set__(self, value):
- self.grid_current.num_method = value
+ self.grid_current.num_method = basic_types.numerical_methods[value]
+ self._num_method = value
def extrapolate_in_time(self, extrapolate):
self.grid_current.SetExtrapolationInTime(extrapolate)
diff --git a/py_gnome/gnome/cy_gnome/cy_gridwind_mover.pyx b/py_gnome/gnome/cy_gnome/cy_gridwind_mover.pyx
index ef7c15229..7ea6dd789 100644
--- a/py_gnome/gnome/cy_gnome/cy_gridwind_mover.pyx
+++ b/py_gnome/gnome/cy_gnome/cy_gridwind_mover.pyx
@@ -1,12 +1,15 @@
+import os
+
cimport numpy as cnp
import numpy as np
-import os
+from libc.string cimport memcpy
from type_defs cimport *
+from utils cimport _GetHandleSize
from movers cimport GridWindMover_c, WindMover_c, Mover_c
+from gnome import basic_types
from cy_mover cimport CyWindMoverBase
-
from gnome.cy_gnome.cy_helpers cimport to_bytes
@@ -184,6 +187,21 @@ cdef class CyGridWindMover(CyWindMoverBase):
" 'forecast' or 'uncertainty' - you've chosen: "
+ str(spill_type))
+ def _is_regular_grid(self):
+ """
+ Invokes the IsRegularGrid TimeGridVel_c object
+ """
+ return self.grid_wind.IsRegularGrid()
+
+ def get_num_points(self):
+ """
+ Invokes the GetNumPoints method of TimeGridVel_c object
+ to get the number of triangles
+ """
+ num_points = self.grid_wind.GetNumPoints()
+
+ return num_points
+
def get_num_triangles(self):
"""
Invokes the GetNumTriangles method of TriGridVel_c object
@@ -193,3 +211,88 @@ cdef class CyGridWindMover(CyWindMoverBase):
return num_tri
+ def _get_points(self):
+ """
+ Invokes the GetPointsHdl method of TriGridWind_c object
+ to get the points for the grid
+ """
+ cdef short tmp_size = sizeof(LongPoint)
+ cdef LongPointHdl pts_hdl
+ cdef cnp.ndarray[LongPoint, ndim = 1] pts
+
+ # allocate memory and copy it over
+ pts_hdl = self.grid_wind.GetPointsHdl()
+ sz = _GetHandleSize(pts_hdl)
+
+ # will this always work?
+ pts = np.empty((sz / tmp_size,), dtype=basic_types.long_point)
+
+ memcpy(&pts[0], pts_hdl[0], sz)
+
+ return pts
+
+ def _get_center_points(self):
+ """
+ Invokes the GetCellCenters method of TriGridWind_c object
+ to get the velocities for the grid
+ """
+ cdef short tmp_size = sizeof(WorldPoint)
+ cdef WORLDPOINTH pts_hdl
+ cdef cnp.ndarray[WorldPoint, ndim = 1] pts
+
+ # allocate memory and copy it over
+ pts_hdl = self.grid_wind.GetCellCenters()
+ sz = _GetHandleSize(pts_hdl)
+
+ # will this always work?
+ pts = np.empty((sz / tmp_size,), dtype=basic_types.w_point_2d)
+
+ memcpy(&pts[0], pts_hdl[0], sz)
+
+ return pts
+
+ def _get_cell_data(self):
+ """
+ Invokes the GetCellDataHdl method of TimeGridWind_c object
+ to get the velocities for the grid
+ """
+ cdef short tmp_size = sizeof(GridCellInfo)
+ cdef GridCellInfoHdl cell_data_hdl
+ cdef cnp.ndarray[GridCellInfo, ndim = 1] cell_data
+
+ # allocate memory and copy it over
+ # should check that cell data exists
+ cell_data_hdl = self.grid_wind.GetCellDataHdl()
+ if not cell_data_hdl:
+ """
+ For now just raise an OSError - until the types of possible errors
+ are defined and enumerated
+ """
+ raise OSError('GridWindMover_c.GetCellDataHdl '
+ 'returned an error.')
+
+ sz = _GetHandleSize(cell_data_hdl)
+
+ # will this always work?
+ cell_data = np.empty((sz / tmp_size,), dtype=basic_types.cell_data)
+
+ memcpy(&cell_data[0], cell_data_hdl[0], sz)
+
+ return cell_data
+
+ def get_scaled_velocities(self, Seconds model_time,
+ cnp.ndarray[VelocityFRec] vels):
+ """
+ Invokes the GetScaledVelocities method of TimeGridVel_c object
+ to get the velocities on the triangles
+ """
+ cdef OSErr err
+
+ err = self.grid_wind.GetScaledVelocities(model_time, &vels[0])
+ if err != 0:
+ """
+ For now just raise an OSError - until the types of possible errors
+ are defined and enumerated
+ """
+ raise OSError('GridWindMover_c.GetScaledVelocities '
+ 'returned an error.')
diff --git a/py_gnome/gnome/cy_gnome/movers.pxd b/py_gnome/gnome/cy_gnome/movers.pxd
index 89fe9cac7..12f22bd55 100644
--- a/py_gnome/gnome/cy_gnome/movers.pxd
+++ b/py_gnome/gnome/cy_gnome/movers.pxd
@@ -93,7 +93,13 @@ cdef extern from "GridWindMover_c.h":
long GetTimeShift()
OSErr GetDataStartTime(Seconds *startTime)
OSErr GetDataEndTime(Seconds *endTime)
+ OSErr GetScaledVelocities(Seconds time, VelocityFRec *velocity)
+ LongPointHdl GetPointsHdl()
+ WORLDPOINTH GetCellCenters()
+ GridCellInfoHdl GetCellDataHdl()
long GetNumTriangles()
+ long GetNumPoints()
+ bool IsRegularGrid()
cdef extern from "IceWindMover_c.h":
diff --git a/py_gnome/gnome/environment/__init__.py b/py_gnome/gnome/environment/__init__.py
index cb946427a..c5c3d4855 100644
--- a/py_gnome/gnome/environment/__init__.py
+++ b/py_gnome/gnome/environment/__init__.py
@@ -1,10 +1,10 @@
'''
environment module
'''
-from environment import Environment, Water, WaterSchema
+from environment import Environment, Water, WaterSchema, env_from_netCDF, ice_env_from_netCDF
from property import EnvProp, VectorProp, Time
from ts_property import TimeSeriesProp, TSVectorProp
-from grid_property import GriddedProp, GridVectorProp
+from grid_property import GriddedProp, GridVectorProp, GridPropSchema, GridVectorPropSchema
from environment_objects import (WindTS,
GridCurrent,
GridWind,
@@ -14,15 +14,12 @@
IceAwareWind,
TemperatureTS)
-from environment_objects import (Wind,
- Current,
- Temperature)
-
from waves import Waves, WavesSchema
from tide import Tide, TideSchema
from wind import Wind, WindSchema, constant_wind, wind_from_values
from running_average import RunningAverage, RunningAverageSchema
-from grid import Grid, GridSchema
+from grid import Grid, GridSchema, PyGrid, PyGrid_S, PyGrid_U
+# from gnome.environment.environment_objects import IceAwareCurrentSchema
__all__ = [Environment,
@@ -38,16 +35,21 @@
RunningAverageSchema,
Grid,
GridSchema,
+ PyGrid,
+ PyGrid_S,
+ PyGrid_U,
constant_wind,
WindTS,
GridCurrent,
+ GridVectorPropSchema,
+ GridPropSchema,
GridWind,
IceConcentration,
GridTemperature,
IceAwareCurrent,
+# IceAwareCurrentSchema,
IceAwareWind,
TemperatureTS,
- Wind,
- Current,
- Temperature
+ env_from_netCDF,
+ ice_env_from_netCDF
]
diff --git a/py_gnome/gnome/environment/environment.py b/py_gnome/gnome/environment/environment.py
index 028994bd0..030e942aa 100644
--- a/py_gnome/gnome/environment/environment.py
+++ b/py_gnome/gnome/environment/environment.py
@@ -16,6 +16,16 @@
from .. import _valid_units
+class EnvironmentMeta(type):
+ def __init__(cls, name, bases, dct):
+# if hasattr(cls, '_state'):
+# cls._state = copy.deepcopy(bases[0]._state)
+ cls._subclasses = []
+ for c in cls.__mro__:
+ if hasattr(c, '_subclasses') and c is not cls:
+ c._subclasses.append(cls)
+
+
class Environment(object):
"""
A base class for all classes in environment module
@@ -23,6 +33,8 @@ class Environment(object):
This is primarily to define a dtype such that the OrderedCollection
defined in the Model object requires it.
"""
+
+ _subclasses = []
_state = copy.deepcopy(serializable.Serializable._state)
# env objects referenced by others using this attribute name
@@ -32,6 +44,8 @@ class Environment(object):
# reference environment objects
_ref_as = 'environment'
+ __metaclass__ = EnvironmentMeta
+
def __init__(self, name=None, make_default_refs=True):
'''
base class for environment objects
@@ -117,6 +131,14 @@ class Water(Environment, serializable.Serializable):
'''
_ref_as = 'water'
_state = copy.deepcopy(Environment._state)
+ _field_descr = {'units': ('update', 'save'),
+ 'temperature:': ('update', 'save'),
+ 'salinity': ('update', 'save'),
+ 'sediment': ('update', 'save'),
+ 'fetch': ('update', 'save'),
+ 'wave_height': ('update', 'save'),
+ 'density': ('update', 'save'),
+ 'kinematic_viscosity': ('update', 'save')}
_state += [serializable.Field('units', update=True, save=True),
serializable.Field('temperature', update=True, save=True),
serializable.Field('salinity', update=True, save=True),
@@ -154,7 +176,7 @@ class Water(Environment, serializable.Serializable):
def __init__(self,
temperature=300.0,
salinity=35.0,
- sediment=.005, # kg/m^3 oceanic default
+ sediment=.005, # kg/m^3 oceanic default
wave_height=None,
fetch=None,
units={'temperature': 'K',
@@ -292,7 +314,105 @@ def _convert_sediment_units(self, from_, to):
if from_ == 'mg/l':
# convert to kg/m^3
- return self.sediment/1000.0
+ return self.sediment / 1000.0
else:
return self.sediment * 1000.0
+
+
+def env_from_netCDF(filename=None, dataset=None, grid_file=None, data_file=None, _cls_list=None, **kwargs):
+ '''
+ Returns a list of instances of environment objects that can be produced from a file or dataset.
+ These instances will be created with a common underlying grid, and will interconnect when possible
+ For example, if an IceAwareWind can find an existing IceConcentration, it will use it instead of
+ instantiating another. This function tries ALL gridded types by default. This means if a particular
+ subclass of object is possible to be built, it is likely that all it's parents will be built and included
+ as well.
+
+ If you wish to limit the types of environment objects that will be used, pass a list of the types
+ using "_cls_list" kwarg'''
+ def attempt_from_netCDF(cls, **klskwargs):
+ obj = None
+ try:
+ obj = c.from_netCDF(**klskwargs)
+ except Exception as e:
+ import logging
+ logging.warn('''Class {0} could not be constituted from netCDF file
+ Exception: {1}'''.format(c.__name__, e))
+ return obj
+
+ from gnome.utilities.file_tools.data_helpers import _get_dataset
+ from gnome.environment.environment_objects import GriddedProp, GridVectorProp
+ from gnome.environment import PyGrid, Environment
+ import copy
+
+ new_env = []
+
+ if filename is not None:
+ data_file = filename
+ grid_file = filename
+
+ ds = None
+ dg = None
+ if dataset is None:
+ if grid_file == data_file:
+ ds = dg = _get_dataset(grid_file)
+ else:
+ ds = _get_dataset(data_file)
+ dg = _get_dataset(grid_file)
+ else:
+ if grid_file is not None:
+ dg = _get_dataset(grid_file)
+ else:
+ dg = dataset
+ ds = dataset
+ dataset = ds
+
+ grid = kwargs.pop('grid', None)
+ if grid is None:
+ grid = PyGrid.from_netCDF(filename=filename, dataset=dg, **kwargs)
+ kwargs['grid'] = grid
+ scs = copy.copy(Environment._subclasses) if _cls_list is None else _cls_list
+ for c in scs:
+ if issubclass(c, (GriddedProp, GridVectorProp)) and not any([isinstance(o, c) for o in new_env]):
+ clskwargs = copy.copy(kwargs)
+ obj = None
+ try:
+ req_refs = c._req_refs
+ except AttributeError:
+ req_refs = None
+
+ if req_refs is not None:
+ for ref, klass in req_refs.items():
+ for o in new_env:
+ if isinstance(o, klass):
+ clskwargs[ref] = o
+ if ref in clskwargs.keys():
+ continue
+ else:
+ obj = attempt_from_netCDF(c, filename=filename, dataset=dataset, grid_file=grid_file, data_file=data_file, **clskwargs)
+ clskwargs[ref] = obj
+ if obj is not None:
+ new_env.append(obj)
+
+ obj = attempt_from_netCDF(c, filename=filename, dataset=dataset, grid_file=grid_file, data_file=data_file, **clskwargs)
+ if obj is not None:
+ new_env.append(obj)
+ return new_env
+
+
+def ice_env_from_netCDF(filename=None, **kwargs):
+ '''
+ A short function to generate a list of all the 'ice_aware' classes for use in env_from_netCDF
+ (this excludes GridCurrent, GridWind, GridTemperature etc)
+ '''
+ from gnome.environment import Environment
+ cls_list = Environment._subclasses
+ ice_cls_list = [c for c in cls_list if (hasattr(c, '_ref_as') and 'ice_aware' in c._ref_as)]
+# for c in cls_list:
+# if hasattr(c, '_ref_as'):
+# if ((not isinstance(c._ref_as, basestring) and
+# any(['ice_aware' in r for r in c._ref_as])) or
+# 'ice_aware' in c._ref_as):
+# ice_cls_list.append(c)
+ return env_from_netCDF(filename=filename, _cls_list=ice_cls_list, **kwargs)
\ No newline at end of file
diff --git a/py_gnome/gnome/environment/environment_objects.py b/py_gnome/gnome/environment/environment_objects.py
index e7e1f9451..96ce9c695 100644
--- a/py_gnome/gnome/environment/environment_objects.py
+++ b/py_gnome/gnome/environment/environment_objects.py
@@ -17,10 +17,11 @@
import unit_conversion
from .. import _valid_units
from gnome.environment import Environment
+from gnome.environment.grid import PyGrid
from gnome.environment.property import Time, PropertySchema, VectorProp, EnvProp
-from gnome.environment.ts_property import TSVectorProp, TimeSeriesProp
-from gnome.environment.grid_property import GridVectorProp, GriddedProp, GridPropSchema
-from gnome.utilities.file_tools.data_helpers import _init_grid, _get_dataset
+from gnome.environment.ts_property import TSVectorProp, TimeSeriesProp, TimeSeriesPropSchema
+from gnome.environment.grid_property import GridVectorProp, GriddedProp, GridPropSchema, GridVectorPropSchema
+from gnome.utilities.file_tools.data_helpers import _get_dataset
class Depth(object):
@@ -39,7 +40,7 @@ def interpolation_alphas(self, points, data_shape, _hash=None):
return None, None
-class S_Depth(object):
+class S_Depth_T1(object):
default_terms = [['Cs_w', 's_w', 'hc', 'Cs_r', 's_rho']]
@@ -59,7 +60,7 @@ def __init__(self,
self.bathymetry = bathymetry
self.terms = terms
if len(terms) == 0:
- for s in S_Depth.default_terms:
+ for s in S_Depth_T1.default_terms:
for term in s:
self.terms[term] = ds[term][:]
@@ -80,7 +81,7 @@ def from_netCDF(cls,
@property
def surface_index(self):
return -1
-
+
@property
def bottom_index(self):
return 0
@@ -104,8 +105,13 @@ def _r_level_depth_given_bathymetry(self, depths, lvl):
Cs_r = self.terms['Cs_r'][lvl]
hc = self.terms['hc']
return -(hc * (s_rho - Cs_r) + Cs_r * depths)
-
+
def interpolation_alphas(self, points, data_shape, _hash=None):
+ '''
+ Returns a pair of values. The 1st value is an array of the depth indices of all the particles.
+ The 2nd value is an array of the interpolation alphas for the particles between their depth
+ index and depth_index+1. If both values are None, then all particles are on the surface layer.
+ '''
underwater = points[:, 2] > 0.0
if len(np.where(underwater)[0]) == 0:
return None, None
@@ -134,7 +140,7 @@ def interpolation_alphas(self, points, data_shape, _hash=None):
if ulev == 0:
und_alph[within_layer] = -2
else:
- a = ((pts[:, 2].take(within_layer) - blev_depths.take(within_layer)) /
+ a = ((pts[:, 2].take(within_layer) - blev_depths.take(within_layer)) /
(ulev_depths.take(within_layer) - blev_depths.take(within_layer)))
und_alph[within_layer] = a
blev_depths = ulev_depths
@@ -144,40 +150,7 @@ def interpolation_alphas(self, points, data_shape, _hash=None):
return indices, alphas
-class TemperatureTSSchema(PropertySchema):
- timeseries = SequenceSchema(
- TupleSchema(
- children=[SchemaNode(DateTime(default_tzinfo=None), missing=drop),
- SchemaNode(Float(), missing=0)
- ],
- missing=drop)
- )
- varnames = SequenceSchema(SchemaNode(String(), missing=drop))
-
-
-class VelocityTSSchema(PropertySchema):
- timeseries = SequenceSchema(
- TupleSchema(
- children=[SchemaNode(DateTime(default_tzinfo=None), missing=drop),
- TupleSchema(children=[
- SchemaNode(Float(), missing=0),
- SchemaNode(Float(), missing=0)
- ]
- )
- ],
- missing=drop)
- )
- varnames = SequenceSchema(SchemaNode(String(), missing=drop))
-
-
-class VelocityTS(TSVectorProp, serializable.Serializable):
-
- _state = copy.deepcopy(serializable.Serializable._state)
- _schema = VelocityTSSchema
-
- _state.add_field([serializable.Field('units', save=True, update=True),
- serializable.Field('timeseries', save=True, update=True),
- serializable.Field('varnames', save=True, update=True)])
+class VelocityTS(TSVectorProp):
def __init__(self,
name=None,
@@ -219,7 +192,7 @@ def constant(cls,
:param speed: speed of wind
:param direction: direction -- degrees True, direction wind is from
(degrees True)
- :param unit='m/s': units for speed, as a string, i.e. "knots", "m/s",
+ :param units='m/s': units for speed, as a string, i.e. "knots", "m/s",
"cm/s", etc.
.. note::
@@ -229,7 +202,9 @@ def constant(cls,
direction = direction * -1 - 90
u = speed * np.cos(direction * np.pi / 180)
v = speed * np.sin(direction * np.pi / 180)
- return super(VelocityTS, self).constant(name, units, variables=[[u], [v]])
+ u = TimeSeriesProp.constant('u', units, u)
+ v = TimeSeriesProp.constant('v', units, v)
+ return super(VelocityTS, cls).constant(name, units, variables=[u, v])
@property
def timeseries(self):
@@ -237,100 +212,80 @@ def timeseries(self):
y = self.variables[1].data
return map(lambda t, x, y: (t, (x, y)), self._time, x, y)
- def serialize(self, json_='webapi'):
- dict_ = serializable.Serializable.serialize(self, json_=json_)
- # The following code is to cover the needs of webapi
- if json_ == 'webapi':
- dict_.pop('timeseries')
- dict_.pop('units')
- x = np.asanyarray(self.variables[0].data)
- y = np.asanyarray(self.variables[1].data)
- direction = -(np.arctan2(y, x) * 180 / np.pi + 90)
- magnitude = np.sqrt(x ** 2 + y ** 2)
- ts = (unicode(tx.isoformat()) for tx in self._time)
- dict_['timeseries'] = map(lambda t, x, y: (t, (x, y)), ts, magnitude, direction)
- dict_['units'] = (unicode(self.variables[0].units), u'degrees')
- dict_['varnames'] = [u'magnitude', u'direction', dict_['varnames'][0], dict_['varnames'][1]]
- return dict_
-
- @classmethod
- def deserialize(cls, json_):
- dict_ = super(VelocityTS, cls).deserialize(json_)
-
- ts, data = zip(*dict_.pop('timeseries'))
- ts = np.array(ts)
- data = np.array(data).T
- units = dict_['units']
- if len(units) > 1 and units[1] == 'degrees':
- u_data, v_data = data
- v_data = ((-v_data - 90) * np.pi / 180)
- u_t = u_data * np.cos(v_data)
- v_data = u_data * np.sin(v_data)
- u_data = u_t
- data = np.array((u_data, v_data))
- dict_['varnames'] = dict_['varnames'][2:]
-
- units = units[0]
- dict_['units'] = units
- dict_['time'] = ts
- dict_['data'] = data
- return dict_
-
- @classmethod
- def new_from_dict(cls, dict_):
- varnames = dict_['varnames']
- vs = []
- for i, varname in enumerate(varnames):
- vs.append(TimeSeriesProp(name=varname,
- units=dict_['units'],
- time=dict_['time'],
- data=dict_['data'][i]))
- dict_.pop('data')
- dict_['variables'] = vs
- return super(VelocityTS, cls).new_from_dict(dict_)
-
-
-class VelocityGridSchema(PropertySchema):
- data_file = SchemaNode(String(), missing=drop)
- grid_file = SchemaNode(String(), missing=drop)
-
-
-class VelocityGrid(GridVectorProp, serializable.Serializable):
- _state = copy.deepcopy(serializable.Serializable._state)
-
- _schema = VelocityGridSchema
-
- _state.add_field([serializable.Field('units', save=True, update=True),
- serializable.Field('varnames', save=True, update=True),
- serializable.Field('time', save=True, update=True),
- serializable.Field('data_file', save=True, update=True),
- serializable.Field('grid_file', save=True, update=True)])
-
- def __init__(self,
- name=None,
- units=None,
- time=None,
- grid=None,
- depth=None,
- variables=None,
- data_file=None,
- grid_file=None,
- dataset=None,
- **kwargs):
-
- GridVectorProp.__init__(self,
- name=name,
- units=units,
- time=time,
- grid=grid,
- depth=depth,
- variables=variables,
- data_file=data_file,
- grid_file=grid_file,
- dataset=dataset,
- **kwargs)
- if len(variables) == 2:
- self.variables.append(TimeSeriesProp(name='constant w', data=[0.0], time=[datetime.now()], units='m/s'))
+# def serialize(self, json_='webapi'):
+# dict_ = serializable.Serializable.serialize(self, json_=json_)
+# # The following code is to cover the needs of webapi
+# if json_ == 'webapi':
+# dict_.pop('timeseries')
+# dict_.pop('units')
+# x = np.asanyarray(self.variables[0].data)
+# y = np.asanyarray(self.variables[1].data)
+# direction = -(np.arctan2(y, x) * 180 / np.pi + 90)
+# magnitude = np.sqrt(x ** 2 + y ** 2)
+# ts = (unicode(tx.isoformat()) for tx in self._time)
+# dict_['timeseries'] = map(lambda t, x, y: (t, (x, y)), ts, magnitude, direction)
+# dict_['units'] = (unicode(self.variables[0].units), u'degrees')
+# dict_['varnames'] = [u'magnitude', u'direction', dict_['varnames'][0], dict_['varnames'][1]]
+# return dict_
+
+# @classmethod
+# def deserialize(cls, json_):
+# if json_ == 'webapi':
+# dict_ = super(VelocityTS, cls).deserialize(json_)
+#
+# ts, data = zip(*dict_.pop('timeseries'))
+# ts = np.array(ts)
+# data = np.array(data).T
+# units = dict_['units']
+# if len(units) > 1 and units[1] == 'degrees':
+# u_data, v_data = data
+# v_data = ((-v_data - 90) * np.pi / 180)
+# u_t = u_data * np.cos(v_data)
+# v_data = u_data * np.sin(v_data)
+# u_data = u_t
+# data = np.array((u_data, v_data))
+# dict_['varnames'] = dict_['varnames'][2:]
+#
+# units = units[0]
+# dict_['units'] = units
+# dict_['time'] = ts
+# dict_['data'] = data
+# return dict_
+# else:
+# return super(VelocityTS, cls).deserialize(json_)
+#
+# @classmethod
+# def new_from_dict(cls, dict_):
+# varnames = dict_['varnames']
+# vs = []
+# for i, varname in enumerate(varnames):
+# vs.append(TimeSeriesProp(name=varname,
+# units=dict_['units'],
+# time=dict_['time'],
+# data=dict_['data'][i]))
+# dict_.pop('data')
+# dict_['variables'] = vs
+# return super(VelocityTS, cls).new_from_dict(dict_)
+
+
+class VelocityGrid(GridVectorProp):
+
+ def __init__(self, **kwargs):
+ if 'variables' in kwargs:
+ variables = kwargs['variables']
+ if len(variables) == 2:
+ variables.append(TimeSeriesProp(name='constant w', data=[0.0], time=Time.constant_time(), units='m/s'))
+ kwargs['variables'] = variables
+ self.angle = None
+ df = None
+ if kwargs.get('dataset', None) is not None:
+ df = kwargs['dataset']
+ elif kwargs.get('grid_file', None) is not None:
+ df = _get_dataset(kwargs['grid_file'])
+ if df is not None and 'angle' in df.variables.keys():
+ # Unrotated ROMS Grid!
+ self.angle = GriddedProp(name='angle', units='radians', time=None, grid=kwargs['grid'], data=df['angle'])
+ super(VelocityGrid, self).__init__(**kwargs)
def __eq__(self, o):
if o is None:
@@ -486,26 +441,20 @@ class GridSediment(GriddedProp, Environment):
default_names = ['sand_06']
-class IceConcentration(GriddedProp, Environment, serializable.Serializable):
- _state = copy.deepcopy(serializable.Serializable._state)
-
- _schema = GridPropSchema
-
- _state.add_field([serializable.Field('units', save=True, update=True),
- serializable.Field('varname', save=True, update=False),
- serializable.Field('time', save=True, update=True),
- serializable.Field('data_file', save=True, update=True),
- serializable.Field('grid_file', save=True, update=True)])
-
+class IceConcentration(GriddedProp, Environment):
+ _ref_as = ['ice_concentration', 'ice_aware']
default_names = ['ice_fraction', ]
- def __eq__(self, o):
- t1 = (self.name == o.name and
- self.units == o.units and
- self.time == o.time and
- self.varname == o.varname)
- t2 = self.data == o.data
- return t1 and t2
+ def __init__(self, *args, **kwargs):
+ super(IceConcentration, self).__init__(*args, **kwargs)
+
+# def __eq__(self, o):
+# t1 = (self.name == o.name and
+# self.units == o.units and
+# self.time == o.time and
+# self.varname == o.varname)
+# t2 = self.data == o.data
+# return t1 and t2
def __str__(self):
return self.serialize(json_='save').__repr__()
@@ -525,39 +474,7 @@ class GridCurrent(VelocityGrid, Environment):
['water_u', 'water_v'],
['curr_ucmp', 'curr_vcmp']]
- def __init__(self,
- name=None,
- units=None,
- time=None,
- variables=None,
- grid=None,
- depth=None,
- grid_file=None,
- data_file=None,
- dataset=None,
- **kwargs):
- VelocityGrid.__init__(self,
- name=name,
- units=units,
- time=time,
- variables=variables,
- grid=grid,
- depth=depth,
- grid_file=grid_file,
- data_file=data_file,
- dataset=dataset)
- self.angle = None
- df = None
- if dataset is not None:
- df = dataset
- elif grid_file is not None:
- df = _get_dataset(grid_file)
- if df is not None and 'angle' in df.variables.keys():
- # Unrotated ROMS Grid!
- self.angle = GriddedProp(name='angle', units='radians', time=None, grid=self.grid, data=df['angle'])
- self.depth = depth
-
- def at(self, points, time, units=None, depth=-1, extrapolate=False, **kwargs):
+ def at(self, points, time, units=None, extrapolate=False, **kwargs):
'''
Find the value of the property at positions P at time T
@@ -593,8 +510,7 @@ def at(self, points, time, units=None, depth=-1, extrapolate=False, **kwargs):
y = value[:, 0] * np.sin(angs) + value[:, 1] * np.cos(angs)
value[:, 0] = x
value[:, 1] = y
- z = value[:, 2]
- z[points[:, 2] == 0.0] = 0
+ value[:, 2][points[:, 2] == 0.0] = 0
if mem:
self._memoize_result(points, time, value, self._result_memo, _hash=_hash)
return value
@@ -603,39 +519,17 @@ def at(self, points, time, units=None, depth=-1, extrapolate=False, **kwargs):
class GridWind(VelocityGrid, Environment):
_ref_as = 'wind'
-
default_names = [['air_u', 'air_v'], ['Air_U', 'Air_V'], ['air_ucmp', 'air_vcmp'], ['wind_u', 'wind_v']]
- def __init__(self,
- name=None,
- units=None,
- time=None,
- variables=None,
- grid=None,
- grid_file=None,
- data_file=None,
- dataset=None,
- **kwargs):
- VelocityGrid.__init__(self,
- name=name,
- units=units,
- time=time,
- variables=variables,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file,
- dataset=dataset)
- self.angle = None
- df = None
- if dataset is not None:
- df = dataset
- elif grid_file is not None:
- df = _get_dataset(grid_file)
- if df is not None and 'angle' in df.variables.keys():
- # Unrotated ROMS Grid!
- self.angle = GriddedProp(name='angle', units='radians', time=None, grid=self.grid, data=df['angle'])
+ def __init__(self, wet_dry_mask=None, *args, **kwargs):
+ super(GridWind, self).__init__(*args, **kwargs)
+ if wet_dry_mask != None:
+ if self.grid.infer_location(wet_dry_mask) != 'center':
+ raise ValueError('Wet/Dry mask does not correspond to grid cell centers')
+ self.wet_dry_mask = wet_dry_mask
+
- def at(self, points, time, units=None, depth=-1, extrapolate=False, **kwargs):
+ def at(self, points, time, units=None, extrapolate=False, **kwargs):
'''
Find the value of the property at positions P at time T
@@ -665,615 +559,180 @@ def at(self, points, time, units=None, depth=-1, extrapolate=False, **kwargs):
return res
value = super(GridWind, self).at(points, time, units, extrapolate=extrapolate, **kwargs)
+ value[points[:, 2] > 0.0] = 0 # no wind underwater!
if self.angle is not None:
angs = self.angle.at(points, time, extrapolate=extrapolate, **kwargs)
x = value[:, 0] * np.cos(angs) - value[:, 1] * np.sin(angs)
y = value[:, 0] * np.sin(angs) + value[:, 1] * np.cos(angs)
value[:, 0] = x
value[:, 1] = y
+
+ if self.wet_dry_mask is not None:
+ idxs = self.grid.locate_faces(points)
+
if mem:
self._memoize_result(points, time, value, self._result_memo, _hash=_hash)
return value
-class IceVelocity(VelocityGrid, Environment):
+class LandMask(GriddedProp):
+ def __init__(self, *args, **kwargs):
+ data = kwargs.pop('data', None)
+ if data is None or not isinstance(data, (np.ma.MaskedArray, nc4.Variable, np.ndarray)):
+ raise ValueError('Must provide a netCDF4 Variable, masked numpy array, or an explicit mask on nodes or faces')
+ if isinstance(data, np.ma.MaskedArray):
+ data = data.mask
+ kwargs['data'] = data
+
+ def at(self, points, time, units=None, extrapolate=False, _hash=None, _mem=True, **kwargs):
+
+ if _hash is None:
+ _hash = self._get_hash(points, time)
+ if _mem:
+ res = self._get_memoed(points, time, self._result_memo, _hash=_hash)
+ if res is not None:
+ return res
+ idxs = self.grid.locate_faces(points)
+ time_idx = self.time.index_of(time)
+ order = self.dimension_ordering
+ if order[0] == 'time':
+ value = self._time_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
+ elif order[0] == 'depth':
+ value = self._depth_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
+ else:
+ value = self._xy_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
+
+ if _mem:
+ self._memoize_result(points, time, value, self._result_memo, _hash=_hash)
+ return value
+
+
+
+class IceVelocity(VelocityGrid, Environment):
+ _ref_as = ['ice_velocity', 'ice_aware']
default_names = [['ice_u', 'ice_v', ], ]
- def __init__(self,
- name=None,
- units=None,
- time=None,
- variables=None,
- grid=None,
- grid_file=None,
- data_file=None,
- dataset=None,
- **kwargs):
- VelocityGrid.__init__(self,
- name=name,
- units=units,
- time=time,
- variables=variables,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file,
- dataset=dataset,
- **kwargs)
-
-
-class IceAwareProp(serializable.Serializable, Environment):
- _state = copy.deepcopy(serializable.Serializable._state)
- _schema = VelocityGridSchema
- _state.add_field([serializable.Field('units', save=True, update=True),
- serializable.Field('time', save=True, update=True),
- serializable.Field('data_file', save=True, update=True),
- serializable.Field('grid_file', save=True, update=True)])
- def __init__(self,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- ice_conc_var=None,
- grid=None,
- grid_file=None,
- data_file=None,
- **kwargs):
- self.name = name
- self.units = units
- self.time = time
- self.ice_var = ice_var
- self.ice_conc_var = ice_conc_var
- self.grid = grid
- self.grid_file = grid_file
- self.data_file = data_file
+class IceAwarePropSchema(GridVectorPropSchema):
+ ice_concentration = GridPropSchema(missing=drop)
- @classmethod
- def from_netCDF(cls,
- filename=None,
- grid_topology=None,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- ice_conc_var=None,
- grid=None,
- dataset=None,
- grid_file=None,
- data_file=None,
- **kwargs):
- if filename is not None:
- data_file = filename
- grid_file = filename
-
- ds = None
- dg = None
- if dataset is None:
- if grid_file == data_file:
- ds = dg = _get_dataset(grid_file)
- else:
- ds = _get_dataset(data_file)
- dg = _get_dataset(grid_file)
- else:
- ds = dg = dataset
-
- if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
- if ice_var is None:
- ice_var = IceVelocity.from_netCDF(filename,
- grid=grid,
- dataset=ds,
- **kwargs)
- if time is None:
- time = ice_var.time
-
- if ice_conc_var is None:
- ice_conc_var = IceConcentration.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds,
- **kwargs)
- if name is None:
- name = 'IceAwareProp'
- if units is None:
- units = ice_var.units
- return cls(name='foo',
- units=units,
- time=time,
- ice_var=ice_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file,
- **kwargs)
+class IceAwareCurrentSchema(IceAwarePropSchema):
+ ice_velocity = GridVectorPropSchema(missing=drop)
+
+
+class IceAwareCurrent(GridCurrent):
+
+ _ref_as = ['current', 'ice_aware']
+ _req_refs = {'ice_concentration': IceConcentration, 'ice_velocity': IceVelocity}
-class IceAwareCurrent(IceAwareProp):
+ _schema = IceAwareCurrentSchema
+ _state = copy.deepcopy(GridCurrent._state)
+
+ _state.add_field([serializable.Field('ice_velocity', save=True, update=True, save_reference=True),
+ serializable.Field('ice_concentration', save=True, update=True, save_reference=True)])
def __init__(self,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- water_var=None,
- ice_conc_var=None,
- grid=None,
- grid_file=None,
- data_file=None,
+ ice_velocity=None,
+ ice_concentration=None,
+ *args,
**kwargs):
- IceAwareProp.__init__(self,
- name=name,
- units=units,
- time=time,
- ice_var=ice_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file)
- self.water_var = water_var
- if self.name == 'IceAwareProp':
- self.name = 'IceAwareCurrent'
+ self.ice_velocity = ice_velocity
+ self.ice_concentration = ice_concentration
+ super(IceAwareCurrent, self).__init__(*args, **kwargs)
@classmethod
+ @GridCurrent._get_shared_vars()
def from_netCDF(cls,
- filename=None,
- grid_topology=None,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- water_var=None,
- ice_conc_var=None,
- grid=None,
- dataset=None,
- grid_file=None,
- data_file=None,
+ ice_concentration=None,
+ ice_velocity=None,
**kwargs):
-
- if filename is not None:
- data_file = filename
- grid_file = filename
-
- ds = None
- dg = None
- if dataset is None:
- if grid_file == data_file:
- ds = dg = _get_dataset(grid_file)
- else:
- ds = _get_dataset(data_file)
- dg = _get_dataset(grid_file)
- else:
- ds = dg = dataset
-
- if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
- if water_var is None:
- water_var = GridCurrent.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds,
- **kwargs)
-
- return super(IceAwareCurrent, cls).from_netCDF(grid_topology=grid_topology,
- name=name,
- units=units,
- time=time,
- ice_var=ice_var,
- water_var=water_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- dataset=ds,
- grid_file=grid_file,
- data_file=data_file,
+ if ice_concentration is None:
+ ice_concentration = IceConcentration.from_netCDF(**kwargs)
+ if ice_velocity is None:
+ ice_velocity = IceVelocity.from_netCDF(**kwargs)
+ return super(IceAwareCurrent, cls).from_netCDF(ice_concentration=ice_concentration,
+ ice_velocity=ice_velocity,
**kwargs)
- def at(self, points, time, units=None, extrapolate=False):
- interp = self.ice_conc_var.at(points, time, extrapolate=extrapolate).copy()
+ def at(self, points, time, units=None, extrapolate=False, **kwargs):
+ interp = self.ice_concentration.at(points, time, extrapolate=extrapolate, **kwargs).copy()
interp_mask = np.logical_and(interp >= 0.2, interp < 0.8)
+ interp_mask = interp_mask.reshape(-1)
if len(interp > 0.2):
ice_mask = interp >= 0.8
- water_v = self.water_var.at(points, time, units, extrapolate)
- ice_v = self.ice_var.at(points, time, units, extrapolate).copy()
- interp = (interp * 10) / 6 - 0.2
+ water_v = super(IceAwareCurrent, self).at(points, time, units, extrapolate, **kwargs)
+ ice_v = self.ice_velocity.at(points, time, units, extrapolate, **kwargs).copy()
+ interp = (interp - 0.2) * 10 / 6.
vels = water_v.copy()
vels[ice_mask] = ice_v[ice_mask]
diff_v = ice_v
diff_v -= water_v
- vels[interp_mask] += diff_v[interp_mask] * interp[interp_mask][:, np.newaxis]
+ vels[interp_mask] += (diff_v[interp_mask] * interp[interp_mask][:, np.newaxis])
return vels
else:
- return self.water_var.at(points, time, units, extrapolate)
+ return super(IceAwareCurrent, self).at(points, time, units, extrapolate, **kwargs)
-class IceAwareWind(IceAwareProp):
+class IceAwareWind(GridWind):
+
+ _ref_as = ['wind', 'ice_aware']
+ _req_refs = {'ice_concentration': IceConcentration}
+
+ _schema = IceAwarePropSchema
+ _state = copy.deepcopy(GridWind._state)
+
+ _state.add_field([serializable.Field('ice_concentration', save=True, update=True, save_reference=True)])
def __init__(self,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- wind_var=None,
- ice_conc_var=None,
- grid=None,
- grid_file=None,
- data_file=None,
+ ice_concentration=None,
+ *args,
**kwargs):
- IceAwareProp.__init__(self,
- name=name,
- units=units,
- time=time,
- ice_var=ice_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file)
- self.wind_var = wind_var
- if self.name == 'IceAwareProp':
- self.name = 'IceAwareWind'
+ self.ice_concentration = ice_concentration
+ super(IceAwareWind, self).__init__(*args, **kwargs)
@classmethod
+ @GridCurrent._get_shared_vars()
def from_netCDF(cls,
- filename=None,
- grid_topology=None,
- name=None,
- units=None,
- time=None,
- ice_var=None,
- wind_var=None,
- ice_conc_var=None,
- grid=None,
- dataset=None,
- grid_file=None,
- data_file=None,
+ ice_concentration=None,
+ ice_velocity=None,
**kwargs):
-
- if filename is not None:
- data_file = filename
- grid_file = filename
-
- ds = None
- dg = None
- if dataset is None:
- if grid_file == data_file:
- ds = dg = _get_dataset(grid_file)
- else:
- ds = _get_dataset(data_file)
- dg = _get_dataset(grid_file)
- else:
- ds = dg = dataset
-
- if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
- if wind_var is None:
- wind_var = GridWind.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds,
- **kwargs)
-
- return super(IceAwareWind, cls).from_netCDF(grid_topology=grid_topology,
- name=name,
- units=units,
- time=time,
- ice_var=ice_var,
- wind_var=wind_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- dataset=ds,
- grid_file=grid_file,
- data_file=data_file,
+ if ice_concentration is None:
+ ice_concentration = IceConcentration.from_netCDF(**kwargs)
+ if ice_velocity is None:
+ ice_velocity = IceVelocity.from_netCDF(**kwargs)
+ return super(IceAwareWind, cls).from_netCDF(ice_concentration=ice_concentration,
+ ice_velocity=ice_velocity,
**kwargs)
- def at(self, points, time, units=None, extrapolate=False):
- interp = self.ice_conc_var.at(points, time, extrapolate=extrapolate)
+ def at(self, points, time, units=None, extrapolate=False, **kwargs):
+ interp = self.ice_concentration.at(points, time, extrapolate=extrapolate, **kwargs)
interp_mask = np.logical_and(interp >= 0.2, interp < 0.8)
+ interp_mask = interp_mask
if len(interp >= 0.2) != 0:
ice_mask = interp >= 0.8
- wind_v = self.wind_var.at(points, time, units, extrapolate)
- interp = (interp * 10) / 6 - 0.2
+ wind_v = super(IceAwareWind, self).at(points, time, units, extrapolate, **kwargs)
+ interp = (interp - 0.2) * 10 / 6.
vels = wind_v.copy()
vels[ice_mask] = 0
- vels[interp_mask] = vels[interp_mask] * (1 - interp[interp_mask][:, np.newaxis]) # scale winds from 100-0% depending on ice coverage
+ vels[interp_mask] = vels[interp_mask] * (1 - interp[interp_mask])[:, np.newaxis] # scale winds from 100-0% depending on ice coverage
return vels
else:
- return self.wind_var.at(points, time, units, extrapolate)
-
-
-_valid_temp_units = _valid_units('Temperature')
-_valid_dist_units = _valid_units('Length')
-_valid_kvis_units = _valid_units('Kinematic Viscosity')
-_valid_density_units = _valid_units('Density')
-_valid_salinity_units = ('psu',)
-_valid_sediment_units = _valid_units('Concentration In Water')
-
-
-class WaterConditions(Environment, serializable.Serializable):
-
- _ref_as = 'water'
- _state = copy.deepcopy(Environment._state)
- _units_type = {'temperature': ('temperature', _valid_temp_units),
- 'salinity': ('salinity', _valid_salinity_units),
- 'sediment': ('concentration in water',
- _valid_sediment_units),
- 'wave_height': ('length', _valid_dist_units),
- 'fetch': ('length', _valid_dist_units),
- 'kinematic_viscosity': ('kinematic viscosity',
- _valid_kvis_units),
- 'density': ('density', _valid_density_units),
- }
-
- # keep track of valid SI units for properties - these are used for
- # conversion since internal code uses SI units. Don't expect to change
- # these so make it a class level attribute
- _si_units = {'temperature': 'K',
- 'salinity': 'psu',
- 'sediment': 'kg/m^3'}
-
- def __init__(self,
- temperature=300.,
- salinity=35.0,
- sediment=.005,
- fetch=0,
- name='WaterConditions',
- **kwargs):
- '''
- Assume units are SI for all properties. 'units' attribute assumes SI
- by default. This can be changed, but initialization takes SI.
- '''
- if isinstance(temperature, (Number)):
- self.temperature = TemperatureTS.constant(data=temperature)
- elif isinstance(temperature, (EnvProp)):
- self.temperature = temperature
- else:
- raise TypeError('Temperature is not an environment object or number')
- if isinstance(salinity, (Number)):
- self.salinity = TimeSeriesProp.constant(name='Salinity', units='psu', data=salinity)
- elif isinstance(salinity, (EnvProp)):
- self.salinity = salinity
- else:
- raise TypeError('Salinity is not an environment object or number')
- if isinstance(sediment, (Number)):
- self.sediment = TimeSeriesProp.constant(name='Sediment', units='kg/m^3', data=sediment)
- elif isinstance(sediment, (EnvProp)):
- self.sediment = sediment
- else:
- raise TypeError('Sediment is not an environment object or number')
-# self.wave_height = wave_height
- self.fetch = fetch
- self.kinematic_viscosity = 0.000001
- self.name = 'WaterConditions'
-# self._units = dict(self._si_units)
-# self.units = units
-
- @classmethod
- def from_netCDF(cls,
- filename=None,
- grid_topology=None,
- name=None,
- temperature=None,
- salinity=None,
- sediment=None,
- grid=None,
- dataset=None,
- grid_file=None,
- data_file=None):
- if filename is not None:
- data_file = filename
- grid_file = filename
-
- ds = None
- dg = None
- if dataset is None:
- if grid_file == data_file:
- ds = dg = _get_dataset(grid_file)
- else:
- ds = _get_dataset(data_file)
- dg = _get_dataset(grid_file)
- else:
- ds = dg = dataset
-
- if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
-
- if time is None:
- time = ice_var.time
-
- if temperature is None:
- try:
- temperature = GridTemperature.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds)
- except:
- temperature = 300.
- if salinity is None:
- try:
- salinity = GridSalinity.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds)
- except:
- salinity = 35.
- if sediment is None:
- try:
- sediment = GridSediment.from_netCDF(filename,
- time=time,
- grid=grid,
- dataset=ds)
- except:
- sediment = .005
- if name is None:
- name = 'WaterConditions'
- if units is None:
- units = water_var.units
- return cls(name=name,
- units=units,
- time=time,
- ice_var=ice_var,
- water_var=water_var,
- ice_conc_var=ice_conc_var,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file)
-
- def get(self, attr, unit=None, points=None, time=None, extrapolate=True): # Arguments should be reorganized eventually
- var = getattr(self, attr)
- if isinstance(var, TimeSeriesProp, TSVectorProp):
- if var.is_constant() or (time is not None):
- return var.at(points, time, units=unit)
- else:
- raise ValueError("Time must be specified to get value from non-constant time series property")
- elif isinstance(var, GriddedProp, GridVectorProp):
- if points is None:
- raise ValueError("Points must be defined to get value from gridded property")
- if time is None:
- raise ValueError("Time must be defined to get value from gridded property")
- return var.at(points, time, units=unit)
- else:
- raise ValueError("var is not a property object")
-
-
-def Wind(*args, **kwargs):
- '''
- Wind environment object factory function
- '''
- units = kwargs['units'] if 'units' in kwargs else 'm/s'
- name = kwargs['name'] if 'name' in kwargs else 'Wind'
-
- # Constant wind - Wind(speed=s, direction=d)
- if ('speed' in kwargs and 'direction' in kwargs) or len(args) == 2:
- speed = direction = 0
- if len(args) == 2:
- speed = args[0]
- direction = args[1]
- else:
- speed = kwargs['speed']
- direction = kwargs['direction']
- name = 'Constant Wind' if name is 'Wind' else name
- if isinstance(speed, Number):
- return WindTS.constant(name, units, speed, direction)
- else:
- raise TypeError('speed must be a single value. For a timeseries, use timeseries=[(t0, (mag,dir)),(t1, (mag,dir))]')
-
- # Time-varying wind - Wind(timeseries=[(t0, (mag,dir)),(t1, (mag,dir)),...])
- if ('timeseries' in kwargs):
- name = 'Wind Time Series' if name is 'Wind' else name
- return WindTS(name=name, units=units, timeseries=kwargs['timeseries'])
-
- # Gridded Wind - Wind(filename=fn, dataset=ds)
- if ('filename' in kwargs or 'dataset' in kwargs):
- if 'ice_aware' in kwargs:
- # Ice Aware Gridded Wind - Wind(filename=fn, dataset=ds, ice_aware=True)
- name = 'IceAwareWind' if name is 'Wind' else name
- return IceAwareWind.from_netCDF(**kwargs)
- name = 'GridWind' if name is 'Wind' else name
- return GridWind.from_netCDF(**kwargs)
-
- # Arguments do not trigger a factory route. Attempt construction using default class __init__s
- w = None
- warnings.warn('Attempting default Wind constructions')
- return _attempt_construction([WindTS, GridWind], **kwargs)
-
-
-def Current(*args, **kwargs):
- '''
- Wind environment object factory function
- '''
- units = kwargs['units'] if 'units' in kwargs else 'm/s'
- name = kwargs['name'] if 'name' in kwargs else 'Current'
-
- # Constant wind - Wind(speed=s, direction=d)
- if ('speed' in kwargs and 'direction' in kwargs) or len(args) == 2:
- speed = direction = 0
- if len(args) == 2:
- speed = args[0]
- direction = args[1]
- else:
- speed = kwargs['speed']
- direction = kwargs['direction']
- name = 'Constant Current' if name is 'Wind' else name
- if isinstance(speed, Number):
- return CurrentTS.constant_current(name, units, speed, direction)
- else:
- raise TypeError('speed must be a single value. For a timeseries, use timeseries=[(t0, (mag,dir)),(t1, (mag,dir))]')
-
- # Time-varying wind - Wind(timeseries=[(t0, (mag,dir)),(t1, (mag,dir)),...])
- if ('timeseries' in kwargs):
- name = 'Current Time Series' if name is 'Current' else name
- return CurrentTS(name=name, units=units, timeseries=kwargs['timeseries'])
-
- # Gridded Wind - Wind(filename=fn, dataset=ds)
- if ('filename' in kwargs or 'dataset' in kwargs):
- if 'ice_aware' in kwargs:
- # Ice Aware Gridded Current - Current(filename=fn, dataset=ds, ice_aware=True)
- name = 'IceAwareCurrent' if name is 'Current' else name
- return IceAwareCurrent.from_netCDF(**kwargs)
- name = 'GridCurrent' if name is 'Current' else name
- return GridCurrent.from_netCDF(**kwargs)
-
- # Arguments do not trigger a factory route. Attempt construction using default class __init__s
- w = None
- warnings.warn('Attempting default Wind constructions')
- return _attempt_construction([CurrentTS, GridCurrent], **kwargs)
-
-
-def Temperature(*args, **kwargs):
- units = kwargs['units'] if 'units' in kwargs else 'K'
- name = kwargs['name'] if 'name' in kwargs else 'WaterTemp'
- kwargs['units'] = units
- kwargs['name'] = name
- # Constant Temperature - WaterTemp(temp=t)
- if ('temp' in kwargs or 'temperature' in kwargs) or len(args) == 1:
- temp = 0
- if len(args) == 1:
- temp = args[0]
- else:
- temp = kwargs['temp'] if 'temp' in kwargs else kwargs['temperature']
- name = 'Constant Temperature' if name is 'Temperature' else name
- if isinstance(speed, Number):
- return TemperatureTS.constant_temp(name, units, temp)
- else:
- raise TypeError('temperature must be a single value. For a timeseries, use timeseries=[(t1, temp1), (t2, temp2),...]')
-
- # Time-varying temp - Temperature(timeseries=[(t1, temp1), (t2, temp2),...])
- if ('timeseries' in kwargs):
- name = 'Temperature Time Series' if name is 'Temperature' else name
- return TemperatureTS(name=name, units=units, timeseries=kwargs['timeseries'])
-
- # Gridded Temp - Temperature(filename=fn, dataset=ds)
- if ('filename' in kwargs or 'dataset' in kwargs):
- if 'ice_aware' in kwargs:
- # Ice Aware Gridded Wind - Wind(filename=fn, dataset=ds, ice_aware=True)
- name = 'IceAwareWaterTemp' if name is 'Temperature' else name
- return IceAwareWaterTemperature.from_netCDF(**kwargs)
- name = 'GridTemperature' if name is 'Temperature' else name
- return GridTemperature.from_netCDF(**kwargs)
-
- # Arguments do not trigger a factory route. Attempt construction using default class __init__s
- w = None
- warnings.warn('Attempting default Temperature constructions')
- return _attempt_construction([TemperatureTS, GridTemperature], **kwargs)
-
-
-def _attempt_construction(types, **kwargs):
- for t in types:
- try:
- prop = t(**kwargs)
- return prop
- except Error as e:
- print('t.__name__ construction failed: {0}'.format(e))
- raise RuntimeError('Unable to build any type of environment object using the arguments provided. Please see the documentation for the usage of')
-
+ return super(IceAwareWind, self).at(points, time, units, extrapolate, **kwargs)
+
+def load_all_from_netCDF(filename=None,
+ grid_topology=None,
+ name=None,
+ time=None,
+ grid=None,
+ depth=None,
+ dataset=None,
+ data_file=None,
+ grid_file=None,
+ **kwargs):
+ pass
diff --git a/py_gnome/gnome/environment/grid.py b/py_gnome/gnome/environment/grid.py
index a3edaf99d..752130bd1 100644
--- a/py_gnome/gnome/environment/grid.py
+++ b/py_gnome/gnome/environment/grid.py
@@ -2,21 +2,317 @@
grid for wind or current data
"""
-import datetime
import copy
import numpy as np
-from colander import (SchemaNode, drop, Float)
+from colander import (SchemaNode, drop, Float, String, SequenceSchema, Sequence)
from gnome.cy_gnome.cy_grid_curv import CyTimeGridWindCurv
from gnome.cy_gnome.cy_grid_rect import CyTimeGridWindRect
from gnome.utilities.time_utils import date_to_sec
from gnome.utilities.serializable import Serializable, Field
-from gnome.persist import validators, base_schema
+from gnome.persist import base_schema
from .environment import Environment
+import pyugrid
+import pysgrid
+import zipfile
+from gnome.utilities.file_tools.data_helpers import _get_dataset, _gen_topology
+
+
+class PyGridSchema(base_schema.ObjType):
+# filename = SequenceSchema(SchemaNode(String()), accept_scalar=True)
+ filename = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())])
+
+
+class PyGrid(Serializable):
+
+ _def_count = 0
+
+ _state = copy.deepcopy(Serializable._state)
+ _schema = PyGridSchema
+ _state.add_field([Field('filename', save=True, update=True, isdatafile=True)])
+
+ def __new__(cls, *args, **kwargs):
+ '''
+ If you construct a PyGrid object directly, you will always
+ get one of the child types based on your input
+ '''
+ if cls is not PyGrid_U and cls is not PyGrid_S:
+ if 'faces' in kwargs:
+ cls = PyGrid_U
+ else:
+ cls = PyGrid_S
+# cls.obj_type = c.obj_type
+ return super(type(cls), cls).__new__(cls, *args, **kwargs)
+
+ def __init__(self,
+ filename=None,
+ *args,
+ **kwargs):
+ '''
+ Init common to all PyGrid types. This constructor will take all the kwargs of both
+ pyugrid.UGrid and pysgrid.SGrid. See their documentation for details
+
+ :param filename: Name of the file this grid was constructed from, if available.
+ '''
+ super(PyGrid, self).__init__(**kwargs)
+ if 'name' in kwargs:
+ self.name = kwargs['name']
+ else:
+ self.name = self.name + '_' + str(type(self)._def_count)
+ self.obj_type = str(type(self).__bases__[0])
+ self.filename = filename
+ type(self)._def_count += 1
+
+ @classmethod
+ def load_grid(cls, filename, topology_var):
+ '''
+ Redirect to grid-specific loading routine.
+ '''
+ if hasattr(topology_var, 'face_node_connectivity') or isinstance(topology_var, dict) and 'faces' in topology_var.keys():
+ cls = PyGrid_U
+ return cls.from_ncfile(filename)
+ else:
+ cls = PyGrid_S
+ return cls.load_grid(filename)
+ pass
+
+ @classmethod
+ def from_netCDF(cls, filename=None, dataset=None, grid_type=None, grid_topology=None, *args, **kwargs):
+ '''
+ :param filename: File containing a grid
+ :param dataset: Takes precedence over filename, if provided.
+ :param grid_type: Must be provided if Dataset does not have a 'grid_type' attribute, or valid topology variable
+ :param grid_topology: A dictionary mapping of grid attribute to variable name. Takes precendence over discovered attributes
+ :param **kwargs: All kwargs to SGrid or UGrid are valid, and take precedence over all.
+ :returns: Instance of PyGrid_U, PyGrid_S, or PyGrid_R
+ '''
+ gf = dataset if filename is None else _get_dataset(filename, dataset)
+ if gf is None:
+ raise ValueError('No filename or dataset provided')
+
+ cls = PyGrid._get_grid_type(gf, grid_topology, grid_type)
+ init_args, gf_vars = cls._find_required_grid_attrs(filename,
+ dataset=dataset,
+ grid_topology=grid_topology)
+ return cls(**init_args)
+
+ @classmethod
+ def _find_required_grid_attrs(cls, filename, dataset=None, grid_topology=None,):
+ '''
+ This function is the top level 'search for attributes' function. If there are any
+ common attributes to all potential grid types, they will be sought here.
+
+ This function returns a dict, which maps an attribute name to a netCDF4
+ Variable or numpy array object extracted from the dataset. When called from
+ PyGrid_U or PyGrid_S, this function should provide all the kwargs needed to
+ create a valid instance.
+ '''
+ gf_vars = dataset.variables if dataset is not None else _get_dataset(filename).variables
+ init_args = {}
+ init_args['filename'] = filename
+ node_attrs = ['node_lon', 'node_lat']
+ node_coord_names = [['node_lon', 'node_lat'], ['lon', 'lat'], ['lon_psi', 'lat_psi']]
+ composite_node_names = ['nodes', 'node']
+ if grid_topology is None:
+ for n1, n2 in node_coord_names:
+ if n1 in gf_vars and n2 in gf_vars:
+ init_args[node_attrs[0]] = gf_vars[n1][:]
+ init_args[node_attrs[1]] = gf_vars[n2][:]
+ break
+ if node_attrs[0] not in init_args:
+ for n in composite_node_names:
+ if n in gf_vars:
+ v = gf_vars[n][:].reshape(-1, 2)
+ init_args[node_attrs[0]] = v[:, 0]
+ init_args[node_attrs[1]] = v[:, 1]
+ break
+ if node_attrs[0] not in init_args:
+ raise ValueError('Unable to find node coordinates.')
+ else:
+ for n, v in grid_topology.items():
+ if n in node_attrs:
+ init_args[n] = gf_vars[v][:]
+ if n in composite_node_names:
+ v = gf_vars[n][:].reshape(-1, 2)
+ init_args[node_attrs[0]] = v[:, 0]
+ init_args[node_attrs[1]] = v[:, 1]
+ return init_args, gf_vars
+
+ @classmethod
+ def new_from_dict(cls, dict_):
+ dict_.pop('json_')
+ filename = dict_['filename']
+ rv = cls.from_netCDF(filename)
+ rv.__class__._restore_attr_from_save(rv, dict_)
+ rv._id = dict_.pop('id') if 'id' in dict_ else rv.id
+ rv.__class__._def_count -= 1
+ return rv
+
+ @staticmethod
+ def _get_grid_type(dataset, grid_topology=None, grid_type=None):
+ sgrid_names = ['sgrid', 'pygrid_s', 'staggered', 'curvilinear', 'roms']
+ ugrid_names = ['ugrid', 'pygrid_u', 'triangular', 'unstructured']
+ if grid_type is not None:
+ if grid_type.lower() in sgrid_names:
+ return PyGrid_S
+ elif grid_type.lower() in ugrid_names:
+ return PyGrid_U
+ else:
+ raise ValueError('Specified grid_type not recognized/supported')
+ if grid_topology is not None:
+ if 'faces' in grid_topology.keys() or grid_topology.get('grid_type', 'notype').lower() in ugrid_names:
+ return PyGrid_U
+ else:
+ return PyGrid_S
+ else:
+ # no topology, so search dataset for grid_type variable
+ if hasattr(dataset, 'grid_type') and dataset.grid_type in sgrid_names + ugrid_names:
+ if dataset.grid_type.lower() in ugrid_names:
+ return PyGrid_U
+ else:
+ return PyGrid_S
+ else:
+ # no grid type explicitly specified. is a topology variable present?
+ topology = PyGrid._find_topology_var(None, dataset=dataset)
+ if topology is not None:
+ if hasattr(topology, 'node_coordinates') and not hasattr(topology, 'node_dimensions'):
+ return PyGrid_U
+ else:
+ return PyGrid_S
+ else:
+ # no topology variable either, so generate and try again.
+ # if no defaults are found, _gen_topology will raise an error
+ try:
+ u_init_args, u_gf_vars = PyGrid_U._find_required_grid_attrs(None, dataset)
+ return PyGrid_U
+ except ValueError:
+ s_init_args, s_gf_vars = PyGrid_S._find_required_grid_attrs(None, dataset)
+ return PyGrid_S
+
+ @staticmethod
+ def _find_topology_var(filename,
+ dataset=None):
+ gf = _get_dataset(filename, dataset)
+ gts = []
+ for v in gf.variables:
+ if hasattr(v, 'cf_role') and 'topology' in v.cf_role:
+ gts.append(v)
+# gts = gf.get_variables_by_attributes(cf_role=lambda t: t is not None and 'topology' in t)
+ if len(gts) != 0:
+ return gts[0]
+ else:
+ return None
+
+ @property
+ def shape(self):
+ return self.node_lon.shape
+
+ def __eq__(self, o):
+ if self is o:
+ return True
+ for n in ('nodes', 'faces'):
+ if hasattr(self, n) and hasattr(o, n) and getattr(self, n) is not None and getattr(o, n) is not None:
+ s = getattr(self, n)
+ s2 = getattr(o, n)
+ if s.shape != s2.shape or np.any(s != s2):
+ return False
+ return True
+
+ def serialize(self, json_='webapi'):
+ pass
+ return Serializable.serialize(self, json_=json_)
+
+ def _write_grid_to_file(self, pth):
+ self.save_as_netcdf(pth)
+
+ def save(self, saveloc, references=None, name=None):
+ '''
+ INCOMPLETE
+ Write Wind timeseries to file or to zip,
+ then call save method using super
+ '''
+# name = self.name
+# saveloc = os.path.splitext(name)[0] + '_grid.GRD'
+
+ if zipfile.is_zipfile(saveloc):
+ if self.filename is None:
+ self._write_grid_to_file(saveloc)
+ self._write_grid_to_zip(saveloc, saveloc)
+ self.filename = saveloc
+# else:
+# self._write_grid_to_zip(saveloc, self.filename)
+ else:
+ if self.filename is None:
+ self._write_grid_to_file(saveloc)
+ self.filename = saveloc
+ return super(PyGrid, self).save(saveloc, references, name)
+
+
+class PyGrid_U(PyGrid, pyugrid.UGrid):
+
+ @classmethod
+ def _find_required_grid_attrs(cls, filename, dataset=None, grid_topology=None):
+
+ # Get superset attributes
+ init_args, gf_vars = super(PyGrid_U, cls)._find_required_grid_attrs(filename=filename,
+ dataset=dataset,
+ grid_topology=grid_topology)
+
+ face_attrs = ['faces']
+ if grid_topology is not None:
+ face_var_names = [grid_topology.get(n) for n in face_attrs]
+ else:
+ face_var_names = ['faces', 'tris', 'nv', 'ele']
+
+ for n in face_var_names:
+ if n in gf_vars:
+ init_args[face_attrs[0]] = gf_vars[n][:]
+ break
+ if face_attrs[0] in init_args:
+ if init_args[face_attrs[0]].shape[0] == 3:
+ init_args[face_attrs[0]] = np.ascontiguousarray(np.array(init_args[face_attrs[0]]).T - 1)
+ return init_args, gf_vars
+ else:
+ raise ValueError('Unable to find faces variable')
+
+
+class PyGrid_S(PyGrid, pysgrid.SGrid):
+
+ @classmethod
+ def _find_required_grid_attrs(cls, filename, dataset=None, grid_topology=None):
+
+ # THESE ARE ACTUALLY ALL OPTIONAL. This should be migrated when optional attributes are dealt with
+ # Get superset attributes
+ init_args, gf_vars = super(PyGrid_S, cls)._find_required_grid_attrs(filename,
+ dataset=dataset,
+ grid_topology=grid_topology)
+
+ center_attrs = ['center_lon', 'center_lat']
+ edge1_attrs = ['edge1_lon', 'edge1_lat']
+ edge2_attrs = ['edge2_lon', 'edge2_lat']
+
+ center_coord_names = [['center_lon', 'center_lat'], ['lon_rho', 'lat_rho']]
+ edge1_coord_names = [['edge1_lon', 'edge1_lat'], ['lon_u', 'lat_u']]
+ edge2_coord_names = [['edge2_lon', 'edge2_lat'], ['lon_v', 'lat_v']]
+
+ if grid_topology is None:
+ for attr, names in (zip((center_attrs, edge1_attrs, edge2_attrs),
+ (center_coord_names, edge1_coord_names, edge2_coord_names))):
+ for n1, n2 in names:
+ if n1 in gf_vars and n2 in gf_vars:
+ init_args[attr[0]] = gf_vars[n1][:]
+ init_args[attr[1]] = gf_vars[n2][:]
+ break
+ else:
+ for n, v in grid_topology.items():
+ if n in center_attrs + edge1_attrs + edge2_attrs and v in gf_vars:
+ init_args[n] = gf_vars[v][:]
+ return init_args, gf_vars
+
class GridSchema(base_schema.ObjType):
name = 'grid'
@@ -38,7 +334,6 @@ class Grid(Environment, Serializable):
_state.add(save=_create, update=_update)
_schema = GridSchema
-
def __init__(self, filename, topology_file=None, grid_type=1,
extrapolate=False, time_offset=0,
**kwargs):
@@ -69,6 +364,7 @@ def __init__(self, filename, topology_file=None, grid_type=1,
super(Grid, self).__init__(**kwargs)
def __repr__(self):
+ self_ts = None
return ('{0.__class__.__module__}.{0.__class__.__name__}('
'timeseries={1}'
')').format(self, self_ts)
@@ -89,7 +385,6 @@ def grid_type(self, value):
# may want a check on value
self._grid_type = value
-
extrapolate = property(lambda self: self.grid.extrapolate,
lambda self, val: setattr(self.grid,
'extrapolate',
@@ -107,7 +402,6 @@ def prepare_for_model_run(self, model_time):
pass
-
def prepare_for_model_step(self, model_time):
"""
Make sure we have the right data loaded
@@ -117,10 +411,9 @@ def prepare_for_model_step(self, model_time):
def get_value(self, time, location):
'''
- Return the value at specified time and location.
-
+ Return the value at specified time and location.
'''
- data = self.grid.get_value(time,location)
+ data = self.grid.get_value(time, location)
return data
@@ -150,3 +443,5 @@ def deserialize(cls, json_):
_to_dict = schema.deserialize(json_)
return _to_dict
+
+
diff --git a/py_gnome/gnome/environment/grid_property.py b/py_gnome/gnome/environment/grid_property.py
index 6bd1c7cda..ead4e8718 100644
--- a/py_gnome/gnome/environment/grid_property.py
+++ b/py_gnome/gnome/environment/grid_property.py
@@ -1,27 +1,36 @@
import netCDF4 as nc4
import numpy as np
-from datetime import datetime, timedelta
from collections import OrderedDict
-from colander import SchemaNode, Float, Boolean, Sequence, MappingSchema, drop, String, OneOf, SequenceSchema, TupleSchema, DateTime
-from gnome.utilities.file_tools.data_helpers import _init_grid, _gen_topology, _get_dataset
+from colander import SchemaNode, SchemaType, Float, Boolean, Sequence, MappingSchema, drop, String, OneOf, SequenceSchema, TupleSchema, DateTime, List
+from gnome.utilities.file_tools.data_helpers import _get_dataset
from gnome.environment.property import *
+from gnome.environment.grid import PyGrid, PyGrid_U, PyGrid_S, PyGridSchema
-import pyugrid
-import pysgrid
-import unit_conversion
-import collections
import hashlib
-
+from gnome.utilities.orderedcollection import OrderedCollection
+from gnome.environment.ts_property import TimeSeriesProp
+from functools import wraps
+import pytest
class GridPropSchema(PropertySchema):
- varname = SchemaNode(String(), missing=drop)
- data_file = SchemaNode(String(), missing=drop)
- grid_file = SchemaNode(String(), missing=drop)
+ varname = SchemaNode(String())
+ grid = PyGridSchema(missing=drop)
+ data_file = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())])
+ grid_file = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())])
class GriddedProp(EnvProp):
+ _state = copy.deepcopy(EnvProp._state)
+
+ _schema = GridPropSchema
+
+ _state.add_field([serializable.Field('grid', save=True, update=True, save_reference=True),
+ serializable.Field('varname', save=True, update=True),
+ serializable.Field('data_file', save=True, update=True, isdatafile=True),
+ serializable.Field('grid_file', save=True, update=True, isdatafile=True)])
+
default_names = []
_def_count = 0
@@ -59,14 +68,12 @@ def __init__(self,
:type varname: string
'''
- self._grid = self._data_file = self._grid_file = None
-
if any([grid is None, data is None]):
raise ValueError("Grid and Data must be defined")
if not hasattr(data, 'shape'):
if grid.infer_location is None:
raise ValueError('Data must be able to fit to the grid')
- self._grid = grid
+ self.grid = grid
self.depth = depth
super(GriddedProp, self).__init__(name=name, units=units, time=time, data=data)
self.data_file = data_file
@@ -75,6 +82,9 @@ def __init__(self,
self._result_memo = OrderedDict()
self.fill_value = fill_value
+# def __repr__(self):
+# return str(self.serialize())
+
@classmethod
def from_netCDF(cls,
filename=None,
@@ -115,7 +125,7 @@ def from_netCDF(cls,
:type time: [] of datetime.datetime, netCDF4 Variable, or Time object
:type data: netCDF4.Variable or numpy.array
:type grid: pysgrid or pyugrid
- :type S_Depth or L_Depth
+ :type depth: Depth, S_Depth or L_Depth
:type dataset: netCDF4.Dataset
:type data_file: string
:type grid_file: string
@@ -140,9 +150,9 @@ def from_netCDF(cls,
ds = dataset
if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
+ grid = PyGrid.from_netCDF(grid_file,
+ dataset=dg,
+ grid_topology=grid_topology)
if varname is None:
varname = cls._gen_varname(data_file,
dataset=ds)
@@ -157,19 +167,15 @@ def from_netCDF(cls,
units = data.units
except AttributeError:
units = None
- timevar = None
if time is None:
- try:
- timevar = data.time if data.time == data.dimensions[0] else data.dimensions[0]
- except AttributeError:
- if len(data.dimensions) > 2:
- timevar = data.dimensions[0]
- time = Time(ds[timevar])
- else:
- time = None
+ time = Time.from_netCDF(filename=data_file,
+ dataset=ds,
+ datavar=data)
if depth is None:
- from gnome.environment.environment_objects import Depth
- depth = Depth(surface_index=-1)
+ if (isinstance(grid, PyGrid_S) and len(data.shape) == 4 or
+ isinstance(grid, PyGrid_U) and len(data.shape) == 3):
+ from gnome.environment.environment_objects import Depth
+ depth = Depth(surface_index=-1)
# if len(data.shape) == 4 or (len(data.shape) == 3 and time is None):
# from gnome.environment.environment_objects import S_Depth
# depth = S_Depth.from_netCDF(grid=grid,
@@ -188,6 +194,7 @@ def from_netCDF(cls,
grid_file=grid_file,
data_file=data_file,
fill_value=fill_value,
+ varname=varname,
**kwargs)
@property
@@ -220,18 +227,6 @@ def data(self, d):
raise ValueError("Data/grid shape mismatch. Data shape is {0}, Grid shape is {1}".format(d.shape, self.grid.node_lon.shape))
self._data = d
- @property
- def grid(self):
- return self._grid
-
- @grid.setter
- def grid(self, g):
- if not (isinstance(g, (pyugrid.UGrid, pysgrid.SGrid))):
- raise ValueError('Grid must be set with a pyugrid.UGrid or pysgrid.SGrid object')
- if self.data is not None and g.infer_location(self.data) is None:
- raise ValueError("Data/grid shape mismatch. Data shape is {0}, Grid shape is {1}".format(self.data.shape, self.grid.node_lon.shape))
- self._grid = g
-
@property
def grid_shape(self):
if hasattr(self.grid, 'shape'):
@@ -272,31 +267,6 @@ def _get_memoed(self, points, time, D, _copy=False, _hash=None):
else:
return None
- def set_attr(self,
- name=None,
- time=None,
- data=None,
- data_file=None,
- grid=None,
- grid_file=None):
- self.name = name if name is not None else self.name
-# self.units = units if units is not None else self.units
- if time is not None:
- if data and len(time) != data.shape[0]:
- raise ValueError("Time provided is incompatible with data source time dimension")
- self.time = time
- if data is not None:
- if (grid and grid.infer_location(data) is None) or self.grid.infer_location(data) is None:
- raise ValueError("Data shape is incompatible with grid shape.")
- self._data = data
- if grid is not None:
- if data is None:
- if grid.infer_location(self.data) is None:
- raise ValueError("Grid shape is incompatible with current data shape.")
- self._grid = grid
- self.grid_file = grid_file if grid_file is not None else self.grid_file
- self.data_file = data_file if data_file is not None else self.data_file
-
def center_values(self, time, units=None, extrapolate=False):
# NOT COMPLETE
if not extrapolate:
@@ -315,6 +285,50 @@ def center_values(self, time, units=None, extrapolate=False):
value = self.at(centers, time, units)
return value
+ @property
+ def dimension_ordering(self):
+ '''
+ Returns a list that describes the dimensions of the property's data. If a dimension_ordering is assigned,
+ it will continue to use that. If no dimension_ordering is set, then a default ordering will be generated
+ based on the object properties and data shape.
+
+ For example, if the data has 4 dimensions and is represented by a PyGrid_S (structured grid), and the
+ GriddedProp has a depth and time assigned, then the assumed ordering is ['time','depth','lon','lat']
+
+ If the data has 3 dimensions, self.grid is a PyGrid_S, and self.time is None, then the ordering is
+ ['depth','lon','lat']
+ If the data has 3 dimensions, self.grid is a PyGrid_U, the ordering is ['time','depth','ele']
+ '''
+ if not hasattr(self, '_order'):
+ self._order = None
+ if self._order is not None:
+ return self._order
+ else:
+ if isinstance(self.grid, PyGrid_S):
+ order = ['time', 'depth', 'lon', 'lat']
+ else:
+ order = ['time', 'depth', 'ele']
+ ndim = len(self.data.shape)
+ diff = len(order) - ndim
+ if diff == 0:
+ return order
+ elif diff == 1:
+ if self.time is not None:
+ del order[1]
+ elif self.depth is not None:
+ del order[0]
+ else:
+ raise ValueError('Generated ordering too short to fit data. Time or depth must not be None')
+ elif diff == 2:
+ order = order[2:]
+ else:
+ raise ValueError('Too many/too few dimensions ndim={0}'.format(ndim))
+ return order
+
+ @dimension_ordering.setter
+ def dimension_ordering(self, order):
+ self._order = order
+
# @profile
def at(self, points, time, units=None, extrapolate=False, _hash=None, _mem=True, **kwargs):
'''
@@ -322,7 +336,6 @@ def at(self, points, time, units=None, extrapolate=False, _hash=None, _mem=True,
:param points: Coordinates to be queried (P)
:param time: The time at which to query these points (T)
- :param depth: Specifies the depth level of the variable
:param units: units the values will be returned in (or converted to)
:param extrapolate: if True, extrapolation will be supported
:type points: Nx2 array of double
@@ -339,169 +352,141 @@ def at(self, points, time, units=None, extrapolate=False, _hash=None, _mem=True,
if _mem:
res = self._get_memoed(points, time, self._result_memo, _hash=_hash)
if res is not None:
- return np.ma.filled(res)
+ return res
- value = self._at_4D(points, time, self.data, units=units, extrapolate=extrapolate, _hash=_hash)
+ order = self.dimension_ordering
+ if order[0] == 'time':
+ value = self._time_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
+ elif order[0] == 'depth':
+ value = self._depth_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
+ else:
+ value = self._xy_interp(points, time, extrapolate, _mem=_mem, _hash=_hash, **kwargs)
if _mem:
self._memoize_result(points, time, value, self._result_memo, _hash=_hash)
- return np.ma.filled(value)
+ return value
-# @profile
- def _at_2D(self, pts, data, slices=None, **kwargs):
- cur_dim = len(data.shape) - len(slices) if slices is not None else len(data.shape)
- if slices is not None and cur_dim != 2:
- raise ValueError("Data dimensions are incorrect! dimension is {0}".format(len(data.shape) - len(slices)))
+ def _xy_interp(self, points, time, extrapolate, slices=(), **kwargs):
+ '''
+ Uses the py(s/u)grid interpolation to determine the values at the points, and returns it
+ :param points: Coordinates to be queried (3D)
+ :param time: Time of the query
+ :param extrapolate: Turns extrapolation on or off
+ :param slices: describes how the data needs to be sliced to reach the appropriate dimension
+ :type points: Nx3 array of double
+ :type time: datetime.datetime object
+ :type extrapolate: boolean
+ :type slices: tuple of integers or slice objects
+ '''
_hash = kwargs['_hash'] if '_hash' in kwargs else None
units = kwargs['units'] if 'units' in kwargs else None
- value = self.grid.interpolate_var_to_points(pts, data, _hash=_hash[0], slices=slices, _memo=True)
+ value = self.grid.interpolate_var_to_points(points[:, 0:2], self.data, _hash=_hash[0], slices=slices, _memo=True)
if units is not None and units != self.units:
value = unit_conversion.convert(self.units, units, value)
return value
-# @profile
- def _at_3D(self, points, data, slices=None, **kwargs):
- cur_dim = len(data.shape) - len(slices) if slices is not None else len(data.shape)
- if slices is not None and cur_dim != 3:
- raise ValueError("Data dimensions are incorrect! dimension is {0}".format(len(data.shape) - len(slices)))
- indices, alphas = self.depth.interpolation_alphas(points, data.shape[1:], kwargs['_hash'])
+ def _time_interp(self, points, time, extrapolate, slices=(), **kwargs):
+ '''
+ Uses the Time object to interpolate the result of the next level of interpolation, as specified
+ by the dimension_ordering attribute.
+ :param points: Coordinates to be queried (3D)
+ :param time: Time of the query
+ :param extrapolate: Turns extrapolation on or off
+ :param slices: describes how the data needs to be sliced to reach the appropriate dimension
+ :type points: Nx3 array of double
+ :type time: datetime.datetime object
+ :type extrapolate: boolean
+ :type slices: tuple of integers or slice objects
+ '''
+ order = self.dimension_ordering
+ idx = order.index('time')
+ if order[idx + 1] != 'depth':
+ val_func = self._xy_interp
+ else:
+ val_func = self._depth_interp
+
+ if time == self.time.min_time or (extrapolate and time < self.time.min_time):
+ # min or before
+ return val_func(points, time, extrapolate, slices=(0,), ** kwargs)
+ elif time == self.time.max_time or (extrapolate and time > self.time.max_time):
+ return val_func(points, time, extrapolate, slices=(-1,), **kwargs)
+ else:
+ ind = self.time.index_of(time)
+ s1 = slices + (ind,)
+ s0 = slices + (ind - 1,)
+ v0 = val_func(points, time, extrapolate, slices=s0, **kwargs)
+ v1 = val_func(points, time, extrapolate, slices=s1, **kwargs)
+ alphas = self.time.interp_alpha(time)
+ value = v0 + (v1 - v0) * alphas
+ return value
+
+ def _depth_interp(self, points, time, extrapolate, slices=(), **kwargs):
+ '''
+ Uses the Depth object to interpolate the result of the next level of interpolation, as specified
+ by the dimension_ordering attribute.
+ :param points: Coordinates to be queried (3D)
+ :param time: Time of the query
+ :param extrapolate: Turns extrapolation on or off
+ :param slices: describes how the data needs to be sliced to reach the appropriate dimension
+ :type points: Nx3 array of double
+ :type time: datetime.datetime object
+ :type extrapolate: boolean
+ :type slices: tuple of integers or slice objects
+ '''
+ order = self.dimension_ordering
+ idx = order.index('depth')
+ if order[idx + 1] != 'time':
+ val_func = self._xy_interp
+ else:
+ val_func = self._time_interp
+ indices, alphas = self.depth.interpolation_alphas(points, self.data.shape[1:], kwargs.get('_hash', None))
if indices is None and alphas is None:
# all particles are on surface
- return self._at_2D(points[:, 0:2], data, slices=slices + (self.depth.surface_index,), **kwargs)
+ return val_func(points, time, extrapolate, slices=slices + (self.depth.surface_index,), **kwargs)
else:
min_idx = indices[indices != -1].min() - 1
max_idx = indices.max()
- pts = points[:, 0:2]
values = np.zeros(len(points), dtype=np.float64)
- v0 = self._at_2D(pts, data, slices=slices + (min_idx - 1,), **kwargs)
+ v0 = val_func(points, time, extrapolate, slices=slices + (min_idx - 1,), **kwargs)
for idx in range(min_idx + 1, max_idx + 1):
- v1 = self._at_2D(pts, data, slices=slices + (idx,), **kwargs)
+ v1 = val_func(points, time, extrapolate, slices=slices + (idx,), **kwargs)
pos_idxs = np.where(indices == idx)[0]
sub_vals = v0 + (v1 - v0) * alphas
if len(pos_idxs) > 0:
values.put(pos_idxs, sub_vals.take(pos_idxs))
v0 = v1
- if 'extrapolate' in kwargs and kwargs['extrapolate']:
+ if extrapolate:
underground = (indices == self.depth.bottom_index)
- values[underground] = self._at_2D(pts, data, slices=slices + (self.depth.bottom_index,) ** kwargs)
+ values[underground] = val_func(points, time, extrapolate, slices=slices + (self.depth.bottom_index,), **kwargs)
else:
underground = (indices == self.depth.bottom_index)
values[underground] = self.fill_value
return values
-# @profile
- def _at_4D(self, points, time, data, **kwargs):
- value = None
- if self.time is None or len(self.time) == 1:
- if len(data.shape) == 2:
- return self._at_2D(points[:, 0:2], data, **kwargs)
- if len(data.shape) == 3:
- return self._at_3D(points, data, **kwargs)
- if len(data.shape) == 4 and len(data) == 1:
- return self._at_3D(points, data, slices=(0,), **kwargs)
- else:
- raise ValueError("Cannot determine correct time index without time axis")
- else:
- extrapolate = kwargs['extrapolate'] if 'extrapolate' in kwargs else False
- if not extrapolate:
- self.time.valid_time(time)
- if time == self.time.min_time or (extrapolate and time < self.time.min_time):
- return self._at_3D(points, data, slices=(0,), **kwargs)
- elif time == self.time.max_time or (extrapolate and time > self.time.max_time):
- return self._at_3D(points, data, slices=(-1,), **kwargs)
- else:
- surface_only = False
- if all(np.isclose(points[:, 2], 0.0, atol=0.0001)):
- surface_only = True
- ind = self.time.index_of(time)
- alphas = self.time.interp_alpha(time)
- s1 = (ind,)
- s0 = (ind - 1,)
- v0 = v1 = None
- if surface_only and self.depth is not None:
- pts = points[:, 0:2]
- s1 = s1 + (self.depth.surface_index,)
- s0 = s0 + (self.depth.surface_index,)
- v0 = self._at_2D(pts, data, slices=s0, **kwargs)
- v1 = self._at_2D(pts, data, slices=s1, **kwargs)
- elif surface_only and self.depth is None and len(data.shape) == 3:
- pts = points[:, 0:2]
- v0 = self._at_2D(pts, data, slices=s0, **kwargs)
- v1 = self._at_2D(pts, data, slices=s1, **kwargs)
- else:
- v0 = self._at_3D(points, data, slices=s0, **kwargs)
- v1 = self._at_3D(points, data, slices=s1, **kwargs)
- value = v0 + (v1 - v0) * alphas
- return value
+# def serialize(self, json_='webapi'):
+# _dict = serializable.Serializable.serialize(self, json_=json_)
+# if self.data_file is not None:
+# # put file in save zip
+# pass
+# else:
+# # write data to file and put in zip
+# pass
+# if self.grid_file is not None:
+# # put grid in save zip. make sure it's not in there twice.
+# pass
+# else:
+# # write grid to file and put in zip
+# pass
- def _at_surface_only(self,
- pts,
- time,
- units=None,
- depth=-1,
- extrapolate=False,
- memoize=True,
- _hash=None,
- mask=False,
- **kwargs):
- sg = False
- mem = memoize
- if self.time is None:
- # special case! prop has no time variance
- v0 = self.grid.interpolate_var_to_points(pts,
- self.data,
- slices=None,
- slice_grid=sg,
- _memo=mem,
- _hash=_hash,)
- return np.ma.filled(v0)
-
- t_alphas = s0 = s1 = value = None
- if not extrapolate:
- self.time.valid_time(time)
- t_index = self.time.index_of(time, extrapolate)
- if len(self.time) == 1:
- value = self.grid.interpolate_var_to_points(pts,
- self.data,
- slices=[0],
- _memo=mem,
- _hash=_hash,)
- else:
- if time > self.time.max_time:
- value = self.data[-1]
- if time <= self.time.min_time:
- value = self.data[0]
- if extrapolate and t_index == len(self.time.time):
- s0 = [t_index - 1]
- value = self.grid.interpolate_var_to_points(pts,
- self.data,
- slices=s0,
- _memo=mem,
- _hash=_hash,)
- else:
- t_alphas = self.time.interp_alpha(time, extrapolate)
- s1 = [t_index]
- s0 = [t_index - 1]
- if len(self.data.shape) == 4:
- s0.append(depth)
- s1.append(depth)
- v0 = self.grid.interpolate_var_to_points(pts,
- self.data,
- slices=s0,
- slice_grid=sg,
- _memo=mem,
- _hash=_hash[0],)
- v1 = self.grid.interpolate_var_to_points(pts,
- self.data,
- slices=s1,
- slice_grid=sg,
- _memo=mem,
- _hash=_hash[0],)
- value = v0 + (v1 - v0) * t_alphas
+ @classmethod
+ def new_from_dict(cls, dict_):
+ if 'data' not in dict_:
+ return cls.from_netCDF(**dict_)
+ return super(GriddedProp, cls).new_from_dict(dict_)
- if units is not None and units != self.units:
- value = unit_conversion.convert(self.units, units, value)
- return value
+ @classmethod
+ def deserialize(cls, json_):
+ return super(GriddedProp, cls).deserialize(json_)
@classmethod
def _gen_varname(cls,
@@ -527,15 +512,33 @@ def _gen_varname(cls,
raise ValueError("Default names not found.")
+class GridVectorPropSchema(VectorPropSchema):
+ varnames = SequenceSchema(SchemaNode(String()))
+ grid = PyGridSchema(missing=drop)
+ data_file = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())])
+ grid_file = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())])
+
+ def __init__(self, json_='webapi', *args, **kwargs):
+ if json_ == 'save':
+ self.add(SchemaNode(typ=Sequence(), children=[SchemaNode(EnvProp())], name='variables'))
+ super(GridVectorPropSchema, self).__init__(*args, **kwargs)
+
class GridVectorProp(VectorProp):
+ _state = copy.deepcopy(VectorProp._state)
+
+ _schema = GridVectorPropSchema
+
+ _state.add_field([serializable.Field('grid', save=True, update=True, save_reference=True),
+ serializable.Field('variables', save=True, update=True, iscollection=True),
+ serializable.Field('varnames', save=True, update=True),
+ serializable.Field('data_file', save=True, update=True, isdatafile=True),
+ serializable.Field('grid_file', save=True, update=True, isdatafile=True)])
+
+ default_names = []
_def_count = 0
def __init__(self,
- name=None,
- units=None,
- time=None,
- variables=None,
grid=None,
depth=None,
grid_file=None,
@@ -544,34 +547,21 @@ def __init__(self,
varnames=None,
**kwargs):
- self._grid = self._grid_file = self._data_file = None
-
- if any([units is None, time is None, grid is None]) and not all([isinstance(v, GriddedProp) for v in variables]):
- raise ValueError("All attributes except name, varnames and MUST be defined if variables is not a list of TimeSeriesProp objects")
-
- if variables is None or len(variables) < 2:
- raise TypeError("Variables needs to be a list of at least 2 GriddedProp objects or ndarray-like arrays")
-
- if all([isinstance(v, GriddedProp) for v in variables]):
- grid = variables[0].grid if grid is None else grid
- depth = variables[0].depth if depth is None else depth
- grid_file = variables[0].grid_file if grid_file is None else grid_file
- data_file = variables[0].data_file if data_file is None else data_file
- VectorProp.__init__(self,
- name,
- units,
- time,
- variables,
- grid=grid,
- depth=depth,
- dataset=dataset,
- data_file=data_file,
- grid_file=grid_file,
- **kwargs)
+ super(GridVectorProp, self).__init__(**kwargs)
+ if isinstance(self.variables, list):
+ self.variables = OrderedCollection(elems=self.variables, dtype=EnvProp)
+ if isinstance(self.variables[0], GriddedProp):
+ self.grid = self.variables[0].grid if grid is None else grid
+ self.depth = self.variables[0].depth if depth is None else depth
+ self.grid_file = self.variables[0].grid_file if grid_file is None else grid_file
+ self.data_file = self.variables[0].data_file if data_file is None else data_file
# self._check_consistency()
self._result_memo = OrderedDict()
+ def __repr__(self):
+ return str(self.serialize())
+
@classmethod
def from_netCDF(cls,
filename=None,
@@ -634,26 +624,27 @@ def from_netCDF(cls,
ds = dataset
if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology,
- dataset=dg)
+ grid = PyGrid.from_netCDF(grid_file,
+ dataset=dg,
+ grid_topology=grid_topology)
if varnames is None:
varnames = cls._gen_varnames(data_file,
dataset=ds)
if name is None:
name = cls.__name__ + str(cls._def_count)
cls._def_count += 1
- timevar = None
data = ds[varnames[0]]
if time is None:
- try:
- timevar = data.time if data.time == data.dimensions[0] else data.dimensions[0]
- except AttributeError:
- timevar = data.dimensions[0]
- time = Time(ds[timevar])
+ time = Time.from_netCDF(filename=data_file,
+ dataset=ds,
+ datavar=data)
if depth is None:
- from gnome.environment.environment_objects import Depth
- depth = Depth(surface_index=-1)
+ if (isinstance(grid, PyGrid_S) and len(data.shape) == 4 or
+ (len(data.shape) == 3 and time is None) or
+ (isinstance(grid, PyGrid_U) and len(data.shape) == 3 or
+ (len(data.shape) == 2 and time is None))):
+ from gnome.environment.environment_objects import Depth
+ depth = Depth(surface_index=-1)
# if len(data.shape) == 4 or (len(data.shape) == 3 and time is None):
# from gnome.environment.environment_objects import S_Depth
# depth = S_Depth.from_netCDF(grid=grid,
@@ -661,10 +652,9 @@ def from_netCDF(cls,
# data_file=data_file,
# grid_file=grid_file,
# **kwargs)
- variables = []
+ variables = OrderedCollection(dtype=EnvProp)
for vn in varnames:
variables.append(GriddedProp.from_netCDF(filename=filename,
- name=name + '_' + vn,
varname=vn,
grid_topology=grid_topology,
units=units,
@@ -676,79 +666,47 @@ def from_netCDF(cls,
dataset=ds,
load_all=load_all,
**kwargs))
- return cls(name,
- units,
- time,
- variables,
+ if units is None:
+ units = [v.units for v in variables]
+ if all(u == units[0] for u in units):
+ units = units[0]
+ return cls(name=name,
+ filename=filename,
+ varnames=varnames,
+ grid_topology=grid_topology,
+ units=units,
+ time=time,
grid=grid,
depth=depth,
- grid_file=grid_file,
+ variables=variables,
data_file=data_file,
+ grid_file=grid_file,
dataset=ds,
+ load_all=load_all,
**kwargs)
- def _check_consistency(self):
- '''
- Checks that the attributes of each GriddedProp in varlist are the same as the GridVectorProp
- '''
- if self.units is None or self.time is None or self.grid is None:
- return
- for v in self.variables:
- if v.units != self.units:
- raise ValueError("Variable {0} did not have units consistent with what was specified. Got: {1} Expected {2}".format(v.name, v.units, self.units))
- if v.time != self.time:
- raise ValueError("Variable {0} did not have time consistent with what was specified Got: {1} Expected {2}".format(v.name, v.time, self.time))
- if v.grid != self.grid:
- raise ValueError("Variable {0} did not have grid consistent with what was specified Got: {1} Expected {2}".format(v.name, v.grid, self.grid))
- if v.grid_file != self.grid_file:
- raise ValueError("Variable {0} did not have grid_file consistent with what was specified Got: {1} Expected {2}".format(v.name, v.grid_file, self.grid_file))
- if v.data_file != self.data_file:
- raise ValueError("Variable {0} did not have data_file consistent with what was specified Got: {1} Expected {2}".format(v.name, v.data_file, self.data_file))
+ @classmethod
+ def _gen_varnames(cls,
+ filename=None,
+ dataset=None):
+ """
+ Function to find the default variable names if they are not provided.
- @property
- def grid(self):
- return self._grid
-
- @grid.setter
- def grid(self, g):
- if not (isinstance(g, (pyugrid.UGrid, pysgrid.SGrid))):
- raise ValueError('Grid must be set with a pyugrid.UGrid or pysgrid.SGrid object')
- if self._variables is not None:
- if g.infer_location(self.variables[0]) is None:
- raise ValueError("Grid with shape {0} not compatible with data of shape {1}".format(g.shape, self.data_shape))
- for v in self.variables:
- v.grid = g
+ :param filename: Name of file that will be searched for variables
+ :param dataset: Existing instance of a netCDF4.Dataset
+ :type filename: string
+ :type dataset: netCDF.Dataset
+ :return: List of default variable names, or None if none are found
+ """
+ df = None
+ if dataset is not None:
+ df = dataset
else:
- self._grid = g
-
- @property
- def variables(self):
- return self._variables
-
- @variables.setter
- def variables(self, vs):
- if vs is None:
- self._variables = None
- return
- new_vars = []
- for i, var in enumerate(vs):
- if not isinstance(var, GriddedProp):
- if (isinstance(var, (collections.Iterable, nc4.Variable)) and
- len(var) == len(self.time) and
- self.grid.infer_location(var) is not None):
- new_vars.append(GriddedProp(name='var{0}'.format(i),
- units=self.units,
- time=self.time,
- grid=self.grid,
- data=vs[i],
- grid_file=self.grid_file,
- data_file=self.data_file))
- else:
- raise ValueError('Variables must contain an iterable, netCDF4.Variable or GriddedProp objects')
- else:
- new_vars.append(var)
- self._variables = new_vars
- self._check_consistency()
+ df = _get_dataset(filename)
+ for n in cls.default_names:
+ if all([sn in df.variables.keys() for sn in n]):
+ return n
+ raise ValueError("Default names not found.")
@property
def is_data_on_nodes(self):
@@ -777,8 +735,8 @@ def time(self, t):
@property
def data_shape(self):
- if self._variables is not None:
- return self.variables.data.shape
+ if self.variables is not None:
+ return self.variables[0].data.shape
else:
return None
@@ -806,55 +764,7 @@ def _get_memoed(self, points, time, D, _copy=True, _hash=None):
else:
return None
- def set_attr(self,
- name=None,
- units=None,
- time=None,
- variables=None,
- grid=None,
- grid_file=None,
- data_file=None,):
-
- self.name = name if name is not None else self.name
- if variables is not None:
- if self.variables is not None and len(variables) != len(self.variables):
- raise ValueError('Cannot change the number of variables using set_attr. {0} provided, {1} required'.format(len(variables), len(self.variables)))
-
- for i, v in enumerate(variables):
- if isinstance(v, GriddedProp):
- variables[i] = variables.data
-
- units = self.units if units is None else units
- time = self.time if time is None else time
- grid = self.grid if grid is None else grid
- grid_file = self.grid_file if grid_file is None else grid_file
- data_file = self.data_file if data_file is None else data_file
-
- for i, var in enumerate(self.variables):
- if variables is None:
- nv = None
- else:
- nv = variables[i]
- var.set_attr(units=units,
- time=time,
- data=nv,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file,)
- else:
- for i, var in enumerate(self.variables):
- var.set_attr(units=units,
- time=time,
- grid=grid,
- grid_file=grid_file,
- data_file=data_file,)
- self._units = units
- self._time = time
- self._grid = grid
- self.grid_file = grid_file
- self.grid_file = grid_file
-
- def at(self, points, time, units=None, depth=-1, extrapolate=False, memoize=True, _hash=None, **kwargs):
+ def at(self, points, time, units=None, extrapolate=False, memoize=True, _hash=None, **kwargs):
mem = memoize
if hash is None:
_hash = self._get_hash(points, time)
@@ -867,7 +777,6 @@ def at(self, points, time, units=None, depth=-1, extrapolate=False, memoize=True
value = super(GridVectorProp, self).at(points=points,
time=time,
units=units,
- depth=depth,
extrapolate=extrapolate,
memoize=memoize,
_hash=_hash,
@@ -877,26 +786,49 @@ def at(self, points, time, units=None, depth=-1, extrapolate=False, memoize=True
self._memoize_result(points, time, value, self._result_memo, _hash=_hash)
return value
- @classmethod
- def _gen_varnames(cls,
- filename=None,
- dataset=None):
- """
- Function to find the default variable names if they are not provided.
- :param filename: Name of file that will be searched for variables
- :param dataset: Existing instance of a netCDF4.Dataset
- :type filename: string
- :type dataset: netCDF.Dataset
- :return: List of default variable names, or None if none are found
- """
- df = None
- if dataset is not None:
- df = dataset
+ @classmethod
+ def _get_shared_vars(cls, *sh_args):
+ default_shared = ['dataset', 'data_file', 'grid_file', 'grid']
+ if len(sh_args) != 0:
+ shared = sh_args
else:
- df = _get_dataset(filename)
- for n in cls.default_names:
- if all([sn in df.variables.keys() for sn in n]):
- return n
- raise ValueError("Default names not found.")
-
+ shared = default_shared
+
+ def getvars(func):
+ @wraps(func)
+ def wrapper(*args, **kws):
+ def _mod(n):
+ k = kws
+ s = shared
+ return (n in s) and ((n not in k) or (n in k and k[n] is None))
+ if 'filename' in kws and kws['filename'] is not None:
+ kws['data_file'] = kws['grid_file'] = kws['filename']
+ if _mod('dataset'):
+ if 'grid_file' in kws and 'data_file' in kws:
+ if kws['grid_file'] == kws['data_file']:
+ ds = dg = _get_dataset(kws['grid_file'])
+ else:
+ ds = _get_dataset(kws['data_file'])
+ dg = _get_dataset(kws['grid_file'])
+ kws['dataset'] = ds
+ else:
+ if 'grid_file' in kws and kws['grid_file'] is not None:
+ dg = _get_dataset(kws['grid_file'])
+ else:
+ dg = kws['dataset']
+ ds = kws['dataset']
+ if _mod('grid'):
+ gt = kws.get('grid_topology', None)
+ kws['grid'] = PyGrid.from_netCDF(kws['grid_file'], dataset=dg, grid_topology=gt)
+ if kws.get('varnames', None) is None:
+ varnames = cls._gen_varnames(kws['data_file'],
+ dataset=ds)
+# if _mod('time'):
+# time = Time.from_netCDF(filename=kws['data_file'],
+# dataset=ds,
+# varname=data)
+# kws['time'] = time
+ return func(*args, **kws)
+ return wrapper
+ return getvars
diff --git a/py_gnome/gnome/environment/property.py b/py_gnome/gnome/environment/property.py
index e8dde25f8..5ab15469e 100644
--- a/py_gnome/gnome/environment/property.py
+++ b/py_gnome/gnome/environment/property.py
@@ -1,5 +1,8 @@
import warnings
+import os
import copy
+import StringIO
+import zipfile
import netCDF4 as nc4
import numpy as np
@@ -9,21 +12,37 @@
from gnome.persist.base_schema import ObjType
from gnome.utilities import serializable
from gnome.persist import base_schema
+from gnome.utilities.file_tools.data_helpers import _get_dataset
import pyugrid
import pysgrid
import unit_conversion
import collections
from collections import OrderedDict
+from gnome.gnomeobject import GnomeId
+
+
+class TimeSchema(base_schema.ObjType):
+# time = SequenceSchema(SchemaNode(DateTime(default_tzinfo=None), missing=drop), missing=drop)
+ filename = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())], missing=drop)
+ varname = SchemaNode(String(), missing=drop)
+ data = SchemaNode(typ=Sequence(), children=[SchemaNode(DateTime(None))], missing=drop)
class PropertySchema(base_schema.ObjType):
- name = SchemaNode(String(), missing='default')
- units = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String(), missing=drop), SchemaNode(String(), missing=drop)])
- time = SequenceSchema(SchemaNode(DateTime(default_tzinfo=None), missing=drop), missing=drop)
+ name = SchemaNode(String(), missing=drop)
+ units = SchemaNode(String(), missing=drop)
+# units = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String(), missing=drop), SchemaNode(String(), missing=drop)])
+ time = TimeSchema(missing=drop) # SequenceSchema(SchemaNode(DateTime(default_tzinfo=None), missing=drop), missing=drop)
-class EnvProp(object):
+class EnvProp(serializable.Serializable):
+
+ _state = copy.deepcopy(serializable.Serializable._state)
+ _schema = PropertySchema
+
+ _state.add_field([serializable.Field('units', save=True, update=True),
+ serializable.Field('time', save=True, update=True, save_reference=True)])
def __init__(self,
name=None,
@@ -59,28 +78,25 @@ def __str__(self):
return self.__repr__()
def __repr__(self):
- r = OrderedDict()
- r['type'] = type(self).__name__
- r['name'] = self.name
- if self.time is not None:
- r['time'] = 'start:{0.min_time}, end:{0.max_time}, length={1}'.format(self.time, len(self.time.time))
- else:
- r['time'] = self.time
- r['data'] = type(self.data)
- return str(r)
+ return ('{0.__class__.__module__}.{0.__class__.__name__}('
+ 'name="{0.name}", '
+ 'time="{0.time}", '
+ 'units="{0.units}", '
+ 'data="{0.data}", '
+ ')').format(self)
'''
Subclasses should override\add any attribute property function getter/setters as needed
'''
- @property
- def data(self):
- '''
- Underlying data
-
- :rtype: netCDF4.Variable or numpy.array
- '''
- return self._data
+# @property
+# def data(self):
+# '''
+# Underlying data
+#
+# :rtype: netCDF4.Variable or numpy.array
+# '''
+# return self._data
@property
def units(self):
@@ -109,7 +125,9 @@ def time(self):
@time.setter
def time(self, t):
- if isinstance(t, Time):
+ if t is None:
+ self._time = None
+ elif isinstance(t, Time):
self._time = t
elif isinstance(t, collections.Iterable):
self._time = Time(t)
@@ -155,7 +173,18 @@ def in_units(self, unit):
return cpy
-class VectorProp(object):
+class VectorPropSchema(base_schema.ObjType):
+ units = SchemaNode(String(), missing=drop)
+ time = TimeSchema(missing=drop)
+
+
+class VectorProp(serializable.Serializable):
+
+ _state = copy.deepcopy(serializable.Serializable._state)
+ _schema = VectorPropSchema
+
+ _state.add_field([serializable.Field('units', save=True, update=True),
+ serializable.Field('time', save=True, update=True, save_reference=True)])
def __init__(self,
name=None,
@@ -186,34 +215,29 @@ def __init__(self,
time = Time(time)
units = variables[0].units if units is None else units
time = variables[0].time if time is None else time
- for v in variables:
- if (v.units != units or
- v.time != time):
- raise ValueError("Variable {0} did not have parameters consistent with what was specified".format(v.name))
-
if units is None:
units = variables[0].units
self._units = units
if variables is None or len(variables) < 2:
raise ValueError('Variables must be an array-like of 2 or more Property objects')
- self.time = time
- for k in kwargs:
- setattr(self, k, kwargs[k])
self.variables = variables
+ self._time = time
+ unused_args = kwargs.keys() if kwargs is not None else None
+ if len(unused_args) > 0:
+# print(unused_args)
+ kwargs = {}
+ super(VectorProp, self).__init__(**kwargs)
def __str__(self):
return self.__repr__()
-
+
def __repr__(self):
- r = OrderedDict()
- r['type'] = type(self).__name__
- r['name'] = self.name
- if self.time is not None:
- r['time'] = 'start:{0.min_time}, end:{0.max_time}, length={1}'.format(self.time, len(self.time.time))
- else:
- r['time'] = self.time
- r['variables'] = str(self.variables)
- return str(r)
+ return ('{0.__class__.__module__}.{0.__class__.__name__}('
+ 'name="{0.name}", '
+ 'time="{0.time}", '
+ 'units="{0.units}", '
+ 'variables="{0.variables}", '
+ ')').format(self)
@property
def time(self):
@@ -256,7 +280,7 @@ def varnames(self):
:rtype: [] of strings
'''
- return [v.name for v in self.variables]
+ return [v.varname if hasattr(v, 'varname') else v.name for v in self.variables ]
def _check_consistency(self):
'''
@@ -281,25 +305,46 @@ def at(self, *args, **kwargs):
:return: returns a Nx2 array of interpolated values
:rtype: double
'''
- return np.column_stack([var.at(*args, **kwargs) for var in self._variables])
+ return np.column_stack([var.at(*args, **kwargs) for var in self.variables])
+
+class Time(serializable.Serializable):
-class Time(object):
+ _state = copy.deepcopy(serializable.Serializable._state)
+ _schema = TimeSchema
+
+ _state.add_field([serializable.Field('filename', save=True, update=True, isdatafile=True),
+ serializable.Field('varname', save=True, update=True),
+ serializable.Field('data', save=True, update=True)])
- def __init__(self, time_seq, tz_offset=None, offset=None):
+ _const_time = None
+
+ def __init__(self,
+ time=None,
+ filename=None,
+ varname=None,
+ tz_offset=None,
+ offset=None,
+ **kwargs):
'''
Representation of a time axis. Provides interpolation alphas and indexing.
- :param time_seq: Ascending list of times to use
+ :param time: Ascending list of times to use
:param tz_offset: offset to compensate for time zone shifts
- :type time_seq: netCDF4.Variable or [] of datetime.datetime
+ :type time: netCDF4.Variable or [] of datetime.datetime
:type tz_offset: datetime.timedelta
'''
- if isinstance(time_seq, (nc4.Variable, nc4._netCDF4._Variable)):
- self.time = nc4.num2date(time_seq[:], units=time_seq.units)
+ if isinstance(time, (nc4.Variable, nc4._netCDF4._Variable)):
+ self.time = nc4.num2date(time[:], units=time.units)
else:
- self.time = time_seq
+ self.time = time
+
+ self.filename = filename
+ self.varname = varname
+
+# if self.filename is None:
+# self.filename = self.id + '_time.txt'
if tz_offset is not None:
self.time += tz_offset
@@ -309,9 +354,104 @@ def __init__(self, time_seq, tz_offset=None, offset=None):
if self._has_duplicates(self.time):
raise ValueError("Time sequence has duplicate entries")
+ self.name = time.name if hasattr(time, 'name') else None
+
@classmethod
- def time_from_nc_var(cls, var):
- return cls(nc4.num2date(var[:], units=var.units))
+ def from_netCDF(cls,
+ filename=None,
+ dataset=None,
+ varname=None,
+ datavar=None,
+ tz_offset=None,
+ **kwargs):
+ if dataset is None:
+ dataset = _get_dataset(filename)
+ if datavar is not None:
+ if hasattr(datavar, 'time') and datavar.time in dataset.dimensions.keys():
+ varname = datavar.time
+ else:
+ varname = datavar.dimensions[0] if 'time' in datavar.dimensions[0] else None
+ if varname is None:
+ return None
+ time = cls(time=dataset[varname],
+ filename=filename,
+ varname=varname,
+ tz_offset=tz_offset,
+ **kwargs
+ )
+ return time
+
+ @staticmethod
+ def constant_time():
+ if Time._const_time is None:
+ Time._const_time = Time([datetime.now()])
+ return Time._const_time
+
+ @classmethod
+ def from_file(cls, filename=None, **kwargs):
+ if isinstance(filename, list):
+ filename = filename[0]
+ fn = open(filename, 'r')
+ t = []
+ for l in fn:
+ l = l.rstrip()
+ if l is not None:
+ t.append(datetime.strptime(l, '%c'))
+ fn.close()
+ return Time(t)
+
+ def save(self, saveloc, references=None, name=None):
+ '''
+ Write Wind timeseries to file or to zip,
+ then call save method using super
+ '''
+# if self.filename is None:
+# self.filename = self.id + '_time.txt'
+# if zipfile.is_zipfile(saveloc):
+# self._write_time_to_zip(saveloc, self.filename)
+# else:
+# datafile = os.path.join(saveloc, self.filename)
+# self._write_time_to_file(datafile)
+# rv = super(Time, self).save(saveloc, references, name)
+# self.filename = None
+# else:
+# rv = super(Time, self).save(saveloc, references, name)
+# return rv
+ super(Time, self).save(saveloc, references, name)
+
+ def _write_time_to_zip(self, saveloc, ts_name):
+ '''
+ use a StringIO type of file descriptor and write directly to zipfile
+ '''
+ fd = StringIO.StringIO()
+ self._write_time_to_fd(fd)
+ self._write_to_zip(saveloc, ts_name, fd.getvalue())
+
+ def _write_time_to_file(self, datafile):
+ '''write timeseries data to file '''
+ with open(datafile, 'w') as fd:
+ self._write_time_to_fd(fd)
+
+ def _write_time_to_fd(self, fd):
+ for t in self.time:
+ fd.write(t.strftime('%c') + '\n')
+
+ @classmethod
+ def new_from_dict(cls, dict_):
+ if 'varname' not in dict_:
+ dict_['time'] = dict_['data']
+# if 'filename' not in dict_:
+# raise ValueError
+ return cls(**dict_)
+ else:
+ return cls.from_netCDF(**dict_)
+
+ @property
+ def data(self):
+ if self.filename is None:
+ return self.time
+ else:
+ return None
def __len__(self):
return len(self.time)
diff --git a/py_gnome/gnome/environment/ts_property.py b/py_gnome/gnome/environment/ts_property.py
index f370e5eb3..547bf5327 100644
--- a/py_gnome/gnome/environment/ts_property.py
+++ b/py_gnome/gnome/environment/ts_property.py
@@ -4,17 +4,40 @@
import netCDF4 as nc4
import numpy as np
-from gnome.environment.property import EnvProp, VectorProp, Time
+from gnome.environment.property import EnvProp, VectorProp, Time, PropertySchema, TimeSchema, \
+ VectorPropSchema
from datetime import datetime, timedelta
from dateutil import parser
from colander import SchemaNode, Float, Boolean, Sequence, MappingSchema, drop, String, OneOf, SequenceSchema, TupleSchema, DateTime
from numbers import Number
+from gnome.utilities import serializable
import unit_conversion
import collections
+from gnome.utilities.orderedcollection import OrderedCollection
-class TimeSeriesProp(EnvProp):
+class TimeSeriesPropSchema(PropertySchema):
+ time = TimeSchema(missing=drop)
+ data = SequenceSchema(SchemaNode(Float()), missing=drop)
+ timeseries = SequenceSchema(
+ TupleSchema(
+ children=[SchemaNode(DateTime(default_tzinfo=None), missing=drop),
+ SchemaNode(Float(), missing=0)
+ ],
+ missing=drop),
+ missing=drop)
+
+
+class TimeSeriesProp(EnvProp, serializable.Serializable):
+
+ _state = copy.deepcopy(EnvProp._state)
+ _schema = TimeSeriesPropSchema
+
+ _state.add_field([serializable.Field('timeseries', save=False, update=True),
+ serializable.Field('data', save=True, update=False)])
+
+# _state.update('time', update=False)
def __init__(self,
name=None,
@@ -39,6 +62,8 @@ def __init__(self,
len(time) == {0}, len(data) == {1}".format(len(time), len(data)))
super(TimeSeriesProp, self).__init__(name, units, time, data)
self.time = time
+ if isinstance(self.data, list):
+ self.data = np.asarray(self.data)
@classmethod
def constant(cls,
@@ -50,8 +75,8 @@ def constant(cls,
if not isinstance(data, Number):
raise TypeError('{0} data must be a number'.format(name))
- t = datetime.now().replace(microsecond=0, second=0, minute=0)
- return cls(name=name, units=units, time=[t], data=[data])
+ t = Time.constant_time()
+ return cls(name=name, units=units, time=t, data=[data])
@property
def timeseries(self):
'''
@@ -151,8 +176,31 @@ def __ne__(self, o):
return not self.__eq__(o)
+class TSVectorPropSchema(VectorPropSchema):
+ timeseries = SequenceSchema(
+ TupleSchema(
+ children=[SchemaNode(DateTime(default_tzinfo=None), missing=drop),
+ TupleSchema(children=[
+ SchemaNode(Float(), missing=0),
+ SchemaNode(Float(), missing=0)
+ ]
+ )
+ ],
+ missing=drop),
+ missing=drop)
+# variables = SequenceSchema(TupleSchema(SchemaNode(Float())))
+ varnames = SequenceSchema(SchemaNode(String(), missing=drop), missing=drop)
+
+
class TSVectorProp(VectorProp):
+ _schema = TSVectorPropSchema
+ _state = copy.deepcopy(VectorProp._state)
+
+ _state.add_field([serializable.Field('timeseries', save=False, update=True),
+ serializable.Field('variables', save=True, update=True, iscollection=True),
+ serializable.Field('varnames', save=True, update=False)])
+
def __init__(self,
name=None,
units=None,
@@ -170,7 +218,6 @@ def __init__(self,
if variables is None or len(variables) < 2:
raise TypeError('Variables must be an array-like of 2 or more TimeSeriesProp or array-like')
VectorProp.__init__(self, name, units, time, variables)
- self._check_consistency()
@classmethod
def constant(cls,
@@ -182,17 +229,8 @@ def constant(cls,
if not isinstance(variables, collections.Iterable):
raise TypeError('{0} variables must be an iterable'.format(name))
- t = datetime.now().replace(microsecond=0, second=0, minute=0)
- return cls(name=name, units=units, time=[t], variables=[v for v in variables])
-
- def _check_consistency(self):
- '''
- Checks that the attributes of each GriddedProp in varlist are the same as the GridVectorProp
- '''
- for v in self.variables:
- if (v.units != self.units or
- v.time != self.time):
- raise ValueError("Variable {0} did not have parameters consistent with what was specified".format(v.name))
+ t = Time.constant_time()
+ return cls(name=name, units=units, time=t, variables=[v for v in variables])
@property
def timeseries(self):
@@ -203,26 +241,6 @@ def timeseries(self):
'''
return map(lambda x, y, z: (x, (y, z)), self.time.time, self.variables[0], self.variables[1])
- @property
- def variables(self):
- return self._variables
-
- @variables.setter
- def variables(self, vs):
- new_vars = []
- for i, var in enumerate(vs):
- if not isinstance(var, TimeSeriesProp):
- if isinstance(var, collections.Iterable) and len(var) == len(self.time):
- new_vars.append(TimeSeriesProp(name='var{0}'.format(i),
- units=self.units, time=self.time,
- data=vs[i]))
- else:
- raise ValueError('Variables must contain iterables or TimeSeriesProp objects')
- else:
- new_vars.append(var)
- self._variables = new_vars
- self._check_consistency()
-
@property
def time(self):
return self._time
@@ -239,29 +257,16 @@ def time(self, t):
else:
raise ValueError("Object being assigned must be an iterable or a Time object")
- def set_attr(self,
- name=None,
- units=None,
- time=None,
- variables=None):
- self.name = name if name is not None else self.name
- self.units = units if units is not None else self.units
- if variables is not None and time is not None:
- new_vars = []
- for i, var in enumerate(variables):
- if not isinstance(var, TimeSeriesProp):
- if isinstance(var, collections.Iterable) and len(var) == len(time):
- new_vars.append(TimeSeriesProp(name='var{0}'.format(i),
- units=self.units, time=time,
- data=variables[i]))
- else:
- raise ValueError('Variables must contain iterables or TimeSeriesProp objects')
- self._variables = new_vars
- self.time = time
- else:
- if variables is not None:
- self.variables = variables
- self.time = time if time is not None else self.time
+ @property
+ def variables(self):
+ return self._variables
+
+ @variables.setter
+ def variables(self, v):
+ if v is None:
+ self._variables = v
+ if isinstance(v, collections.Iterable):
+ self._variables = OrderedCollection(v)
def is_constant(self):
return len(self.variables[0]) == 1
diff --git a/py_gnome/gnome/gnomeobject.py b/py_gnome/gnome/gnomeobject.py
index daa465e83..8668228c2 100644
--- a/py_gnome/gnome/gnomeobject.py
+++ b/py_gnome/gnome/gnomeobject.py
@@ -139,6 +139,20 @@ def name(self):
def name(self, val):
self._name = val
+ def _attach_default_refs(self, ref_dict):
+ '''
+ If provided a dictionary of references this function will validate it
+ against the _req_refs specified by the class, and if a match is found
+ and the instance's reference is None, it will set it to the instance
+ from ref_dict
+ '''
+ if not hasattr(self, '_req_refs'):
+ return
+ else:
+ for var in ref_dict.keys():
+ if getattr(self, var) is None:
+ setattr(self, var, ref_dict[var])
+
def validate_refs(self, refs=['wind', 'water', 'waves']):
'''
level is the logging level to use for messages. Default is 'warning'
diff --git a/py_gnome/gnome/map.py b/py_gnome/gnome/map.py
index 803a86e5f..0fa98d6b9 100644
--- a/py_gnome/gnome/map.py
+++ b/py_gnome/gnome/map.py
@@ -21,7 +21,6 @@
from osgeo import ogr
import py_gd
-from osgeo import ogr
# import pyugrid
import numpy as np
@@ -84,7 +83,8 @@ class GnomeMap(Serializable):
The very simplest map for GNOME -- all water
with only a bounding box for the map bounds.
- This also serves as a description of the interface
+ This also serves as a description of the interface and
+ base class for more complex maps
"""
_update = ['map_bounds', 'spillable_area']
_create = []
@@ -102,8 +102,9 @@ def __init__(self, map_bounds=None, spillable_area=None, land_polys=None,
Optional parameters (kwargs)
- :param map_bounds: The polygon bounding the map -- could be larger
- or smaller than the land raster
+ :param map_bounds: The polygon bounding the map if any elements are
+ outside the map bounds, they are removed from the
+ simulation.
:param spillable_area: The PolygonSet bounding the spillable_area.
:type spillable_area: Either a PolygonSet object or a list of lists
@@ -116,7 +117,7 @@ def __init__(self, map_bounds=None, spillable_area=None, land_polys=None,
is a list of points defining a polygon.
Note on 'map_bounds':
- ( (x1,y1), (x2,y2),(x3,y3),..)
+ ( (x1,y1), (x2,y2), (x3,y3),..)
An NX2 array of points that describe a polygon
if no map bounds is provided -- the whole world is valid
"""
@@ -580,7 +581,7 @@ def refloat_elements(self, spill_container, time_step):
:param spill_container: the current spill container
:type spill_container: :class:`gnome.spill_container.SpillContainer`
"""
- r_idx = np.where(spill_container['status_codes'] ==
+ r_idx = np.where(spill_container['status_codes'] ==
oil_status.on_land)[0]
if r_idx.size == 0: # no particles on land
@@ -589,7 +590,7 @@ def refloat_elements(self, spill_container, time_step):
if self._refloat_halflife > 0.0:
# if 0.0, then r_idx is all of them -- they will all refloat.
# refloat particles based on probability
- refloat_probability = 1.0 - 0.5 ** (float(time_step) /
+ refloat_probability = 1.0 - 0.5 ** (float(time_step) /
self._refloat_halflife)
rnd = np.random.uniform(0, 1, len(r_idx))
@@ -934,7 +935,7 @@ def refloat_elements(self, spill_container, time_step):
"""
# index into array of particles on_land
- r_idx = np.where(spill_container['status_codes'] ==
+ r_idx = np.where(spill_container['status_codes'] ==
oil_status.on_land)[0]
if r_idx.size == 0: # no particles on land
@@ -944,7 +945,7 @@ def refloat_elements(self, spill_container, time_step):
# if 0.0, then r_idx is all of them -- they will all refloat.
# refloat particles based on probability
- refloat_probability = 1.0 - 0.5 ** (float(time_step) /
+ refloat_probability = 1.0 - 0.5 ** (float(time_step) /
self._refloat_halflife)
rnd = np.random.uniform(0, 1, len(r_idx))
@@ -1035,8 +1036,6 @@ def __init__(self, filename, raster_size=4096 * 4096, **kwargs):
:param filename: full path to the data file
- :param refloat_halflife: the half-life (in hours) for the re-floating.
-
:param raster_size: the total number of pixels (bytes) to make the
raster -- the actual size will match the
aspect ratio of the bounding box of the land
@@ -1044,6 +1043,8 @@ def __init__(self, filename, raster_size=4096 * 4096, **kwargs):
Optional arguments (kwargs):
+ :param refloat_halflife: the half-life (in hours) for the re-floating.
+
:param map_bounds: The polygon bounding the map -- could be larger or
smaller than the land raster
@@ -1070,10 +1071,10 @@ def __init__(self, filename, raster_size=4096 * 4096, **kwargs):
spillable_area = PolygonSet()
for p in polygons:
- if p.metadata[1].lower() == 'spillablearea':
+ if p.metadata[1].lower().replace(' ', '') == 'spillablearea':
spillable_area.append(p)
- elif p.metadata[1].lower() == 'map bounds':
+ elif p.metadata[1].lower().replace(' ', '') == 'mapbounds':
map_bounds = p
else:
land_polys.append(p)
@@ -1089,11 +1090,17 @@ def __init__(self, filename, raster_size=4096 * 4096, **kwargs):
map_bounds = kwargs.pop('map_bounds', map_bounds)
if map_bounds is None:
- map_bounds = BB.AsPoly()
+ if spillable_area: # add the spillable area to the bounds
+ saBB = spillable_area.bounding_box
+ saBB.Merge(BB)
+ map_bounds = saBB.AsPoly()
+ else:
+ map_bounds = BB.AsPoly()
- if len(spillable_area) == 0:
+ elif spillable_area:
spillable_area.append(map_bounds)
+
# user defined spillable_area, map_bounds overrides data obtained
# from polygons
@@ -1103,7 +1110,7 @@ def __init__(self, filename, raster_size=4096 * 4096, **kwargs):
# stretch the bounding box, to get approximate aspect ratio in
# projected coords.
- aspect_ratio = (np.cos(BB.Center[1] * np.pi / 180) *
+ aspect_ratio = (np.cos(BB.Center[1] * np.pi / 180) *
(BB.Width / BB.Height))
w = int(np.sqrt(raster_size * aspect_ratio))
@@ -1291,7 +1298,7 @@ def __init__(self, filename, raster_size=1024 * 1024, **kwargs):
# stretch the bounding box, to get approximate aspect ratio in
# projected coords.
- aspect_ratio = (np.cos(BB.Center[1] * np.pi / 180) *
+ aspect_ratio = (np.cos(BB.Center[1] * np.pi / 180) *
(BB.Width / BB.Height))
w = int(np.sqrt(raster_size * aspect_ratio))
diff --git a/py_gnome/gnome/model.py b/py_gnome/gnome/model.py
index 490d9e54a..e3727aed7 100644
--- a/py_gnome/gnome/model.py
+++ b/py_gnome/gnome/model.py
@@ -6,6 +6,8 @@
import inspect
import zipfile
+import numpy as np
+
from colander import (SchemaNode,
String, Float, Int, Bool,
drop, OneOf)
@@ -32,7 +34,7 @@
class_from_objtype)
from gnome.persist.base_schema import (ObjType,
CollectionItemsList)
-from gnome.exceptions import ReferencedObjectNotSet
+from gnome.exceptions import ReferencedObjectNotSet, GnomeRuntimeError
class ModelSchema(ObjType):
@@ -231,7 +233,6 @@ def __init__(self,
weathering_substeps,
uncertain, cache_enabled, map, name, mode)
-
self._register_callbacks()
def _register_callbacks(self):
@@ -277,6 +278,7 @@ def __restore__(self, time_step, start_time, duration,
self._start_time = start_time
self._duration = duration
self.weathering_substeps = weathering_substeps
+
if not map:
map = gnome.map.GnomeMap()
@@ -540,11 +542,18 @@ def find_by_attr(self, attr, value, collection, allitems=False):
items = []
for item in collection:
try:
- if getattr(item, attr) == value:
- if allitems:
- items.append(item)
- else:
- return item
+ if not isinstance(getattr(item, attr), basestring):
+ if any([value == v for v in getattr(item, attr)]):
+ if allitems:
+ items.append(item)
+ else:
+ return item
+ else:
+ if getattr(item, attr) == value:
+ if allitems:
+ items.append(item)
+ else:
+ return item
except AttributeError:
pass
items = None if items == [] else items
@@ -562,7 +571,7 @@ def _attach_references(self):
'''
attach references
'''
- attr = {'wind': None, 'water': None, 'waves': None}
+ attr = {}
attr['wind'] = self.find_by_attr('_ref_as', 'wind', self.environment)
attr['water'] = self.find_by_attr('_ref_as', 'water', self.environment)
attr['waves'] = self.find_by_attr('_ref_as', 'waves', self.environment)
@@ -572,31 +581,54 @@ def _attach_references(self):
spread = None
for coll in ('environment', 'weatherers', 'movers'):
for item in getattr(self, coll):
+ if hasattr(item, '_req_refs'):
+ ref_dict = {}
+ for var in item._req_refs.keys():
+ inst = self.find_by_attr('_ref_as', var,
+ self.environment)
+ if inst is not None:
+ ref_dict[var] = inst
+ if len(ref_dict) > 0:
+ item._attach_default_refs(ref_dict)
+ else:
+ if coll == 'weatherers':
+ # by default turn WeatheringData and spreading object
+ # off
+ if isinstance(item, WeatheringData):
+ item.on = False
+ wd = item
- if coll == 'weatherers':
- # by default turn WeatheringData and spreading object off
- if isinstance(item, WeatheringData):
- item.on = False
- wd = item
+ try:
+ if item._ref_as == 'spreading':
+ item.on = False
+ spread = item
- try:
- if item._ref_as == 'spreading':
- item.on = False
- spread = item
+ except AttributeError:
+ pass
- except AttributeError:
- pass
+ if item.on:
+ weather_data.update(item.array_types)
- if item.on:
- weather_data.update(item.array_types)
+ if hasattr(item, 'on') and not item.on:
+ # no need to setup references if item is not on
+ continue
- if hasattr(item, 'on') and not item.on:
- # no need to setup references if item is not on
- continue
+ for name, val in attr.iteritems():
+ if (hasattr(item, name) and
+ getattr(item, name) is None and
+ item.make_default_refs):
+ setattr(item, name, val)
- for name, val in attr.iteritems():
- if hasattr(item, name) and item.make_default_refs:
- setattr(item, name, val)
+ all_spills = [sp
+ for sc in self.spills.items()
+ for sp in sc.spills.values()]
+
+ for spill in all_spills:
+ for name, val in attr.iteritems():
+ if (hasattr(spill, name) and
+ getattr(spill, name) is None and
+ spill.make_default_refs):
+ setattr(spill, name, val)
# if WeatheringData object and FayGravityViscous (spreading object)
# are not defined by user, add them automatically because most
@@ -878,7 +910,7 @@ def step(self):
(msgs, isvalid) = self.check_inputs()
if not isvalid:
raise RuntimeError("Setup model run complete but model "
- "is invalid", msgs)
+ "is invalid", msgs)
# (msgs, isvalid) = self.validate()
# if not isvalid:
# raise StopIteration("Setup model run complete but model "
@@ -1024,7 +1056,7 @@ def __eq__(self, other):
check = super(Model, self).__eq__(other)
if check:
# also check the data in ordered collections
- if type(self.spills) != type(other.spills):
+ if not isinstance(self.spills, other.spills.__class__):
return False
if self.spills != other.spills:
@@ -1397,9 +1429,6 @@ def check_inputs(self):
raise an exception if user can't run the model
todo: check if all spills start after model ends
'''
- msgs = []
- isvalid = True
-
(msgs, isvalid) = self.validate()
someSpillIntersectsModel = False
@@ -1421,11 +1450,34 @@ def check_inputs(self):
msgs.append('error: ' + self.__class__.__name__ + ': ' + msg)
isvalid = False
+ if spill.substance is not None:
+ # min_k1 = spill.substance.get('pour_point_min_k')
+ pour_point = spill.substance.pour_point()
+ if spill.water is not None:
+ water_temp = spill.water.get('temperature')
+ if water_temp < pour_point[0]:
+ msg = ('The water temperature, {0} K, is less than '
+ 'the minimum pour point of the selected oil, '
+ '{1} K. The results may be unreliable.'
+ .format(water_temp, pour_point[0]))
+
+ self.logger.warning(msg)
+ msgs.append(self._warn_pre + msg)
+
+ rho_h2o = spill.water.get('density')
+ rho_oil = spill.substance.density_at_temp(water_temp)
+ if np.any(rho_h2o < rho_oil):
+ msg = ("Found particles with relative_buoyancy < 0. "
+ "Oil is a sinker")
+ raise GnomeRuntimeError(msg)
+
if num_spills > 0 and not someSpillIntersectsModel:
if num_spills > 1:
- msg = ('All of the spills are released after the time interval being modeled.')
+ msg = ('All of the spills are released after the '
+ 'time interval being modeled.')
else:
- msg = ('The spill is released after the time interval being modeled.')
+ msg = ('The spill is released after the time interval '
+ 'being modeled.')
self.logger.warning(msg) # for now make this a warning
# self.logger.error(msg)
msgs.append('warning: ' + self.__class__.__name__ + ': ' + msg)
@@ -1555,7 +1607,8 @@ def get_spill_data(self, target_properties, conditions, ucert=0):
Example case::
get_spill_data('position && mass',
- 'position > 50 && spill_num == 1 || status_codes == 1')
+ 'position > 50 && spill_num == 1 || status_codes == 1'
+ )
WARNING: EXPENSIVE! USE AT YOUR OWN RISK ON LARGE num_elements!
@@ -1601,7 +1654,6 @@ def num(s):
conditions = conditions.rsplit('&&')
conditions = [str(cond).rsplit('||') for cond in conditions]
-
sc = self.spills.items()[ucert]
result = {}
@@ -1622,3 +1674,92 @@ def num(s):
result[k].append(n)
return result
+
+ def add_env(self, env, quash=False):
+ for item in env:
+ if not quash:
+ self.environment.add(item)
+ else:
+ for o in self.environment:
+ if o.__class__ == item.__class__:
+ idx = self.environment.index(o)
+ self.environment[idx] = item
+ break
+ else:
+ self.environment.add(item)
+
+# def env_from_netCDF(self, filename=None, dataset=None, grid_file=None, data_file=None, _cls_list=None, **kwargs):
+# def attempt_from_netCDF(cls, **kwargs):
+# obj = None
+# try:
+# obj = c.from_netCDF(filename=filename, dataset=dataset, grid_file=grid_file, data_file=data_file, **clskwargs)
+# except Exception as e:
+# self.logger.warn('''Class {0} could not be constituted from netCDF file
+# Exception: {1}'''.format(c.__name__, e))
+# return obj
+#
+# from gnome.utilities.file_tools.data_helpers import _get_dataset
+# from gnome.environment.environment_objects import GriddedProp, GridVectorProp
+# from gnome.environment import PyGrid
+#
+# if filename is not None:
+# data_file = filename
+# grid_file = filename
+#
+# ds = None
+# dg = None
+# if dataset is None:
+# if grid_file == data_file:
+# ds = dg = _get_dataset(grid_file)
+# else:
+# ds = _get_dataset(data_file)
+# dg = _get_dataset(grid_file)
+# else:
+# if grid_file is not None:
+# dg = _get_dataset(grid_file)
+# else:
+# dg = dataset
+# ds = dataset
+# dataset = ds
+#
+# grid = kwargs.pop('grid', None)
+# if grid is None:
+# grid = PyGrid.from_netCDF(filename=filename, dataset=dg, **kwargs)
+# kwargs['grid'] = grid
+# scs = copy.copy(Environment._subclasses) if _cls_list is None else _cls_list
+# for c in scs:
+# if issubclass(c, (GriddedProp, GridVectorProp)) and not any([isinstance(o, c) for o in self.environment]):
+# clskwargs = copy.copy(kwargs)
+# obj = None
+# try:
+# req_refs = c._req_refs
+# except AttributeError:
+# req_refs = None
+#
+# if req_refs is not None:
+# for ref, klass in req_refs.items():
+# for o in self.environment:
+# if isinstance(o, klass):
+# clskwargs[ref] = o
+# break
+# if ref in clskwargs.keys():
+# continue
+# else:
+# obj = attempt_from_netCDF(c, filename=filename, dataset=dataset, grid_file=grid_file, data_file=data_file, **clskwargs)
+# clskwargs[ref] = obj
+# self.environment.append(obj)
+#
+# obj = attempt_from_netCDF(c, filename=filename, dataset=dataset, grid_file=grid_file, data_file=data_file, **clskwargs)
+# if obj is not None:
+# self.environment.append(obj)
+#
+# def ice_env_from_netCDF(self, filename=None, **kwargs):
+# cls_list = Environment._subclasses
+# ice_cls_list = self.find_by_attr('_ref_as', 'ice_aware', cls_list, allitems=True)
+# # for c in cls_list:
+# # if hasattr(c, '_ref_as'):
+# # if ((not isinstance(c._ref_as, basestring) and
+# # any(['ice_aware' in r for r in c._ref_as])) or
+# # 'ice_aware' in c._ref_as):
+# # ice_cls_list.append(c)
+# self.env_from_netCDF(filename=filename, _cls_list=ice_cls_list, **kwargs)
diff --git a/py_gnome/gnome/movers/__init__.py b/py_gnome/gnome/movers/__init__.py
index c0ebcd216..cf5e65e87 100644
--- a/py_gnome/gnome/movers/__init__.py
+++ b/py_gnome/gnome/movers/__init__.py
@@ -1,82 +1,28 @@
-# import modules so WindMover, RandomMover etc can be imported as:
-# import gnome.movers.WindMover
-# import gnome.movers.RandomMover and so forth ..
+'''
+ __init__.py for the gnome.movers package
+'''
-"""
-__init__.py for the gnome package
-
-"""
-
-from movers import Mover, Process, ProcessSchema, CyMover
-from simple_mover import SimpleMover, SimpleMoverSchema
+from movers import Mover, Process, CyMover, ProcessSchema
+from simple_mover import SimpleMover
from wind_movers import (WindMover,
- WindMoverSchema,
constant_wind_mover,
wind_mover_from_file,
- GridWindMoverSchema,
GridWindMover,
- IceWindMoverSchema,
- IceWindMover,
- )
-from ship_drift_mover import (ShipDriftMoverSchema,
- ShipDriftMover)
-from random_movers import (RandomMoverSchema,
- RandomMover,
+ IceWindMover)
+
+from ship_drift_mover import ShipDriftMover
+from random_movers import (RandomMover,
IceAwareRandomMover,
- RandomVerticalMoverSchema,
RandomVerticalMover)
-from current_movers import (CatsMoverSchema,
- CatsMover,
- ComponentMoverSchema,
+
+from current_movers import (CatsMover,
ComponentMover,
- GridCurrentMoverSchema,
GridCurrentMover,
- IceMoverSchema,
IceMover,
- CurrentCycleMoverSchema,
CurrentCycleMover)
-from vertical_movers import RiseVelocityMoverSchema, RiseVelocityMover, TamocRiseVelocityMover
-from ugrid_movers import UGridCurrentMover
-# from py_ice_mover import PyIceMover
+from vertical_movers import (RiseVelocityMover,
+ TamocRiseVelocityMover)
from py_wind_movers import PyWindMover
-from py_current_movers import PyGridCurrentMover
-
-# no reason for __all__ if you are going to put everything in it.
-# in fact, no reason for __all__unless you want to support "import *", which we don't.
-# __all__ = [Mover,
-# CyMover,
-# Process,
-# ProcessSchema,
-# SimpleMover,
-# SimpleMoverSchema,
-# WindMover,
-# WindMoverSchema,
-# constant_wind_mover,
-# wind_mover_from_file,
-# GridWindMoverSchema,
-# GridWindMover,
-# ShipDriftMoverSchema,
-# ShipDriftMover,
-# IceWindMoverSchema,
-# IceWindMover,
-# RandomMoverSchema,
-# RandomMover,
-# IceAwareRandomMover,
-# RandomVerticalMoverSchema,
-# RandomVerticalMover,
-# CatsMoverSchema,
-# CatsMover,
-# ComponentMoverSchema,
-# ComponentMover,
-# GridCurrentMoverSchema,
-# GridCurrentMover,
-# IceMoverSchema,
-# IceMover,
-# CurrentCycleMoverSchema,
-# CurrentCycleMover,
-# RiseVelocityMoverSchema,
-# RiseVelocityMover,
-# PyWindMover,
-# PyGridCurrentMover]
+from py_current_movers import PyCurrentMover
diff --git a/py_gnome/gnome/movers/current_movers.py b/py_gnome/gnome/movers/current_movers.py
index fe8760151..58917c749 100644
--- a/py_gnome/gnome/movers/current_movers.py
+++ b/py_gnome/gnome/movers/current_movers.py
@@ -9,22 +9,24 @@
from colander import (SchemaNode, Bool, String, Float, drop)
-from gnome.persist.base_schema import ObjType, WorldPoint
-
-from gnome.movers import CyMover, ProcessSchema
-from gnome import environment
-from gnome.utilities import serializable
-from gnome.utilities import time_utils
-
from gnome import basic_types
+
+from gnome.cy_gnome.cy_shio_time import CyShioTime
+from gnome.cy_gnome.cy_ossm_time import CyOSSMTime
from gnome.cy_gnome.cy_cats_mover import CyCatsMover
from gnome.cy_gnome.cy_gridcurrent_mover import CyGridCurrentMover
from gnome.cy_gnome.cy_ice_mover import CyIceMover
from gnome.cy_gnome.cy_currentcycle_mover import CyCurrentCycleMover
-from gnome.cy_gnome.cy_shio_time import CyShioTime
-from gnome.cy_gnome.cy_ossm_time import CyOSSMTime
from gnome.cy_gnome.cy_component_mover import CyComponentMover
+from gnome.utilities.serializable import Serializable, Field
+from gnome.utilities.time_utils import sec_to_datetime
+
+from gnome.environment import Tide, TideSchema, Wind, WindSchema
+from gnome.movers import CyMover, ProcessSchema
+
+from gnome.persist.base_schema import ObjType, WorldPoint
+
class CurrentMoversBaseSchema(ObjType, ProcessSchema):
uncertain_duration = SchemaNode(Float(), missing=drop)
@@ -48,6 +50,7 @@ def __init__(self,
'''
self.uncertain_duration = uncertain_duration
self.uncertain_time_delay = uncertain_time_delay
+
super(CurrentMoversBase, self).__init__(**kwargs)
uncertain_duration = property(lambda self:
@@ -72,6 +75,7 @@ def get_triangles(self):
dtype = triangle_data[0].dtype.descr
unstructured_type = dtype[0][1]
+
unstructured = (triangle_data.view(dtype=unstructured_type)
.reshape(-1, len(dtype))[:, :3])
@@ -87,6 +91,7 @@ def get_cells(self):
dtype = cell_data[0].dtype.descr
unstructured_type = dtype[0][1]
+
unstructured = (cell_data.view(dtype=unstructured_type)
.reshape(-1, len(dtype))[:, 1:])
@@ -109,14 +114,6 @@ def get_cell_center_points(self):
'''
return self.mover._get_center_points().view(dtype=' box_to_merge[0][0]:
left = box_to_merge[0][0]
+
if right < box_to_merge[1][0]:
right = box_to_merge[1][0]
if bottom > box_to_merge[0][1]:
bottom = box_to_merge[0][1]
+
if top < box_to_merge[1][1]:
top = box_to_merge[1][1]
@@ -822,10 +830,12 @@ def get_scaled_velocities(self, model_time):
:param model_time=0:
"""
num_tri = self.mover.get_num_triangles()
+
if self.mover._is_triangle_grid():
num_cells = num_tri
else:
num_cells = num_tri / 2
+
vels = np.zeros(num_cells, dtype=basic_types.velocity_rec)
self.mover.get_scaled_velocities(model_time, vels)
@@ -836,6 +846,7 @@ def get_ice_velocities(self, model_time):
:param model_time=0:
"""
num_tri = self.mover.get_num_triangles()
+
vels = np.zeros(num_tri, dtype=basic_types.velocity_rec)
self.mover.get_ice_velocities(model_time, vels)
@@ -846,6 +857,7 @@ def get_movement_velocities(self, model_time):
:param model_time=0:
"""
num_tri = self.mover.get_num_triangles()
+
vels = np.zeros(num_tri, dtype=basic_types.velocity_rec)
self.mover.get_movement_velocities(model_time, vels)
@@ -857,8 +869,10 @@ def get_ice_fields(self, model_time):
"""
num_tri = self.mover.get_num_triangles()
num_cells = num_tri / 2
+
frac_coverage = np.zeros(num_cells, dtype=np.float64)
thickness = np.zeros(num_cells, dtype=np.float64)
+
self.mover.get_ice_fields(model_time, frac_coverage, thickness)
return frac_coverage, thickness
@@ -907,11 +921,11 @@ class CurrentCycleMoverSchema(ObjType, ProcessSchema):
uncertain_cross = SchemaNode(Float(), default=.25, missing=drop)
-class CurrentCycleMover(GridCurrentMover, serializable.Serializable):
+class CurrentCycleMover(GridCurrentMover, Serializable):
_state = copy.deepcopy(GridCurrentMover._state)
- _state.add_field([serializable.Field('tide',
- save=True, update=True,
- save_reference=True)])
+ _state.add_field([Field('tide', save=True, update=True,
+ save_reference=True)])
+
_schema = CurrentCycleMoverSchema
def __init__(self,
@@ -948,9 +962,9 @@ def __init__(self,
# use super with kwargs to invoke base class __init__
self.mover = CyCurrentCycleMover()
- tide = kwargs.pop('tide', None)
self._tide = None
+ tide = kwargs.pop('tide', None)
if tide is not None:
self.tide = tide
@@ -985,7 +999,7 @@ def tide(self):
@tide.setter
def tide(self, tide_obj):
- if not isinstance(tide_obj, environment.Tide):
+ if not isinstance(tide_obj, Tide):
raise TypeError('tide must be of type environment.Tide')
if isinstance(tide_obj.cy_obj, CyShioTime):
@@ -1013,7 +1027,7 @@ def serialize(self, json_='webapi'):
schema = self.__class__._schema()
if json_ == 'webapi' and 'tide' in toserial:
- schema.add(environment.TideSchema(name='tide'))
+ schema.add(TideSchema(name='tide'))
return schema.serialize(toserial)
@@ -1025,7 +1039,7 @@ def deserialize(cls, json_):
schema = cls._schema()
if 'tide' in json_:
- schema.add(environment.TideSchema())
+ schema.add(TideSchema())
return schema.deserialize(json_)
@@ -1040,10 +1054,10 @@ class ComponentMoverSchema(ObjType, ProcessSchema):
# scale_value = SchemaNode(Float())
-#class ComponentMover(CyMover, serializable.Serializable):
-class ComponentMover(CurrentMoversBase, serializable.Serializable):
+# class ComponentMover(CyMover, serializable.Serializable):
+class ComponentMover(CurrentMoversBase, Serializable):
- #_state = copy.deepcopy(CyMover._state)
+ # _state = copy.deepcopy(CyMover._state)
_state = copy.deepcopy(CurrentMoversBase._state)
_update = ['scale_refpoint',
@@ -1054,15 +1068,13 @@ class ComponentMover(CurrentMoversBase, serializable.Serializable):
_create = []
_create.extend(_update)
_state.add(update=_update, save=_create)
- _state.add_field([serializable.Field('filename1',
- save=True, read=True, isdatafile=True,
- test_for_eq=False),
- serializable.Field('filename2',
- save=True, read=True, isdatafile=True,
- test_for_eq=False),
- serializable.Field('wind',
- save=True, update=True,
- save_reference=True)])
+ _state.add_field([Field('filename1', save=True, read=True, isdatafile=True,
+ test_for_eq=False),
+ Field('filename2', save=True, read=True, isdatafile=True,
+ test_for_eq=False),
+ Field('wind', save=True, update=True,
+ save_reference=True)])
+
_schema = ComponentMoverSchema
def __init__(self, filename1, filename2=None, wind=None,
@@ -1110,10 +1122,6 @@ def __init__(self, filename1, filename2=None, wind=None,
if wind is not None:
self.wind = wind
- # self.scale = kwargs.pop('scale', self.mover.scale_type)
- # self.scale_value = kwargs.get('scale_value',
- # self.mover.scale_value)
-
# TODO: no need to check for None since properties that are None
# are not persisted
@@ -1121,11 +1129,6 @@ def __init__(self, filename1, filename2=None, wind=None,
if 'scale_refpoint' in kwargs:
self.scale_refpoint = kwargs.pop('scale_refpoint')
-# if self.scale and self.scale_value != 0.0 \
-# and self.scale_refpoint is None:
-# raise TypeError("Provide a reference point in 'scale_refpoint'."
-# )
-
super(ComponentMover, self).__init__(**kwargs)
def __repr__(self):
@@ -1135,15 +1138,6 @@ def __repr__(self):
return 'ComponentMover(filename={0})'.format(self.filename1)
# Properties
-
- # scale_type = property(lambda self: bool(self.mover.scale_type),
- # lambda self, val: setattr(self.mover, 'scale_type',
- # int(val)))
-
- # scale_by = property(lambda self: bool(self.mover.scale_by),
- # lambda self, val: setattr(self.mover, 'scale_by',
- # int(val)))
-
pat1_angle = property(lambda self: self.mover.pat1_angle,
lambda self, val: setattr(self.mover, 'pat1_angle',
val))
@@ -1189,19 +1183,20 @@ def __repr__(self):
val))
use_averaged_winds = property(lambda self: self.mover.use_averaged_winds,
- lambda self, val: setattr(self.mover,
- 'use_averaged_winds',
- val))
+ lambda self, val:
+ setattr(self.mover, 'use_averaged_winds',
+ val))
wind_power_factor = property(lambda self: self.mover.wind_power_factor,
lambda self, val: setattr(self.mover,
'wind_power_factor',
val))
- past_hours_to_average = property(lambda self: self.mover.past_hours_to_average,
- lambda self, val: setattr(self.mover,
- 'past_hours_to_average',
- val))
+ past_hours_to_average = property(lambda self: (self.mover
+ .past_hours_to_average),
+ lambda self, val:
+ setattr(self.mover,
+ 'past_hours_to_average', val))
scale_factor_averaged_winds = property(lambda self: self.mover.scale_factor_averaged_winds,
lambda self, val: setattr(self.mover,
@@ -1234,7 +1229,7 @@ def wind(self):
@wind.setter
def wind(self, wind_obj):
- if not isinstance(wind_obj, environment.Wind):
+ if not isinstance(wind_obj, Wind):
raise TypeError('wind must be of type environment.Wind')
self.mover.set_ossm(wind_obj.ossm)
@@ -1244,8 +1239,6 @@ def get_grid_data(self):
"""
Invokes the GetToplogyHdl method of TriGridVel_c object
"""
- # we are assuming cats are always triangle grids,
- # but may want to extend
return self.get_triangles()
def get_center_points(self):
@@ -1255,19 +1248,7 @@ def get_scaled_velocities(self, model_time):
"""
Get file values scaled to ref pt value, with tide applied (if any)
"""
- velocities = self.mover._get_velocity_handle()
- #ref_scale = self.ref_scale # this needs to be computed, needs a time
-
- #if self._tide is not None:
- #time_value = self._tide.cy_obj.get_time_value(model_time)
- #tide = time_value[0][0]
- #else:
- #tide = 1
-
- #velocities['u'] *= ref_scale * tide
- #velocities['v'] *= ref_scale * tide
-
- return velocities
+ return self.mover._get_velocity_handle()
def serialize(self, json_='webapi'):
"""
@@ -1278,7 +1259,7 @@ def serialize(self, json_='webapi'):
schema = self.__class__._schema()
if json_ == 'webapi' and 'wind' in dict_:
- schema.add(environment.WindSchema(name='wind'))
+ schema.add(WindSchema(name='wind'))
return schema.serialize(dict_)
@@ -1293,7 +1274,6 @@ def deserialize(cls, json_):
# for 'webapi', there will be nested Wind structure
# for 'save' option, there should be no nested 'wind'. It is
# removed, loaded and added back after deserialization
- schema.add(environment.WindSchema())
- _to_dict = schema.deserialize(json_)
+ schema.add(WindSchema())
- return _to_dict
+ return schema.deserialize(json_)
diff --git a/py_gnome/gnome/movers/movers.py b/py_gnome/gnome/movers/movers.py
index 102021a0d..7ba271685 100644
--- a/py_gnome/gnome/movers/movers.py
+++ b/py_gnome/gnome/movers/movers.py
@@ -217,6 +217,12 @@ def __init__(self,
'Trapezoid': self.get_delta_Trapezoid}
self.default_num_method = default_num_method
+ if 'env' in kwargs:
+ if hasattr(self, '_req_refs'):
+ for k, v in self._req_refs.items():
+ for o in kwargs['env']:
+ if k in o._ref_as:
+ setattr(self, k, o)
Mover.__init__(self, **kwargs)
def get_delta_Euler(self, sc, time_step, model_time, pos, vel_field):
@@ -247,17 +253,17 @@ def get_delta_RK4(self, sc, time_step, model_time, pos, vel_field):
v0 = vel_field.at(pos, t, extrapolate=self.extrapolate)
d0 = FlatEarthProjection.meters_to_lonlat(v0 * dt_s / 2, pos)
p1 = pos.copy()
- p1[:, 0:2] += d0
+ p1 += d0
v1 = vel_field.at(p1, t + dt / 2, extrapolate=self.extrapolate)
d1 = FlatEarthProjection.meters_to_lonlat(v1 * dt_s / 2, pos)
p2 = pos.copy()
- p2[:, 0:2] += d1
+ p2 += d1
v2 = vel_field.at(p2, t + dt / 2, extrapolate=self.extrapolate)
d2 = FlatEarthProjection.meters_to_lonlat(v2 * dt_s, pos)
p3 = pos.copy()
- p3[:, 0:2] += d2
+ p3 += d2
v3 = vel_field.at(p3, t + dt, extrapolate=self.extrapolate)
diff --git a/py_gnome/gnome/movers/py_current_movers.py b/py_gnome/gnome/movers/py_current_movers.py
index cb84d1cb7..9cd84678d 100644
--- a/py_gnome/gnome/movers/py_current_movers.py
+++ b/py_gnome/gnome/movers/py_current_movers.py
@@ -3,7 +3,7 @@
import datetime
import copy
from gnome import basic_types
-from gnome.environment import GridCurrent
+from gnome.environment import GridCurrent, GridVectorPropSchema
from gnome.utilities import serializable
from gnome.utilities.projections import FlatEarthProjection
from gnome.basic_types import oil_status
@@ -11,15 +11,33 @@
world_point_type,
spill_type,
status_code_type)
+from gnome.persist import base_schema
+from colander import SchemaNode, Float, Boolean, Sequence, MappingSchema, drop, String, OneOf, SequenceSchema, TupleSchema, DateTime, Bool
-class PyGridCurrentMover(movers.PyMover, serializable.Serializable):
+class PyCurrentMoverSchema(base_schema.ObjType):
+ filename = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())], missing=drop)
+ current_scale = SchemaNode(Float(), missing=drop)
+ extrapolate = SchemaNode(Bool(), missing=drop)
+ time_offset = SchemaNode(Float(), missing=drop)
+ current = GridVectorPropSchema(missing=drop)
- _state = copy.deepcopy(movers.Mover._state)
+
+class PyCurrentMover(movers.PyMover, serializable.Serializable):
+
+ _state = copy.deepcopy(movers.PyMover._state)
+
+ _state.add_field([serializable.Field('filename',
+ save=True, read=True, isdatafile=True,
+ test_for_eq=False),
+ serializable.Field('current', save=True, read=True, save_reference=True)])
_state.add(update=['uncertain_duration', 'uncertain_time_delay'],
save=['uncertain_duration', 'uncertain_time_delay'])
+ _schema = PyCurrentMoverSchema
- _ref_as = 'ugrid_current_movers'
+ _ref_as = 'py_current_movers'
+
+ _req_refs = {'current': GridCurrent}
def __init__(self,
current=None,
@@ -32,7 +50,8 @@ def __init__(self,
uncertain_along=.5,
uncertain_across=.25,
uncertain_cross=.25,
- default_num_method='Trapezoid'
+ default_num_method='Trapezoid',
+ **kwargs
):
self.current = current
self.filename = filename
@@ -50,8 +69,12 @@ def __init__(self,
# either a 1, or 2 depending on whether spill is certain or not
self.spill_type = 0
- movers.PyMover.__init__(self,
- default_num_method=default_num_method)
+ super(PyCurrentMover, self).__init__(default_num_method=default_num_method,
+ **kwargs)
+
+ def _attach_default_refs(self, ref_dict):
+ pass
+ return serializable.Serializable._attach_default_refs(self, ref_dict)
@classmethod
def from_netCDF(cls,
@@ -73,7 +96,8 @@ def from_netCDF(cls,
current_scale=current_scale,
uncertain_along=uncertain_along,
uncertain_across=uncertain_across,
- uncertain_cross=uncertain_cross)
+ uncertain_cross=uncertain_cross,
+ **kwargs)
def get_scaled_velocities(self, time):
@@ -81,10 +105,6 @@ def get_scaled_velocities(self, time):
:param model_time=0:
"""
points = None
- if isinstance(self.grid, pysgrid):
- points = np.column_stack(self.grid.node_lon[:], self.grid.node_lat[:])
- if isinstance(self.grid, pyugrid):
- raise NotImplementedError("coming soon...")
vels = self.grid.interpolated_velocities(time, points)
return vels
diff --git a/py_gnome/gnome/movers/py_wind_movers.py b/py_gnome/gnome/movers/py_wind_movers.py
index e5b28f0c0..9cbf9fb4a 100644
--- a/py_gnome/gnome/movers/py_wind_movers.py
+++ b/py_gnome/gnome/movers/py_wind_movers.py
@@ -3,6 +3,7 @@
import datetime
import copy
from gnome import basic_types
+from gnome.environment import GridCurrent, GridVectorPropSchema
from gnome.utilities import serializable, rand
from gnome.utilities.projections import FlatEarthProjection
from gnome.environment import GridWind
@@ -11,15 +12,33 @@
world_point_type,
spill_type,
status_code_type)
+from gnome.persist import base_schema
+from colander import SchemaNode, Float, Boolean, Sequence, MappingSchema, drop, String, OneOf, SequenceSchema, TupleSchema, DateTime, Bool
+
+
+class PyWindMoverSchema(base_schema.ObjType):
+ filename = SchemaNode(typ=Sequence(accept_scalar=True), children=[SchemaNode(String())], missing=drop)
+ current_scale = SchemaNode(Float(), missing=drop)
+ extrapolate = SchemaNode(Bool(), missing=drop)
+ time_offset = SchemaNode(Float(), missing=drop)
+ wind = GridVectorPropSchema(missing=drop)
class PyWindMover(movers.PyMover, serializable.Serializable):
- _state = copy.deepcopy(movers.Mover._state)
+ _state = copy.deepcopy(movers.PyMover._state)
+
+ _state.add_field([serializable.Field('filename',
+ save=True, read=True, isdatafile=True,
+ test_for_eq=False),
+ serializable.Field('wind', save=True, read=True, save_reference=True)])
_state.add(update=['uncertain_duration', 'uncertain_time_delay'],
save=['uncertain_duration', 'uncertain_time_delay'])
+ _schema = PyWindMoverSchema
_ref_as = 'py_wind_movers'
+
+ _req_refs = {'wind': GridWind}
def __init__(self,
wind=None,
@@ -45,8 +64,6 @@ def __init__(self,
to False since user provided a valid Wind and does not wish to
use the default from the Model.
"""
- movers.PyMover.__init__(self,
- default_num_method=default_num_method)
self._wind = wind
self.make_default_refs = False
@@ -58,11 +75,12 @@ def __init__(self,
# also sets self._uncertain_angle_units
self.uncertain_angle_scale = uncertain_angle_scale
+ super(PyWindMover, self).__init__(default_num_method=default_num_method,
+ **kwargs)
self.array_types.update({'windages',
'windage_range',
'windage_persist'})
- # set optional attributes
@classmethod
def from_netCDF(cls,
diff --git a/py_gnome/gnome/movers/random_movers.py b/py_gnome/gnome/movers/random_movers.py
index 6f25cab9c..757e2a456 100644
--- a/py_gnome/gnome/movers/random_movers.py
+++ b/py_gnome/gnome/movers/random_movers.py
@@ -7,19 +7,19 @@
from colander import (SchemaNode, Float, drop)
-from gnome.persist.base_schema import ObjType
-from gnome.utilities.serializable import Serializable
-from gnome.movers import CyMover, ProcessSchema
+from gnome.basic_types import (oil_status)
from gnome.cy_gnome.cy_random_mover import CyRandomMover
from gnome.cy_gnome.cy_random_vertical_mover import CyRandomVerticalMover
+
+from gnome.utilities.serializable import Serializable, Field
+
from gnome.environment import IceConcentration
-from gnome.environment.grid_property import _init_grid
-from gnome.utilities.projections import FlatEarthProjection
-from gnome.basic_types import oil_status
-from gnome.basic_types import (world_point,
- world_point_type,
- spill_type,
- status_code_type)
+from gnome.environment.grid import PyGrid
+from gnome.environment.grid_property import GridPropSchema
+
+from gnome.movers import CyMover, ProcessSchema
+from gnome.persist.base_schema import ObjType
+
class RandomMoverSchema(ObjType, ProcessSchema):
diffusion_coef = SchemaNode(Float(), missing=drop)
@@ -35,7 +35,7 @@ class RandomMover(CyMover, Serializable):
"""
_state = copy.deepcopy(CyMover._state)
_state.add(update=['diffusion_coef', 'uncertain_factor'],
- save=['diffusion_coef', 'uncertain_factor'])
+ save=['diffusion_coef', 'uncertain_factor'])
_schema = RandomMoverSchema
def __init__(self, **kwargs):
@@ -51,9 +51,12 @@ def __init__(self, **kwargs):
Remaining kwargs are passed onto :class:`gnome.movers.Mover` __init__
using super. See Mover documentation for remaining valid kwargs.
"""
- self.mover = \
- CyRandomMover(diffusion_coef=kwargs.pop('diffusion_coef', 100000),
- uncertain_factor=kwargs.pop('uncertain_factor', 2))
+ diffusion_coeff = kwargs.pop('diffusion_coef', 100000)
+ uncertain_factor = kwargs.pop('uncertain_factor', 2)
+
+ self.mover = CyRandomMover(diffusion_coef=diffusion_coeff,
+ uncertain_factor=uncertain_factor)
+
super(RandomMover, self).__init__(**kwargs)
@property
@@ -73,25 +76,36 @@ def uncertain_factor(self, value):
self.mover.uncertain_factor = value
def __repr__(self):
- return ('RandomMover(diffusion_coef={0}, '
- 'uncertain_factor={1}, '
- 'active_start={2}, active_stop={3}, '
- 'on={4})'.format(self.diffusion_coef, self.uncertain_factor,
- self.active_start, self.active_stop, self.on))
+ return ('RandomMover(diffusion_coef={0}, uncertain_factor={1}, '
+ 'active_start={2}, active_stop={3}, on={4})'
+ .format(self.diffusion_coef, self.uncertain_factor,
+ self.active_start, self.active_stop, self.on))
+
+
+class IceAwareRandomMoverSchema(RandomMoverSchema):
+ ice_concentration = GridPropSchema(missing=drop)
class IceAwareRandomMover(RandomMover):
- def __init__(self, *args, **kwargs):
- if 'ice_conc_var' in kwargs.keys():
- self.ice_conc_var = kwargs.pop('ice_conc_var')
+
+ _state = copy.deepcopy(RandomMover._state)
+ _state.add_field([Field('ice_concentration',
+ save=True, read=True, save_reference=True)])
+ _schema = IceAwareRandomMoverSchema
+
+ _req_refs = {'ice_concentration': IceConcentration}
+
+ def __init__(self, ice_concentration=None, **kwargs):
+ self.ice_concentration = ice_concentration
super(IceAwareRandomMover, self).__init__(**kwargs)
@classmethod
def from_netCDF(cls, filename=None,
+ dataset=None,
grid_topology=None,
units=None,
time=None,
- ice_conc_var=None,
+ ice_concentration=None,
grid=None,
grid_file=None,
data_file=None,
@@ -99,41 +113,58 @@ def from_netCDF(cls, filename=None,
if filename is not None:
data_file = filename
grid_file = filename
+
if grid is None:
- grid = _init_grid(grid_file,
- grid_topology=grid_topology)
- if ice_conc_var is None:
- ice_conc_var = IceConcentration.from_netCDF(filename,
- time=time,
- grid=grid)
- return cls(ice_conc_var=ice_conc_var, **kwargs)
+ grid = PyGrid.from_netCDF(grid_file,
+ grid_topology=grid_topology)
+
+ if ice_concentration is None:
+ ice_concentration = (IceConcentration
+ .from_netCDF(filename=filename,
+ dataset=dataset,
+ data_file=data_file,
+ grid_file=grid_file,
+ time=time, grid=grid,
+ **kwargs))
+
+ return cls(ice_concentration=ice_concentration, **kwargs)
def get_move(self, sc, time_step, model_time_datetime):
status = sc['status_codes'] != oil_status.in_water
positions = sc['positions']
deltas = np.zeros_like(positions)
- interp = self.ice_conc_var.at(positions, model_time_datetime, extrapolate=True).copy()
+
+ interp = self.ice_concentration.at(positions, model_time_datetime,
+ extrapolate=True).copy()
interp_mask = np.logical_and(interp >= 0.2, interp < 0.8)
+
if len(np.where(interp_mask)[0]) != 0:
ice_mask = interp >= 0.8
- deltas = super(IceAwareRandomMover, self).get_move(sc, time_step, model_time_datetime)
+ deltas = (super(IceAwareRandomMover, self)
+ .get_move(sc, time_step, model_time_datetime))
+
interp -= 0.2
interp *= 1.25
interp *= 1.3333333333
deltas[:, 0:2][ice_mask] = 0
- deltas[:, 0:2][interp_mask] *= (1 - interp[interp_mask][:, np.newaxis]) # scale winds from 100-0% depending on ice coverage
+ # scale winds from 100-0% depending on ice coverage
+ deltas[:, 0:2][interp_mask] *= (1 - interp[interp_mask][:, np.newaxis])
deltas[status] = (0, 0, 0)
+
return deltas
else:
- return super(IceAwareRandomMover, self).get_move(sc, time_step, model_time_datetime)
+ return (super(IceAwareRandomMover, self)
+ .get_move(sc, time_step, model_time_datetime))
class RandomVerticalMoverSchema(ObjType, ProcessSchema):
vertical_diffusion_coef_above_ml = SchemaNode(Float(), missing=drop)
vertical_diffusion_coef_below_ml = SchemaNode(Float(), missing=drop)
+
mixed_layer_depth = SchemaNode(Float(), missing=drop)
+
horizontal_diffusion_coef_above_ml = SchemaNode(Float(), missing=drop)
horizontal_diffusion_coef_below_ml = SchemaNode(Float(), missing=drop)
@@ -147,15 +178,15 @@ class RandomVerticalMover(CyMover, Serializable):
"""
_state = copy.deepcopy(CyMover._state)
_state.add(update=['vertical_diffusion_coef_above_ml',
- 'vertical_diffusion_coef_below_ml',
- 'horizontal_diffusion_coef_above_ml',
- 'horizontal_diffusion_coef_below_ml',
- 'mixed_layer_depth'],
- save=['vertical_diffusion_coef_above_ml',
- 'vertical_diffusion_coef_below_ml',
- 'horizontal_diffusion_coef_above_ml',
- 'horizontal_diffusion_coef_below_ml',
- 'mixed_layer_depth'])
+ 'vertical_diffusion_coef_below_ml',
+ 'horizontal_diffusion_coef_above_ml',
+ 'horizontal_diffusion_coef_below_ml',
+ 'mixed_layer_depth'],
+ save=['vertical_diffusion_coef_above_ml',
+ 'vertical_diffusion_coef_below_ml',
+ 'horizontal_diffusion_coef_above_ml',
+ 'horizontal_diffusion_coef_below_ml',
+ 'mixed_layer_depth'])
_schema = RandomVerticalMoverSchema
def __init__(self, **kwargs):
@@ -168,10 +199,15 @@ def __init__(self, **kwargs):
:param vertical_diffusion_coef_below_ml: Vertical diffusion coefficient
for random diffusion below the mixed layer. Default is .11 cm2/s
:param mixed_layer_depth: Mixed layer depth. Default is 10 meters.
- :param horizontal_diffusion_coef_above_ml: Horizontal diffusion coefficient
- for random diffusion above the mixed layer. Default is 100000 cm2/s.
- :param horizontal_diffusion_coef_below_ml: Horizontal diffusion coefficient
- for random diffusion below the mixed layer. Default is 126 cm2/s.
+ :param horizontal_diffusion_coef_above_ml: Horizontal diffusion
+ coefficient for random
+ diffusion above the mixed
+ layer. Default is
+ 100000 cm2/s.
+ :param horizontal_diffusion_coef_below_ml: Horizontal diffusion
+ coefficient for random
+ diffusion below the mixed
+ layer. Default is 126 cm2/s.
Remaining kwargs are passed onto Mover's __init__ using super.
See Mover documentation for remaining valid kwargs.
@@ -224,16 +260,28 @@ def mixed_layer_depth(self, value):
self.mover.mixed_layer_depth = value
def __repr__(self):
- '''
- .. todo:: We probably want to include more information.
- '''
return ('RandomVerticalMover(vertical_diffusion_coef_above_ml={0}, '
'vertical_diffusion_coef_below_ml={1}, mixed_layer_depth={2}, '
'horizontal_diffusion_coef_above_ml={3}, '
- 'horizontal_diffusion_coef_below_ml={4}, active_start={5}, active_stop={6}, '
- 'on={6})'.format(self.vertical_diffusion_coef_above_ml,
- self.vertical_diffusion_coef_below_ml,
- self.mixed_layer_depth,
- self.horizontal_diffusion_coef_above_ml,
- self.horizontal_diffusion_coef_below_ml,
- self.active_start, self.active_stop, self.on))
+ 'horizontal_diffusion_coef_below_ml={4}, '
+ 'active_start={5}, active_stop={6}, on={6})'
+ .format(self.vertical_diffusion_coef_above_ml,
+ self.vertical_diffusion_coef_below_ml,
+ self.mixed_layer_depth,
+ self.horizontal_diffusion_coef_above_ml,
+ self.horizontal_diffusion_coef_below_ml,
+ self.active_start, self.active_stop, self.on))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/py_gnome/gnome/movers/simple_mover.py b/py_gnome/gnome/movers/simple_mover.py
index d2fa33bca..77281ee75 100644
--- a/py_gnome/gnome/movers/simple_mover.py
+++ b/py_gnome/gnome/movers/simple_mover.py
@@ -11,8 +11,8 @@
"""
import copy
-import numpy
-np = numpy
+import numpy as np
+
from numpy import random
from colander import (SchemaNode, Float)
@@ -55,15 +55,13 @@ class SimpleMover(Mover, serializable.Serializable):
_state = copy.deepcopy(Mover._state)
_state.add(update=['uncertainty_scale', 'velocity'],
- save=['uncertainty_scale', 'velocity'])
+ save=['uncertainty_scale', 'velocity'])
_schema = SimpleMoverSchema
- def __init__(
- self,
- velocity,
- uncertainty_scale=0.5,
- **kwargs
- ):
+ def __init__(self,
+ velocity,
+ uncertainty_scale=0.5,
+ **kwargs):
"""
simple_mover (velocity)
@@ -76,21 +74,16 @@ def __init__(
"""
# use this, to be compatible with whatever we are using for location
- self.velocity = np.asarray(velocity,
- dtype=mover_type).reshape((3,
- ))
+ self.velocity = np.asarray(velocity, dtype=mover_type).reshape((3,))
+
self.uncertainty_scale = uncertainty_scale
super(SimpleMover, self).__init__(**kwargs)
def __repr__(self):
return 'SimpleMover(<%s>)' % self.id
- def get_move(
- self,
- spill,
- time_step,
- model_time,
- ):
+ def get_move(self, spill,
+ time_step, model_time):
"""
moves the particles defined in the spill object
@@ -132,12 +125,12 @@ def get_move(
num = sum(in_water_mask)
scale = self.uncertainty_scale * self.velocity \
* time_step
- delta[in_water_mask, 0] += random.uniform(-scale[0],
- scale[0], num)
- delta[in_water_mask, 1] += random.uniform(-scale[1],
- scale[1], num)
- delta[in_water_mask, 2] += random.uniform(-scale[2],
- scale[2], num)
+ delta[in_water_mask, 0] += random.uniform(-scale[0], scale[0],
+ num)
+ delta[in_water_mask, 1] += random.uniform(-scale[1], scale[1],
+ num)
+ delta[in_water_mask, 2] += random.uniform(-scale[2], scale[2],
+ num)
# scale for projection
diff --git a/py_gnome/gnome/movers/wind_movers.py b/py_gnome/gnome/movers/wind_movers.py
index f1e506931..57ffceba8 100644
--- a/py_gnome/gnome/movers/wind_movers.py
+++ b/py_gnome/gnome/movers/wind_movers.py
@@ -5,27 +5,29 @@
import os
import copy
from datetime import datetime
-import math
-import numpy
-np = numpy
+import numpy as np
+
from colander import (SchemaNode, Bool, String, Float, drop)
-from gnome.basic_types import (ts_format,
- world_point,
+from gnome.basic_types import (world_point,
world_point_type,
velocity_rec,
datetime_value_2d)
-from gnome.utilities import serializable, rand
-from gnome.utilities import time_utils
-
-from gnome import environment
-from gnome.movers import CyMover, ProcessSchema
from gnome.cy_gnome.cy_wind_mover import CyWindMover
from gnome.cy_gnome.cy_gridwind_mover import CyGridWindMover
from gnome.cy_gnome.cy_ice_wind_mover import CyIceWindMover
+from gnome.utilities.serializable import Serializable, Field
+from gnome.utilities.time_utils import sec_to_datetime
+from gnome.utilities.rand import random_with_persistance
+
+
+from gnome import environment
+from gnome import basic_types
+from gnome.movers import CyMover, ProcessSchema
+
from gnome.persist.base_schema import ObjType
from gnome.exceptions import ReferencedObjectNotSet
@@ -35,7 +37,6 @@ class WindMoversBaseSchema(ObjType, ProcessSchema):
uncertain_time_delay = SchemaNode(Float(), missing=drop)
uncertain_speed_scale = SchemaNode(Float(), missing=drop)
uncertain_angle_scale = SchemaNode(Float(), missing=drop)
- #extrapolate = SchemaNode(Bool(), missing=drop)
class WindMoverSchema(WindMoversBaseSchema):
@@ -60,7 +61,6 @@ def __init__(self,
uncertain_time_delay=0,
uncertain_speed_scale=2.,
uncertain_angle_scale=0.4,
- #extrapolate=False,
**kwargs):
"""
This is simply a base class for WindMover and GridWindMover for the
@@ -91,8 +91,6 @@ def __init__(self,
# also sets self._uncertain_angle_units
self.uncertain_angle_scale = uncertain_angle_scale
- #self.extrapolate = extrapolate
-
self.array_types.update({'windages',
'windage_range',
'windage_persist'})
@@ -100,13 +98,12 @@ def __init__(self,
# no conversion necessary - simply sets/gets the stored value
uncertain_speed_scale = \
property(lambda self: self.mover.uncertain_speed_scale,
- lambda self, val: setattr(self.mover,
- 'uncertain_speed_scale',
+ lambda self, val: setattr(self.mover, 'uncertain_speed_scale',
val))
+
uncertain_angle_scale = \
property(lambda self: self.mover.uncertain_angle_scale,
- lambda self, val: setattr(self.mover,
- 'uncertain_angle_scale',
+ lambda self, val: setattr(self.mover, 'uncertain_angle_scale',
val))
def _seconds_to_hours(self, seconds):
@@ -131,11 +128,6 @@ def uncertain_time_delay(self):
def uncertain_time_delay(self, val):
self.mover.uncertain_time_delay = self._hours_to_seconds(val)
-# extrapolate = property(lambda self: self.mover.extrapolate,
-# lambda self, val: setattr(self.mover,
-# 'extrapolate',
-# val))
-
def prepare_for_model_step(self, sc, time_step, model_time_datetime):
"""
Call base class method using super
@@ -150,14 +142,14 @@ def prepare_for_model_step(self, sc, time_step, model_time_datetime):
# if no particles released, then no need for windage
# TODO: revisit this since sc.num_released shouldn't be None
- if sc.num_released is None or sc.num_released == 0:
+ if sc.num_released is None or sc.num_released == 0:
return
- rand.random_with_persistance(sc['windage_range'][:, 0],
- sc['windage_range'][:, 1],
- sc['windages'],
- sc['windage_persist'],
- time_step)
+ random_with_persistance(sc['windage_range'][:, 0],
+ sc['windage_range'][:, 1],
+ sc['windages'],
+ sc['windage_persist'],
+ time_step)
def get_move(self, sc, time_step, model_time_datetime):
"""
@@ -172,13 +164,10 @@ def get_move(self, sc, time_step, model_time_datetime):
self.prepare_data_for_get_move(sc, model_time_datetime)
if self.active and len(self.positions) > 0:
- self.mover.get_move(self.model_time,
- time_step,
- self.positions,
- self.delta,
+ self.mover.get_move(self.model_time, time_step,
+ self.positions, self.delta,
sc['windages'],
- self.status_codes,
- self.spill_type)
+ self.status_codes, self.spill_type)
return (self.delta.view(dtype=world_point_type)
.reshape((-1, len(world_point))))
@@ -198,7 +187,7 @@ def _state_as_str(self):
return info.format(self)
-class WindMover(WindMoversBase, serializable.Serializable):
+class WindMover(WindMoversBase, Serializable):
"""
Python wrapper around the Cython wind_mover module.
This class inherits from CyMover and contains CyWindMover
@@ -209,12 +198,12 @@ class WindMover(WindMoversBase, serializable.Serializable):
_state = copy.deepcopy(WindMoversBase._state)
_state.add(update=['extrapolate'],
save=['extrapolate'])
- _state.add_field(serializable.Field('wind', save=True, update=True,
- save_reference=True))
+ _state.add_field(Field('wind',
+ save=True, update=True, save_reference=True))
+
_schema = WindMoverSchema
def __init__(self, wind=None, extrapolate=False, **kwargs):
- #def __init__(self, wind=None, **kwargs):
"""
Uses super to call CyMover base class __init__
@@ -233,39 +222,32 @@ def __init__(self, wind=None, extrapolate=False, **kwargs):
self._wind = None
if wind is not None:
self.wind = wind
- kwargs['make_default_refs'] = \
- kwargs.pop('make_default_refs', False)
- kwargs['name'] = \
- kwargs.pop('name', wind.name)
+ kwargs['make_default_refs'] = kwargs.pop('make_default_refs',
+ False)
+ kwargs['name'] = kwargs.pop('name', wind.name)
self.extrapolate = extrapolate
# set optional attributes
super(WindMover, self).__init__(**kwargs)
- # this will have to be updated when wind is set or changed
+ # this will have to be updated when wind is set or changed
if self.wind is not None:
- self.real_data_start = time_utils.sec_to_datetime(self.wind.ossm.get_start_time())
- self.real_data_stop = time_utils.sec_to_datetime(self.wind.ossm.get_end_time())
+ self.real_data_start = sec_to_datetime(self.wind.ossm
+ .get_start_time())
+ self.real_data_stop = sec_to_datetime(self.wind.ossm
+ .get_end_time())
def __repr__(self):
- """
- .. todo::
- We probably want to include more information.
- """
- return ('{0.__class__.__module__}.{0.__class__.__name__}(\n'
- '{1}'
- ')'.format(self, self._state_as_str()))
+ return ('{0.__class__.__module__}.{0.__class__.__name__}(\n{1})'
+ .format(self, self._state_as_str()))
def __str__(self):
- info = ('WindMover - current _state. '
- 'See "wind" object for wind conditions:\n'
- '{0}'.format(self._state_as_str()))
- return info
-
+ return ('WindMover - current _state. '
+ 'See "wind" object for wind conditions:\n{0}'
+ .format(self._state_as_str()))
extrapolate = property(lambda self: self.mover.extrapolate,
- lambda self, val: setattr(self.mover,
- 'extrapolate',
+ lambda self, val: setattr(self.mover, 'extrapolate',
val))
@property
@@ -298,13 +280,12 @@ def serialize(self, json_='webapi'):
"""
toserial = self.to_serialize(json_)
schema = self.__class__._schema()
+
if json_ == 'webapi':
# add wind schema
schema.add(environment.WindSchema(name='wind'))
- serial = schema.serialize(toserial)
-
- return serial
+ return schema.serialize(toserial)
@classmethod
def deserialize(cls, json_):
@@ -312,11 +293,11 @@ def deserialize(cls, json_):
append correct schema for wind object
"""
schema = cls._schema()
+
if 'wind' in json_:
schema.add(environment.WindSchema())
- _to_dict = schema.deserialize(json_)
- return _to_dict
+ return schema.deserialize(json_)
def wind_mover_from_file(filename, **kwargs):
@@ -330,9 +311,8 @@ def wind_mover_from_file(filename, **kwargs):
:returns mover: returns a wind mover, built from the file
"""
w = environment.Wind(filename=filename, format='r-theta')
- wm = WindMover(w, **kwargs)
- return wm
+ return WindMover(w, **kwargs)
def constant_wind_mover(speed, direction, units='m/s'):
@@ -348,43 +328,47 @@ def constant_wind_mover(speed, direction, units='m/s'):
:return: returns a gnome.movers.WindMover object all set up.
.. note::
- The time for a constant wind timeseries is irrelevant.
- This function simply sets it to datetime.now() accurate to hours.
+ The time for a constant wind timeseries is irrelevant.
+ This function simply sets it to datetime.now() accurate to hours.
"""
-
series = np.zeros((1, ), dtype=datetime_value_2d)
# note: if there is ony one entry, the time is arbitrary
dt = datetime.now().replace(microsecond=0, second=0, minute=0)
series[0] = (dt, (speed, direction))
wind = environment.Wind(timeseries=series, units=units)
- w_mover = WindMover(wind)
- return w_mover
+
+ return WindMover(wind)
class GridWindMoverSchema(WindMoversBaseSchema):
- """ Similar to WindMover except it doesn't have wind_id"""
- wind_file = SchemaNode(String(), missing=drop)
+ """
+ Similar to WindMover except it doesn't have wind_id
+ """
+ filename = SchemaNode(String(), missing=drop)
topology_file = SchemaNode(String(), missing=drop)
wind_scale = SchemaNode(Float(), missing=drop)
extrapolate = SchemaNode(Bool(), missing=drop)
-class GridWindMover(WindMoversBase, serializable.Serializable):
+class GridWindMover(WindMoversBase, Serializable):
_state = copy.deepcopy(WindMoversBase._state)
- _state.add(update=['wind_scale', 'extrapolate'], save=['wind_scale', 'extrapolate'])
- _state.add_field([serializable.Field('wind_file', save=True,
- read=True, isdatafile=True, test_for_eq=False),
- serializable.Field('topology_file', save=True,
- read=True, isdatafile=True, test_for_eq=False)])
+ _state.add(update=['wind_scale', 'extrapolate'],
+ save=['wind_scale', 'extrapolate'])
+
+ _state.add_field([Field('filename', save=True, read=True,
+ isdatafile=True, test_for_eq=False),
+ Field('topology_file', save=True, read=True,
+ isdatafile=True, test_for_eq=False)])
_schema = GridWindMoverSchema
- def __init__(self, wind_file, topology_file=None,
+ def __init__(self, filename, topology_file=None,
extrapolate=False, time_offset=0,
**kwargs):
"""
:param wind_file: file containing wind data on a grid
+ :param filename: file containing wind data on a grid
:param topology_file: Default is None. When exporting topology, it
is stored in this file
:param wind_scale: Value to scale wind data
@@ -396,9 +380,9 @@ def __init__(self, wind_file, topology_file=None,
uses super: super(GridWindMover,self).__init__(\*\*kwargs)
"""
- if not os.path.exists(wind_file):
+ if not os.path.exists(filename):
raise ValueError('Path for wind file does not exist: {0}'
- .format(wind_file))
+ .format(filename))
if topology_file is not None:
if not os.path.exists(topology_file):
@@ -406,15 +390,18 @@ def __init__(self, wind_file, topology_file=None,
.format(topology_file))
# is wind_file and topology_file is stored with cy_gridwind_mover?
- self.wind_file = wind_file
+ self.filename = filename
self.topology_file = topology_file
self.mover = CyGridWindMover(wind_scale=kwargs.pop('wind_scale', 1))
- self.name = os.path.split(wind_file)[1]
+ self.name = os.path.split(filename)[1]
+
super(GridWindMover, self).__init__(**kwargs)
- self.mover.text_read(wind_file, topology_file)
- self.real_data_start = time_utils.sec_to_datetime(self.mover.get_start_time())
- self.real_data_stop = time_utils.sec_to_datetime(self.mover.get_end_time())
+ self.mover.text_read(filename, topology_file)
+
+ self.real_data_start = sec_to_datetime(self.mover.get_start_time())
+ self.real_data_stop = sec_to_datetime(self.mover.get_end_time())
+
self.mover.extrapolate_in_time(extrapolate)
self.mover.offset_time(time_offset * 3600.)
@@ -423,29 +410,82 @@ def __repr__(self):
.. todo::
We probably want to include more information.
"""
- info = 'GridWindMover(\n{0})'.format(self._state_as_str())
- return info
+ return 'GridWindMover(\n{0})'.format(self._state_as_str())
def __str__(self):
- info = ('GridWindMover - current _state.\n'
- '{0}'.format(self._state_as_str()))
- return info
+ return ('GridWindMover - current _state.\n{0}'
+ .format(self._state_as_str()))
wind_scale = property(lambda self: self.mover.wind_scale,
- lambda self, val: setattr(self.mover,
- 'wind_scale',
+ lambda self, val: setattr(self.mover, 'wind_scale',
val))
extrapolate = property(lambda self: self.mover.extrapolate,
- lambda self, val: setattr(self.mover,
- 'extrapolate',
+ lambda self, val: setattr(self.mover, 'extrapolate',
val))
time_offset = property(lambda self: self.mover.time_offset / 3600.,
- lambda self, val: setattr(self.mover,
- 'time_offset',
+ lambda self, val: setattr(self.mover, 'time_offset',
val * 3600.))
+ def get_grid_data(self):
+ return self.get_cells()
+
+ def get_cells(self):
+ """
+ Invokes the GetCellDataHdl method of TimeGridWind_c object.
+ Cross-references point data to get cell coordinates.
+ """
+ cell_data = self.mover._get_cell_data()
+ points = self.get_points()
+
+ dtype = cell_data[0].dtype.descr
+ unstructured_type = dtype[0][1]
+ unstructured = (cell_data.view(dtype=unstructured_type)
+ .reshape(-1, len(dtype))[:, 1:])
+
+ return points[unstructured]
+
+ def get_points(self):
+ points = (self.mover._get_points()
+ .astype([('long', ' 2:
- #curvilinear grid; ugrids never have line segments greater than 2 points
- for l in lines.transpose((1,0,2)).copy():
+ # curvilinear grid; ugrids never have line segments greater than 2 points
+ for l in lines.transpose((1, 0, 2)).copy():
img.draw_polyline(l,
line_color=self.color,
line_width=self.width)
@@ -761,33 +763,33 @@ def __init__(self,
scale=1000
):
self.prop = prop
- self.projection=projection
- self.on=on
- self.color=color
- self.mask_color=mask_color
- self.size=size
- self.width=width
- self.scale=scale
+ self.projection = projection
+ self.on = on
+ self.color = color
+ self.mask_color = mask_color
+ self.size = size
+ self.width = width
+ self.scale = scale
def draw_to_image(self, img, time):
if not self.on:
return
t0 = self.prop.time.index_of(time, extrapolate=True) - 1
data_u = self.prop.variables[0].data[t0]
- data_u2 = self.prop.variables[0].data[t0+1] if len(self.prop.time)> 1 else data_u
+ data_u2 = self.prop.variables[0].data[t0 + 1] if len(self.prop.time) > 1 else data_u
data_v = self.prop.variables[1].data[t0]
- data_v2 = self.prop.variables[1].data[t0+1] if len(self.prop.time)> 1 else data_v
+ data_v2 = self.prop.variables[1].data[t0 + 1] if len(self.prop.time) > 1 else data_v
t_alphas = self.prop.time.interp_alpha(time, extrapolate=True)
data_u = data_u + t_alphas * (data_u2 - data_u)
data_v = data_v + t_alphas * (data_v2 - data_v)
data_u = data_u.reshape(-1)
data_v = data_v.reshape(-1)
- start=end=None
+ start = end = None
# if self.prop.grid.infer_grid(data_u) == 'centers':
# start = self.prop.grid.centers
# else:
try:
- start = self.prop.grid.nodes.copy().reshape(-1,2)
+ start = self.prop.grid.nodes.copy().reshape(-1, 2)
except AttributeError:
start = np.column_stack((self.prop.grid.node_lon,
@@ -795,19 +797,19 @@ def draw_to_image(self, img, time):
# deltas = FlatEarthProjection.meters_to_lonlat(data*self.scale, lines[:0])
if hasattr(data_u, 'mask'):
- start[data_u.mask] = [0.,0.]
+ start[data_u.mask] = [0., 0.]
data_u *= self.scale * 8.9992801e-06
data_v *= self.scale * 8.9992801e-06
- data_u /= np.cos(np.deg2rad(start[:,1]))
+ data_u /= np.cos(np.deg2rad(start[:, 1]))
end = start.copy()
- end[:,0] += data_u
- end[:,1] += data_v
+ end[:, 0] += data_u
+ end[:, 1] += data_v
if hasattr(data_u, 'mask'):
- end[data_u.mask] = [0.,0.]
+ end[data_u.mask] = [0., 0.]
bounds = self.projection.image_box
- pt1 = ((bounds[0][0] <= start[:, 0]) * (start[:, 0] <= bounds[1][0]) *
+ pt1 = ((bounds[0][0] <= start[:, 0]) * (start[:, 0] <= bounds[1][0]) *
(bounds[0][1] <= start[:, 1]) * (start[:, 1] <= bounds[1][1]))
- pt2 = ((bounds[0][0] <= end[:, 0]) * (end[:, 0] <= bounds[1][0]) *
+ pt2 = ((bounds[0][0] <= end[:, 0]) * (end[:, 0] <= bounds[1][0]) *
(bounds[0][1] <= end[:, 1]) * (end[:, 1] <= bounds[1][1]))
start = start[pt1 * pt2]
end = end[pt1 * pt2]
@@ -815,10 +817,10 @@ def draw_to_image(self, img, time):
end = self.projection.to_pixel_multipoint(end, asint=True)
img.draw_dots(start, diameter=self.size, color=self.color)
- line = np.array([[0.,0.],[0.,0.]])
- for i in xrange(0,len(start)):
+ line = np.array([[0., 0.], [0., 0.]])
+ for i in xrange(0, len(start)):
line[0] = start[i]
line[1] = end[i]
img.draw_polyline(line,
- line_color = self.color,
- line_width = self.width)
+ line_color=self.color,
+ line_width=self.width)
diff --git a/py_gnome/gnome/persist/save_load.py b/py_gnome/gnome/persist/save_load.py
index 54a834902..2faafb752 100644
--- a/py_gnome/gnome/persist/save_load.py
+++ b/py_gnome/gnome/persist/save_load.py
@@ -8,6 +8,7 @@
import logging
import gnome
+import colander
# as long as loggers are configured before module is loaded, module scope
# logger will work. If loggers are configured after this module is loaded and
@@ -333,24 +334,43 @@ def _move_data_file(self, saveloc, json_):
for field in fields:
if field.name not in json_:
continue
-
- # data filename
- d_fname = os.path.split(json_[field.name])[1]
-
- if zipfile.is_zipfile(saveloc):
- # add datafile to zip archive
- with zipfile.ZipFile(saveloc, 'a',
- compression=zipfile.ZIP_DEFLATED,
- allowZip64=self._allowzip64) as z:
- if d_fname not in z.namelist():
- z.write(json_[field.name], d_fname)
+
+ raw_paths = json_[field.name]
+ if isinstance(raw_paths, list):
+ for i, p in enumerate(raw_paths):
+ d_fname = os.path.split(p)[1]
+ if zipfile.is_zipfile(saveloc):
+ # add datafile to zip archive
+ with zipfile.ZipFile(saveloc, 'a',
+ compression=zipfile.ZIP_DEFLATED,
+ allowZip64=self._allowzip64) as z:
+ if d_fname not in z.namelist():
+ z.write(p, d_fname)
+ else:
+ # move datafile to saveloc
+ if p != os.path.join(saveloc, d_fname):
+ shutil.copy(p, saveloc)
+
+ # always want to update the reference so it is relative to saveloc
+ json_[field.name][i] = d_fname
else:
- # move datafile to saveloc
- if json_[field.name] != os.path.join(saveloc, d_fname):
- shutil.copy(json_[field.name], saveloc)
-
- # always want to update the reference so it is relative to saveloc
- json_[field.name] = d_fname
+ # data filename
+ d_fname = os.path.split(json_[field.name])[1]
+
+ if zipfile.is_zipfile(saveloc):
+ # add datafile to zip archive
+ with zipfile.ZipFile(saveloc, 'a',
+ compression=zipfile.ZIP_DEFLATED,
+ allowZip64=self._allowzip64) as z:
+ if d_fname not in z.namelist():
+ z.write(json_[field.name], d_fname)
+ else:
+ # move datafile to saveloc
+ if json_[field.name] != os.path.join(saveloc, d_fname):
+ shutil.copy(json_[field.name], saveloc)
+
+ # always want to update the reference so it is relative to saveloc
+ json_[field.name] = d_fname
return json_
@@ -398,8 +418,13 @@ def _update_datafile_path(cls, json_data, saveloc):
# For zip files coming from the web, is_savezip_valid() tests
# filenames in archive do not contain paths with '..'
# In here, we just extract datafile to saveloc/.
- json_data[field.name] = os.path.join(saveloc,
- json_data[field.name])
+ raw_n = json_data[field.name]
+ if isinstance(raw_n, list):
+ for i, n in enumerate(raw_n):
+ json_data[field.name][i] = os.path.join(saveloc, n)
+ else:
+ json_data[field.name] = os.path.join(saveloc,
+ json_data[field.name])
@classmethod
def loads(cls, json_data, saveloc=None, references=None):
@@ -432,7 +457,11 @@ def loads(cls, json_data, saveloc=None, references=None):
cls._update_datafile_path(json_data, saveloc)
# deserialize after removing references
- _to_dict = cls.deserialize(json_data)
+ try:
+ _to_dict = cls.deserialize(json_data)
+ except colander.Invalid as e:
+ print('Class {0} failed to deserialize.'.format(cls.__name__))
+ raise e
if ref_dict:
_to_dict.update(ref_dict)
diff --git a/py_gnome/gnome/spill/elements/element_type.py b/py_gnome/gnome/spill/elements/element_type.py
index ba0ef92f9..d940b1fa0 100644
--- a/py_gnome/gnome/spill/elements/element_type.py
+++ b/py_gnome/gnome/spill/elements/element_type.py
@@ -76,28 +76,81 @@ def __repr__(self):
'substance={0.substance!r}'
')'.format(self))
- def __getattr__(self, att):
- """
- delegates some attribute access to the element types.
+ # def __getattr__(self, att):
+ # """
+ # delegates some attribute access to the element types.
+
+ # .. todo::
+ # There is an issue in that if two initializers have the same
+ # property - could be the case if they both define a 'distribution',
+ # then it does not know which one to return
+ # """
+ # for initr in self.initializers:
+ # try:
+ # return getattr(initr, att)
+ # except AttributeError:
+ # pass
+
+ # # nothing returned, then attribute was not found
+ # msg = ('{0} attribute does not exist in element_type or initializers'
+ # .format(att))
+ # # NOTE: this would get trigggered by a a hasattr() call --
+ # # which isn't something we need to log
+ # ## self.logger.warning(msg)
+ # raise AttributeError(msg)
+
+ # properties for attributes the need to be pulled from initializers
+ @property
+ def windage_range(self):
+ for initr in self.initializers:
+ try:
+ return getattr(initr, 'windage_range')
+ except AttributeError:
+ pass
+ msg = 'windage_range attribute does not exist any initializers'
- .. todo::
- There is an issue in that if two initializers have the same
- property - could be the case if they both define a 'distribution',
- then it does not know which one to return
- """
+ self.logger.warning(msg)
+ raise AttributeError(msg)
+ @windage_range.setter
+ def windage_range(self, wr):
+ print self.initializers
+ for initr in self.initializers:
+ print "initr:"
+ if hasattr(initr, "windage_range"):
+ print "setting windage_range"
+ initr.windage_range = wr
+ return None
+ msg = "can't set windage_range: no initializer has it"
+
+ self.logger.warning(msg)
+ raise AttributeError(msg)
+
+ @property
+ def windage_persist(self):
for initr in self.initializers:
try:
- return getattr(initr, att)
+ return getattr(initr, 'windage_persist')
except AttributeError:
pass
+ msg = 'windage_persist attribute does not exist any initializers'
- # nothing returned, then attribute was not found
- msg = ('{0} attribute does not exist in element_type initializers'
- .format(att))
+ self.logger.warning(msg)
+ raise AttributeError(msg)
+ @windage_persist.setter
+ def windage_persist(self, wp):
+ print self.initializers
+ for initr in self.initializers:
+ print "initr:"
+ if hasattr(initr, "windage_persist"):
+ print "setting windage_persist"
+ initr.windage_persist = wp
+ return None
+ msg = "can't set windage_persist: no initializer has it"
self.logger.warning(msg)
raise AttributeError(msg)
+
def contains_object(self, obj_id):
for o in self.initializers:
if obj_id == o.id:
@@ -362,7 +415,7 @@ def plume(distribution_type='droplet_size',
)
if density is not None:
- # Assume density is at 15 K - convert density to api
+ # Assume density is at 15 C - convert density to api
api = uc.convert('density', density_units, 'API', density)
if substance_name is not None:
substance = get_oil_props({'name': substance_name,
diff --git a/py_gnome/gnome/spill/elements/initializers.py b/py_gnome/gnome/spill/elements/initializers.py
index e1759ecb4..3f0e6f7c7 100644
--- a/py_gnome/gnome/spill/elements/initializers.py
+++ b/py_gnome/gnome/spill/elements/initializers.py
@@ -334,8 +334,16 @@ def initialize(self, num_new_particles, spill, data_arrays, substance):
self.distribution.set_values(drop_size)
data_arrays['droplet_diameter'][-num_new_particles:] = drop_size
- water_temp = spill.water.get('temperature')
- le_density[:] = substance.density_at_temp(water_temp)
+
+ #don't require a water object
+ #water_temp = spill.water.get('temperature')
+ #le_density[:] = substance.density_at_temp(water_temp)
+
+ if spill.water is not None:
+ water_temp = spill.water.get('temperature')
+ le_density[:] = substance.density_at_temp(water_temp)
+ else:
+ le_density[:] = substance.density_at_temp()
# now update rise_vel with droplet size - dummy for now
rise_velocity_from_drop_size(
diff --git a/py_gnome/gnome/spill/spill.py b/py_gnome/gnome/spill/spill.py
index 3e89f7aba..78a603928 100644
--- a/py_gnome/gnome/spill/spill.py
+++ b/py_gnome/gnome/spill/spill.py
@@ -251,10 +251,12 @@ def __init__(self,
self.element_type = element_type
- self.on = on # spill is active or not
+ self.on = on # spill is active or not
# raise Exception("stopping")
+ # fixme: shouldn't units default to 'kg'?
self.units = None
+ # fixme -- and amount always be in kg?
self.amount = amount
if amount is not None:
@@ -265,9 +267,8 @@ def __init__(self,
self.amount_uncertainty_scale = amount_uncertainty_scale
- '''
- fraction of area covered by oil
- '''
+ # fixme: why is fractional area part of spill???
+ # fraction of area covered by oil
self.frac_coverage = 1.0
self.name = name
@@ -660,7 +661,6 @@ def substance(self, subs):
self.element_type.substance = subs
def get_mass(self, units=None):
-
"""
Return the mass released during the spill.
User can also specify desired output units in the function.
@@ -668,18 +668,27 @@ def get_mass(self, units=None):
If volume is given, then use density to find mass. Density is always
at 15degC, consistent with API definition
"""
-
+ # fixme: This really should be re-factored to always store mass.
if self.amount is None:
return self.amount
- # first convert amount to 'kg'
if self.units in self.valid_mass_units:
+ # first convert amount to 'kg'
mass = uc.convert('Mass', self.units, 'kg', self.amount)
elif self.units in self.valid_vol_units:
- water_temp = self.water.get('temperature')
- rho = self.element_type.substance.density_at_temp(water_temp)
- vol = uc.convert('Volume', self.units, 'm^3', self.amount)
+ # need to convert to mass
+ if self.element_type.substance is None:
+ # unspecified substance gets a density 1000 kg/m^3
+ rho = 1000.0
+ else:
+ # DO NOT change this back!
+ # for the UI to be consistent, the conversion needs to use standard
+ # density -- not the current water temp.
+ # water_temp = self.water.get('temperature')
+ # ideally substance would have a "standard_density" attribute for this.
+ rho = self.element_type.substance.density_at_temp(288.15)
+ vol = uc.convert('Volume', self.units, 'm^3', self.amount)
mass = rho * vol
else:
raise ValueError("{} is not a valid mass or Volume unit"
diff --git a/py_gnome/gnome/utilities/file_tools/data_helpers.py b/py_gnome/gnome/utilities/file_tools/data_helpers.py
index 80194a968..ac95d8d72 100644
--- a/py_gnome/gnome/utilities/file_tools/data_helpers.py
+++ b/py_gnome/gnome/utilities/file_tools/data_helpers.py
@@ -133,11 +133,13 @@ def _gen_topology(filename,
break
return gt
-
-def _get_dataset(filename):
+def _get_dataset(filename, dataset=None):
+ if dataset is not None:
+ return dataset
df = None
if isinstance(filename, basestring):
df = nc4.Dataset(filename)
else:
df = nc4.MFDataset(filename)
return df
+
diff --git a/py_gnome/gnome/utilities/geometry/polygons.py b/py_gnome/gnome/utilities/geometry/polygons.py
index 9d513b88e..26ae545c7 100644
--- a/py_gnome/gnome/utilities/geometry/polygons.py
+++ b/py_gnome/gnome/utilities/geometry/polygons.py
@@ -221,10 +221,10 @@ def append(self, polygon, metadata=None):
old_length = self._PointsArray.shape[0]
added_length = polygon.shape[0]
- self._PointsArray.resize((old_length+added_length, 2))
+ self._PointsArray.resize((old_length + added_length, 2))
self._PointsArray[-added_length:, :] = polygon
- self._IndexArray.resize((self._IndexArray.shape[0]+1))
+ self._IndexArray.resize((self._IndexArray.shape[0] + 1))
self._IndexArray[-1] = self._PointsArray.shape[0]
self._MetaDataList.append(metadata)
@@ -319,6 +319,11 @@ def __len__(self):
# there is an extra index at the end, so that IndexArray[i+1] works
return len(self._IndexArray) - 1
+ def __bool__(self):
+ return bool(len(self))
+
+ __nonzero__ = __bool__ # for python 2
+
def __getitem__(self, index):
"""
returns a Polygon object
diff --git a/py_gnome/gnome/utilities/timeseries.py b/py_gnome/gnome/utilities/timeseries.py
index 9272000f7..08e0ac042 100644
--- a/py_gnome/gnome/utilities/timeseries.py
+++ b/py_gnome/gnome/utilities/timeseries.py
@@ -85,9 +85,12 @@ def __init__(self, timeseries=None, filename=None, format='uv'):
self._filename = filename
if filename is None:
- self._check_timeseries(timeseries) # will raise an Exception if it fails
+ # will raise an Exception if it fails
+ self._check_timeseries(timeseries)
+
datetime_value_2d = self._xform_input_timeseries(timeseries)
time_value_pair = to_time_value_pair(datetime_value_2d, format)
+
self.ossm = CyTimeseries(timeseries=time_value_pair)
else:
ts_format = tsformat(format)
@@ -108,7 +111,9 @@ def _check_timeseries(self, timeseries):
else:
for i in timeseries:
if not self._is_timeseries_value(i):
- raise TimeseriesError('value: %s is not a timeseries value' % (i,))
+ raise TimeseriesError('value: {} '
+ 'is not a timeseries value'
+ .format(i))
return True
if not self._timeseries_is_ascending(timeseries):
@@ -273,7 +278,8 @@ def __eq__(self, other):
if not np.all(self_ts['time'] == other_ts['time']):
return False
- if not np.allclose(self_ts['value'], other_ts['value'], atol=1e-10, rtol=1e-10):
+ if not np.allclose(self_ts['value'], other_ts['value'],
+ atol=1e-10, rtol=1e-10):
return False
return True
diff --git a/py_gnome/gnome/utilities/weathering/adios2.py b/py_gnome/gnome/utilities/weathering/adios2.py
index 9139817f2..3fdaebcef 100644
--- a/py_gnome/gnome/utilities/weathering/adios2.py
+++ b/py_gnome/gnome/utilities/weathering/adios2.py
@@ -14,8 +14,8 @@ class Adios2(object):
Note: We should really try to look up the references for these and
move them to an appropriately referenced class.
'''
- @classmethod
- def wave_height(cls, U, fetch):
+ @staticmethod
+ def wave_height(U, fetch):
"""
compute the wave height
@@ -43,8 +43,8 @@ def wave_height(cls, U, fetch):
# into account?
return Hrms if Hrms < 30.0 else 30.0
- @classmethod
- def wind_speed_from_height(cls, H):
+ @staticmethod
+ def wind_speed_from_height(H):
"""
Compute the wind speed to use for the whitecap fraction
This is the reverse of wave_height()
@@ -61,8 +61,8 @@ def wind_speed_from_height(cls, H):
return U_h
- @classmethod
- def mean_wave_period(cls, U, wave_height, fetch):
+ @staticmethod
+ def mean_wave_period(U, wave_height, fetch):
"""
Compute the mean wave period
@@ -84,9 +84,14 @@ def mean_wave_period(cls, U, wave_height, fetch):
return T
- @classmethod
- def dissipative_wave_energy(self, water_density, H):
+ @staticmethod
+ def dissipative_wave_energy(water_density, H):
"""
Compute the dissipative wave energy
+
+ units? -- should be: 1/s^3
+ i.e. energy disspiation rate per m^2
+ so water density is in there -- but something else is up
+ does the constant have units?
"""
return 0.0034 * water_density * g * H ** 2
diff --git a/py_gnome/gnome/utilities/weathering/delvigne_sweeney.py b/py_gnome/gnome/utilities/weathering/delvigne_sweeney.py
index 8c2f70017..22967f01f 100644
--- a/py_gnome/gnome/utilities/weathering/delvigne_sweeney.py
+++ b/py_gnome/gnome/utilities/weathering/delvigne_sweeney.py
@@ -8,8 +8,8 @@ class DelvigneSweeney(object):
less than 10 knots.
'''
- @classmethod
- def breaking_waves_frac(cls, wind_speed, peak_wave_period):
+ @staticmethod
+ def breaking_waves_frac(wind_speed, peak_wave_period):
'''
Field observations of Holthuysen and Herbers (1986)
and Toba et al. (1971) lead to a simple empirical relation
diff --git a/py_gnome/gnome/utilities/weathering/lehr_simecek.py b/py_gnome/gnome/utilities/weathering/lehr_simecek.py
index 95ef4726d..95aaf03f9 100644
--- a/py_gnome/gnome/utilities/weathering/lehr_simecek.py
+++ b/py_gnome/gnome/utilities/weathering/lehr_simecek.py
@@ -6,14 +6,14 @@ class LehrSimecek(object):
This based on formulas by:
Lehr and Simecek-Beatty
'''
- @classmethod
- def whitecap_fraction(cls, U, salinity):
+ @staticmethod
+ def whitecap_fraction(U, salinity):
"""
compute the white capping fraction
This based on Lehr and Simecek-Beatty
The Relation of Langmuir Circulation Processes to the Standard
- Oil Spill Spreading, Dispersion and Transport Algorithms
+ Oil Spill Spreading, Dispersion, and Transport Algorithms
Spill Sci. and Tech. Bull, 6:247-253 (2000)
(maybe typo -- didn't match)
@@ -24,16 +24,18 @@ def whitecap_fraction(cls, U, salinity):
if U < 4.0: # m/s
# linear fit from 0 to the 4m/s value from Ding and Farmer
- # maybe should be a exponential / quadratic fit?
- # or zero less than 3, then a sharp increase to 4m/s?
+ # The Lehr and Simecek-Beatty paper had a different formulation:
+ # fw = 0.025 * (U - 3.0) / Tm
+ # that one produces a kink at 4 m/s and negative for U < 1
fw = (0.0125 * U) / Tm
else:
# # Ding and Farmer (JPO 1994)
# fw = (0.01*U + 0.01) / Tm
- # old ADIOS had a .5 factor - not sure why but we'll keep it
- # for now
# Ding and Farmer (JPO 1994)
- fw = 0.5 * (0.01 * U + 0.01) / Tm
+ fw = (0.01 * U + 0.01) / Tm
- return fw if fw <= 1.0 else 1.0 # only with U > 200m/s!
+ fw *= 0.5 # old ADIOS had a .5 factor - not sure why but we'll keep it
+ # for now
+
+ return min(fw, 1.0) # only with U > 200m/s!
diff --git a/py_gnome/gnome/utilities/weathering/monahan.py b/py_gnome/gnome/utilities/weathering/monahan.py
index 2dd4fe6d0..60db225ab 100644
--- a/py_gnome/gnome/utilities/weathering/monahan.py
+++ b/py_gnome/gnome/utilities/weathering/monahan.py
@@ -4,15 +4,19 @@ class Monahan(object):
This based on formulas by:
Monahan (JPO, 1971)
'''
- @classmethod
- def whitecap_decay_constant(cls, salinity):
+ @staticmethod
+ def whitecap_decay_constant(salinity):
"""
Monahan(JPO, 1971) time constant characterizing exponential
whitecap decay.
+ :param salinity: the salinity of the water
+ :type salinity: integer or float in PSU
+
+
The saltwater value for this constant is 3.85 sec while the
freshwater value is 2.54 sec.
- We will interpolate with salinity
+ This interpolates between those values by salinity
"""
return 0.03742857 * salinity + 2.54
diff --git a/py_gnome/gnome/utilities/weathering/stokes.py b/py_gnome/gnome/utilities/weathering/stokes.py
index e9197eff7..120d3d503 100644
--- a/py_gnome/gnome/utilities/weathering/stokes.py
+++ b/py_gnome/gnome/utilities/weathering/stokes.py
@@ -1,7 +1,7 @@
class Stokes(object):
- @classmethod
- def water_phase_xfer_velocity(cls, oil_water_rho_delta, diameter):
+ @staticmethod
+ def water_phase_xfer_velocity(oil_water_rho_delta, diameter):
'''
water phase transfer velocity k_w (m/s)
diff --git a/py_gnome/gnome/weatherers/__init__.py b/py_gnome/gnome/weatherers/__init__.py
index 36f294d2a..83bb86892 100644
--- a/py_gnome/gnome/weatherers/__init__.py
+++ b/py_gnome/gnome/weatherers/__init__.py
@@ -7,60 +7,62 @@
from emulsification import Emulsification
from weathering_data import WeatheringData
from spreading import Langmuir, FayGravityViscous, ConstantArea
+from roc import Burn as ROC_Burn
+from roc import Disperse as ROC_Disperse
'''
Weatherers are to be ordered as follows:
- 0. half-life - This weatherer is just used for testing. It is not used
+ half-life - This weatherer is just used for testing. It is not used
with the following real weatherers but we need to include it so
sorting always works
- 1. cleanup options including Skimmer, Burn, Beaching
- 2. chemical dispersion
- 3. evaporation - assign to all classes in this module
- 4. natural dispersion
- 5. oil particle aggregation - what is this?
- 6. dissolution
- 7. biodegradation
- 8. emulsification
- 9. WeatheringData - defines initialize_data() method to initialize all
+
+ Cleanup options including Skimmer, Burn, Beaching
+
+ WeatheringData - defines initialize_data() method to initialize all
weathering data arrays. In weather_elements, this updates data arrays
corresponding with wd properties (density, viscosity)
- 10. FayGravityViscous - initializes the 'fay_area' and 'area' array. Also
+
+ FayGravityViscous - initializes the 'fay_area' and 'area' array. Also
updates the 'area' and 'fay_area' array
- 11. Langmuir - modifies the 'area' array with fractional coverage based on
+
+ Langmuir - modifies the 'area' array with fractional coverage based on
langmuir cells.
- removal options have been re-prioritized - Burn, Skim, Disperse, Beach
+ Removal options have been re-prioritized - Burn, Skim, Disperse, Beach
the first three are listed in reverse order because the marking done
in prepare_for_model_step prioritizes whichever operation gets marked
last.
Once they are marked the weathering order doesn't matter.
'''
-__all__ = [Weatherer,
- HalfLifeWeatherer,
- ChemicalDispersion,
- Skimmer,
- Burn,
- Beaching,
- Evaporation,
- NaturalDispersion,
- # OilParticleAggregation,
- Dissolution,
- # Biodegradation,
- Emulsification,
- WeatheringData,
- FayGravityViscous,
- ConstantArea,
- Langmuir,
- ]
-
-weatherers_idx = dict([(v, i) for i, v in enumerate(__all__)])
+# NOTE: this list specifies sort order!
+sort_order = [ChemicalDispersion,
+ Skimmer,
+ Burn,
+ ROC_Burn,
+ ROC_Disperse,
+ Beaching,
+ HalfLifeWeatherer,
+ Evaporation,
+ NaturalDispersion,
+ # OilParticleAggregation,
+ Dissolution,
+ # Biodegradation,
+ Emulsification,
+ WeatheringData,
+ FayGravityViscous,
+ ConstantArea,
+ Langmuir,
+ ]
+weatherers_idx = dict([(v, i) for i, v in enumerate(sort_order)])
def weatherer_sort(weatherer):
'''
Returns an int describing the sorting order of the weatherer
or None if an order is not defined for the weatherer
+
+ :param weatherer: weatherer instance
'''
return weatherers_idx.get(weatherer.__class__)
diff --git a/py_gnome/gnome/weatherers/emulsification.py b/py_gnome/gnome/weatherers/emulsification.py
index b22edb74f..6a9b5f1bd 100644
--- a/py_gnome/gnome/weatherers/emulsification.py
+++ b/py_gnome/gnome/weatherers/emulsification.py
@@ -7,11 +7,17 @@
import numpy as np
+import gnome
+
from gnome.array_types import (frac_lost, # due to evaporation and dissolution
age,
mass,
+ oil_density,
+ density,
bulltime,
interfacial_area,
+ oil_viscosity,
+ viscosity,
frac_water)
from gnome.utilities.serializable import Serializable, Field
@@ -38,12 +44,15 @@ def __init__(self,
'''
self.waves = waves
+ self._bw = 0
if waves is not None:
kwargs['make_default_refs'] = \
kwargs.pop('make_default_refs', False)
super(Emulsification, self).__init__(**kwargs)
self.array_types.update({'age', 'bulltime', 'frac_water',
+ 'density', 'viscosity',
+ 'oil_density', 'oil_viscosity',
'mass', 'interfacial_area', 'frac_lost'})
def prepare_for_model_run(self, sc):
@@ -56,6 +65,7 @@ def prepare_for_model_run(self, sc):
if self.on:
super(Emulsification, self).prepare_for_model_run(sc)
sc.mass_balance['water_content'] = 0.0
+ self._bw = 0
def prepare_for_model_step(self, sc, time_step, model_time):
'''
@@ -70,6 +80,178 @@ def prepare_for_model_step(self, sc, time_step, model_time):
if not self.active:
return
+ # eventually switch this in
+ def new_weather_elements(self, sc, time_step, model_time):
+ '''
+ weather elements over time_step
+ - sets 'water_content' in sc.mass_balance
+ '''
+
+ if not self.active:
+ return
+ if sc.num_released == 0:
+ return
+
+ for substance, data in sc.itersubstancedata(self.array_types):
+ if len(data['age']) == 0:
+ #if len(data['frac_water']) == 0:
+ # substance does not contain any surface_weathering LEs
+ continue
+
+ product_type = substance.get('product_type')
+ if product_type == 'Refined':
+ data['frac_water'][:] = 0.0 # since there can only be one product type this could be return...
+ continue # since there can only be one product type this could be return...
+
+ # compute energy dissipation rate (m^2/s^3) based on wave height
+ wave_height = self.waves.get_value(model_time)[0]
+ if wave_height > 0:
+ eps = (.0355 * wave_height ** .215) / ((np.log(6.31 / wave_height ** 1.45)) ** 3)
+ else:
+ #eps = 0.
+ continue
+
+ water_temp = self.waves.water.get('temperature', 'K')
+ rho_oil = substance.density_at_temp(water_temp)
+ dens_emul = data['density']
+ visc_emul = data['viscosity']
+ dens_oil = data['oil_density']
+ visc_oil = data['oil_viscosity']
+ sigma_ow = substance.oil_water_surface_tension() # does this vary in time?
+ print "sigma_ow"
+ print sigma_ow[0]
+ v0 = substance.kvis_at_temp(water_temp) #viscosity is calculated in weathering_data
+ if wave_height > 0:
+ delta_T_emul = 1630 + 450 / wave_height ** (1.5)
+ else:
+ continue
+
+ visc_min = .00001 # 10 cSt
+ visc_max = .01 # 10000 cSt
+ sigma_min = .01 # 10 dyne/com
+ # new suggestion .03 <= f_asph <= .2
+ # latest update, min only .03 <= f_asph
+ f_min = .03
+ f_max = .2
+ r_min = .2
+ r_max = 1.4
+ rho_min = 600 #kg/m^3
+ drop_min = .000008 # 8 microns
+
+ #k_emul2 = 2.3 / delta_T_emul
+ k_emul2 = 1. / delta_T_emul
+ k_emul = self._water_uptake_coeff(model_time, substance)
+
+ # bulltime is not in database, but could be set by user
+ #emul_time = substance.get_bulltime()
+ emul_time = substance.bulltime
+
+ resin_mask = substance._sara['type'] == 'Resins'
+ asphaltene_mask = substance._sara['type'] == 'Asphaltenes'
+ saturates_mask = substance._sara['type'] == 'Saturates'
+ aromatics_mask = substance._sara['type'] == 'Aromatics'
+
+ f_sat = (saturates_mask * data['mass_components']).sum(axis=1) / data['mass'].sum()
+ f_arom = (aromatics_mask * data['mass_components']).sum(axis=1) / data['mass'].sum()
+
+ # will want to use mass_components to update over time
+ f_res1 = resin_mask * substance._sara['fraction']
+ f_res = np.sum(resin_mask * substance._sara['fraction'])
+ f_asph = np.sum(asphaltene_mask * substance._sara['fraction'])
+ rho_asph = np.sum(asphaltene_mask * substance._sara['density']) # 1100 kg/m^3
+
+ f_res2 = resin_mask * data['mass_components']
+ if data['mass'].sum() == 0:
+ continue
+ f_res3 = (resin_mask * data['mass_components']).sum(axis=1) / data['mass'].sum()
+ f_asph3 = (asphaltene_mask * data['mass_components']).sum(axis=1) / data['mass'].sum()
+
+ if f_res > 0:
+ r_oil = f_asph / f_res
+ else:
+ #r_oil = 0
+ continue
+ if f_asph <= 0:
+ continue
+ r_oil3 = np.where(f_res3 > 0, f_asph3 / f_res3, 0) # check if limits are just for S_b calculation
+
+ Y_max = .61 + .5 * r_oil - .28 * r_oil **2
+ # limit on r_oil3 values or just final Y_max or set Y_max = 0 if out of bounds?
+ if Y_max > .9:
+ Y_max = .9
+
+ m = .5 * (visc_max + visc_min)
+ x_visc = (visc_oil - m) / (visc_max - visc_min)
+
+ x_sig_min = (sigma_ow[0] - sigma_min) / sigma_ow[0]
+
+ #m = .5 * (f_max + f_min)
+ #x_fasph = (f_asph3 - m) / (f_max - f_min)
+ # changed to one-sided, add check for f_asph3 = 0
+ x_fasph = (f_asph3 - f_min) / (f_asph3)
+
+ m = .5 * (r_max + r_min)
+ x_r = (r_oil - m) / (r_max - r_min)
+
+ x_s = 0 # placeholder since this isn't used
+
+ # decide which factors use initial value and which use current value
+ # once Bw is set it stays on
+ Bw = self._Bw(x_visc,x_sig_min,x_fasph,x_r,x_s)
+
+ T_week = 604800
+
+ # Bill's calculation uses sigma_ow[0] in dynes/cm, visc in cSt and a fudge factor of .478834
+ # so we need to convert and scale
+ print "dens_oil"
+ print dens_oil
+ print "visc_oil"
+ print visc_oil
+ print "r_oil"
+ print r_oil
+ S_b = .478834 * ((dens_oil * (1000000*visc_oil)**.25 / (1000*sigma_ow[0])) * r_oil * np.exp(-2 * r_oil**2))**(1/6)
+ S_b[S_b > 1] = 1.
+ S_b[S_b < 0] = 0.
+ print "S_b"
+ print S_b
+ T_week = 604800
+
+
+ k_lw = np.where(data['frac_water'] > 0, (1 - S_b) / T_week, 0.)
+
+ #data['frac_water'] += (Bw * (k_emul2 * (Y_max - data['frac_water'])) - k_lw * data['frac_water']) * time_step
+ Y_prime = 1.582 * Y_max # Y_max / (1 - 1/e)
+ data['frac_water'] += (Bw * (k_emul2 * (Y_prime - data['frac_water'])) - k_lw * data['frac_water']) * time_step
+ data['frac_water'] = np.where(data['frac_water']>Y_max,Y_max,data['frac_water'])
+ # get from database bullwinkle (could be overridden by user)
+ #emul_constant = substance.get('bullwinkle_fraction')
+ # will want to check if user set a value, and change the interface since there is no longer a bullwinkle
+ emul_constant = substance.bullwinkle
+
+ # max water content fraction - get from database
+ Y_max = substance.get('emulsion_water_fraction_max')
+
+ # doesn't emulsify, avoid the nans
+ if Y_max <= 0:
+ continue
+ S_max = (6. / constants.drop_min) * (Y_max / (1.0 - Y_max))
+
+ #sc.mass_balance['water_content'] += \
+ #np.sum(data['frac_water'][:]) / sc.num_released
+ # just average the water fraction each time - it is not per time
+ # step value but at a certain time value
+ # todo: probably should be weighted avg
+ if data['mass'].sum() > 0:
+ sc.mass_balance['water_content'] = \
+ np.sum(data['mass']/data['mass'].sum() * data['frac_water'])
+
+ self.logger.debug(self._pid + 'water_content for {0}: {1}'.
+ format(substance.name,
+ sc.mass_balance['water_content']))
+
+ sc.update_from_fatedataview()
+
+
def weather_elements(self, sc, time_step, model_time):
'''
weather elements over time_step
@@ -160,13 +342,78 @@ def deserialize(cls, json_):
dict_ = schema.deserialize(json_)
if 'waves' in json_:
- waves = class_from_objtype(json_['waves'].pop('obj_type'))
- dict_['waves'] = waves.deserialize(json_['waves'])
+ obj = json_['waves']['obj_type']
+ dict_['waves'] = (eval(obj).deserialize(json_['waves']))
+# if 'waves' in json_:
+# waves = class_from_objtype(json_['waves'].pop('obj_type'))
+# dict_['waves'] = waves.deserialize(json_['waves'])
return dict_
else:
return json_
+
+ def _H_log(self, k, x):
+ '''
+ logistic function for turning on emulsification
+ '''
+ H_log = 1 / (1 + np.exp(-1*k*x))
+
+ return H_log
+
+ def _H_4(self, k, x):
+ '''
+ symmetric function for turning on emulsification
+ '''
+ H_4 = 1 / (1 + x**(2*k))
+
+ return H_4
+
+ def _Bw(self, x_visc, x_sig_min, x_fasph, x_r, x_s):
+ '''
+ '''
+ k_v = 4
+ k_sig = 4
+ k_fasph = 3
+ k_r = 2
+ k_s = 1.5
+
+ # for now, I think P_min will be determined elsewhere
+ U = 0
+ P_min = .03
+ #P_min = P_min - U*P_min
+ #P_min = P_min + U*(1 - P_min)
+
+ k = 4
+ P_1 = self._H_log(k,x_sig_min)
+
+ k = 4
+ P_2 = self._H_4(k,x_visc)
+
+ k = 3
+ P_3 = self._H_4(k,x_fasph)
+
+ k = 2
+ P_4 = self._H_4(k,x_r)
+
+ k = 1.5
+ #P_5 = self._H_log(k,x_s)
+ P_5 = 1 # placeholder until Bill comes up with a good option
+ # in his AMOP paper he is using slick thickness...
+
+ P_all = P_1 * P_2 * P_3 * P_4 * P_5
+ #P_all = self._H_log(k_v,x_v_min) * self._H_log(k_v,x_v_max) * self._H_log(k_sig,x_sig_min) * self._H_log(k_fasph,x_fasph) * self._H_log(k_r,x_r_min) * self._H_log(k_r,x_r_max) * self._H_log(k_s,x_s_min)
+
+ #if (P_all.any() < P_min):
+ if (P_all.all() < P_min):
+ Bw = 0
+ else:
+ Bw = 1
+
+ Bw = np.where(P_all < .03, 0, 1)
+
+ return Bw
+
def _water_uptake_coeff(self, model_time, substance):
'''
Use higher of wind or pseudo wind corresponding to wave height
diff --git a/py_gnome/gnome/weatherers/platforms.json b/py_gnome/gnome/weatherers/platforms.json
new file mode 100644
index 000000000..e0b16f39d
--- /dev/null
+++ b/py_gnome/gnome/weatherers/platforms.json
@@ -0,0 +1,835 @@
+{
+ "vessel": [
+ {
+ "swath_width_max": 100,
+ "max_op_time": 36,
+ "application_speed_max": 20,
+ "cascade_transit_speed": 5,
+ "payload": 2000,
+ "fuel_load": 40,
+ "application_speed_min": 3,
+ "swath_width": 65,
+ "application_speed": 5,
+ "staging_area_brief": 45,
+ "transit_speed": 5,
+ "max_range_with_payload": 1000,
+ "pump_rate_max": 20,
+ "pump_rate": "",
+ "pump_rate_min": 3,
+ "refuel": false,
+ "name": "Typical Large Vessel",
+ "dispersant_load": 20,
+ "swath_width_min": 20,
+ "transit_speed_max": 20,
+ "u_turn_time": 1,
+ "transit_speed_min": 5
+ }
+ ],
+ "aircraft": [
+ {
+ "swath_width_max": 200,
+ "max_op_time": 4,
+ "application_speed_max": 200,
+ "FIELD11": "",
+ "payload": 400,
+ "fuel_load": 10,
+ "reposition_speed": 120,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 1000,
+ "application_speed_min": 50,
+ "swath_width": 100,
+ "cascade_transit_speed_max_without_payload": null,
+ "cascade_transit_speed_without_payload": null,
+ "application_speed": 120,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": null,
+ "staging_area_brief": 45,
+ "transit_speed": 150,
+ "max_range_with_payload": 850,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 150,
+ "pump_rate_max": 1000,
+ "pump_rate_min": 5,
+ "cascade_transit_speed_max_with_payload": null,
+ "name": "Test Platform",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": null,
+ "swath_width_min": 20,
+ "departure": 0.5,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 50,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 250
+ },
+ {
+ "swath_width_max": 75,
+ "max_op_time": 4,
+ "application_speed_max": 130,
+ "FIELD11": "X",
+ "payload": 400,
+ "fuel_load": 5,
+ "reposition_speed": 140,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 532,
+ "application_speed_min": 104,
+ "swath_width": 70,
+ "cascade_transit_speed_max_without_payload": 140,
+ "cascade_transit_speed_without_payload": 122,
+ "application_speed": 130,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 122,
+ "staging_area_brief": 45,
+ "transit_speed": 128,
+ "max_range_with_payload": 442,
+ "u_turn_time": 0.75,
+ "cascade_transit_speed_with_payload": 128,
+ "pump_rate_max": 260,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 128,
+ "name": "Air Tractor AT-402 A & B 216 gal",
+ "dispersant_load": 8,
+ "cascade_transit_speed_min_with_payload": 128,
+ "swath_width_min": 50,
+ "departure": 0.5,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 140,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 122
+ },
+ {
+ "swath_width_max": 75,
+ "max_op_time": 3,
+ "application_speed_max": 135,
+ "FIELD11": "X",
+ "payload": 500,
+ "fuel_load": 5,
+ "reposition_speed": 140,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 450,
+ "application_speed_min": 104,
+ "swath_width": 70,
+ "cascade_transit_speed_max_without_payload": 122,
+ "cascade_transit_speed_without_payload": 122,
+ "application_speed": 135,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 122,
+ "staging_area_brief": 45,
+ "transit_speed": 120,
+ "max_range_with_payload": 360,
+ "u_turn_time": 0.75,
+ "cascade_transit_speed_with_payload": 120,
+ "pump_rate_max": 260,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 120,
+ "name": "Air Tractor AT-502 B 170 gal",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 120,
+ "swath_width_min": 45,
+ "departure": 0.5,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 152,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 120
+ },
+ {
+ "swath_width_max": 85,
+ "max_op_time": 2.5,
+ "application_speed_max": 170,
+ "FIELD11": "X",
+ "payload": 630,
+ "fuel_load": 10,
+ "reposition_speed": 160,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 500,
+ "application_speed_min": 110,
+ "swath_width": 85,
+ "cascade_transit_speed_max_without_payload": 167,
+ "cascade_transit_speed_without_payload": 167,
+ "application_speed": 145,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 167,
+ "staging_area_brief": 45,
+ "transit_speed": 160,
+ "max_range_with_payload": 400,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 160,
+ "pump_rate_max": 260,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 160,
+ "name": "Air Tractor AT-602 216 gal",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 160,
+ "swath_width_min": 60,
+ "departure": 1,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 172,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 90,
+ "max_op_time": 4.2,
+ "application_speed_max": 180,
+ "FIELD11": "x",
+ "payload": 800,
+ "fuel_load": 5,
+ "reposition_speed": 170,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 946,
+ "application_speed_min": 110,
+ "swath_width": 90,
+ "cascade_transit_speed_max_without_payload": 166,
+ "cascade_transit_speed_without_payload": 166,
+ "application_speed": 150,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 144,
+ "staging_area_brief": 45,
+ "transit_speed": 150,
+ "max_range_with_payload": 630,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 150,
+ "pump_rate_max": 370,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 150,
+ "name": "Air Tractor AT-802 A or F 380 gal",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 150,
+ "swath_width_min": 70,
+ "departure": 1,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 166,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 144
+ },
+ {
+ "swath_width_max": 90,
+ "max_op_time": 3.3,
+ "application_speed_max": 180,
+ "FIELD11": "X",
+ "payload": 800,
+ "fuel_load": 5,
+ "reposition_speed": 170,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 747,
+ "application_speed_min": 110,
+ "swath_width": 90,
+ "cascade_transit_speed_max_without_payload": 166,
+ "cascade_transit_speed_without_payload": 166,
+ "application_speed": 150,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 166,
+ "staging_area_brief": 45,
+ "transit_speed": 150,
+ "max_range_with_payload": 495,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 150,
+ "pump_rate_max": 370,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 150,
+ "name": "Air Tractor AT-802 A or F 308 gal",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 150,
+ "swath_width_min": 70,
+ "departure": 1,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 192,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 90,
+ "max_op_time": 2.6,
+ "application_speed_max": 180,
+ "FIELD11": "X",
+ "payload": 800,
+ "fuel_load": 5,
+ "reposition_speed": 150,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 598,
+ "application_speed_min": 110,
+ "swath_width": 90,
+ "cascade_transit_speed_max_without_payload": 188,
+ "cascade_transit_speed_without_payload": 166,
+ "application_speed": 145,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 166,
+ "staging_area_brief": 45,
+ "transit_speed": 150,
+ "max_range_with_payload": 390,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 150,
+ "pump_rate_max": 370,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 188,
+ "name": "Air Tractor AT-802 A 254 gal",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 150,
+ "swath_width_min": 70,
+ "departure": 1,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 192,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 6.8,
+ "application_speed_max": 165,
+ "FIELD11": "x",
+ "payload": 3750,
+ "fuel_load": 32,
+ "reposition_speed": 165,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2400,
+ "application_speed_min": 130,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 330,
+ "cascade_transit_speed_without_payload": 282,
+ "application_speed": 140,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 282,
+ "staging_area_brief": 45,
+ "transit_speed": 225,
+ "max_range_with_payload": 2000,
+ "u_turn_time": 1.75,
+ "cascade_transit_speed_with_payload": 295,
+ "pump_rate_max": 350,
+ "pump_rate_min": 150,
+ "cascade_transit_speed_max_with_payload": 330,
+ "name": "Lockheed Electra L-188",
+ "dispersant_load": 30,
+ "cascade_transit_speed_min_with_payload": 295,
+ "swath_width_min": 100,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 250,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 4,
+ "application_speed_max": 200,
+ "FIELD11": "X",
+ "payload": 4000,
+ "fuel_load": 21,
+ "reposition_speed": 150,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2700,
+ "application_speed_min": 130,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 225,
+ "cascade_transit_speed_without_payload": 225,
+ "application_speed": 150,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 225,
+ "staging_area_brief": 45,
+ "transit_speed": 250,
+ "max_range_with_payload": 1000,
+ "u_turn_time": 1.75,
+ "cascade_transit_speed_with_payload": 250,
+ "pump_rate_max": 600,
+ "pump_rate_min": 50,
+ "cascade_transit_speed_max_with_payload": 250,
+ "name": "Lockheed Orion P-3A",
+ "dispersant_load": 27,
+ "cascade_transit_speed_min_with_payload": 250,
+ "swath_width_min": 100,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 350,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 250
+ },
+ {
+ "swath_width_max": 70,
+ "max_op_time": 5.7,
+ "application_speed_max": 200,
+ "FIELD11": "x",
+ "payload": 2000,
+ "fuel_load": 50,
+ "reposition_speed": 200,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2380,
+ "application_speed_min": 170,
+ "swath_width": 65,
+ "cascade_transit_speed_max_without_payload": 330,
+ "cascade_transit_speed_without_payload": 290,
+ "application_speed": 200,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 280,
+ "staging_area_brief": 45,
+ "transit_speed": 290,
+ "max_range_with_payload": 1650,
+ "u_turn_time": 1.75,
+ "cascade_transit_speed_with_payload": 290,
+ "pump_rate_max": 450,
+ "pump_rate_min": 50,
+ "cascade_transit_speed_max_with_payload": 330,
+ "name": "C-130 H with MASS",
+ "dispersant_load": 30,
+ "cascade_transit_speed_min_with_payload": 250,
+ "swath_width_min": 50,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 300,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 250
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 4.7,
+ "application_speed_max": 200,
+ "FIELD11": "x",
+ "payload": 3250,
+ "fuel_load": 20,
+ "reposition_speed": 150,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2086,
+ "application_speed_min": 150,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 370,
+ "cascade_transit_speed_without_payload": 298,
+ "application_speed": 150,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 250,
+ "staging_area_brief": 45,
+ "transit_speed": 298,
+ "max_range_with_payload": 1400,
+ "u_turn_time": 1.67,
+ "cascade_transit_speed_with_payload": 298,
+ "pump_rate_max": 523,
+ "pump_rate_min": 60,
+ "cascade_transit_speed_max_with_payload": 298,
+ "name": "C-130 A internal tank",
+ "dispersant_load": 20,
+ "cascade_transit_speed_min_with_payload": 230,
+ "swath_width_min": 100,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 298,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 230
+ },
+ {
+ "swath_width_max": 125,
+ "max_op_time": 4,
+ "application_speed_max": 150,
+ "FIELD11": "x",
+ "payload": 3170,
+ "fuel_load": 30,
+ "reposition_speed": 150,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2700,
+ "application_speed_min": 140,
+ "swath_width": 100,
+ "cascade_transit_speed_max_without_payload": 300,
+ "cascade_transit_speed_without_payload": 300,
+ "application_speed": 145,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 275,
+ "staging_area_brief": 45,
+ "transit_speed": 250,
+ "max_range_with_payload": 1200,
+ "u_turn_time": 1.75,
+ "cascade_transit_speed_with_payload": 300,
+ "pump_rate_max": 612,
+ "pump_rate_min": 51,
+ "cascade_transit_speed_max_with_payload": 300,
+ "name": "C-130 Hercules L-382 B, E, & G NIMBUS",
+ "dispersant_load": 45,
+ "cascade_transit_speed_min_with_payload": 275,
+ "swath_width_min": 75,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 300,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 250
+ },
+ {
+ "swath_width_max": 200,
+ "max_op_time": 4,
+ "application_speed_max": 150,
+ "FIELD11": "x",
+ "payload": 5000,
+ "fuel_load": 30,
+ "reposition_speed": 150,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 2700,
+ "application_speed_min": 140,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 300,
+ "cascade_transit_speed_without_payload": 300,
+ "application_speed": 145,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 275,
+ "staging_area_brief": 45,
+ "transit_speed": 250,
+ "max_range_with_payload": 1200,
+ "u_turn_time": 1.75,
+ "cascade_transit_speed_with_payload": 300,
+ "pump_rate_max": 612,
+ "pump_rate_min": 51,
+ "cascade_transit_speed_max_with_payload": 300,
+ "name": "C-130 Hercules L-382 B, E, & G ADDS",
+ "dispersant_load": 45,
+ "cascade_transit_speed_min_with_payload": 275,
+ "swath_width_min": 100,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 300,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 250
+ },
+ {
+ "swath_width_max": 120,
+ "max_op_time": 6.2,
+ "application_speed_max": 160,
+ "FIELD11": "X",
+ "payload": 1200,
+ "fuel_load": 13,
+ "reposition_speed": 130,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 1066,
+ "application_speed_min": 120,
+ "swath_width": 120,
+ "cascade_transit_speed_max_without_payload": 130,
+ "cascade_transit_speed_without_payload": 130,
+ "application_speed": 130,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 130,
+ "staging_area_brief": 45,
+ "transit_speed": 130,
+ "max_range_with_payload": 806,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 130,
+ "pump_rate_max": 600,
+ "pump_rate_min": 40,
+ "cascade_transit_speed_max_with_payload": 130,
+ "name": "Douglas DC-3",
+ "dispersant_load": 15,
+ "cascade_transit_speed_min_with_payload": 130,
+ "swath_width_min": 70,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 130,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 130
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 9,
+ "application_speed_max": 140,
+ "FIELD11": "x",
+ "payload": 2000,
+ "fuel_load": 15,
+ "reposition_speed": 150,
+ "taxi_time_landing": 7.5,
+ "max_range_no_payload": 2400,
+ "application_speed_min": 140,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 220,
+ "cascade_transit_speed_without_payload": 220,
+ "application_speed": 140,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 210,
+ "staging_area_brief": 45,
+ "transit_speed": 220,
+ "max_range_with_payload": 1800,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 220,
+ "pump_rate_max": 600,
+ "pump_rate_min": 40,
+ "cascade_transit_speed_max_with_payload": 220,
+ "name": "Douglas DC-3 BT-67",
+ "dispersant_load": 15,
+ "cascade_transit_speed_min_with_payload": 210,
+ "swath_width_min": 150,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 220,
+ "taxi_time_takeoff": 7.5,
+ "transit_speed_min": 200
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 8.2,
+ "application_speed_max": 160,
+ "FIELD11": "x",
+ "payload": 2000,
+ "fuel_load": 16,
+ "reposition_speed": 150,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 1725,
+ "application_speed_min": 120,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 150,
+ "cascade_transit_speed_without_payload": 150,
+ "application_speed": 150,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 150,
+ "staging_area_brief": 45,
+ "transit_speed": 150,
+ "max_range_with_payload": 1230,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 150,
+ "pump_rate_max": 600,
+ "pump_rate_min": 40,
+ "cascade_transit_speed_max_with_payload": 150,
+ "name": "Douglas DC-4",
+ "dispersant_load": 20,
+ "cascade_transit_speed_min_with_payload": 150,
+ "swath_width_min": 75,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 150,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 150,
+ "max_op_time": 12,
+ "application_speed_max": 145,
+ "FIELD11": "x",
+ "payload": 3320,
+ "fuel_load": 30,
+ "reposition_speed": 170,
+ "taxi_time_landing": 15,
+ "max_range_no_payload": 1725,
+ "application_speed_min": 120,
+ "swath_width": 150,
+ "cascade_transit_speed_max_without_payload": 237,
+ "cascade_transit_speed_without_payload": 237,
+ "application_speed": 130,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 237,
+ "staging_area_brief": 45,
+ "transit_speed": 237,
+ "max_range_with_payload": 1230,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 237,
+ "pump_rate_max": 375,
+ "pump_rate_min": 40,
+ "cascade_transit_speed_max_with_payload": 237,
+ "name": "Douglas DC-6",
+ "dispersant_load": 30,
+ "cascade_transit_speed_min_with_payload": 237,
+ "swath_width_min": 150,
+ "departure": 1,
+ "taxi_land_depart": 15,
+ "transit_speed_max": 256,
+ "taxi_time_takeoff": 15,
+ "transit_speed_min": 237
+ },
+ {
+ "swath_width_max": 90,
+ "max_op_time": 2.4,
+ "application_speed_max": 160,
+ "FIELD11": "X",
+ "payload": 250,
+ "fuel_load": 5,
+ "reposition_speed": 185,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 1900,
+ "application_speed_min": 130,
+ "swath_width": 65,
+ "cascade_transit_speed_max_without_payload": 200,
+ "cascade_transit_speed_without_payload": 185,
+ "application_speed": 140,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 150,
+ "staging_area_brief": 45,
+ "transit_speed": 185,
+ "max_range_with_payload": 450,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 185,
+ "pump_rate_max": 260,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 185,
+ "name": "Cessna C208 Grand Caravan",
+ "dispersant_load": 5,
+ "cascade_transit_speed_min_with_payload": 150,
+ "swath_width_min": 50,
+ "departure": 0.3,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 220,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 185
+ },
+ {
+ "swath_width_max": 85,
+ "max_op_time": 1.2,
+ "application_speed_max": 175,
+ "FIELD11": "X",
+ "payload": 425,
+ "fuel_load": 12,
+ "reposition_speed": 150,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 796,
+ "application_speed_min": 130,
+ "swath_width": 75,
+ "cascade_transit_speed_max_without_payload": 200,
+ "cascade_transit_speed_without_payload": 185,
+ "application_speed": 150,
+ "approach": 0.75,
+ "cascade_transit_speed_min_without_payload": 160,
+ "staging_area_brief": 45,
+ "transit_speed": 185,
+ "max_range_with_payload": 222,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 185,
+ "pump_rate_max": 180,
+ "pump_rate_min": 20,
+ "cascade_transit_speed_max_with_payload": 200,
+ "name": "Beechcraft King Air 90A (BE-90A)",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 160,
+ "swath_width_min": 60,
+ "departure": 0.75,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 200,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 150
+ },
+ {
+ "swath_width_max": 70,
+ "max_op_time": 1.1,
+ "application_speed_max": 160,
+ "FIELD11": "x",
+ "payload": 500,
+ "fuel_load": 5,
+ "reposition_speed": 140,
+ "taxi_time_landing": 3,
+ "max_range_no_payload": 680,
+ "application_speed_min": 140,
+ "swath_width": 60,
+ "cascade_transit_speed_max_without_payload": 170,
+ "cascade_transit_speed_without_payload": 170,
+ "application_speed": 140,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 170,
+ "staging_area_brief": 45,
+ "transit_speed": 165,
+ "max_range_with_payload": 181,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 165,
+ "pump_rate_max": 260,
+ "pump_rate_min": 15,
+ "cascade_transit_speed_max_with_payload": 165,
+ "name": "CASA C-212-200 AVIOCAR",
+ "dispersant_load": 5,
+ "cascade_transit_speed_min_with_payload": 165,
+ "swath_width_min": 40,
+ "departure": 0.5,
+ "taxi_land_depart": 3,
+ "transit_speed_max": 200,
+ "taxi_time_takeoff": 3,
+ "transit_speed_min": 140
+ },
+ {
+ "swath_width_max": 80,
+ "max_op_time": 3.9,
+ "application_speed_max": 150,
+ "FIELD11": "x",
+ "payload": 440,
+ "fuel_load": 10,
+ "reposition_speed": 160,
+ "taxi_time_landing": 10,
+ "max_range_no_payload": 1060,
+ "application_speed_min": 120,
+ "swath_width": 60,
+ "cascade_transit_speed_max_without_payload": 225,
+ "cascade_transit_speed_without_payload": 200,
+ "application_speed": 120,
+ "approach": 1,
+ "cascade_transit_speed_min_without_payload": 200,
+ "staging_area_brief": 45,
+ "transit_speed": 200,
+ "max_range_with_payload": 780,
+ "u_turn_time": 1,
+ "cascade_transit_speed_with_payload": 200,
+ "pump_rate_max": 300,
+ "pump_rate_min": 40,
+ "cascade_transit_speed_max_with_payload": 225,
+ "name": "EMBRAER EMB 110 Bandierante",
+ "dispersant_load": 15,
+ "cascade_transit_speed_min_with_payload": 200,
+ "swath_width_min": 50,
+ "departure": 1,
+ "taxi_land_depart": 10,
+ "transit_speed_max": 220,
+ "taxi_time_takeoff": 10,
+ "transit_speed_min": 200
+ },
+ {
+ "swath_width_max": 70,
+ "max_op_time": 1.7,
+ "application_speed_max": 90,
+ "FIELD11": "x",
+ "payload": 240,
+ "fuel_load": 5,
+ "reposition_speed": 50,
+ "taxi_time_landing": 1,
+ "max_range_no_payload": 238,
+ "application_speed_min": 30,
+ "swath_width": 65,
+ "cascade_transit_speed_max_without_payload": 140,
+ "cascade_transit_speed_without_payload": 140,
+ "application_speed": 50,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 140,
+ "staging_area_brief": 45,
+ "transit_speed": 90,
+ "max_range_with_payload": 153,
+ "u_turn_time": 0.75,
+ "cascade_transit_speed_with_payload": 90,
+ "pump_rate_max": 50,
+ "pump_rate_min": 30,
+ "cascade_transit_speed_max_with_payload": 110,
+ "name": "Bell 407 with Simplex 6810",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 90,
+ "swath_width_min": 60,
+ "departure": 0.5,
+ "taxi_land_depart": 1,
+ "transit_speed_max": 90,
+ "taxi_time_takeoff": 1,
+ "transit_speed_min": 90
+ },
+ {
+ "swath_width_max": 70,
+ "max_op_time": 2,
+ "application_speed_max": 90,
+ "FIELD11": "x",
+ "payload": 240,
+ "fuel_load": 5,
+ "reposition_speed": 50,
+ "taxi_time_landing": 1,
+ "max_range_no_payload": 225,
+ "application_speed_min": 30,
+ "swath_width": 65,
+ "cascade_transit_speed_max_without_payload": 90,
+ "cascade_transit_speed_without_payload": 90,
+ "application_speed": 50,
+ "approach": 0.5,
+ "cascade_transit_speed_min_without_payload": 90,
+ "staging_area_brief": 45,
+ "transit_speed": 90,
+ "max_range_with_payload": 180,
+ "u_turn_time": 0.75,
+ "cascade_transit_speed_with_payload": 90,
+ "pump_rate_max": 50,
+ "pump_rate_min": 30,
+ "cascade_transit_speed_max_with_payload": 110,
+ "name": "Bell UH-1H with Simplex 6810",
+ "dispersant_load": 10,
+ "cascade_transit_speed_min_with_payload": 90,
+ "swath_width_min": 60,
+ "departure": 0.5,
+ "taxi_land_depart": 1,
+ "transit_speed_max": 90,
+ "taxi_time_takeoff": 1,
+ "transit_speed_min": 90
+ }
+ ]
+}
\ No newline at end of file
diff --git a/py_gnome/gnome/weatherers/roc.py b/py_gnome/gnome/weatherers/roc.py
new file mode 100644
index 000000000..96dab5f4c
--- /dev/null
+++ b/py_gnome/gnome/weatherers/roc.py
@@ -0,0 +1,1805 @@
+'''
+oil removal from various cleanup options
+add these as weatherers
+'''
+from __future__ import division
+
+import pytest
+import datetime
+import copy
+import unit_conversion as uc
+import json
+import os
+import logging
+import numpy as np
+import math
+from collections import OrderedDict
+
+from colander import (drop, SchemaNode, MappingSchema, Integer, Float, String, OneOf, Mapping, SequenceSchema, TupleSchema, DateTime)
+
+from gnome.weatherers import Weatherer
+from gnome.utilities.serializable import Serializable, Field
+from gnome.persist.extend_colander import LocalDateTime, DefaultTupleSchema, NumpyArray, TimeDelta
+from gnome.persist import validators, base_schema
+
+from gnome.weatherers.core import WeathererSchema
+from gnome import _valid_units
+from gnome.basic_types import oil_status, fate as bt_fate
+
+from gnome.array_types import (mass,
+ density,
+ fay_area,
+ frac_water)
+
+# define valid units at module scope because the Schema and Object both use it
+_valid_dist_units = _valid_units('Length')
+_valid_vel_units = _valid_units('Velocity')
+_valid_vol_units = _valid_units('Volume')
+_valid_dis_units = _valid_units('Discharge')
+_valid_time_units = _valid_units('Time')
+_valid_oil_concentration_units = _valid_units('Oil Concentration')
+_valid_concentration_units = _valid_units('Concentration In Water')
+
+
+class OnSceneTupleSchema(TupleSchema):
+ start = SchemaNode(DateTime(default_tzinfo=None))
+ end = SchemaNode(DateTime(default_tzinfo=None))
+
+class OnSceneTimeSeriesSchema(SequenceSchema):
+ value = OnSceneTupleSchema()
+
+# def validator(self, node, cstruct):
+# '''
+# validate on-scene timeseries list
+# '''
+# validators.no_duplicate_datetime(node, cstruct)
+# validators.ascending_datetime(node, cstruct)
+
+class ResponseSchema(WeathererSchema):
+ timeseries = OnSceneTimeSeriesSchema()
+
+class Response(Weatherer, Serializable):
+
+ _schema = ResponseSchema
+ _state = copy.deepcopy(Weatherer._state)
+# _state += [Field('timeseries', update=True, save=True)]
+ _oc_list = ['timeseries']
+
+ _schema = ResponseSchema
+
+ _state = copy.deepcopy(Weatherer._state)
+
+ _state += [Field('timeseries', save=True, update=True)]
+
+ def __init__(self,
+ timeseries=None,
+ **kwargs):
+ super(Response, self).__init__(**kwargs)
+ self.timeseries = timeseries
+ self._report = []
+
+ def _get_thickness(self, sc):
+ oil_thickness = 0.0
+ substance = self._get_substance(sc)
+ if sc['area'].any() > 0:
+ volume_emul = (sc['mass'].mean() / substance.density_at_temp()) / (1.0 - sc['frac_water'].mean())
+ oil_thickness = volume_emul / sc['area'].mean()
+
+ return uc.convert('Length', 'meters', 'inches', oil_thickness)
+
+ @property
+ def units(self):
+ return self._units
+
+ @units.setter
+ def units(self, u_dict):
+ for prop, unit in u_dict.iteritems():
+ if prop in self._units_type:
+ if unit not in self._units_type[prop][1]:
+ msg = ("{0} are invalid units for {1}."
+ "Ignore it".format(unit, prop))
+ self.logger.error(msg)
+ raise uc.InvalidUnitError(msg)
+
+ self._units[prop] = unit
+
+ def get(self, attr, unit=None):
+ val = getattr(self, attr)
+ if unit is None:
+ if (attr not in self._si_units or
+ self._si_units[attr] == self.units[attr]):
+ return val
+ else:
+ unit = self._si_units[attr]
+
+ if unit in self._units_type[attr][1]:
+ return uc.convert(self._units_type[attr][0], self.units[attr],
+ unit, val)
+ else:
+ ex = uc.InvalidUnitError((unit, self._units_type[attr][0]))
+ self.logger.error(str(ex))
+ raise ex
+
+ def set(self, attr, value, unit):
+ if unit not in self._units_type[attr][1]:
+ raise uc.InvalidUnitError((unit, self._units_type[attr][1]))
+
+ setattr(self, attr, value)
+ self.units[attr] = unit
+
+ def _is_active(self, model_time, time_step):
+ for t in self.timeseries:
+ if model_time >= t[0] and model_time + datetime.timedelta(seconds=time_step / 2) <= t[1]:
+ return True
+
+ return False
+
+ def _setup_report(self, sc):
+ if 'report' not in sc:
+ sc.report = {}
+
+ sc.report[self.id] = []
+ self.report = sc.report[self.id]
+
+ def _get_substance(self, sc):
+ '''
+ return a single substance - recovery options only know about the
+ total amount removed. Unclear how to assign this to multiple substances
+ for now, just log an error if more than one substance is present
+ '''
+ substance = sc.get_substances(complete=False)
+ if len(substance) > 1:
+ self.logger.error('Found more than one type of oil '
+ '- not supported. Results with be incorrect')
+
+ return substance[0]
+
+ def _remove_mass_simple(self, data, amount):
+ total_mass = data['mass'].sum()
+ rm_mass_frac = min(amount / total_mass, 1.0)
+ data['mass_components'] = \
+ (1 - rm_mass_frac) * data['mass_components']
+ data['mass'] = data['mass_components'].sum(1)
+
+ def _remove_mass_indices(self, data, amounts, indices):
+ #removes mass from the mass components specified by an indices array
+ masses = data['mass'][indices]
+ rm_mass_frac = np.clip(amounts / masses, 0, 1)
+ old_mass = data['mass_components'][indices].sum(1)
+ data['mass_components'][indices] = (1 - rm_mass_frac)[:, np.newaxis] * data['mass_components'][indices]
+ new_mass = data['mass_components'][indices].sum(1)
+ data['mass'][indices] = data['mass_components'][indices].sum(1)
+ return old_mass - new_mass
+
+ def index_of(self, time):
+ '''
+ Returns the index of the timeseries entry that the time specified is within.
+ If it is not in one of the intervals, -1 will be returned
+ '''
+ for i, t in enumerate(self.timeseries):
+ if time >= t[0] and time < t[-1]:
+ return i
+ return -1
+
+ def next_interval_index(self, time):
+ '''
+ returns the index of the next interval, even if outside interval.
+ returns None if there is no next interval
+ '''
+ if time >= self.timeseries[-1][-1]:
+ #off end
+ return None
+ if time < self.timeseries[0][0]:
+ #before start
+ return 0
+ idx = self.index_of(time)
+ if idx > -1:
+ #inside valid interval
+ return idx + 1 if idx + 1 != len(self.timeseries) else None
+ if idx == -1:
+ #outside timeseries intervals
+ for i, t in enumerate(self.timeseries[0:-1]):
+ if time >= self.timeseries[i][-1] and time < self.timeseries[i+1][0]:
+ return i+1
+
+ def time_to_next_interval(self, time):
+ '''
+ if within an interval, returns time left in the interval.
+ if between intervals, returns time until start of next interval
+ if past end, or response deactivated, return None
+ '''
+ cur_idx = self.index_of(time)
+ if cur_idx == -1:
+ next_idx = self.next_interval_index(time)
+ if next_idx is None:
+ return None
+ else:
+ return self.timeseries[next_idx][0] - time
+ else:
+ return self.timeseries[cur_idx][-1] - time
+
+ def is_operating(self, time):
+ return self.index_of(time) > -1
+
+# def serialize(self, json_="webapi"):
+# serial = super(Response, self).serialize(json_)
+# if self.timeseries is not None:
+# serial['timeseries'] = []
+# for v in self.timeseries:
+# serial['timeseries'].append([v[0].isoformat(), v[1].isoformat()])
+# return serial
+#
+# @classmethod
+# def deserialize(cls, json):
+# schema = cls._schema()
+# deserial = schema.deserialize(json)
+# if 'timeseries' in json:
+# deserial['timeseries'] = []
+# for v in json['timeseries']:
+# deserial['timeseries'].append(
+# (datetime.datetime.strptime(v[0], '%Y-%m-%dT%H:%M:%S'),
+# datetime.datetime.strptime(v[1], '%Y-%m-%dT%H:%M:%S')))
+
+# return deserial
+
+ def _no_op_step(self):
+ self._time_remaining = 0;
+
+class PlatformUnitsSchema(MappingSchema):
+ def __init__(self, *args, **kwargs):
+ for k, v in Platform._attr.items():
+ self.add(SchemaNode(String(), missing=drop, name=k, validator=OneOf(v[2])))
+ super(PlatformUnitsSchema, self).__init__()
+
+
+class PlatformSchema(base_schema.ObjType):
+
+ def __init__(self, *args, **kwargs):
+ for k in Platform._attr.keys():
+ self.add(SchemaNode(Float(), missing=drop, name=k))
+ units = PlatformUnitsSchema()
+ units.missing = drop
+ units.name = 'units'
+ self.add(units)
+ super(PlatformSchema, self).__init__()
+
+
+class Platform(Serializable):
+
+ _attr = {"swath_width_max": ('ft', 'length', _valid_dist_units),
+ "swath_width": ('ft', 'length', _valid_dist_units),
+ "swath_width_min": ('ft', 'length', _valid_dist_units),
+ "reposition_speed": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "application_speed_min": ('kts', 'velocity', _valid_vel_units),
+ "application_speed": ('kts', 'velocity', _valid_vel_units),
+ "application_speed_max": ('kts', 'velocity', _valid_vel_units),
+ "cascade_transit_speed_max_without_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "cascade_transit_speed_without_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "cascade_transit_speed_min_without_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "cascade_transit_speed_with_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "cascade_transit_speed_max_with_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "cascade_transit_speed_min_with_payload": ('kts', 'velocity', _valid_vel_units), #non-boat
+ "transit_speed_max": ('kts', 'velocity', _valid_vel_units),
+ "transit_speed_min": ('kts', 'velocity', _valid_vel_units),
+ "transit_speed": ('kts', 'velocity', _valid_vel_units),
+ "fuel_load": ('min', 'time', _valid_time_units),
+ "taxi_time_landing": ('min', 'time', _valid_time_units),
+ "staging_area_brief": ('min', 'time', _valid_time_units),
+ "dispersant_load": ('min', 'time', _valid_time_units),
+ "taxi_land_depart": ('min', 'time', _valid_time_units),
+ "taxi_time_takeoff": ('min', 'time', _valid_time_units),
+ "u_turn_time": ('min', 'time', _valid_time_units),
+ "max_op_time": ('hr', 'time', _valid_time_units),
+ "max_range_no_payload": ('nm', 'length', _valid_dist_units),
+ "max_range_with_payload": ('nm', 'length', _valid_dist_units),
+ "approach": ('nm', 'length', _valid_dist_units),
+ "departure": ('nm', 'length', _valid_dist_units),
+ "payload": ('gal', 'volume', _valid_vol_units),
+ "pump_rate_max": ('gal/min', 'discharge', _valid_dis_units),
+ "pump_rate_min": ('gal/min', 'discharge', _valid_dis_units)}
+
+ _si_units = dict([(k, v[0]) for k, v in _attr.items()])
+
+ _units_type = dict([(k, (v[1], v[2])) for k, v in _attr.items()])
+
+ base_dir = os.path.dirname(__file__)
+ with open(os.path.join(base_dir, 'platforms.json'), 'r') as f:
+ js = json.load(f)
+ plat_types = dict(zip([t['name'] for t in js['vessel']], js['vessel']))
+ plat_types.update(dict(zip([t['name'] for t in js['aircraft']], js['aircraft'])))
+
+ _schema = PlatformSchema
+
+ _state = copy.deepcopy(Serializable._state)
+
+ _state += [Field(k, save=True, update=True) for k in _attr.keys()]
+ _state += [Field('units', save=True, update=True)]
+
+ def __init__(self,
+ units=None,
+ **kwargs):
+
+ if '_name' in kwargs.keys():
+ kwargs = self.plat_types[kwargs.pop('_name')]
+ if units is None:
+ units = dict([(k, v[0]) for k, v in self._attr.items()])
+ self.units = units
+ for k in Platform._attr.keys():
+ setattr(self, k, kwargs.get(k, None))
+
+ self.disp_remaining = 0
+ self.cur_pump_rate = 0
+ if self.approach is None or self.departure is None:
+ self.is_boat = True
+ else:
+ self.is_boat = False
+
+ super(Platform, self).__init__()
+
+ def get(self, attr, unit=None):
+ val = getattr(self, attr)
+ if unit is None:
+ if (attr not in self._si_units or
+ self._si_units[attr] == self.units[attr]):
+ return val
+ else:
+ unit = self._si_units[attr]
+
+ if unit in self._units_type[attr][1]:
+ return uc.convert(self._units_type[attr][0], self.units[attr],
+ unit, val)
+ else:
+ ex = uc.InvalidUnitError((unit, self._units_type[attr][0]))
+ self.logger.error(str(ex))
+ raise ex
+
+ def set(self, attr, value, unit):
+ if unit not in self._units_type[attr][0]:
+ raise uc.InvalidUnitError((unit, self._units_type[attr][0]))
+
+ setattr(self, attr, value)
+ self.units[attr] = unit
+
+ def release_rate(self, dosage, unit='gal/acre'):
+ '''return unit = gal/min'''
+ if unit != 'gal/acre':
+ dosage = uc.Convert('oilconcentration', 'unit', 'gal/acre', dosage)
+ a_s = self.get('application_speed', 'ft/min')
+ s_w = self.get('swadth_width', 'ft')
+
+ return uc.convert('area', 'ft^2', 'acre', (dosage * a_s * s_w))
+
+ @classmethod
+ def new_from_dict(cls, dict_):
+ '''
+ Need to override this, because what the default one does is insane
+ '''
+ return cls(**dict_)
+
+ def one_way_transit_time(self, dist, unit='nm', payload=False):
+ '''return unit = sec'''
+ t_s = self.get('transit_speed', 'kts')
+ t_l_d = self.get('taxi_land_depart', 'sec') if self.taxi_land_depart is not None else None
+ raw = dist / t_s * 3600
+ if t_l_d is not None:
+ raw += t_l_d
+ return raw
+
+ def max_dosage(self):
+ '''return unit = gal/acre'''
+ p_r_m = self.get('pump_rate_max', 'm^3/s')
+ a_s = self.get('application_speed', 'm/s')
+ s_w_m = self.get('swath_width_min', 'm')
+ dos = (p_r_m) / (a_s * s_w_m)
+ dos = uc.convert('length', 'm', 'micron', dos)
+ dos = uc.convert('oilconcentration', 'micron', 'gal/acre', dos)
+ return dos
+
+ def min_dosage(self):
+ '''return unit = gal/acre'''
+ p_r_m = self.get('pump_rate_min', 'm^3/s')
+ a_s = self.get('application_speed', 'm/s')
+ s_w_m = self.get('swath_width_max', 'm')
+ dos = (p_r_m) / (a_s * s_w_m)
+ dos = uc.convert('length', 'm', 'micron', dos)
+ dos = uc.convert('oilconcentration', 'micron', 'gal/acre', dos)
+ return dos
+
+ def cascade_time(self, dist, unit='nm', payload=False):
+ '''return unit = sec'''
+ dist = dist if unit == 'nm' else uc.convert('length', unit, 'nm', dist)
+ max_range = self.get('max_rage_with_payload', 'nm') if payload else self.get('max_range_no_payload', 'nm')
+ speed = self.get('cascade_transit_speed_with_payload', 'kts') if payload else self.get('cascade_transit_speed_without_payload', 'kts')
+ taxi_land_depart = self.get('taxi_land_depart', 'hr')
+ fuel_load = self.get('refuel', 'hr')
+
+ cascade_time = 0
+ if dist > max_range:
+ num_legs = dist / max_range
+ frac_leg = (num_legs * 1000) % 1000
+ num_legs = int(num_legs)
+ cascade_time += taxi_land_depart
+ cascade_time += (num_legs * max_range)
+ inter_stop = (taxi_land_depart * 2 + fuel_load)
+ cascade_time += num_legs * inter_stop
+ cascade_time += frac_leg * (max_range / speed)
+ cascade_time += taxi_land_depart
+ else:
+ cascade_time += taxi_land_depart * 2
+ cascade_time += dist / speed
+ return cascade_time * 3600
+
+ def max_onsite_time(self, dist, simul=False):
+ '''
+ return time in sec
+ '''
+ m_o_t = self.get('max_op_time', 'sec')
+ o_w_t_t = self.one_way_transit_time(dist)
+ r_r = self.refuel_reload(simul=simul)
+ rv = m_o_t - o_w_t_t * 2 - r_r
+# if rv < 0:
+# logging.warn('max onsite time is less than zero')
+# else:
+# pld = self.get('payload', 'gal')
+# m_p_r = self.get('max_pump_rate', 'gal/hr')
+# if rv < (pld / m_p_r):
+# logging.warn("max onsite time is less than possible time to finsish spraying")
+ return rv
+
+ def num_passes_possible(self, time, pass_len, pass_type):
+ '''
+ In a given time (sec) compute maximum number of complete passes before
+ needing to return to base.
+
+ A pass consists of an approach, spray, u-turn, and reposition.
+ '''
+
+# rep = self.get('reposition_speed', 'm/s')
+
+ return int(time.total_seconds() / int(self.pass_duration(pass_len, pass_type)))
+
+ def refuel_reload(self, simul=False):
+ '''return unit = sec'''
+ rl = self.get('dispersant_load', 'sec')
+ rf = self.get('fuel_load', 'sec')
+ return max(rl, rf) if simul else rf + rl
+
+ def pass_duration(self, pass_len, pass_type, units='nm'):
+ '''
+ pass_len in nm
+ return in sec
+ '''
+ times = self.pass_duration_tuple(pass_len, pass_type, units='nm')
+ if pass_type == 'bidirectional':
+ return sum(times)
+ else:
+ return sum(times)
+
+ def pass_duration_tuple(self, pass_len, pass_type, units='nm'):
+ appr_dist = self.get('approach', 'm') if self.approach is not None else 0
+ dep_dist = self.get('departure', 'm') if self.departure is not None else 0
+ rep_speed = self.get('reposition_speed', 'm/s') if self.reposition_speed is not None else 1
+ appr_time = appr_dist / rep_speed
+ dep_time = dep_dist / rep_speed
+ u_turn = self.get('u_turn_time', 'sec') if self.u_turn_time is not None else 0
+
+ pass_len = uc.convert('length', units, 'm', pass_len)
+ app_speed = self.get('application_speed', 'm/s')
+ spray_time = pass_len / app_speed
+ if pass_type == 'bidirectional':
+ return (appr_time, spray_time, u_turn, spray_time, dep_time)
+ else:
+ return (appr_time, spray_time, u_turn, dep_time)
+
+ def sortie_possible(self, time_avail, transit, pass_len):
+ # assume already refueled/reloaded
+ # possible if able to complete transit, at least one pass, and transit back within time available
+ min_spray_time = self.pass_duration(pass_len, 'bidirectional')
+ tot_mission_time = self.one_way_transit_time(transit) * 2 + min_spray_time
+ return time_avail > datetime.timedelta(seconds=tot_mission_time)
+
+ def eff_pump_rate(self, dosage, unit='gal/acre'):
+ '''
+ given a dosage, determine the pump rate necessary given the airspeed and area covered in a pass
+ return value = m^3/s
+ '''
+ dosage = uc.convert('oilconcentration', unit, 'micron', dosage)
+ dosage = uc.convert('length', 'micron', 'm', dosage)
+ app_speed = self.get('application_speed', 'm/s')
+ swath_width = self.get('swath_width', 'm')
+ eff_pr = dosage * app_speed * swath_width
+ max_pr = self.get('pump_rate_max', 'm^3/s')
+ min_pr = self.get('pump_rate_min', 'm^3/s')
+ if eff_pr > max_pr:
+ #log warning?
+ print 'computed pump rate is too high for this platform. using max instead'
+ return max_pr
+ elif eff_pr < min_pr:
+ print 'computed pump rate is too low for this platform. using min instead'
+ return min_pr
+ else:
+ return eff_pr
+
+ def spray_time_fraction(self, pass_len, pass_type, units='nm'):
+ pass_len = uc.convert('length', units, 'm', pass_len)
+ app_speed = self.get('application_speed', 'm/s')
+ pass_dur = self.pass_duration(pass_len, pass_type, units)
+ spray_time = pass_len / app_speed
+ if pass_type == 'bidirectional':
+ return (spray_time * 2) / pass_dur
+ else:
+ return (spray_time) / pass_dur
+
+
+class DisperseUnitsSchema(MappingSchema):
+ def __init__(self, *args, **kwargs):
+ for k, v in Disperse._attr.items():
+ self.add(SchemaNode(String(), missing=drop, name=k, validator=OneOf(v[2])))
+ super(DisperseUnitsSchema, self).__init__()
+
+
+class DisperseSchema(ResponseSchema):
+ loading_type = SchemaNode(String(), validator=OneOf(['simultaneous', 'separate']))
+ dosage_type = SchemaNode(String(), missing=drop, validator=OneOf(['auto', 'custom']))
+ disp_oil_ratio = SchemaNode(Float(), missing=drop)
+ disp_eff = SchemaNode(Float(), missing=drop)
+ platform = PlatformSchema()
+
+ def __init__(self, *args, **kwargs):
+ for k, v in Disperse._attr.items():
+ self.add(SchemaNode(Float(), missing=drop, name=k))
+ units = DisperseUnitsSchema()
+ units.missing = drop
+ units.name = 'units'
+ self.add(units)
+ super(DisperseSchema, self).__init__()
+
+class Disperse(Response):
+
+ _attr = {'transit': ('nm', 'length', _valid_dist_units),
+ 'pass_length': ('nm', 'length', _valid_dist_units),
+ 'cascade_distance': ('nm', 'length', _valid_dist_units),
+ 'dosage': ('gal/acre', 'oilconcentration', _valid_oil_concentration_units)}
+
+ _si_units = dict([(k, v[0]) for k, v in _attr.items()])
+
+ _units_type = dict([(k, (v[1], v[2])) for k, v in _attr.items()])
+
+ _schema = DisperseSchema
+
+ _state = copy.deepcopy(Response._state)
+
+# _state += [Field(k, save=True, update=True) for k in _attr.keys()]
+ _state += [Field('units', save=True, update=True),
+ Field('disp_oil_ratio', save=True, update=True),
+ Field('disp_eff', save=True, update=True),
+ Field('platform', save=True, update=True),
+ Field('dosage_type', save=True, update=True),
+ Field('loading_type', save=True, update=True),
+ Field('report', save=False, update=False),
+ Field('wind', save=True, update=True, save_reference=True)]
+
+ wind_eff_list = [15, 30, 45, 60, 70, 78, 80, 82, 83, 84, 84, 84, 84, 84, 83, 83, 82, 80, 79, 78, 77, 75, 73, 71, 69, 67, 65, 63, 60, 58, 55, 53, 50, 47, 44, 41, 38]
+ visc_eff_table = OrderedDict([(1, 68), (2, 71), (3, 72.5), (4, 74), (5, 75), (7, 77), (10, 78), (20, 80), (40, 83.5), (70, 85.5), (100, 87), (300, 89.5), (500, 90.5), (700, 91), (1000, 92), (2000, 91), (3000, 83), (5000, 52), (7000, 32), (10000, 17), (20000, 11), (30000, 8.5), (40000, 7), (50000, 6.5), (100000, 6), (1000000, 0)])
+
+ def __init__(self,
+ name=None,
+ transit=None,
+ pass_length=4,
+ dosage=None,
+ dosage_type='auto',
+ cascade_on=False,
+ cascade_distance=None,
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform=None,
+ units=None,
+ wind=None,
+ onsite_reload_refuel=False,
+ **kwargs):
+ super(Disperse, self).__init__(**kwargs)
+ self.name = name
+ self.transit = transit
+ self.pass_length = pass_length
+ self.dosage = dosage
+ self.dosage_type = dosage_type
+ self.cascade_on = cascade_on
+ self.cascade_distance = cascade_distance
+ self.loading_type = loading_type
+ self.pass_type = pass_type
+ self.disp_oil_ratio = 20 if disp_oil_ratio is None else disp_oil_ratio
+ self.disp_eff = disp_eff
+ self.onsite_reload_refuel = onsite_reload_refuel
+ if self.disp_eff is not None:
+ self._disp_eff_type = 'fixed'
+ else:
+ self._disp_eff_type = 'auto'
+ # time to next state
+ if platform is not None:
+ if isinstance(platform, basestring):
+ #find platform name
+ self.platform = Platform(_name=platform)
+ else:
+ #platform is defined as a dict
+ self.platform = Platform(**platform)
+ else:
+ self.platform = platform
+ if units is None:
+ units = dict([(k, v[0]) for k, v in self._attr.items()])
+ self._units = units
+ self.wind = wind
+ self.cur_state = None
+ self.oil_treated_this_timestep = 0
+ self._next_state_time = None
+ self._op_start = None
+ self._op_end = None
+ self._cur_sortie_num = 1
+ self._cur_pass_num = 1
+ self._area_this_ts = 0
+ self._area_this_sortie = 0
+ self._disp_sprayed_this_timestep = 0
+ self._remaining_dispersant = None
+ self._pass_time_tuple = self.platform.pass_duration_tuple(self.pass_length, self.pass_type)
+
+ if dosage is not None:
+ self._dosage_m = uc.convert('oilconcentration', self.units['dosage'], 'micron', self.dosage)
+ self._dosage_m = uc.convert('length', 'micron', 'meters', self._dosage_m)
+ self.report=[]
+ self.array_types.update({'area', 'density', 'viscosity'})
+
+
+# @property
+# def next_state(self):
+# if self.cur_state is None:
+# return None
+# if self.cur_state == 'cascade' or self.cur_state == 'rtb':
+# return 'replenish'
+# elif self.cur_state == 'replenish':
+# return 'en_route'
+# elif self.cur_state == 'en_route':
+# return 'on_site'
+# elif self.cur_state == 'inactive':
+# return 'replenish'
+#
+# @property
+# def cur_state_duration(self):
+# if self.cur_state is None:
+# raise ValueError('Current state of None has no duration')
+# if self.cur_state == 'inactive':
+# raise ValueError('inactive has special duration and should not be requested')
+# if self.cur_state == 'cascade':
+# return self.platform.cascade_time(self.cascade_distance)
+# if self.cur_state == 'ready':
+# return self.platform.refuel_reload(self.loading_type)
+# if self.cur_state == 'en_route':
+# return self.platform.one_way_transit_time(self.transit)
+# if self.cur_state == 'on_site':
+# return self.platform.max_onsite_time(self.transit)
+# if self.cur_state == 'returning':
+# return self.platform.one_way_transit_time(self.transit)
+
+ def get_mission_data(self,
+ dosage=None,
+ area=None,
+ pass_len=None,
+ efficiency=None,
+ units=None):
+ '''
+ Given a dosage and an area to spray, will return a tuple of information as follows:
+ Minimize number of passes by using high swath_width. If pump rate cannot get to the dosage necessary
+ reduce the swath width until it can.
+ Default units are ('gal/acre', 'm^3, 'nm', percent)
+ Return tuple is as below
+ (num_passes, disp/pass, oil/pass)
+ (number, gal, ft, gal/min)
+ '''
+ if units is None:
+ units = {'dosage': 'gal/acre',
+ 'area': 'm^3',
+ 'pass_len': 'nm',
+ 'efficiency': 'percent'}
+
+ # Efficiency determines how much of the pass length is
+ pass_area = self.get('swath_width', 'm') * uc.convert('length', units['pass_len'], 'm', pass_len)
+ pass_len = uc.convert('length', units['pass_len'], 'm', pass_len)
+ app_speed = self.get('application_speed', 'm/s')
+ spray_time = pass_len / app_speed
+ max_dos = (self.get('pump_rate_max', 'm^3/s') * spray_time / pass_area)
+ max_dos = uc.convert('length', 'm', 'micron', max_dos)
+ max_dos = uc.convert('oilconcentration', 'micron', 'gal/acre', max_dos)
+
+ def prepare_for_model_run(self, sc):
+ self._setup_report(sc)
+ if self.on:
+ sc.mass_balance['chem_dispersed'] = 0.0
+ if self.cascade_on:
+ self.cur_state = 'cascade'
+ else:
+ self.cur_state = 'retired'
+ self._remaining_dispersant = self.platform.get('payload', 'm^3')
+ self.oil_treated_this_timestep = 0
+ if 'systems' not in sc.mass_balance:
+ sc.mass_balance['systems'] = {}
+ sc.mass_balance['systems'][self.id] = 0.0
+
+ def dosage_from_thickness(self, sc):
+ thickness = self._get_thickness(sc) # inches
+ self._dosage_m = uc.convert('length', 'inches', 'm', thickness) / self.disp_oil_ratio
+ self.dosage = uc.convert('length', 'inches', 'micron', thickness)
+ self.dosage = uc.convert('oilconcentration', 'micron', 'gal/acre', self.dosage) / self.disp_oil_ratio
+
+ def get_disp_eff_avg(self, sc, model_time):
+ wind_eff_list = Disperse.wind_eff_list
+ visc_eff_table = Disperse.visc_eff_table
+ vel = self.wind.get_value(model_time)
+ spd = vel[0]
+ wind_eff = wind_eff_list[int(spd)] / 100.
+ idxs = self.dispersable_oil_idxs(sc)
+ avg_visc = np.mean(sc['viscosity'][idxs] * 1000000) if len(idxs) > 0 else 1000000
+ visc_eff = visc_eff_table[visc_eff_table.keys()[np.searchsorted(visc_eff_table.keys(), avg_visc)]] / 100
+ return wind_eff * visc_eff
+
+ def get_disp_eff(self, sc, model_time):
+ wind_eff_list = Disperse.wind_eff_list
+ visc_eff_table = Disperse.visc_eff_table
+ vel = self.wind.get_value(model_time)
+ spd = vel[0]
+ wind_eff = wind_eff_list[int(spd)] / 100.
+ idxs = self.dispersable_oil_idxs(sc)
+ visc = sc['viscosity'][idxs] * 1000000
+ visc_idxs = np.array([np.searchsorted(visc_eff_table.keys(), v) for v in visc])
+ visc_eff = np.array([visc_eff_table[visc_eff_table.keys()[v]] for v in visc_idxs]) / 100
+ return wind_eff * visc_eff
+
+ def prepare_for_model_step(self, sc, time_step, model_time):
+ '''
+ '''
+
+ if self._disp_eff_type != 'fixed':
+ self.disp_eff = self.get_disp_eff_avg(sc, model_time)
+# print 'efficiency is ', self.disp_eff
+ slick_area = 'WHAT??'
+
+ if not isinstance(time_step, datetime.timedelta):
+ time_step = datetime.timedelta(seconds=time_step)
+
+ self._time_remaining = datetime.timedelta(seconds=time_step.total_seconds())
+ zero = datetime.timedelta(seconds=0)
+ if self.cur_state is None:
+ # This is first step., setup inactivity if necessary
+ if self.next_interval_index(model_time) != 0:
+ raise ValueError('disperse time series begins before time of first step!')
+ else:
+ self.cur_state = 'retired'
+
+ if self.cur_state == 'deactivated':
+ # do deactivated stuff
+ return
+
+ if self.platform.is_boat:
+ self.simulate_boat(sc, time_step, model_time)
+ else:
+ self.simulate_plane(sc, time_step, model_time)
+
+ def simulate_boat(self, sc, time_step, model_time):
+ zero = datetime.timedelta(seconds=0)
+ ttni = self.time_to_next_interval(model_time)
+ tte = self.timeseries[-1][-1] - model_time
+ if tte < zero:
+ return
+ while self._time_remaining > zero:
+
+ if self.cur_state == 'retired':
+ if model_time < self.timeseries[0][0]:
+ tts = self.timeseries[0][0] - model_time
+ self._time_remaining -= min(self._time_remaining, tts)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self.time_remaining > 0:
+ #must just have started. Get ready
+ self.cur_state = 'ready'
+ self.report.append((model_time, 'Begin new operational period'))
+ else:
+ self.cur_state = 'ready'
+ self.report.append((model_time, 'Begin new operational period'))
+
+ elif self.cur_state == 'ready':
+ if self.platform.sortie_possible(tte, self.transit, self.pass_length):
+ # sortie is possible, so start immediately
+ self.report.append((model_time, 'Starting sortie'))
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit))
+ self.cur_state = 'en_route'
+ self._area_sprayed_this_sortie = 0
+ self._area_sprayed_this_ts = 0
+ else:
+ # cannot sortie, so retire until next interval
+ self.cur_state = 'deactivated'
+ self.report.append((model_time, 'Deactivating due to insufficient time remaining to conduct sortie'))
+ print self.report[-1]
+ self._time_remaining -= min(self._time_remaining, ttni)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+
+ elif self.cur_state == 'en_route':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Reached slick'))
+ self._op_start = model_time
+ self._op_end = (self.timeseries[-1][-1] - datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit)))
+ self._cur_pass_num = 1
+ self.cur_state = 'onsite'
+ dur = datetime.timedelta(hours=self.platform.get('max_op_time', 'hrs'))
+ self._next_state_time = model_time + dur
+
+ elif self.cur_state == 'onsite':
+ remaining_op = self._op_end - model_time
+ if self.is_operating(model_time):
+ interval_remaining = self.time_to_next_interval(model_time)
+ spray_time = min(self._time_remaining, remaining_op, interval_remaining)
+ if self.dosage_type == 'auto':
+ self.dosage_from_thickness(sc)
+ dosage = self.dosage
+ disp_possible = spray_time.total_seconds() * self.platform.eff_pump_rate(dosage)
+ disp_actual = min(self._remaining_dispersant, disp_possible)
+ if disp_actual != disp_possible:
+ spray_time = datetime.timedelta(seconds=disp_actual / self.platform.eff_pump_rate(dosage))
+ treated_possible = disp_actual * self.disp_oil_ratio
+ mass_treatable = np.mean(sc['density'][self.dispersable_oil_idxs(sc)]) * treated_possible
+ oil_avail = self.dispersable_oil_amount(sc, 'kg')
+ self.report.append((model_time, 'Oil available: ' + str(oil_avail) + ' Treatable mass: ' + str(mass_treatable) + ' Dispersant Sprayed: ' + str(disp_actual)))
+ self.report.append((model_time, 'Sprayed ' + str(disp_actual) + 'm^3 dispersant in ' + str(spray_time) + ' on ' + str(oil_avail) + ' kg of oil'))
+ print self.report[-1]
+ self._time_remaining -= spray_time
+ self._disp_sprayed_this_timestep += disp_actual
+ self._remaining_dispersant -= disp_actual
+ self.oil_treated_this_timestep += min(mass_treatable, oil_avail)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero: #end of interval, end of operation, or out of dispersant/fuel
+ if self._remaining_dispersant == 0:
+ #go to reload
+ if self.onsite_reload_refuel:
+ self.cur_state = 'refuel_reload'
+ refuel_reload = datetime.timedelta(seconds=self.platform.refuel_reload(simul=self.loading_type))
+ self._next_state_time = model_time + refuel_reload
+ self.report.append((model_time, 'Reloading/refueling'))
+ else:
+ #need to return to base
+ self.cur_state = 'rtb'
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit))
+ self.report.append((model_time, 'Out of dispersant, returning to base'))
+ elif model_time == self._op_end:
+ self.report.append((model_time, 'Operation complete, returning to base'))
+ self.cur_state = 'rtb'
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit))
+ else:
+ self._time_remaining -= min(self._time_remaining, remaining_op)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.cur_state = 'rtb'
+ self.report.append((model_time, 'Operation complete, returning to base'))
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit))
+
+ elif self.cur_state == 'rtb':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Returned to base'))
+ print self.report[-1]
+ refuel_reload = datetime.timedelta(seconds=self.platform.refuel_reload(simul=self.loading_type))
+ self._next_state_time = model_time + refuel_reload
+ self.cur_state = 'refuel_reload'
+
+ elif self.cur_state == 'refuel_reload':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Refuel/reload complete'))
+ print self.report[-1]
+ self._remaining_dispersant = self.platform.get('payload', 'm^3')
+ if self.onsite_reload_refuel:
+ self.cur_state = 'onsite'
+ else:
+ self.cur_state = 'ready'
+
+ def simulate_plane(self, sc, time_step, model_time):
+ ttni = self.time_to_next_interval(model_time)
+ zero = datetime.timedelta(seconds=0)
+ while self._time_remaining > zero:
+ if ttni is None:
+ if self.cur_state not in ['retired', 'reload', 'ready']:
+ raise ValueError('Operation is being deactivated while platform is active!')
+ self.cur_state = 'deactivated'
+ self.report.append((model_time, 'Disperse operation has ended and is deactivated'))
+ print self.report[-1]
+ break
+
+ if self.cur_state == 'retired':
+ if self.index_of(model_time) > -1 and self.timeseries[self.index_of(model_time)][0] == model_time:
+ #landed right on interval start, so ready immediately
+ self.cur_state = 'ready'
+ self.report.append((model_time, 'Begin new operational period'))
+ print self.report[-1]
+ continue
+ self._time_remaining -= min(self._time_remaining, ttni)
+ if self._time_remaining > zero:
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ # hit interval boundary before ending timestep.
+ # If ending current interval or no remaining time, do nothing
+ # if start of next interval, set state to 'ready'
+ # entering new operational interval
+ # ending current interval
+ if self.index_of(model_time) > -1:
+ self.cur_state = 'ready'
+ self.report.append((model_time, 'Begin new operational period'))
+ print self.report[-1]
+ else:
+ interval_idx = self.index_of(model_time - time_step + self._time_remaining)
+ self.report.append((model_time, 'Ending current operational period'))
+ print self.report[-1]
+
+ elif self.cur_state == 'ready':
+ if self.platform.sortie_possible(ttni, self.transit, self.pass_length):
+ # sortie is possible, so start immediately
+ self.report.append((model_time, 'Starting sortie'))
+ print self.report[-1]
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit))
+ self.cur_state = 'en_route'
+ self._area_sprayed_this_sortie = 0
+ self._area_sprayed_this_ts = 0
+ else:
+ # cannot sortie, so retire until next interval
+ self.cur_state = 'retired'
+ self.report.append((model_time, 'Retiring due to insufficient time remaining to conduct sortie'))
+ print self.report[-1]
+ self._time_remaining -= min(self._time_remaining, ttni)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+
+ elif self.cur_state == 'en_route':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Reached slick'))
+ print self.report[-1]
+ self._op_start = model_time
+ self._op_end = model_time + datetime.timedelta(seconds=self.platform.max_onsite_time(self.transit, self.loading_type))
+ self._cur_pass_num = 1
+ self.cur_state = 'approach'
+ dur = datetime.timedelta(seconds=self.platform.pass_duration_tuple(self.pass_length, self.pass_type)[0])
+ self._next_state_time = model_time + dur
+ self.report.append((model_time, 'Starting approach for pass ' + str(self._cur_pass_num)))
+ print self.report[-1]
+
+ elif self.cur_state == 'approach':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ spray_time = self.platform.pass_duration_tuple(self.pass_length, self.pass_type)[1]
+ self._next_state_time = model_time + datetime.timedelta(seconds=spray_time)
+ self.cur_state = 'disperse_' + str(self._cur_pass_num)
+ self.report.append((model_time, 'Starting pass ' + str(self._cur_pass_num)))
+
+ elif self.cur_state == 'u-turn':
+ if self.pass_type != 'bidirectional':
+ raise ValueError('u-turns should not happen in uni-directional passes')
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ spray_time = self.platform.pass_duration_tuple(self.pass_length, self.pass_type)[1]
+ self._next_state_time = model_time + datetime.timedelta(seconds=spray_time)
+ self.cur_state = 'disperse_' + str(self._cur_pass_num) + 'u'
+ self.report.append((model_time, 'Begin return pass of pass ' + str(self._cur_pass_num)))
+
+ elif self.cur_state == 'departure':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Disperse pass ' + str(self._cur_pass_num) + ' completed'))
+ passes_possible = self.platform.num_passes_possible(self._op_end - model_time, self.pass_length, self.pass_type)
+ passes_possible_after_holding = self.platform.num_passes_possible(self._op_end - model_time + time_step, self.pass_length, self.pass_type)
+ o_w_t_t = datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit, payload=False))
+ self._cur_pass_num += 1
+ if self._remaining_dispersant == 0:
+ # no dispersant, so return to base
+ self.reset_for_return_to_base(model_time, 'No dispersant remaining, returning to base')
+ elif np.isclose(self.dispersable_oil_amount(sc, 'kg'), 0):
+ if passes_possible_after_holding > 0:
+ # no oil left, but can still do a pass after holding for one timestep
+ self.cur_state = 'holding'
+ self._next_state_time = model_time + datetime.timedelta(seconds=time_step)
+ else:
+ self.reset_for_return_to_base(model_time, 'No oil, no time for holding pattern, returning to base')
+ elif passes_possible == 0:
+ # no passes possible, so RTB
+ self.reset_for_return_to_base(model_time, 'No time for further passes, returning to base')
+ else:
+ # oil and payload still remaining. Spray again.
+ self.report.append((model_time, 'Starting disperse pass ' + str(self._cur_pass_num)))
+ print self.report[-1]
+ self.cur_state = 'disperse_' + str(self._cur_pass_num)
+ self._next_state_time = model_time + datetime.timedelta(seconds=self._pass_time_tuple[1])
+
+ elif self.cur_state == 'holding':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ self.cur_state = 'approach'
+
+ elif 'disperse' in self.cur_state:
+ pass_dur = datetime.timedelta(seconds=self.platform.pass_duration_tuple(self.pass_length, self.pass_type)[1])
+ time_left_in_pass = self._next_state_time - model_time
+ spray_time = min(self._time_remaining, time_left_in_pass)
+ if self.dosage_type == 'auto':
+ self.dosage_from_thickness(sc)
+ dosage = self.dosage
+ disp_possible = spray_time.total_seconds() * self.platform.eff_pump_rate(dosage)
+ disp_actual = min(self._remaining_dispersant, disp_possible)
+ treated_possible = disp_actual * self.disp_oil_ratio
+ mass_treatable = np.mean(sc['density'][self.dispersable_oil_idxs(sc)]) * treated_possible
+ oil_avail = self.dispersable_oil_amount(sc, 'kg')
+ self.report.append((model_time, 'Oil available: ' + str(oil_avail) + ' Treatable mass: ' + str(mass_treatable) + ' Dispersant Sprayed: ' + str(disp_actual)))
+ self.report.append((model_time, 'Sprayed ' + str(disp_actual) + 'm^3 dispersant in ' + str(spray_time) + ' seconds on ' + str(oil_avail) + ' kg of oil'))
+ print self.report[-1]
+ self._time_remaining -= spray_time
+ self._disp_sprayed_this_timestep += disp_actual
+ self._remaining_dispersant -= disp_actual
+ self.oil_treated_this_timestep += min(mass_treatable, oil_avail)
+
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ # completed a spray.
+ if self.pass_type == 'bidirectional' and self._remaining_dispersant > 0 and self.cur_state[-1] != 'u':
+ self.cur_state = 'u-turn'
+ self.report.append((model_time, 'Doing u-turn'))
+ self._next_state_time = model_time + datetime.timedelta(seconds=self._pass_time_tuple[2])
+ else:
+ self.cur_state = 'departure'
+ self._next_state_time = model_time + datetime.timedelta(seconds=self._pass_time_tuple[-1])
+
+
+ elif self.cur_state == 'rtb':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Returned to base'))
+ print self.report[-1]
+ refuel_reload = datetime.timedelta(seconds=self.platform.refuel_reload(simul=self.loading_type))
+ self._next_state_time = model_time + refuel_reload
+ self.cur_state = 'refuel_reload'
+
+ elif self.cur_state == 'refuel_reload':
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Refuel/reload complete'))
+ print self.report[-1]
+ self._remaining_dispersant = self.platform.get('payload', 'm^3')
+ self.cur_state = 'ready'
+
+ elif self.cur_state == 'cascade':
+ if self._next_state_time is None:
+ self._next_state_time = model_time + datetime.timedelta(seconds=self.platform.cascade_time(self.cascade_distance, payload=False))
+ time_left = self._next_state_time - model_time
+ self._time_remaining -= min(self._time_remaining, time_left)
+ model_time, time_step = self.update_time(self._time_remaining, model_time, time_step)
+ if self._time_remaining > zero:
+ self.report.append((model_time, 'Cascade complete'))
+ print self.report[-1]
+ self.cur_state = 'ready'
+ else:
+ raise ValueError('current state is not recognized: ' + self.cur_state)
+
+ def reset_for_return_to_base(self, model_time, message):
+ self.report.append((model_time, message))
+ print self.report[-1]
+ o_w_t_t = datetime.timedelta(seconds=self.platform.one_way_transit_time(self.transit, payload=False))
+ self._next_state_time = model_time + o_w_t_t
+ self._op_start = self._op_end = None
+ self._cur_pass_num = 1
+ self._disp_sprayed_this_timestep = 0
+ self.cur_state = 'rtb'
+
+ def update_time(self, time_remaining, model_time, time_step):
+ if time_remaining > datetime.timedelta(seconds=0):
+ return model_time + time_step - time_remaining, time_remaining
+ else:
+ return model_time, time_step
+
+ def dispersable_oil_idxs(self, sc):
+ # LEs must have a low viscosity, have not been fully chem dispersed, and must have a mass > 0
+ idxs = np.where(sc['viscosity'] * 1000000 < 1000000)[0]
+# idxs = np.arange(0, len(sc['mass']))
+ codes = sc['fate_status'][idxs] != bt_fate.disperse
+ idxs = idxs[codes]
+ nonzero_mass = sc['mass'][idxs] > 0
+ idxs = idxs[nonzero_mass]
+ return idxs
+
+ def dispersable_oil_amount(self, sc, units='gal'):
+ idxs = self.dispersable_oil_idxs(sc)
+ if units in _valid_vol_units:
+ tot_vol = np.sum(sc['mass'][idxs] / sc['density'][idxs])
+ return max(0, uc.convert('m^3', units, tot_vol))
+ else:
+ tot_mass = np.sum(sc['mass'][idxs])
+ return max(0, tot_mass - self.oil_treated_this_timestep / np.mean(sc['density'][idxs]))
+
+ def weather_elements(self, sc, time_step, model_time):
+
+ idxs = self.dispersable_oil_idxs(sc)
+ if self.oil_treated_this_timestep != 0:
+ visc_eff_table = Disperse.visc_eff_table
+ wind_eff_list = Disperse.wind_eff_list
+# visc_disp_eff_per_le = [visc_eff_table[visc_eff_table.keys()[np.searchsorted(visc_eff_table.keys(), le)]] / 100 for le in sc['viscosity'][idxs] * 1000000]
+# vel = self.wind.get_value(model_time)
+# spd = math.sqrt(vel[0]**2 + vel[1]**2)
+# wind_disp_eff_per_le = wind_eff_list[int(self.wind.get_value(spd))]
+# proportions = disp_eff_per_le / np.mean(disp_eff_per_le)
+ mass_proportions = sc['mass'][idxs] / np.sum(sc['mass'][idxs])
+ eff_reductions = self.get_disp_eff(sc, model_time)
+ mass_to_remove = self.oil_treated_this_timestep * mass_proportions * eff_reductions
+
+ org_mass = sc['mass'][idxs]
+ removed = self._remove_mass_indices(sc, mass_to_remove, idxs)
+ print 'index, original mass, removed mass, final mass'
+ masstab = np.column_stack((idxs, org_mass, mass_to_remove, sc['mass'][idxs]))
+ sc.mass_balance['chem_dispersed'] += sum(removed)
+ sc.mass_balance['systems'][self.id] += sum(removed)
+ sc.mass_balance['floating'] -= sum(removed)
+ zero_or_disp = np.isclose(sc['mass'][idxs], 0)
+ new_status = sc['fate_status'][idxs]
+ new_status[zero_or_disp] = bt_fate.disperse
+ sc['fate_status'][idxs] = new_status
+ self.oil_treated_this_timestep = 0
+ self.disp_sprayed_this_timestep = 0
+
+
+
+class BurnUnitsSchema(MappingSchema):
+ offset = SchemaNode(String(),
+ description='SI units for distance',
+ validator=OneOf(_valid_dist_units))
+
+ boom_length = SchemaNode(String(),
+ description='SI units for distance',
+ validator=OneOf(_valid_dist_units))
+
+ boom_draft = SchemaNode(String(),
+ description='SI units for distance',
+ validator=OneOf(_valid_dist_units))
+
+ speed = SchemaNode(String(),
+ description='SI units for speed',
+ validator=OneOf(_valid_vel_units))
+
+class BurnSchema(ResponseSchema):
+ offset = SchemaNode(Integer())
+ boom_length = SchemaNode(Integer())
+ boom_draft = SchemaNode(Integer())
+ speed = SchemaNode(Float())
+ throughput = SchemaNode(Float())
+ burn_efficiency_type = SchemaNode(String())
+ units = BurnUnitsSchema()
+
+class Burn(Response):
+ _state = copy.deepcopy(Response._state)
+ _state += [Field('offset', save=True, update=True),
+ Field('boom_length', save=True, update=True),
+ Field('boom_draft', save=True, update=True),
+ Field('speed', save=True, update=True),
+ Field('throughput', save=True, update=True),
+ Field('burn_efficiency_type', save=True, update=True),
+ Field('units', save=True, update=True)]
+
+ _schema = BurnSchema
+
+ _si_units = {'offset': 'ft',
+ 'boom_length': 'ft',
+ 'boom_draft': 'in',
+ 'speed': 'kts',
+ '_boom_capacity_max': 'ft^3'}
+
+ _units_type = {'offset': ('length', _valid_dist_units),
+ 'boom_length': ('length', _valid_dist_units),
+ 'boom_draft': ('length', _valid_dist_units),
+ 'speed': ('velocity', _valid_vel_units),
+ '_boom_capacity_max': ('volume', _valid_vol_units)}
+
+ def __init__(self,
+ offset,
+ boom_length,
+ boom_draft,
+ speed,
+ throughput,
+ burn_efficiency_type=1,
+ units=_si_units,
+ **kwargs):
+
+ super(Burn, self).__init__(**kwargs)
+ self.array_types.update({'mass': mass,
+ 'density': density,
+ 'frac_water': frac_water})
+
+ self.offset = offset
+ self._units = dict(self._si_units)
+ self.units = units
+ self.boom_length = boom_length
+ self.boom_draft = boom_draft
+ self.speed = speed
+ self.throughput = throughput
+ self.burn_efficiency_type = burn_efficiency_type
+ self._swath_width = None
+ self._area = None
+ self._boom_capacity_max = 0
+ self._offset_time = None
+
+ self._is_collecting = False
+ self._is_burning = False
+ self._is_boom_filled = False
+ self._is_transiting = False
+ self._is_cleaning = False
+
+ self._time_collecting_in_sim = 0.
+ self._total_burns = 0.
+ self._time_burning = 0.
+ self._ts_burned = 0.
+ self._ts_collected = 0.
+ self._burn_time = None
+ self._burn_rate = None
+
+ def prepare_for_model_run(self, sc):
+ self._setup_report(sc)
+ self._swath_width = 0.3 * self.get('boom_length')
+ self._area = self._swath_width * (0.4125 * self.get('boom_length') / 3) * 2 / 3
+ self.set('_boom_capacity_max', self.get('boom_draft') / 36 * self._area, 'ft^3')
+ self._boom_capacity = self.get('_boom_capacity_max')
+ self._offset_time = (self.offset * 0.00987 / self.get('speed')) * 60
+ self._area_coverage_rate = self._swath_width * self.get('speed') / 430
+
+ if self._swath_width > 1000:
+ self.report.append('Swaths > 1000 feet may not be achievable in the field')
+
+ if self.get('speed') > 1.2:
+ self.report.append('Excessive entrainment of oil likely to occur at speeds greater than 1.2 knots.')
+
+ if self.on:
+ sc.mass_balance['burned'] = 0.0
+ if 'systems' not in sc.mass_balance:
+ sc.mass_balance['systems'] = {}
+ sc.mass_balance['systems'][self.id] = {'boomed': 0.0,
+ 'burned': 0.0,
+ 'time_burning': 0.0,
+ 'num_burns': 0,
+ 'area_covered': 0.0}
+ sc.mass_balance['boomed'] = 0.0
+
+ self._is_collecting = True
+ self._is_transiting = False
+ self._is_cleaning = False
+ self._is_burning = False
+ self._is_boom_full = False
+
+ self._time_burning = 0
+
+ def prepare_for_model_step(self, sc, time_step, model_time):
+ '''
+ 1. set 'active' flag based on timeseries and model_time
+ 2. Mark LEs to be burned, do them in order right now. assume all LEs
+ that are released together will be burned together since they would
+ be closer to each other in position.
+ '''
+
+ self._ts_collected = 0.
+ self._ts_burned = 0.
+ self._ts_num_burns = 0
+ self._ts_area_covered = 0.
+
+ if self._is_active(model_time, time_step) or self._is_burning:
+ self._active = True
+ else:
+ self._active = False
+
+ if not self.active:
+ return
+
+ self._time_remaining = time_step
+
+ while self._time_remaining > 0.:
+ if self._is_collecting:
+ self._collect(sc, time_step, model_time)
+
+ if self._is_transiting:
+ self._transit(sc, time_step, model_time)
+
+ if self._is_burning:
+ self._burn(sc, time_step, model_time)
+
+ if self._is_cleaning:
+ self._clean(sc, time_step, model_time)
+
+ def _collect(self, sc, time_step, model_time):
+ # calculate amount collected this time_step
+ if self._burn_rate is None:
+ self._burn_rate = 0.14 * (1 - sc['frac_water'].mean())
+
+ oil_thickness = self._get_thickness(sc)
+ encounter_rate = 63.13 * self._swath_width * oil_thickness * self.get('speed')
+ emulsion_rr = encounter_rate * self.throughput
+ self._boomed_density = sc['density'].mean()
+ if oil_thickness > 0:
+ # old ROC equation
+ # time_to_fill = (self._boom_capacity_remaining / emulsion_rr) * 60
+ # new ebsp equation
+ time_to_fill = uc.convert('Volume', 'ft^3', 'gal', self._boom_capacity) / emulsion_rr
+ #(self._boom_capacity * 0.17811) * 42 / emulsion_rr
+ else:
+ time_to_fill = 0.
+
+ if time_to_fill > self._time_remaining:
+ # doesn't finish fill the boom in this time step
+ self._ts_collected = uc.convert('Volume', 'gal', 'ft^3', emulsion_rr * self._time_remaining)
+ self._boom_capacity -= self._ts_collected
+ self._ts_area_covered = encounter_rate * (self._time_remaining / 60)
+ self._time_collecting_in_sim += self._time_remaining
+ self._time_remaining = 0.0
+ elif self._time_remaining > 0:
+ # finishes filling the boom in this time step any time remaining
+ # should be spend transiting to the burn position
+ self._ts_collected = uc.convert('Volume', 'gal', 'ft^3', emulsion_rr * time_to_fill)
+ self._ts_area_covered = encounter_rate * (time_to_fill / 60)
+ self._boom_capacity-= self._ts_collected
+ self._is_boom_full = True
+ self._time_remaining -= time_to_fill
+ self._time_collecting_in_sim += time_to_fill
+ self._offset_time_remaining = self._offset_time
+ self._is_collecting = False
+ self._is_transiting = True
+
+ def _transit(self, sc, time_step, model_time):
+ # transiting to burn site
+ # does it arrive and start burning?
+ if self._time_remaining > self._offset_time_remaining:
+ self._time_remaining -= self._offset_time_remaining
+ self._offset_time_remaining = 0.
+ self._is_transiting = False
+ if self._is_boom_full:
+ self._is_burning = True
+ else:
+ self._is_collecting = True
+ elif self._time_remaining > 0:
+ self._offset_time_remaining -= self._time_remaining
+ self._time_remaining = 0.
+
+ def _burn(self, sc, time_step, model_time):
+ # burning
+ if self._burn_time is None:
+ self._ts_num_burns = 1
+ self._burn_time = (0.33 * self.get('boom_draft') / self._burn_rate) * 60
+ self._burn_time_remaining = self._burn_time
+ if not np.isclose(self._boom_capacity, 0):
+ # this is a special case if the boom didn't fill up all the way
+ # due to lack of oil or somethig.
+ self._burn_time_remaining = self._burn_time * ((1 - self._boom_capacity) / self.get('_boom_capacity_max'))
+
+ self._is_boom_full = False
+ if self._time_remaining > self._burn_time_remaining:
+ self._time_remaining -= self._burn_time_remaining
+ self._time_burning += self._burn_time_remaining
+ self._burn_time_remaining = 0.
+ burned = self.get('_boom_capacity_max') - self._boom_capacity
+ self._ts_burned = burned
+ self._is_burning = False
+ self._is_cleaning = True
+ self._cleaning_time_remaining = 3600 # 1hr in seconds
+ elif self._time_remaining > 0:
+ frac_burned = self._time_remaining / self._burn_time
+ burned = self.get('_boom_capacity_max') * frac_burned
+ self._boom_capacity += burned
+ self._ts_burned = burned
+ self._time_burning += self._time_remaining
+ self._burn_time_remaining -= self._time_remaining
+ self._time_remaining = 0.
+
+ def _clean(self, sc, time_step, model_time):
+ # cleaning
+ self._burn_time = None
+ self._burn_rate = None
+ if self._time_remaining > self._cleaning_time_remaining:
+ self._time_remaining -= self._cleaning_time_remaining
+ self._cleaning_time_remaining = 0.
+ self._is_cleaning = False
+ self._is_transiting = True
+ self._offset_time_remaining = self._offset_time
+ elif self._time_remaining > 0:
+ self._cleaning_time_remaining -= self._time_remaining
+ self._time_remaining = 0.
+
+ def weather_elements(self, sc, time_step, model_time):
+ '''
+ Remove mass from each le equally for now, no flagging for not
+ just make sure it's from floating oil.
+ '''
+ if not self.active or len(sc) == 0:
+ return
+
+ les = sc.itersubstancedata(self.array_types)
+ for substance, data in les:
+ if len(data['mass']) is 0:
+ continue
+
+ sc.mass_balance['systems'][self.id]['area_covered'] += self._ts_area_covered
+ sc.mass_balance['systems'][self.id]['num_burns'] += self._ts_num_burns
+
+ if self._ts_collected > 0:
+ collected = uc.convert('Volume', 'ft^3', 'm^3', self._ts_collected) * self._boomed_density
+ sc.mass_balance['boomed'] += collected
+ sc.mass_balance['systems'][self.id]['boomed'] += collected
+ self._remove_mass_simple(data, collected)
+
+ self.logger.debug('{0} amount boomed for {1}: {2}'
+ .format(self._pid, substance.name, collected))
+
+ if self._ts_burned > 0:
+ burned = uc.convert('Volume', 'ft^3', 'm^3', self._ts_burned) * self._boomed_density
+ sc.mass_balance['burned'] += burned
+ sc.mass_balance['boomed'] -= burned
+ sc.mass_balance['systems'][self.id]['burned'] += burned
+ sc.mass_balance['systems'][self.id]['time_burning'] = self._time_burning
+
+ # make sure we didn't burn more than we boomed if so correct the amount
+ if sc.mass_balance['boomed'] < 0:
+ sc.mass_balance['burned'] += sc.mass_balance['boomed']
+ sc.mass_balance['boomed'] = 0
+
+ self.logger.debug('{0} amount burned for {1}: {2}'
+ .format(self._pid, substance.name, burned))
+
+class SkimUnitsSchema(MappingSchema):
+ storage = SchemaNode(String(),
+ description='SI units for onboard storage',
+ validator=OneOf(_valid_vol_units))
+
+ decant_pump = SchemaNode(String(),
+ description='SI units for decant',
+ validator=OneOf(_valid_dis_units))
+
+ nameplate_pump = SchemaNode(String(),
+ description='SI units for nameplate',
+ validator=OneOf(_valid_dis_units))
+
+ discharge_pump = SchemaNode(String(),
+ description='SI units for discharge',
+ validator=OneOf(_valid_dis_units))
+
+ speed = SchemaNode(String(),
+ description='SI units for speed',
+ validator=OneOf(_valid_vel_units))
+
+ swath_width = SchemaNode(String(),
+ description='SI units for length',
+ validator=OneOf(_valid_dist_units))
+
+class SkimSchema(ResponseSchema):
+ units = SkimUnitsSchema()
+ speed = SchemaNode(Float())
+ storage = SchemaNode(Float())
+ swath_width = SchemaNode(Float())
+ group = SchemaNode(String())
+ throughput = SchemaNode(Float())
+ nameplate_pump = SchemaNode(Float())
+ skim_efficiency_type = SchemaNode(String())
+ decant = SchemaNode(Float())
+ decant_pump = SchemaNode(Float())
+ rig_time = SchemaNode(TimeDelta())
+ transit_time = SchemaNode(TimeDelta())
+ offload_to = SchemaNode(String(), missing=drop)
+ discharge_pump = SchemaNode(Float())
+ recovery = SchemaNode(String())
+ recovery_ef = SchemaNode(Float())
+ barge_arrival = SchemaNode(LocalDateTime(),
+ validator=validators.convertible_to_seconds,
+ missing=drop)
+
+class Skim(Response):
+ _state = copy.deepcopy(Response._state)
+ _state += [Field('units', save=True, update=True),
+ Field('speed', save=True, update=True),
+ Field('storage', save=True, update=True),
+ Field('swath_width', save=True, update=True),
+ Field('group', save=True, update=True),
+ Field('throughput', save=True, update=True),
+ Field('nameplate_pump', save=True, update=True),
+ Field('discharge_pump', save=True, update=True),
+ Field('skim_efficiency_type', save=True, update=True),
+ Field('decant', save=True, update=True),
+ Field('decant_pump', save=True, update=True),
+ Field('rig_time', save=True, update=True),
+ Field('transit_time', save=True, update=True),
+ Field('recovery', save=True, update=True),
+ Field('recovery_ef', save=True, update=True)]
+
+ _schema = SkimSchema
+
+ _si_units = {'storage': 'bbl',
+ 'decant_pump': 'gpm',
+ 'nameplate_pump': 'gpm',
+ 'speed': 'kts',
+ 'swath_width': 'ft',
+ 'discharge_pump': 'gpm'}
+
+ _units_types = {'storage': ('storage', _valid_vol_units),
+ 'decant_pump': ('decant_pump', _valid_dis_units),
+ 'nameplate_pump': ('nameplate_pump', _valid_dis_units),
+ 'speed': ('speed', _valid_vel_units),
+ 'swath_width': ('swath_width', _valid_dist_units),
+ 'discharge_pump': ('discharge_pump', _valid_dis_units)}
+
+ def __init__(self,
+ speed,
+ storage,
+ swath_width,
+ group,
+ throughput,
+ nameplate_pump,
+ skim_efficiency_type,
+ recovery,
+ recovery_ef,
+ decant,
+ decant_pump,
+ discharge_pump,
+ rig_time,
+ transit_time,
+ units=_si_units,
+ **kwargs):
+
+ super(Skim, self).__init__(**kwargs)
+
+ self.speed = speed
+ self.storage = storage
+ self.swath_width = swath_width
+ self.group = group
+ self.throughput = throughput
+ self.nameplate_pump = nameplate_pump
+ self.recovery = recovery
+ self.recovery_ef = recovery_ef
+ self.decant = decant
+ self.decant_pump = decant_pump
+ self.rig_time = rig_time
+ self.discharge_pump = discharge_pump
+ self.skim_efficiency_type = skim_efficiency_type
+ self.transit_time = transit_time
+ self._units = dict(self._si_units)
+
+ self._is_collecting = False
+ self._is_transiting = False
+ self._is_offloading = False
+ self._is_rig_deriging = False
+
+ def prepare_for_model_run(self, sc):
+ self._setup_report(sc)
+ self._storage_remaining = self.storage
+ self._coverage_rate = self.swath_width * self.speed * 0.00233
+ self.offload = (self.storage * 42 / self.discharge_pump) * 60
+
+ if self.on:
+ sc.mass_balance['skimmed'] = 0.0
+ sc.mass_balance[self.id] = {'fluid_collected': 0.0,
+ 'emulsion_collected': 0.0,
+ 'oil_collected': 0.0,
+ 'water_collected': 0.0,
+ 'water_decanted': 0.0,
+ 'water_retained': 0.0,
+ 'area_covered': 0.0,
+ 'storage_remaining': 0.0}
+
+ self._is_collecting = True
+
+ def prepare_for_model_step(self, sc, time_step, model_time):
+ if self._is_active(model_time, time_step):
+ self._active = True
+ else :
+ self._active = False
+
+ if not self.active:
+ return
+
+ self._time_remaining = time_step
+
+ if hasattr(self, 'barge_arrival'): #type(self.barge_arrival) is datetime.date:
+ # if there's a barge so a modified cycle
+ while self._time_remaining > 0.:
+ if self._is_collecting:
+ self._collect(sc, time_step, model_time)
+ else:
+ while self._time_remaining > 0.:
+ if self._is_collecting:
+ self._collect(sc, time_step, model_time)
+
+ if self._is_transiting:
+ self._transit(sc, time_step, model_time)
+
+ if self._is_offloading:
+ self._offload(sc, time_step, model_time)
+
+
+ def _collect(self, sc, time_step, model_time):
+ thickness = self._get_thickness(sc)
+ if self.recovery_ef > 0 and self.throughput > 0 and thickness > 0:
+ self._maximum_effective_swath = self.nameplate_pump * self.recovery_ef / (63.13 * self.speed * thickness * self.throughput)
+ else:
+ self._maximum_effective_swath = 0
+
+ if self.swath_width > self._maximum_effective_swath:
+ swath = self._maximum_effective_swath;
+ else:
+ swath = self.swath_width
+
+ if swath > 1000:
+ self.report.append('Swaths > 1000 feet may not be achievable in the field.')
+
+ encounter_rate = thickness * self.speed * swath * 63.13
+ rate_of_coverage = swath * self.speed * 0.00233
+ if encounter_rate > 0:
+ recovery = self._getRecoveryEfficiency()
+
+ if recovery > 0:
+ totalFluidRecoveryRate = encounter_rate * (self.throughput / recovery)
+
+ if totalFluidRecoveryRate > self.nameplate_pump:
+ # total fluid recovery rate is greater than nameplate
+ # pump, recalculate the throughput efficiency and
+ # total fluid recovery rate again with the new throughput
+ throughput = self.nameplate_pump * recovery / encounter_rate
+ totalFluidRecoveryRate = encounter_rate * (throughput / recovery)
+ msg = ('{0.name} - Total Fluid Recovery Rate is greater than Nameplate \
+ Pump Rate, recalculating Throughput Efficiency').format(self)
+ self.logger.warning(msg)
+ else:
+ throughput = self.throughput
+
+ if throughput > 0:
+ emulsionRecoveryRate = encounter_rate * throughput
+
+ waterRecoveryRate = (1 - recovery) * totalFluidRecoveryRate
+ waterRetainedRate = waterRecoveryRate * (1 - self.decant)
+ computedDecantRate = (totalFluidRecoveryRate - emulsionRecoveryRate) * self.decant
+
+ decantRateDifference = 0.
+ if computedDecantRate > self.decant_pump:
+ decantRateDifference = computedDecantRate - self.decant_pump
+
+ recoveryRate = emulsionRecoveryRate + waterRecoveryRate
+ retainRate = emulsionRecoveryRate + waterRetainedRate + decantRateDifference
+ oilRecoveryRate = emulsionRecoveryRate * (1 - sc['frac_water'].mean())
+
+ freeWaterRecoveryRate = recoveryRate - emulsionRecoveryRate
+ freeWaterRetainedRate = retainRate - emulsionRecoveryRate
+ freeWaterDecantRate = freeWaterRecoveryRate - freeWaterRetainedRate
+
+ timeToFill = .7 * self._storage_remaining / retainRate * 60
+
+ if timeToFill * 60 > self._time_remaining:
+ # going to take more than this timestep to fill the storage
+ time_collecting = self._time_remaining
+ self._time_remaining = 0.
+ else:
+ # storage is filled during this timestep
+ time_collecting = timeToFill
+ self._time_remaining -= timeToFill
+ self._transit_remaining = self.transit_time
+ self._collecting = False
+ self._transiting = True
+
+ self._ts_fluid_collected = retainRate * time_collecting
+ self._ts_emulsion_collected = emulsionRecoveryRate * time_collecting
+ self._ts_oil_collected = oilRecoveryRate * time_collecting
+ self._ts_water_collected = freeWaterRecoveryRate * time_collecting
+ self._ts_water_decanted = freeWaterDecantRate * time_collecting
+ self._ts_water_retained = freeWaterRetainedRate * time_collecting
+ self._ts_area_covered = rate_of_coverage * time_collecting
+
+ self._storage_remaining -= uc.convert('gal', 'bbl', self._ts_fluid_collected)
+
+ else:
+ self._no_op_step()
+ else:
+ self._no_op_step()
+ else:
+ self._no_op_step()
+
+
+ def _transit(self, sc, time_step, model_time):
+ # transiting back to shore to offload
+ if self._time_remaining > self._transit_remaining:
+ self._time_remaining -= self._transit_remaining
+ self._transit_remaining = 0.
+ self._is_transiting = False
+ if self._storage_remaining == 0.0:
+ self._is_offloading = True
+ else:
+ self._is_collecting = True
+ self._offload_remaining = self.offload + self.rig_time
+ else:
+ self._transit_remaining -= self._time_remaining
+ self._time_remaining = 0.
+
+ def _offload(self, sc, time_step, model_time):
+ if self._time_remaining > self._offload_remaining:
+ self._time_remaining -= self._offload_remaining
+ self._offload_remaining = 0.
+ self._storage_remaining = self.storage
+ self._offloading = False
+ self._transiting = True
+ else:
+ self._offload_remaining -= self._time_remaining
+ self._time_remaining = 0.
+
+ def weather_elements(self, sc, time_step, model_time):
+ '''
+ Remove mass from each le equally for now, no flagging for now
+ just make sure the mass is from floating oil.
+ '''
+ if not self.active or len(sc) == 0:
+ return
+
+ les = sc.itersubstancedata(self.array_types)
+ for substance, data in les:
+ if len(data['mass']) is 0:
+ continue
+
+ if hasattr(self, '_ts_oil_collected') and self._ts_oil_collected is not None:
+ sc.mass_balance['skimmed'] += self._ts_oil_collected
+ self._remove_mass_simple(data, self._ts_oil_collected)
+
+ self.logger.debug('{0} amount boomed for {1}: {2}'
+ .format(self._pid, substance.name, self._ts_oil_collected))
+
+ platform_balance = sc.mass_balance[self.id]
+ platform_balance['fluid_collected'] += self._ts_fluid_collected
+ platform_balance['emulsion_collected'] += self._ts_emulsion_collected
+ platform_balance['oil_collected'] += self._ts_oil_collected
+ platform_balance['water_collected'] += self._ts_water_collected
+ platform_balance['water_retained'] += self._ts_water_retained
+ platform_balance['water_decanted'] += self._ts_water_decanted
+ platform_balance['area_covered'] += self._ts_area_covered
+ platform_balance['storage_remaining'] += self._storage_remaining
+
+
+ def _getRecoveryEfficiency(self):
+ # scaffolding method
+ # will eventually include logic for calculating
+ # recovery efficiency based on wind and oil visc.
+
+ return self.recovery_ef
+
+if __name__ == '__main__':
+ print None
+ d = Disperse(name = 'test')
+ p = Platform(_name='Test Platform')
+ import pprint as pp
+ ser = p.serialize()
+ pp.pprint(ser)
+ deser = Platform.deserialize(ser)
+
+ pp.pprint(deser)
+
+ p2 = Platform.new_from_dict(deser)
+ ser2 = p2.serialize()
+ pp.pprint(ser2)
+
+ print 'INCORRECT BELOW'
+
+ for k, v in ser.items():
+ if p2.serialize()[k] != v:
+ print p2.serialize()[k]
+
+ pass
diff --git a/py_gnome/gnome/weatherers/weathering_data.py b/py_gnome/gnome/weatherers/weathering_data.py
index ce3b60828..2e1f436f2 100644
--- a/py_gnome/gnome/weatherers/weathering_data.py
+++ b/py_gnome/gnome/weatherers/weathering_data.py
@@ -55,6 +55,7 @@ def __init__(self, water, **kwargs):
self.water = water
self.array_types = {'fate_status', 'positions', 'status_codes',
'density', 'viscosity', 'mass_components', 'mass',
+ 'oil_density', 'oil_viscosity',
'init_mass', 'frac_water', 'frac_lost', 'age'}
# following used to update viscosity
@@ -152,6 +153,7 @@ def weather_elements(self, sc, time_step, model_time):
.format(self._pid))
data['density'] = new_rho
+ data['oil_density'] = oil_rho
# following implementation results in an extra array called
# fw_d_fref but is easy to read
@@ -165,6 +167,8 @@ def weather_elements(self, sc, time_step, model_time):
np.exp(kv1 * data['frac_lost']) *
(1 + (fw_d_fref / (1.187 - fw_d_fref))) ** 2.49
)
+ data['oil_viscosity'] = (v0 *
+ np.exp(kv1 * data['frac_lost']) )
sc.update_from_fatedataview(fate='all')
@@ -262,8 +266,10 @@ def _init_new_particles(self, mask, data, substance):
self.logger.error(msg)
data['density'][mask] = self.water.get('density')
+ data['oil_density'][mask] = self.water.get('density')
else:
data['density'][mask] = density
+ data['oil_density'][mask] = density
# initialize mass_components -
# sub-select mass_components array by substance.num_components.
@@ -284,6 +290,7 @@ def _init_new_particles(self, mask, data, substance):
if substance_kvis is not None:
'make sure we do not add NaN values'
data['viscosity'][mask] = substance_kvis
+ data['oil_viscosity'][mask] = substance_kvis
# initialize the fate_status array based on positions and status_codes
self._init_fate_status(mask, data)
diff --git a/py_gnome/log_config.json b/py_gnome/log_config.json
deleted file mode 100644
index 29472f129..000000000
--- a/py_gnome/log_config.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "version": 1,
- "disbale_existing_loggers": true,
- "root":
- {
- "level": "INFO",
- "handlers": ["console", "file"]
- },
- "formatters":
- {
- "simple":
- {
- "format": "format=%(asctime)s - %(name)s - %(levelname)s - %(message)s",
- "datefmt": "%Y-%m-%d %H:%M:%S"
- },
- "brief":
- {
- "format": "%(levelname)-8s: %(name)-28s: %(message)s",
- "datefmt": "%Y-%m-%d %H:%M:%S"
- },
- "precise":
- {
- "format": "%(asctime)s %(name)-28s %(levelname)-8s %(message)s",
- "datefmt": "%Y-%m-%d %H:%M:%S"
- }
- },
- "handlers":
- {
- "console":
- {
- "class": "logging.StreamHandler",
- "level": "DEBUG",
- "formatter": "brief"
- },
- "file":
- {
- "class": "logging.handlers.RotatingFileHandler",
- "formatter": "precise",
- "filename": "logfile.log",
- "maxBytes": 1000000,
- "backupCount": 3
- }
- }
-}
diff --git a/py_gnome/re_link_for_anaconda.py b/py_gnome/re_link_for_anaconda.py
index 3dc3e885c..5ae850e58 100644
--- a/py_gnome/re_link_for_anaconda.py
+++ b/py_gnome/re_link_for_anaconda.py
@@ -42,7 +42,15 @@ def remove_local_dir_from_path():
def get_conda_lib_path(lib_name):
- return os.path.join(sys.exec_prefix, 'lib', lib_name)
+ lib_path = os.path.join(sys.exec_prefix, 'lib', lib_name)
+ if not os.path.isfile(lib_path):
+ # if we are in an anaconda virtual environment, we might need to
+ # strip the last two folders (envs/) to get to the main
+ # anaconda lib file.
+ base_exec_prefix = os.sep.join(sys.exec_prefix.split(os.sep)[:-2])
+ lib_path = os.path.join(base_exec_prefix, 'lib', lib_name)
+
+ return lib_path
def find_cy_gnome_library(shared_lib):
diff --git a/py_gnome/scripts/script_TAP/script_new_TAP.py b/py_gnome/scripts/script_TAP/script_new_TAP.py
index 510d84ebc..cfdbac374 100644
--- a/py_gnome/scripts/script_TAP/script_new_TAP.py
+++ b/py_gnome/scripts/script_TAP/script_new_TAP.py
@@ -15,17 +15,18 @@
from gnome.model import Model
from gnome.map import MapFromBNA
-from gnome.environment import Wind
+from gnome.environment import Environment
from gnome.spill import point_line_release_spill
from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover, IceAwareRandomMover
-from gnome.environment import IceAwareCurrent, IceAwareWind
+from gnome.environment import IceAwareCurrent, IceAwareWind, GridCurrent
from gnome.movers.py_wind_movers import PyWindMover
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer, NetCDFOutput
from gnome.environment.vector_field import ice_field
import gnome.utilities.profiledeco as pd
+from gnome.environment.environment_objects import IceVelocity
# define base directory
base_dir = os.path.dirname(__file__)
@@ -40,7 +41,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
# 1/2 hr in seconds
model = Model(start_time=start_time,
duration=timedelta(days=4),
- time_step=3600)
+ time_step=7200)
# mapfile = get_datafile(os.path.join(base_dir, 'ak_arctic.bna'))
mapfile = get_datafile('arctic_coast3.bna')
@@ -77,6 +78,9 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
fn = ['arctic_avg2_0001_gnome.nc',
'arctic_avg2_0002_gnome.nc']
+# fn = ['C:\\Users\\jay.hennen\\Documents\\Code\\pygnome\\py_gnome\\scripts\\script_TAP\\arctic_avg2_0001_gnome.nc',
+# 'C:\\Users\\jay.hennen\\Documents\\Code\\pygnome\\py_gnome\\scripts\\script_TAP\\arctic_avg2_0002_gnome.nc']
+
gt = {'node_lon': 'lon',
'node_lat': 'lat'}
# fn='arctic_avg2_0001_gnome.nc'
@@ -88,30 +92,42 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
# draw_ontop can be 'uncertain' or 'forecast'
# 'forecast' LEs are in black, and 'uncertain' are in red
# default is 'forecast' LEs draw on top
-# renderer = Renderer(mapfile, images_dir, image_size=(1024, 768))
-# model.outputters += renderer
+ renderer = Renderer(mapfile, images_dir, image_size=(1024, 768))
+ model.outputters += renderer
netcdf_file = os.path.join(base_dir, str(model.time_step / 60) + method + '.nc')
scripting.remove_netcdf(netcdf_file)
print 'adding movers'
model.outputters += NetCDFOutput(netcdf_file, which_data='all')
- load = False
print 'loading entire current data'
ice_aware_curr = IceAwareCurrent.from_netCDF(filename=fn,
- grid_topology=gt,
- load_all=load)
- print 'loading entire wind data'
+ grid_topology=gt)
+
+# env1 = get_env_from_netCDF(filename)
+# mov = PyCurrentMover.from_netCDF(filename)
+
+ ice_aware_curr.ice_velocity.variables[0].dimension_ordering = ['time', 'x', 'y']
ice_aware_wind = IceAwareWind.from_netCDF(filename=fn,
- ice_var=ice_aware_curr.ice_var,
- ice_conc_var=ice_aware_curr.ice_conc_var,
- grid=ice_aware_curr.grid,
- load_all=load)
-
-# i_c_mover = PyGridCurrentMover(current=ice_aware_curr)
-# i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method='Euler')
- i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method=method, extrapolate=True)
+ ice_velocity=ice_aware_curr.ice_velocity,
+ ice_concentration=ice_aware_curr.ice_concentration,
+ grid=ice_aware_curr.grid)
+
+ curr = GridCurrent.from_netCDF(filename=fn)
+# GridCurrent.is_gridded()
+
+# import pprint as pp
+# from gnome.utilities.orderedcollection import OrderedCollection
+# model.environment = OrderedCollection(dtype=Environment)
+# model.environment.add(ice_aware_curr)
+# from gnome.environment import WindTS
+
+ print 'loading entire wind data'
+
+# i_c_mover = PyCurrentMover(current=ice_aware_curr)
+# i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method='Euler')
+ i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method=method, extrapolate=True)
i_w_mover = PyWindMover(wind=ice_aware_wind, default_num_method=wind_method)
# ice_aware_curr.grid.node_lon = ice_aware_curr.grid.node_lon[:]-360
@@ -120,16 +136,23 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
model.movers += i_w_mover
print 'adding an IceAwareRandomMover:'
- model.movers += IceAwareRandomMover(ice_conc_var=ice_aware_curr.ice_conc_var,
+ model.movers += IceAwareRandomMover(ice_concentration=ice_aware_curr.ice_concentration,
diffusion_coef=1000)
# renderer.add_grid(ice_aware_curr.grid)
# renderer.add_vec_prop(ice_aware_curr)
-# renderer.set_viewport(((-190.9, 60), (-72, 89)))
# curr_file = get_datafile(os.path.join(base_dir, 'COOPSu_CREOFS24.nc'))
# c_mover = GridCurrentMover(curr_file)
# model.movers += c_mover
+# model.environment.add(WindTS.constant(10, 300))
+# print('Saving')
+# model.environment[0].ice_velocity.variables[0].serialize()
+# IceVelocity.deserialize(model.environment[0].ice_velocity.serialize())
+# model.save('.')
+# from gnome.persist.save_load import load
+# print('Loading')
+# model2 = load('./Model.zip')
return model
diff --git a/py_gnome/scripts/script_TAP/script_old_TAP.py b/py_gnome/scripts/script_TAP/script_old_TAP.py
index 9b8a934f5..4c9966177 100644
--- a/py_gnome/scripts/script_TAP/script_old_TAP.py
+++ b/py_gnome/scripts/script_TAP/script_old_TAP.py
@@ -23,7 +23,7 @@
from gnome.movers.py_wind_movers import PyWindMover
from gnome.environment.property_classes import WindTS, IceAwareCurrent, IceAwareWind
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer, NetCDFOutput
from gnome.environment.vector_field import ice_field
@@ -118,9 +118,9 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
# grid = ice_aware_curr.grid,)
# method = 'Trapezoid'
#
-# # i_c_mover = PyGridCurrentMover(current=ice_aware_curr)
-# # i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method='Euler')
-# i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method=method)
+# # i_c_mover = PyCurrentMover(current=ice_aware_curr)
+# # i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method='Euler')
+# i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method=method)
# i_w_mover = PyWindMover(wind = ice_aware_wind, default_num_method=method)
#
# ice_aware_curr.grid.node_lon = ice_aware_curr.grid.node_lon[:]-360
diff --git a/py_gnome/scripts/script_animation_demo/script_animation_demo.py b/py_gnome/scripts/script_animation_demo/script_animation_demo.py
index fc100f0be..5c859d4e5 100644
--- a/py_gnome/scripts/script_animation_demo/script_animation_demo.py
+++ b/py_gnome/scripts/script_animation_demo/script_animation_demo.py
@@ -54,7 +54,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
renderer.set_timestamp_attrib(format='%a %c')
renderer.graticule.set_DMS(True)
# renderer.viewport = ((-124.25, 47.5), (-122.0, 48.70))
-
+
print 'adding outputters'
model.outputters += renderer
@@ -69,23 +69,23 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
0.0,
0.0),
release_time=start_time)
-
+
model.spills += spill1
print 'adding a RandomMover:'
model.movers += RandomMover(diffusion_coef=50000)
print 'adding a wind mover:'
-
+
model.movers += constant_wind_mover(13, 270, units='m/s')
print 'adding a current mover:'
# curr_file = get_datafile(os.path.join(base_dir, 'COOPSu_CREOFS24.nc'))
-#
+#
# # uncertain_time_delay in hours
# c_mover = GridCurrentMover(curr_file)
# c_mover.uncertain_cross = 0 # default is .25
-#
+#
# model.movers += c_mover
return model
@@ -107,4 +107,4 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
print "step: %.4i -- memuse: %fMB" % (step['step_num'],
utilities.get_mem_use())
print datetime.now() - startTime
- pd.print_stats(5)
\ No newline at end of file
+# pd.print_stats(5)
\ No newline at end of file
diff --git a/py_gnome/scripts/script_ice/script_ice.py b/py_gnome/scripts/script_ice/script_ice.py
index f3bbf1f8d..1ad55bc53 100644
--- a/py_gnome/scripts/script_ice/script_ice.py
+++ b/py_gnome/scripts/script_ice/script_ice.py
@@ -25,7 +25,7 @@
from gnome.environment import IceAwareCurrent, IceAwareWind
from gnome.movers.py_wind_movers import PyWindMover
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
from gnome.outputters import Renderer, NetCDFOutput
from gnome.environment.vector_field import ice_field
@@ -105,9 +105,9 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
grid=ice_aware_curr.grid,)
method = 'Trapezoid'
-# i_c_mover = PyGridCurrentMover(current=ice_aware_curr)
-# i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method='Euler')
- i_c_mover = PyGridCurrentMover(current=ice_aware_curr, default_num_method=method)
+# i_c_mover = PyCurrentMover(current=ice_aware_curr)
+# i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method='Euler')
+ i_c_mover = PyCurrentMover(current=ice_aware_curr, default_num_method=method)
i_w_mover = PyWindMover(wind=ice_aware_wind, default_num_method=method)
ice_aware_curr.grid.node_lon = ice_aware_curr.grid.node_lon[:] - 360
diff --git a/py_gnome/scripts/script_ny_plume/script_ny_plume.py b/py_gnome/scripts/script_ny_plume/script_ny_plume.py
index 576175482..6f71efbca 100644
--- a/py_gnome/scripts/script_ny_plume/script_ny_plume.py
+++ b/py_gnome/scripts/script_ny_plume/script_ny_plume.py
@@ -35,7 +35,7 @@
from gnome.outputters import Renderer
from gnome.outputters import NetCDFOutput
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
import gnome.utilities.profiledeco as pd
# define base directory
@@ -132,7 +132,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
url = ('http://geoport.whoi.edu/thredds/dodsC/clay/usgs/users/jcwarner/Projects/Sandy/triple_nest/00_dir_NYB05.ncml')
gc = GridCurrent.from_netCDF(url)
- u_mover = PyGridCurrentMover(gc, default_num_method='Trapezoid')
+ u_mover = PyCurrentMover(gc, default_num_method='Trapezoid')
model.movers += u_mover
# print 'adding a wind mover:'
diff --git a/py_gnome/scripts/script_ny_roms/script_ny_roms.py b/py_gnome/scripts/script_ny_roms/script_ny_roms.py
index 318ebc312..101bd8c15 100644
--- a/py_gnome/scripts/script_ny_roms/script_ny_roms.py
+++ b/py_gnome/scripts/script_ny_roms/script_ny_roms.py
@@ -4,7 +4,7 @@
This script uses:
- GridCurrent
-- PyGridCurrentMover
+- PyCurrentMover
- rendering of GridCurrent using Renderer
"""
@@ -28,7 +28,7 @@
from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover
from gnome.outputters import Renderer
-from gnome.movers.py_current_movers import PyGridCurrentMover
+from gnome.movers.py_current_movers import PyCurrentMover
import gnome.utilities.profiledeco as pd
# define base directory
@@ -91,7 +91,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
cf = GridCurrent.from_netCDF(url)
renderer.add_grid(cf.grid)
renderer.delay = 25
- u_mover = PyGridCurrentMover(cf, default_num_method='Euler')
+ u_mover = PyCurrentMover(cf, default_num_method='Euler')
model.movers += u_mover
# curr_file = get_datafile(os.path.join(base_dir, 'COOPSu_CREOFS24.nc'))
diff --git a/py_gnome/scripts/script_plume/script_plume.py b/py_gnome/scripts/script_plume/script_plume.py
index c915b97f2..cbadacd41 100644
--- a/py_gnome/scripts/script_plume/script_plume.py
+++ b/py_gnome/scripts/script_plume/script_plume.py
@@ -81,7 +81,8 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
amount=90, # default volume_units=m^3
units='m^3',
end_release_time=end_time,
- density=600)
+ substance='oil_crude')
+ #density=600)
model.spills += spill
diff --git a/py_gnome/scripts/script_tamoc/script_arctic_tamoc.py b/py_gnome/scripts/script_tamoc/script_arctic_tamoc.py
index 749b4e341..76a541fe2 100644
--- a/py_gnome/scripts/script_tamoc/script_arctic_tamoc.py
+++ b/py_gnome/scripts/script_tamoc/script_arctic_tamoc.py
@@ -37,7 +37,7 @@
RandomVerticalMover,
SimpleMover,
GridCurrentMover,
- PyGridCurrentMover,
+ PyCurrentMover,
constant_wind_mover,
IceMover)
diff --git a/py_gnome/scripts/script_tamoc/script_gulf_tamoc.py b/py_gnome/scripts/script_tamoc/script_gulf_tamoc.py
index 72e3530d0..80230e2ac 100644
--- a/py_gnome/scripts/script_tamoc/script_gulf_tamoc.py
+++ b/py_gnome/scripts/script_tamoc/script_gulf_tamoc.py
@@ -38,7 +38,7 @@
RandomVerticalMover,
SimpleMover,
GridCurrentMover,
- PyGridCurrentMover,
+ PyCurrentMover,
constant_wind_mover,
WindMover)
diff --git a/py_gnome/scripts/script_tamoc/script_tamoc.py b/py_gnome/scripts/script_tamoc/script_tamoc.py
index d5cb2575c..23d7457b2 100755
--- a/py_gnome/scripts/script_tamoc/script_tamoc.py
+++ b/py_gnome/scripts/script_tamoc/script_tamoc.py
@@ -36,7 +36,7 @@
RiseVelocityMover,
RandomVerticalMover,
SimpleMover,
- PyGridCurrentMover)
+ PyCurrentMover)
from gnome.outputters import Renderer
from gnome.outputters import NetCDFOutput
@@ -113,7 +113,7 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
print 'adding a circular current and eastward current'
# This is .3 m/s south
- model.movers += PyGridCurrentMover(current=vg,
+ model.movers += PyCurrentMover(current=vg,
default_num_method='Trapezoid',
extrapolate=True)
model.movers += SimpleMover(velocity=(0., -0.1, 0.))
diff --git a/py_gnome/scripts/script_weatherers/script_weatherers.py b/py_gnome/scripts/script_weatherers/script_weatherers.py
index 0175e6b98..1da91f16e 100644
--- a/py_gnome/scripts/script_weatherers/script_weatherers.py
+++ b/py_gnome/scripts/script_weatherers/script_weatherers.py
@@ -57,21 +57,21 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
uncertain=True)
# mapfile = get_datafile(os.path.join(base_dir, './ak_arctic.bna'))
-#
+#
# print 'adding the map'
# model.map = MapFromBNA(mapfile, refloat_halflife=1) # seconds
-#
+#
# # draw_ontop can be 'uncertain' or 'forecast'
# # 'forecast' LEs are in black, and 'uncertain' are in red
# # default is 'forecast' LEs draw on top
# renderer = Renderer(mapfile, images_dir, size=(800, 600),
# output_timestep=timedelta(hours=2),
# draw_ontop='forecast')
-#
+#
# print 'adding outputters'
# model.outputters += renderer
- model.outputters += WeatheringOutput()
+ model.outputters += WeatheringOutput('.\\')
netcdf_file = os.path.join(base_dir, 'script_weatherers.nc')
scripting.remove_netcdf(netcdf_file)
@@ -98,11 +98,11 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
model.spills += spill
print 'adding a RandomMover:'
- #model.movers += RandomMover(diffusion_coef=50000)
+ # model.movers += RandomMover(diffusion_coef=50000)
print 'adding a wind mover:'
- series = np.zeros((2, ), dtype=datetime_value_2d)
+ series = np.zeros((2,), dtype=datetime_value_2d)
series[0] = (start_time, (20, 0))
series[1] = (start_time + timedelta(hours=23), (20, 0))
@@ -129,20 +129,20 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
active_start=burn_start, efficiency=.2)
chem_start = start_time + timedelta(hours=24)
- c_disp = ChemicalDispersion(0.5, efficiency=0.4,
- active_start=chem_start,
- active_stop=chem_start + timedelta(hours=8))
+# c_disp = ChemicalDispersion(0.5, efficiency=0.4,
+# active_start=chem_start,
+# active_stop=chem_start + timedelta(hours=8))
- model.environment += [Water(280.928), wind, waves]
+ model.environment += [Water(280.928), wind, waves]
- model.weatherers += Evaporation(water,wind)
+ model.weatherers += Evaporation(water, wind)
model.weatherers += Emulsification(waves)
- model.weatherers += NaturalDispersion(waves,water)
+ model.weatherers += NaturalDispersion(waves, water)
model.weatherers += skimmer1
model.weatherers += skimmer2
model.weatherers += burn
- model.weatherers += c_disp
+# model.weatherers += c_disp
return model
@@ -151,3 +151,4 @@ def make_model(images_dir=os.path.join(base_dir, 'images')):
scripting.make_images_dir()
model = make_model()
model.full_run()
+ model.save('.')
diff --git a/py_gnome/tests/unit_tests/conftest.py b/py_gnome/tests/unit_tests/conftest.py
index cf5703ddd..59d8409af 100644
--- a/py_gnome/tests/unit_tests/conftest.py
+++ b/py_gnome/tests/unit_tests/conftest.py
@@ -24,7 +24,7 @@
from gnome.spill_container import SpillContainer
from gnome.movers import SimpleMover
-from gnome.weatherers import Skimmer
+# from gnome.weatherers import Skimmer
from gnome.environment import constant_wind, Water, Waves
from gnome.utilities.remote_data import get_datafile
import gnome.array_types as gat
@@ -190,7 +190,7 @@ def get_testdata():
curr_dir = os.path.join(s_data, 'currents')
tide_dir = os.path.join(s_data, 'tides')
wind_dir = os.path.join(s_data, 'winds')
- testmap = os.path.join(base_dir, '../sample_data', 'MapBounds_Island.bna')
+ testmap = os.path.join(s_data, 'MapBounds_Island.bna')
bna_sample = os.path.join(s_data, 'MapBounds_2Spillable2Islands2Lakes.bna')
data = dict()
@@ -522,8 +522,8 @@ def sample_sc_no_uncertainty():
spills = [gnome.spill.point_line_release_spill(num_elements,
start_position,
release_time,
- water=water,
- amount=10, units='l'),
+ amount=10, units='l',
+ water=water),
gnome.spill.point_line_release_spill(num_elements,
start_position,
release_time_2,
@@ -563,7 +563,8 @@ def sample_model():
# the image output map
- mapfile = os.path.join(os.path.dirname(__file__), '../sample_data',
+ mapfile = os.path.join(os.path.dirname(__file__),
+ 'sample_data',
'MapBounds_Island.bna')
# the land-water map
@@ -677,7 +678,7 @@ def sample_model_weathering(sample_model_fcn,
et = gnome.spill.elements.floating(substance=oil)
start_time = model.start_time + timedelta(hours=1)
- end_time = start_time + timedelta(seconds=model.time_step*3)
+ end_time = start_time + timedelta(seconds=model.time_step * 3)
spill = gnome.spill.point_line_release_spill(num_les,
rel_pos,
start_time,
diff --git a/py_gnome/tests/sample_data/MapBounds_Island.bna b/py_gnome/tests/unit_tests/sample_data/MapBounds_Island.bna
similarity index 100%
rename from py_gnome/tests/sample_data/MapBounds_Island.bna
rename to py_gnome/tests/unit_tests/sample_data/MapBounds_Island.bna
diff --git a/py_gnome/tests/unit_tests/sample_data/no_map_bounds.bna b/py_gnome/tests/unit_tests/sample_data/no_map_bounds.bna
new file mode 100644
index 000000000..ed59284e3
--- /dev/null
+++ b/py_gnome/tests/unit_tests/sample_data/no_map_bounds.bna
@@ -0,0 +1,12 @@
+"land-1","1",5
+3, 10
+4, 10
+4, 11
+3, 11
+3, 10
+"SpillableArea","1",5
+3, 10
+6, 10
+6, 11
+3, 11
+3, 10
diff --git a/py_gnome/tests/sample_data/small_trigrid_example.nc b/py_gnome/tests/unit_tests/sample_data/small_trigrid_example.nc
similarity index 100%
rename from py_gnome/tests/sample_data/small_trigrid_example.nc
rename to py_gnome/tests/unit_tests/sample_data/small_trigrid_example.nc
diff --git a/py_gnome/tests/unit_tests/test_environment/sample_data/gen_analytical_datasets.py b/py_gnome/tests/unit_tests/test_environment/sample_data/gen_analytical_datasets.py
new file mode 100644
index 000000000..962a790ed
--- /dev/null
+++ b/py_gnome/tests/unit_tests/test_environment/sample_data/gen_analytical_datasets.py
@@ -0,0 +1,337 @@
+import numpy as np
+import netCDF4 as nc4
+
+from pysgrid import SGrid
+from gnome.environment.grid_property import GriddedProp
+
+import os
+from datetime import datetime, timedelta
+
+
+from gnome import scripting
+from gnome import utilities
+
+
+from gnome.model import Model
+
+from gnome.spill import point_line_release_spill
+from gnome.movers import RandomMover, constant_wind_mover, GridCurrentMover
+
+from gnome.environment import GridCurrent
+from gnome.environment import PyGrid, PyGrid_U
+from gnome.movers.py_current_movers import PyCurrentMover
+
+from gnome.outputters import Renderer, NetCDFOutput
+
+def gen_vortex_3D(filename=None):
+ x, y = np.mgrid[-30:30:61j, -30:30:61j]
+ y = np.ascontiguousarray(y.T)
+ x = np.ascontiguousarray(x.T)
+ x_size = 61
+ y_size = 61
+ g = PyGrid(node_lon=x,
+ node_lat=y)
+ g.build_celltree()
+ lin_nodes = g._trees['node'][1]
+ lin_faces = np.array([np.array([([lx, lx + x_size + 1, lx + 1], [lx, lx + x_size, lx + x_size + 1]) for lx in range(0, x_size - 1, 1)]) + ly * x_size for ly in range(0, y_size - 1)])
+ lin_faces = lin_faces.reshape(-1, 3)
+ # y += np.sin(x) / 1
+ # x += np.sin(x) / 5
+
+ t0 = datetime(2001, 1, 1, 0, 0)
+ tarr = [t0 + timedelta(hours=i) for i in range(0, 11)]
+ angs = -np.arctan2(y, x)
+ mag = np.sqrt(x ** 2 + y ** 2)
+ vx = np.cos(angs) * mag
+ vy = np.sin(angs) * mag
+ vx = vx[np.newaxis, :] * 20
+ vy = vy[np.newaxis, :] * 20
+ vw = -0.001
+
+ d_scale = [1, 0.5, 0, -0.5, -1]
+ t_scale = np.linspace(0, 1, 11)
+
+ tvx = np.array([vx * t for t in t_scale]).squeeze()
+ tvy = np.array([vy * t for t in t_scale]).squeeze()
+
+ dvx = np.array([vx * s for s in d_scale]).squeeze()
+ dvy = np.array([vy * s for s in d_scale]).squeeze()
+
+ tdvx = np.array([dvx * t for t in t_scale]).squeeze()
+ tdvy = np.array([dvy * t for t in t_scale]).squeeze()
+
+ lin_vx = vx.reshape(-1)
+ lin_vy = vy.reshape(-1)
+
+ lin_tvx = np.array([lin_vx * t for t in t_scale])
+ lin_tvy = np.array([lin_vy * t for t in t_scale])
+
+ lin_dvx = np.array([lin_vx * s for s in d_scale])
+ lin_dvy = np.array([lin_vy * s for s in d_scale])
+
+ lin_tdvx = np.array([lin_dvx * t for t in t_scale])
+ lin_tdvy = np.array([lin_dvy * t for t in t_scale])
+
+ ds = None
+ if filename is not None:
+ ds = nc4.Dataset(filename, 'w', diskless=True, persist=True)
+ ds.createDimension('y', y.shape[0])
+ ds.createDimension('x', x.shape[1])
+ ds.createDimension('time', len(tarr))
+ ds.createDimension('depth', len(d_scale))
+ ds.createVariable('x', 'f8', dimensions=('x', 'y'))
+ ds['x'][:] = x
+ ds.createVariable('y', 'f8', dimensions=('x', 'y'))
+ ds['y'][:] = y
+ ds.createVariable('time', 'f8', dimensions=('time'))
+ ds['time'][:] = nc4.date2num(tarr, 'hours since {0}'.format(t0))
+ ds['time'].setncattr('units', 'hours since {0}'.format(t0))
+ ds.createVariable('vx', 'f8', dimensions=('x', 'y'))
+ ds.createVariable('vy', 'f8', dimensions=('x', 'y'))
+ ds['vx'][:] = vx
+ ds['vy'][:] = vy
+ ds.createVariable('tvx', 'f8', dimensions=('time', 'x', 'y'))
+ ds.createVariable('tvy', 'f8', dimensions=('time', 'x', 'y'))
+ ds['tvx'][:] = tvx
+ ds['tvy'][:] = tvy
+ ds.createVariable('dvx', 'f8', dimensions=('depth', 'x', 'y'))
+ ds.createVariable('dvy', 'f8', dimensions=('depth', 'x', 'y'))
+ ds['dvx'][:] = dvx
+ ds['dvy'][:] = dvy
+ ds.createVariable('tdvx', 'f8', dimensions=('time', 'depth', 'x', 'y'))
+ ds.createVariable('tdvy', 'f8', dimensions=('time', 'depth', 'x', 'y'))
+ ds['tdvx'][:] = tdvx
+ ds['tdvy'][:] = tdvy
+ for v in ds.variables:
+ if 'v' in v:
+ ds[v].units = 'm/s'
+
+ ds.createDimension('nv', lin_nodes.shape[0])
+ ds.createDimension('nele', lin_faces.shape[0])
+ ds.createDimension('two', 2)
+ ds.createDimension('three', 3)
+ ds.createVariable('nodes', 'f8', dimensions=('nv', 'two'))
+ ds.createVariable('faces', 'f8', dimensions=('nele', 'three'))
+ ds.createVariable('lin_vx', 'f8', dimensions=('nv'))
+ ds.createVariable('lin_vy', 'f8', dimensions=('nv'))
+ ds.createVariable('lin_tvx', 'f8', dimensions=('time', 'nv'))
+ ds.createVariable('lin_tvy', 'f8', dimensions=('time', 'nv'))
+ ds.createVariable('lin_dvx', 'f8', dimensions=('depth', 'nv'))
+ ds.createVariable('lin_dvy', 'f8', dimensions=('depth', 'nv'))
+ ds.createVariable('lin_tdvx', 'f8', dimensions=('time', 'depth', 'nv'))
+ ds.createVariable('lin_tdvy', 'f8', dimensions=('time', 'depth', 'nv'))
+ for k, v in {'nodes': lin_nodes,
+ 'faces': lin_faces,
+ 'lin_vx': lin_vx,
+ 'lin_vy': lin_vy,
+ 'lin_tvx': lin_tvx,
+ 'lin_tvy': lin_tvy,
+ 'lin_dvx': lin_dvx,
+ 'lin_dvy': lin_dvy,
+ 'lin_tdvx': lin_tdvx,
+ 'lin_tdvy': lin_tdvy
+ }.items():
+ ds[k][:] = v
+ if 'lin' in k:
+ ds[k].units = 'm/s'
+ PyGrid._get_grid_type(ds, grid_topology={'node_lon': 'x', 'node_lat': 'y'})
+ PyGrid._get_grid_type(ds)
+ ds.setncattr('grid_type', 'sgrid')
+ if ds is not None:
+ # Need to test the dataset...
+ from gnome.environment import GridCurrent
+ from gnome.environment.grid_property import GriddedProp
+ sgt = {'node_lon': 'x', 'node_lat': 'y'}
+ sg = PyGrid.from_netCDF(dataset=ds, grid_topology=sgt, grid_type='sgrid')
+ sgc1 = GridCurrent.from_netCDF(dataset=ds, varnames=['vx', 'vy'], grid_topology=sgt)
+ sgc2 = GridCurrent.from_netCDF(dataset=ds, varnames=['tvx', 'tvy'], grid_topology=sgt)
+ sgc3 = GridCurrent.from_netCDF(dataset=ds, varnames=['dvx', 'dvy'], grid_topology=sgt)
+ sgc4 = GridCurrent.from_netCDF(dataset=ds, varnames=['tdvx', 'tdvy'], grid_topology=sgt)
+
+ ugt = {'nodes': 'nodes', 'faces': 'faces'}
+# ug = PyGrid_U(nodes=ds['nodes'][:], faces=ds['faces'][:])
+ ugc1 = GridCurrent.from_netCDF(dataset=ds, varnames=['lin_vx', 'lin_vy'], grid_topology=ugt)
+ ugc2 = GridCurrent.from_netCDF(dataset=ds, varnames=['lin_tvx', 'lin_tvy'], grid_topology=ugt)
+ ugc3 = GridCurrent.from_netCDF(dataset=ds, varnames=['lin_dvx', 'lin_dvy'], grid_topology=ugt)
+ ugc4 = GridCurrent.from_netCDF(dataset=ds, varnames=['lin_tdvx', 'lin_tdvy'], grid_topology=ugt)
+
+ ds.close()
+ return {'sgrid': (x, y),
+ 'sgrid_vel': (dvx, dvy),
+ 'sgrid_depth_vel': (tdvx, tdvy),
+ 'ugrid': (lin_nodes, lin_faces),
+ 'ugrid_depth_vel': (lin_tdvx, lin_tdvy)}
+
+
+def gen_sinusoid(filename=None):
+# from mpl_toolkits.mplot3d import axes3d
+# import matplotlib.pyplot as plt
+# import numpy as np
+# fig = plt.figure()
+# ax = fig.add_subplot(111, projection='3d', zlim=[-2, 2], xlim=[0, 25], ylim=[-2, 2])
+# ax.autoscale(False)
+
+ y, x = np.mgrid[-1:1:5j, 0:(6 * np.pi):25j]
+ y = y + np.sin(x / 2)
+ Z = np.zeros_like(x)
+ # abs(np.sin(x / 2)) +
+ vx = np.ones_like(x)
+ vy = np.cos(x / 2) / 2
+ vz = np.zeros_like(x)
+# ax.plot_wireframe(x, y, Z, rstride=1, cstride=1, color='blue')
+# ax.quiver(x, y, Z, vx, vy, vz, length=0.5, arrow_length_ratio=0.2, color='darkblue', pivot='tail')
+# ax.quiver(x, y, vx, vy, color='darkblue', pivot='tail', angles='xy', scale=1.5, scale_units='xy', width=0.0025)
+# ax.plot(x[2], y[2])
+ rho = {'r_grid': (x, y, Z),
+ 'r_vel': (vx, vy, vz)}
+
+ yc, xc = np.mgrid[-0.75:0.75: 4j, 0.377:18.493:24j]
+ yc = yc + np.sin(xc / 2)
+ zc = np.zeros_like(xc) + 0.025
+ vxc = np.ones_like(xc)
+ vyc = np.cos(xc / 2) / 2
+ vzc = np.zeros_like(xc)
+# ax.plot_wireframe(xc, yc, zc, rstride=1, cstride=1, color="red")
+# ax.quiver(xc, yc, zc, vxc, vyc, vzc, length=0.3, arrow_length_ratio=0.2, color='darkred', pivot='tail')
+ psi = {'p_grid': (xc, yc, zc),
+ 'p_vel': (vxc, vyc, vzc)}
+
+ yu, xu = np.mgrid[-1:1:5j, 0.377:18.493:24j]
+ yu = yu + np.sin(xu / 2)
+ zu = np.zeros_like(xu) + 0.05
+ vxu = np.ones_like(xu) * 2
+ vyu = np.zeros_like(xu)
+ vzu = np.zeros_like(xu)
+# ax.plot_wireframe(xu, yu, zu, rstride=1, cstride=1, color="purple")
+# ax.quiver(xu, yu, zu, vxu, vyu, vzu, length=0.3, arrow_length_ratio=0.2, color='indigo', pivot='tail')
+ u = {'u_grid': (xu, yu, zu),
+ 'u_vel': (vzu, vxu, vzu)}
+
+ yv, xv = np.mgrid[-0.75:0.75: 4j, 0:18.87:25j]
+ yv = yv + np.sin(xv / 2)
+ zv = np.zeros_like(xv) + 0.075
+ vxv = np.zeros_like(xv)
+ vyv = np.cos(xv / 2) / 2
+ vzv = np.zeros_like(xv)
+# ax.plot_wireframe(xv, yv, zv, rstride=1, cstride=1, color="y")
+# ax.quiver(xv, yv, zv, vxv, vyv, vzv, length=0.3, arrow_length_ratio=0.2, color='olive', pivot='tail')
+ v = {'v_grid': (xv, yv, zv),
+ 'v_vel': (vyv, vzv, vzv)}
+
+ angle = np.cos(x / 2) / 2
+
+ ds = None
+ if filename is not None:
+ ds = nc4.Dataset(filename, 'w', diskless=True, persist=True)
+ for k, v in {'eta_psi': 24,
+ 'xi_psi': 4,
+ 'eta_rho': 25,
+ 'xi_rho': 5}.items():
+ ds.createDimension(k, v)
+ for k, v in {'lon_rho': ('xi_rho', 'eta_rho', x),
+ 'lat_rho': ('xi_rho', 'eta_rho', y),
+ 'lon_psi': ('xi_psi', 'eta_psi', xc),
+ 'lat_psi': ('xi_psi', 'eta_psi', yc),
+ 'lat_u': ('xi_rho', 'eta_psi', xu),
+ 'lon_u': ('xi_rho', 'eta_psi', yu),
+ 'lat_v': ('xi_psi', 'eta_rho', xv),
+ 'lon_v': ('xi_psi', 'eta_rho', yv),
+ }.items():
+ ds.createVariable(k, 'f8', dimensions=v[0:2])
+ ds[k][:] = v[2]
+ for k, v in {'u_rho': ('xi_rho', 'eta_rho', vx),
+ 'v_rho': ('xi_rho', 'eta_rho', vy),
+ 'u_psi': ('xi_psi', 'eta_psi', vxc),
+ 'v_psi': ('xi_psi', 'eta_psi', vyc),
+ 'u': ('xi_rho', 'eta_psi', vxu),
+ 'v': ('xi_psi', 'eta_rho', vyv)}.items():
+ ds.createVariable(k, 'f8', dimensions=v[0:2])
+ ds[k][:] = v[2]
+ ds[k].units = 'm/s'
+ ds.grid_type = 'sgrid'
+ ds.createVariable('angle', 'f8', dimensions=('xi_rho', 'eta_rho'))
+ ds['angle'][:] = angle
+ if ds is not None:
+ # Need to test the dataset...
+# from gnome.environment import GridCurrent
+# sg = PyGrid.from_netCDF(dataset=ds)
+# sgc1 = GridCurrent.from_netCDF(dataset=ds, varnames=['u_rho', 'v_rho'], grid=sg)
+# sgc1.angle = None
+# sgc2 = GridCurrent.from_netCDF(dataset=ds, varnames=['u_psi', 'v_psi'], grid=sg)
+# sgc2.angle = None
+# sgc3 = GridCurrent.from_netCDF(dataset=ds, grid=sg)
+ ds.close()
+
+# plt.show()
+
+
+def gen_ring(filename=None):
+# import matplotlib.pyplot as plt
+ import matplotlib.tri as tri
+ import math
+
+ n_angles = 36
+ n_radii = 6
+ min_radius = 0.25
+ radii = np.linspace(min_radius, 1, n_radii)
+
+ angles = np.linspace(0, 2 * math.pi, n_angles, endpoint=False)
+ angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
+ angles[:, 1::2] += math.pi / n_angles
+# print angles.shape
+
+ x = (radii * np.cos(angles)).flatten()
+ y = (radii * np.sin(angles)).flatten()
+ z = (np.cos(radii) * np.cos(angles * 3.0)).flatten()
+
+ # Create the Triangulation; no triangles so Delaunay triangulation created.
+ triang = tri.Triangulation(x, y)
+ # Mask off unwanted triangles.
+ xmid = x[triang.triangles].mean(axis=1)
+ ymid = y[triang.triangles].mean(axis=1)
+ mask = np.where(xmid * xmid + ymid * ymid < min_radius * min_radius, 1, 0)
+ triang.set_mask(mask)
+ faces = triang.get_masked_triangles()
+
+ vx = (np.ones_like(radii) * np.cos(angles + np.pi)).flatten()
+ vy = (np.ones_like(radii) * np.sin(angles)).flatten()
+
+ if filename is not None:
+ ds = nc4.Dataset(filename, 'w', diskless=True, persist=True)
+ ds.createDimension('nv', x.shape[0])
+ ds.createDimension('nele', faces.shape[0])
+ ds.createDimension('three', 3)
+ for k, v in {'node_lon': ('nv', x),
+ 'node_lat': ('nv', y),
+ 'faces': ('nele', 'three', faces),
+ 'u': ('nv', vx),
+ 'v': ('nv', vy)}.items():
+ ds.createVariable(k, 'f8', dimensions=v[0:-1])
+ ds[k][:] = v[-1]
+ ds[k].units = 'm/s'
+
+ if ds is not None:
+# gc = GridCurrent.from_netCDF(dataset=ds)
+# print gc.grid.node_lon.shape
+# print gc.grid.faces.shape
+ ds.close()
+
+ # tripcolor plot.
+# plt.figure()
+# plt.gca().set_aspect('equal')
+# plt.triplot(triang, 'bo-')
+# plt.quiver(x, y, vy, vx)
+# plt.title('triplot of Delaunay triangulation')
+
+
+def gen_all(path=None):
+ filenames = ['staggered_sine_channel.nc', '3D_circular.nc', 'tri_ring.nc']
+ if path is not None:
+ filenames = [os.path.join(path, fn) for fn in filenames]
+ for fn, func in zip(filenames, (gen_sinusoid, gen_vortex_3D, gen_ring)):
+ func(fn)
+
+if __name__ == '__main__':
+ gen_sinusoid('staggered_sine_channel.nc')
+ gen_vortex_3D('3D_circular.nc')
+ gen_ring('tri_ring.nc')
diff --git a/py_gnome/tests/unit_tests/test_environment/test_environment.py b/py_gnome/tests/unit_tests/test_environment/test_environment.py
index fce379807..99a24ba7a 100644
--- a/py_gnome/tests/unit_tests/test_environment/test_environment.py
+++ b/py_gnome/tests/unit_tests/test_environment/test_environment.py
@@ -8,19 +8,14 @@
from gnome.environment import Water
from gnome.environment import TemperatureTS
-
-def test_Water_init():
- w = Water()
- # no idea what this is about !
- # t = TemperatureTS(name='test',
- # units='K',
- # time=w.time,
- # data=np.array([[300]]))
- # assert w.temperature == t
- assert w.salinity == 35.0
- w = Water(temperature=273, salinity=0)
- assert w.temperature == 273.0
- assert w.salinity == 0.0
+# def test_Water_init():
+# w = Water()
+# t = TemperatureTS(name='test', units='K', time=[w.temperature.time], data=np.array([[300]]))
+# assert w.temperature == t
+# assert w.salinity == 35.0
+# w = Water(temperature=273, salinity=0)
+# assert w.temperature == 273.0
+# assert w.salinity == 0.0
# currently salinity only have psu in there since there is no conversion from
@@ -43,7 +38,7 @@ def test_exceptions(attr, unit):
@pytest.mark.parametrize(("attr", "unit", "val", "si_val"),
- [('temperature', 'C', 0, 273.16),
+ [('temperature', 'C', 0, 273.15),
('sediment', 'mg/l', 5, 0.005),
('sediment', 'percent', 0.005, 0.05),
('wave_height', 'cm', 100.0, 1.0),
@@ -98,7 +93,7 @@ def test_Water_update_from_dict():
@pytest.mark.parametrize(("attr", "unit", "val", "exp_si"),
- [('temperature', 'C', 0, 273.16),
+ [('temperature', 'C', 0, 273.15),
('sediment', 'mg/l', 5, 0.005),
('wave_height', 'km', .001, 1),
('fetch', 'km', .01, 10),
diff --git a/py_gnome/tests/unit_tests/test_environment/test_grid.py b/py_gnome/tests/unit_tests/test_environment/test_grid.py
new file mode 100644
index 000000000..db56a9e42
--- /dev/null
+++ b/py_gnome/tests/unit_tests/test_environment/test_grid.py
@@ -0,0 +1,138 @@
+import os
+import pytest
+import datetime as dt
+import numpy as np
+import datetime
+import netCDF4 as nc
+from gnome.environment.grid import PyGrid, PyGrid_U, PyGrid_S
+from gnome.utilities.remote_data import get_datafile
+import pprint as pp
+
+@pytest.fixture()
+def sg_data():
+ base_dir = os.path.dirname(__file__)
+ s_data = os.path.join(base_dir, 'sample_data')
+ filename = os.path.join(s_data, 'currents')
+ filename = get_datafile(os.path.join(filename, 'tbofs_example.nc'))
+ return filename, nc.Dataset(filename)
+
+@pytest.fixture()
+def sg_topology():
+ return {'node_lon': 'lonc',
+ 'node_lat': 'latc'}
+
+@pytest.fixture()
+def sg():
+ return PyGrid.from_netCDF(sg_data()[0], sg_data()[1], grid_topology=sg_topology())
+
+@pytest.fixture()
+def ug_data():
+ base_dir = os.path.dirname(__file__)
+ s_data = os.path.join(base_dir, 'sample_data')
+ filename = os.path.join(s_data, 'currents')
+ filename = get_datafile(os.path.join(filename, 'ChesBay.nc'))
+ return filename, nc.Dataset(filename)
+
+@pytest.fixture()
+def ug_topology():
+ pass
+
+@pytest.fixture()
+def ug():
+ return PyGrid.from_netCDF(ug_data()[0], ug_data()[1], grid_topology=ug_topology())
+
+class TestPyGrid_S:
+ def test_construction(self, sg_data, sg_topology):
+ filename = sg_data[0]
+ dataset = sg_data[1]
+ grid_topology = sg_topology
+ sg = PyGrid_S.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ assert sg.filename == filename
+
+ sg2 = PyGrid_S.from_netCDF(filename)
+ assert sg2.filename == filename
+
+ sg3 = PyGrid.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ sg4 = PyGrid.from_netCDF(filename)
+ print sg3.shape
+ print sg4.shape
+ assert sg == sg3
+ assert sg2 == sg4
+
+ def test_serialize(self, sg, sg_data, sg_topology):
+ filename = sg_data[0]
+ dataset = sg_data[1]
+ grid_topology = sg_topology
+ sg2 = PyGrid_S.from_netCDF(filename, dataset, grid_topology=grid_topology)
+# pytest.set_trace()
+ print sg.serialize()['filename']
+ print sg2.serialize()['filename']
+ assert sg.serialize()['filename'] == sg2.serialize()['filename']
+
+ def test_deserialize(self, sg, sg_data, sg_topology):
+ filename = sg_data[0]
+ dataset = sg_data[1]
+ grid_topology = sg_topology
+ sg2 = PyGrid_S.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ d_sg = PyGrid_S.new_from_dict(sg.serialize())
+
+ pp.pprint(sg.serialize())
+ pp.pprint(d_sg.serialize())
+
+ assert sg.name == d_sg.name
+# fn1 = 'C:\\Users\\jay.hennen\\Documents\\Code\\pygnome\\py_gnome\\scripts\\script_TAP\\arctic_avg2_0001_gnome.nc'
+# fn2 = 'C:\\Users\\jay.hennen\\Documents\\Code\\pygnome\\py_gnome\\scripts\\script_columbia_river\\COOPSu_CREOFS24.nc'
+# sg = PyGrid.from_netCDF(fn1)
+# ug = PyGrid.from_netCDF(fn2)
+# sg.save(".\\testzip.zip", name="testjson.json")
+# ug.save_as_netcdf("./testug.nc")
+# # sg.save_as_netcdf("./testug.nc")
+# k = PyGrid_U.from_netCDF("./testug.nc")
+# k2 = PyGrid_U.from_netCDF(fn2)
+# c1 = PyGrid_S.from_netCDF(fn1)
+# ug4 = PyGrid.from_netCDF("./testug.nc")
+# sg2 = PyGrid.from_netCDF("./testsg.nc")
+# ug2 = PyGrid.from_netCDF(fn2)
+#
+# ug3 = PyGrid.new_from_dict(ug.serialize(json_='save'))
+
+class TestPyGrid_U:
+ def test_construction(self, ug_data, ug_topology):
+ filename = ug_data[0]
+ dataset = ug_data[1]
+ grid_topology = ug_topology
+ ug = PyGrid_U.from_netCDF(filename, dataset, grid_topology=grid_topology)
+# assert ug.filename == filename
+# assert isinstance(ug.node_lon, nc.Variable)
+# assert ug.node_lon.name == 'lonc'
+
+ ug2 = PyGrid_U.from_netCDF(filename)
+ assert ug2.filename == filename
+# assert isinstance(ug2.node_lon, nc.Variable)
+# assert ug2.node_lon.name == 'lon'
+
+ ug3 = PyGrid.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ ug4 = PyGrid.from_netCDF(filename)
+ print ug3.shape
+ print ug4.shape
+ assert ug == ug3
+ assert ug2 == ug4
+
+ def test_serialize(self, ug, ug_data, ug_topology):
+ filename = ug_data[0]
+ dataset = ug_data[1]
+ grid_topology = ug_topology
+ ug2 = PyGrid_U.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ assert ug.serialize()['filename'] == ug2.serialize()['filename']
+
+ def test_deserialize(self, ug, ug_data, ug_topology):
+ filename = ug_data[0]
+ dataset = ug_data[1]
+ grid_topology = ug_topology
+ ug2 = PyGrid_U.from_netCDF(filename, dataset, grid_topology=grid_topology)
+ d_ug = PyGrid_U.new_from_dict(ug.serialize())
+
+ pp.pprint(ug.serialize())
+ pp.pprint(d_ug.serialize())
+
+ assert ug.name == d_ug.name
diff --git a/py_gnome/tests/unit_tests/test_environment/test_property.py b/py_gnome/tests/unit_tests/test_environment/test_property.py
index ed3e2b770..6658c504e 100644
--- a/py_gnome/tests/unit_tests/test_environment/test_property.py
+++ b/py_gnome/tests/unit_tests/test_environment/test_property.py
@@ -1,107 +1,109 @@
import os
+import sys
import pytest
import datetime as dt
import numpy as np
import pysgrid
import datetime
from gnome.environment.property import Time
-from gnome.environment.grid_property import GriddedProp, GridVectorProp
+from gnome.environment import GriddedProp, GridVectorProp
from gnome.environment.ts_property import TimeSeriesProp, TSVectorProp
from gnome.environment.environment_objects import (VelocityGrid,
VelocityTS,
Bathymetry,
- S_Depth)
+ S_Depth_T1)
+from gnome.environment.grid import PyGrid, PyGrid_S, PyGrid_U
from gnome.utilities.remote_data import get_datafile
from unit_conversion import NotSupportedUnitError
import netCDF4 as nc
import unit_conversion
-
+import pprint as pp
base_dir = os.path.dirname(__file__)
+sys.path.append(os.path.join(base_dir, 'sample_data'))
+from gen_analytical_datasets import gen_all
+
+
'''
Need to hook this up to existing test data infrastructure
'''
s_data = os.path.join(base_dir, 'sample_data')
-curr_dir = os.path.join(s_data, 'currents')
-curr_file = get_datafile(os.path.join(curr_dir, 'tbofs_example.nc'))
-dataset = nc.Dataset(curr_file)
-node_lon = dataset['lonc']
-node_lat = dataset['latc']
-grid_u = dataset['water_u']
-grid_v = dataset['water_v']
-grid_time = dataset['time']
-test_grid = pysgrid.SGrid(node_lon=node_lon,
- node_lat=node_lat)
-
-
-dates = np.array([dt.datetime(2000, 1, 1, 0),
- dt.datetime(2000, 1, 1, 2),
- dt.datetime(2000, 1, 1, 4)])
-dates2 = np.array([dt.datetime(2000, 1, 1, 0),
- dt.datetime(2000, 1, 1, 2),
- dt.datetime(2000, 1, 1, 4),
- dt.datetime(2000, 1, 1, 6),
- dt.datetime(2000, 1, 1, 8), ])
-uv_units = 'm/s'
-u_data = np.array([2., 4., 6., 8., 10.])
-v_data = np.array([5., 7., 9., 11., 13.])
-
-s_data = np.array([20, 30, 40])
-
-
-@pytest.fixture()
-def ts():
- return Time(dates2)
+gen_all(path=s_data)
-class TestTime:
+sinusoid = os.path.join(s_data, 'staggered_sine_channel.nc')
+sinusoid = nc.Dataset(sinusoid)
- def test_construction(self):
- t1 = Time(dates2)
- assert all(dates2 == t1.time)
+circular_3D = os.path.join(s_data, '3D_circular.nc')
+circular_3D = nc.Dataset(circular_3D)
+
+tri_ring = os.path.join(s_data, 'tri_ring.nc')
+tri_ring = nc.Dataset(tri_ring)
- t2 = Time(grid_time)
- assert len(t2.time) == 54
- def test_offset(self):
- t = Time(dates2.copy(), tz_offset=dt.timedelta(hours=1))
- assert t.time[0] == dt.datetime(2000, 1, 1, 1)
+class TestTime:
+ time_var = circular_3D['time']
+ time_arr = nc.num2date(time_var[:], units=time_var.units)
+
+ def test_construction(self):
- def test_extrapolation(self, ts):
- before = dt.datetime(1999, 12, 31, 23)
- after = dt.datetime(2000, 1, 1, 9)
+ t1 = Time(TestTime.time_var)
+ assert all(TestTime.time_arr == t1.time)
+
+ t2 = Time(TestTime.time_arr)
+ assert all(TestTime.time_arr == t2.time)
+
+ t = Time(TestTime.time_var, tz_offset=dt.timedelta(hours=1))
+ print TestTime.time_arr
+ print t.time
+ print TestTime.time_arr[0] + dt.timedelta(hours=1)
+ assert t.time[0] == (TestTime.time_arr[0] + dt.timedelta(hours=1))
+
+ t = Time(TestTime.time_arr.copy(), tz_offset=dt.timedelta(hours=1))
+ assert t.time[0] == TestTime.time_arr[0] + dt.timedelta(hours=1)
+
+ def test_save_load(self):
+ t1 = Time(TestTime.time_var)
+ fn = 'time.txt'
+ t1._write_time_to_file('time.txt')
+ t2 = Time.from_file(fn)
+# pytest.set_trace()
+ assert all(t1.time == t2.time)
+ os.remove(fn)
+
+ def test_extrapolation(self):
+ ts = Time(TestTime.time_var)
+ before = TestTime.time_arr[0] - dt.timedelta(hours=1)
+ after = TestTime.time_arr[-1] + dt.timedelta(hours=1)
assert ts.index_of(before, True) == 0
- assert ts.index_of(after, True) == 5
- assert ts.index_of(ts.time[-1], True) == 4
+ assert ts.index_of(after, True) == 11
+ assert ts.index_of(ts.time[-1], True) == 10
assert ts.index_of(ts.time[0], True) == 0
with pytest.raises(ValueError):
ts.index_of(before, False)
with pytest.raises(ValueError):
ts.index_of(after, False)
- assert ts.index_of(ts.time[-1], True) == 4
+ assert ts.index_of(ts.time[-1], True) == 10
assert ts.index_of(ts.time[0], True) == 0
+ @pytest.mark.parametrize('_json_', ['save', 'webapi'])
+ def test_serialization(self, _json_):
+ ts = Time(TestTime.time_var)
+ ser = ts.serialize(_json_)
+ if _json_ == 'webapi':
+ deser = Time.deserialize(ser)
+ t2 = Time.new_from_dict(deser)
+ assert all(ts.data == t2.data)
+ assert 'data' in ser
+ else:
+ assert 'data' in ser
-
-@pytest.fixture()
-def u():
- return TimeSeriesProp(name='u', units='m/s', time=dates2, data=u_data)
-
-@pytest.fixture()
-def v():
- return TimeSeriesProp(name='v', units='m/s', time=dates2, data=v_data)
-
-@pytest.fixture()
-def vp():
- return TSVectorProp(name='vp', units='m/s', time=dates2, variables=[u_data, v_data])
-
-
-class TestS_Depth:
+class TestS_Depth_T1:
def test_construction(self):
- test_grid = pysgrid.SGrid(node_lon=np.array([[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]]),
+ test_grid = PyGrid_S(node_lon=np.array([[0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]]),
node_lat=np.array([[0, 0, 0, 0], [1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3]]))
u = np.zeros((3, 4, 4), dtype=np.float64)
@@ -128,7 +130,7 @@ def test_construction(self):
b = Bathymetry(name='bathymetry', data=bathy_data, grid=test_grid, time=None)
- dep = S_Depth(bathymetry=b, terms=dict(zip(S_Depth.default_terms[0], [Cs_w, s_w, hc, Cs_r, s_rho])), dataset='dummy')
+ dep = S_Depth_T1(bathymetry=b, terms=dict(zip(S_Depth_T1.default_terms[0], [Cs_w, s_w, hc, Cs_r, s_rho])), dataset='dummy')
assert dep is not None
corners = np.array([[0, 0, 0], [0, 3, 0], [3, 3, 0], [3, 0, 0]], dtype=np.float64)
@@ -165,82 +167,47 @@ def test_construction(self):
v = None
with pytest.raises(ValueError):
# mismatched data and dates length
- u = TimeSeriesProp('u', 'm/s', dates, u_data)
-
- assert u is None
+ dates = []
+ u = TimeSeriesProp('u', 'm/s', [datetime.datetime.now(), datetime.datetime.now()], [5, ])
- u = TimeSeriesProp('u', 'm/s', dates2, u_data)
+ u = TimeSeriesProp('u', 'm/s', [datetime.datetime.now()], [5, ])
assert u is not None
assert u.name == 'u'
assert u.units == 'm/s'
- print u.time == Time(dates2)
- assert u.time == Time(dates2)
- assert (u.data == u_data).all()
v = None
with pytest.raises(ValueError):
- v = TimeSeriesProp('v', 'nm/hr', dates2, v_data)
+ v = TimeSeriesProp('v', 'nm/hr', [datetime.datetime.now()], [5, ])
assert v is None
- def test_unit_conversion(self, u):
+ constant = TimeSeriesProp.constant('const', 'm/s', 5)
+ assert constant.data[0] == 5
+ assert all(constant.at(np.array((0, 0)), datetime.datetime.now()) == 5)
+
+ def test_unit_conversion(self):
+ u = TimeSeriesProp('u', 'm/s', [datetime.datetime.now()], [5, ])
t = u.in_units('km/hr')
- assert t.data is not v_data
- assert round(t.data[0], 2) == 7.2
+ assert t.data is not u.data
+ assert round(t.data[0], 2) == 18.0
with pytest.raises(unit_conversion.NotSupportedUnitError):
# mismatched data and dates length
t = u.in_units('nm/hr')
- def test_set_data(self, u):
- u.data = v_data
- assert (u.data == v_data).all()
-
- with pytest.raises(ValueError):
- # mismatched data and time length
- u.data = [5, 6, 7]
-
- def test_set_time(self, u):
- with pytest.raises(ValueError):
- # mismatched data and time length
- u.time = dates
-
- u.time = dates2
- assert u.time == Time(dates2)
-
- def test_set_attr(self, u):
-
- # mismatched data and time length
- with pytest.raises(ValueError):
- u.set_attr(time=dates2, data=s_data)
-
- u.set_attr(name='v')
- assert u.name == 'v'
-
- with pytest.raises(ValueError):
- u.set_attr(time=dates, data=u_data)
-
- u.set_attr(time=dates, data=s_data)
- assert u.data[0] == 20
+ def test_at(self):
- u.set_attr(data=[50, 60, 70])
- assert u.data[0] == 50
+ dates2 = np.array([dt.datetime(2000, 1, 1, 0),
+ dt.datetime(2000, 1, 1, 2),
+ dt.datetime(2000, 1, 1, 4),
+ dt.datetime(2000, 1, 1, 6),
+ dt.datetime(2000, 1, 1, 8), ])
+ u_data = np.array([2., 4., 6., 8., 10.])
+ u = TimeSeriesProp(name='u', units='m/s', time=dates2, data=u_data)
- u.set_attr(time=[datetime.datetime(2000, 1, 3, 1),
- datetime.datetime(2000, 1, 3, 2),
- datetime.datetime(2000, 1, 3, 3)])
-
- u.set_attr(units='km/hr')
-
- assert u.units == 'km/hr'
-
- with pytest.raises(ValueError):
- u.set_attr(units='nm/hr')
-
- def test_at(self, u):
corners = np.array(((1, 1), (2, 2)))
t1 = dt.datetime(1999, 12, 31, 23)
t2 = dt.datetime(2000, 1, 1, 0)
@@ -261,351 +228,203 @@ def test_at(self, u):
assert (u.at(corners, t1, extrapolate=True) == np.array([2])).all()
assert (u.at(corners, t5, extrapolate=True) == np.array([10])).all()
-class TestTSVectorProp:
-
- def test_construction(self, u, v):
- vp = None
- vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[u_data, v_data])
-
- assert all(vp.variables[0].data == u_data)
-
- # 3 components
- vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[u_data, v_data, u_data])
-
- # Using TimeSeriesProp
- vp = TSVectorProp(name='vp', variables=[u, v])
- assert vp.time == vp.variables[0].time == vp.variables[1].time
-
- # SHORT TIME
- with pytest.raises(ValueError):
- vp = TSVectorProp(name='vp', units='m/s', time=dates, variables=[u_data, v_data])
-
- # DIFFERENT LENGTH VARS
- with pytest.raises(ValueError):
- vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[s_data, v_data])
-
- # UNSUPPORTED UNITS
- with pytest.raises(ValueError):
- vp = TSVectorProp(name='vp', units='km/s', time=dates2, variables=[s_data, v_data, u_data])
-
- def test_unit_conversion(self, vp):
- nvp = vp.in_units('km/hr')
- assert round(nvp.variables[0].data[0], 2) == 7.2
-
- with pytest.raises(unit_conversion.NotSupportedUnitError):
- # mismatched data and dates length
- nvp = vp.in_units('nm/hr')
-
- assert nvp != vp
- assert all(nvp.variables[0].data != vp.variables[0].data)
-
- def test_set_variables(self, vp):
- print u_data
- vp.variables = [u_data, v_data, u_data]
- assert (vp._variables[0].data == u_data).all()
-
- with pytest.raises(ValueError):
- # mismatched data and time length
- vp.variables = [[5], [6], [7]]
-
- def test_set_attr(self, vp):
-
- # mismatched data and time length
- with pytest.raises(ValueError):
- vp.set_attr(time=dates2, variables=[s_data, s_data])
-
- vp.set_attr(name='vp1')
- assert vp.name == 'vp1'
+# class TestTSVectorProp:
+#
+# def test_construction(self, u, v):
+# vp = None
+# vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[u_data, v_data])
+# pytest.set_trace()
+# assert vp.variables[0].data == u_data
+#
+# # 3 components
+# vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[u_data, v_data, u_data])
+#
+# # Using TimeSeriesProp
+# vp = TSVectorProp(name='vp', variables=[u, v])
+# assert vp.time == vp.variables[0].time == vp.variables[1].time
+#
+# # SHORT TIME
+# with pytest.raises(ValueError):
+# vp = TSVectorProp(name='vp', units='m/s', time=dates, variables=[u_data, v_data])
+#
+# # DIFFERENT LENGTH VARS
+# with pytest.raises(ValueError):
+# vp = TSVectorProp(name='vp', units='m/s', time=dates2, variables=[s_data, v_data])
+#
+# # UNSUPPORTED UNITS
+# with pytest.raises(ValueError):
+# vp = TSVectorProp(name='vp', units='km/s', time=dates2, variables=[s_data, v_data, u_data])
+#
+# def test_unit_conversion(self, vp):
+# nvp = vp.in_units('km/hr')
+# assert round(nvp.variables[0].data[0], 2) == 7.2
+#
+# with pytest.raises(unit_conversion.NotSupportedUnitError):
+# # mismatched data and dates length
+# nvp = vp.in_units('nm/hr')
+#
+# assert nvp != vp
+# assert all(nvp.variables[0].data != vp.variables[0].data)
+
+# def test_set_variables(self, vp):
+# print u_data
+# vp.variables = [u_data, v_data, u_data]
+# assert (vp._variables[0].data == u_data).all()
+#
+# with pytest.raises(ValueError):
+# # mismatched data and time length
+# vp.variables = [[5], [6], [7]]
+#
+# def test_set_attr(self, vp):
+#
+# # mismatched data and time length
+# with pytest.raises(ValueError):
+# vp.set_attr(time=dates2, variables=[s_data, s_data])
+#
+# vp.set_attr(name='vp1')
+# assert vp.name == 'vp1'
+#
+# with pytest.raises(ValueError):
+# vp.set_attr(time=dates, variables=[u_data, v_data])
+#
+# vp.set_attr(time=dates, variables=[s_data, s_data])
+# assert vp.variables[0].data[0] == 20
+#
+# vp.set_attr(variables=[[50, 60, 70], s_data])
+# assert vp.variables[0].data[0] == 50
+#
+# vp.set_attr(time=[datetime.datetime(2000, 1, 3, 1),
+# datetime.datetime(2000, 1, 3, 2),
+# datetime.datetime(2000, 1, 3, 3)])
+#
+# vp.set_attr(units='km/hr')
+#
+# assert vp.units == 'km/hr'
+#
+# with pytest.raises(ValueError):
+# vp.set_attr(units='nm/hr')
+#
+# def test_at(self, vp):
+# corners = np.array(((1, 1, 0), (2, 2, 0)))
+# t1 = dt.datetime(1999, 12, 31, 23)
+# t2 = dt.datetime(2000, 1, 1, 0)
+# t3 = dt.datetime(2000, 1, 1, 1)
+# t4 = dt.datetime(2000, 1, 1, 8)
+# t5 = dt.datetime(2000, 1, 1, 9)
+#
+# # No extrapolation. out of bounds time should fail
+# with pytest.raises(ValueError):
+# vp.at(corners, t1)
+#
+# print vp.name
+# assert (vp.at(corners, t2) == np.array([2, 5])).all()
+# assert (vp.at(corners, t3) == np.array([3, 6])).all()
+# assert (vp.at(corners, t4) == np.array([10, 13])).all()
+# with pytest.raises(ValueError):
+# vp.at(corners, t5)
+#
+# # turn extrapolation on
+# assert (vp.at(corners, t1, extrapolate=True) == np.array([2, 5])).all()
+# assert (vp.at(corners, t5, extrapolate=True) == np.array([10, 13])).all()
- with pytest.raises(ValueError):
- vp.set_attr(time=dates, variables=[u_data, v_data])
-
- vp.set_attr(time=dates, variables=[s_data, s_data])
- assert vp.variables[0].data[0] == 20
-
- vp.set_attr(variables=[[50, 60, 70], s_data])
- assert vp.variables[0].data[0] == 50
-
- vp.set_attr(time=[datetime.datetime(2000, 1, 3, 1),
- datetime.datetime(2000, 1, 3, 2),
- datetime.datetime(2000, 1, 3, 3)])
-
- vp.set_attr(units='km/hr')
-
- assert vp.units == 'km/hr'
-
- with pytest.raises(ValueError):
- vp.set_attr(units='nm/hr')
-
- def test_at(self, vp):
- corners = np.array(((1, 1, 0), (2, 2, 0)))
- t1 = dt.datetime(1999, 12, 31, 23)
- t2 = dt.datetime(2000, 1, 1, 0)
- t3 = dt.datetime(2000, 1, 1, 1)
- t4 = dt.datetime(2000, 1, 1, 8)
- t5 = dt.datetime(2000, 1, 1, 9)
-
- # No extrapolation. out of bounds time should fail
- with pytest.raises(ValueError):
- vp.at(corners, t1)
-
- print vp.name
- assert (vp.at(corners, t2) == np.array([2, 5])).all()
- assert (vp.at(corners, t3) == np.array([3, 6])).all()
- assert (vp.at(corners, t4) == np.array([10, 13])).all()
- with pytest.raises(ValueError):
- vp.at(corners, t5)
-
- # turn extrapolation on
- assert (vp.at(corners, t1, extrapolate=True) == np.array([2, 5])).all()
- assert (vp.at(corners, t5, extrapolate=True) == np.array([10, 13])).all()
-
-
-@pytest.fixture()
-def gp():
- return GriddedProp(name='u', units='m/s', time=grid_time, data=grid_u, data_file=curr_file, grid=test_grid, grid_file=curr_file)
+'''
+Analytical cases:
+
+Triangular
+ grid shape: (nodes = nv, faces = nele)
+ data_shapes: (time, depth, nv),
+ (time, nv),
+ (depth, nv),
+ (nv)
+ depth types: (None),
+ (constant),
+ (sigma v1),
+ (sigma v2),
+ (levels)
+ test points: 2D surface (time=None, depth=None)
+ - nodes should be valid
+ - off grid should extrapolate with fill value or Error
+ - interpolation elsewhere
+ 2D surface (time=t, depth=None)
+ - as above, validate time interpolation
+
+
+
+Quad
+ grid shape: (nodes:(x,y))
+ (nodes:(x,y), faces(xc, yc))
+ (nodes:(x,y), faces(xc, yc), edge1(x, yc), edge2(xc, y))
+ data_shapes: (time, depth, x, y),
+ (time, x, y),
+ (depth, x, y),
+ (x,y)
+ depth types: (None),
+ (constant),
+ (sigma v1),
+ (sigma v2),
+ (levels)
-@pytest.fixture()
-def gp2():
- return GriddedProp(name='v;', units='m/s', time=grid_time, data=grid_v, data_file=curr_file, grid=test_grid, grid_file=curr_file)
+'''
-@pytest.fixture()
-def gvp():
- return GridVectorProp(name='velocity', units='m/s', time=grid_time, variables=[gp(), gp2()])
class TestGriddedProp:
+
def test_construction(self):
+ data = sinusoid['u'][:]
+ grid = PyGrid.from_netCDF(dataset=sinusoid)
+ time = None
+
u = GriddedProp(name='u',
units='m/s',
- data=grid_u,
- grid=test_grid,
- time=grid_time,
- data_file='tbofs_example.nc',
- grid_file='tbofs_example.nc')
- with pytest.raises(ValueError):
- u = GriddedProp(name='u',
- units='m/s',
- data=None, # NO DATA
- grid=test_grid,
- time=grid_time,
- data_file='tbofs_example.nc',
- grid_file='tbofs_example.nc')
- with pytest.raises(ValueError):
- u = GriddedProp(name='u',
- units='m/s',
- data=grid_u,
- grid=None, # NO GRID
- time=grid_time,
- data_file='tbofs_example.nc',
- grid_file='tbofs_example.nc')
- with pytest.raises(ValueError):
- u = GriddedProp(name='u',
- units='m/s',
- data=u_data, # BAD DATA SHAPE
- grid=test_grid,
- time=grid_time,
- data_file='tbofs_example.nc',
- grid_file='tbofs_example.nc')
- with pytest.raises(ValueError):
- u = GriddedProp(name='u',
- units='m/s',
- data=grid_u,
- grid=test_grid,
- time=dates2, # BAD TIME SHAPE
- data_file='tbofs_example.nc',
- grid_file='tbofs_example.nc')
-
- topology = {'node_lon': 'lonc',
- 'node_lat': 'latc'}
- k = GriddedProp.from_netCDF(name='u',
- depth=None,
- grid_file=curr_file,
- grid_topology=topology,
- data_file=curr_file,
- varname='water_u')
+ data=data,
+ grid=grid,
+ time=time,
+ data_file='staggered_sine_channel.nc',
+ grid_file='staggered_sine_channel.nc')
+
+ curr_file = os.path.join(s_data, 'staggered_sine_channel.nc')
+ k = GriddedProp.from_netCDF(filename=curr_file, varname='u', name='u')
assert k.name == u.name
- assert k.units == 'meter second-1'
+ assert k.units == 'm/s'
# fixme: this was failing
- #assert k.time == u.time
- assert k.data[0, 0, 0] == u.data[0, 0, 0]
-
- def test_set_data(self, gp):
- with pytest.raises(ValueError):
- gp.data = np.array(v_data)
-
- def test_set_grid(self, gp):
- with pytest.raises(ValueError):
- gp.grid = np.array(v_data)
-
- def test_set_time(self, gp):
- gp.time = grid_time
- gt2 = gp.time.time.copy()
- gt2[0] = datetime.datetime(1999, 12, 31, 23)
- gp.time = gt2
- assert gp.time.time[0] == datetime.datetime(1999, 12, 31, 23)
-
- def test_set_attr(self, gp):
- gp.set_attr(name='gridpropobj')
- assert gp.name == 'gridpropobj'
-
- gp.set_attr(data=grid_v)
- assert gp.data == grid_v
-
- gp.set_attr(grid=test_grid)
- assert gp.grid == test_grid
- assert gp.grid.infer_location(gp.data) == 'node'
-
- gp.set_attr(data=grid_u, grid=test_grid)
- assert gp.data == grid_u
- assert gp.grid.infer_location(gp.data) == 'node'
-
- gp.set_attr(data_file='f', grid_file='f')
- assert gp.data_file == 'f'
-
- def test_at(self, gp):
-
- print type(gp.grid)
-
- print gp.at(np.array([[-82.8, 27.475, 0], ]), gp.time.time[2])
- assert gp.at(np.array([[-82.8, 27.475, 0], ]), gp.time.time[2]) != 0
- print gp.at(np.array([[0, 0, 0], ]), gp.time.time[2])
- assert gp.at(np.array([[0, 0, 0], ]), gp.time.time[2]) == 1.0e20
-
- def test_extrapolation(self, gp, gp2):
- gp._time.time = np.array([gp.time.time[0]])
- gp._data = gp.data[0, :, :]
- assert gp.at(np.array([[-82.8, 27.475, 0], ]), dt.datetime.now()) != 0
+ # assert k.time == u.time
+ assert k.data[0, 0] == u.data[0, 0]
+
+ def test_at(self):
+ curr_file = os.path.join(s_data, 'staggered_sine_channel.nc')
+ u = GriddedProp.from_netCDF(filename=curr_file, varname='u_rho')
+ v = GriddedProp.from_netCDF(filename=curr_file, varname='v_rho')
+
+ points = np.array(([0, 0, 0], [np.pi, 1, 0], [2 * np.pi, 0, 0]))
+ time = datetime.datetime.now()
+
+ assert all(u.at(points, time) == [1, 1, 1])
+ print np.cos(points[:, 0] / 2) / 2
+ assert all(np.isclose(v.at(points, time), np.cos(points[:, 0] / 2) / 2))
class TestGridVectorProp:
- def test_construction(self, gp, gp2):
- # Grid_file and data_file missing
- with pytest.raises(ValueError):
- gvp = GridVectorProp(name='velocity', units='m/s', time=grid_time, variables=[grid_u, grid_v])
- # Units inconsistent with variables units
- with pytest.raises(ValueError):
- gvp = GridVectorProp(name='velocity', units='km/hr', time=grid_time, variables=[gp, gp2])
- gvp = GridVectorProp(name='velocity', units='m/s', time=grid_time, variables=[gp, gp2])
+ def test_construction(self):
+ curr_file = os.path.join(s_data, 'staggered_sine_channel.nc')
+ u = GriddedProp.from_netCDF(filename=curr_file, varname='u_rho')
+ v = GriddedProp.from_netCDF(filename=curr_file, varname='v_rho')
+ gvp = GridVectorProp(name='velocity', units='m/s', time=u.time, variables=[u, v])
assert gvp.name == 'velocity'
assert gvp.units == 'm/s'
- assert gvp.time == Time(grid_time)
- assert gvp._variables[0].data == grid_u
- assert gvp._variables[0].name == 'u'
-
-
-@pytest.fixture()
-def vel(u, v):
- return VelocityTS(name='vel', variables=[u, v])
-class TestVelocityTS:
- def test_construction(self, u, v):
- vel = None
- vel = VelocityTS(name='vel', units='m/s', time=dates2, variables=[u_data, v_data], extrapolate=False)
-
- assert all(vel.variables[0].data == u_data)
-
- # Using TimeSeriesProp objects
- vel = VelocityTS(name='vel', variables=[u, v])
- assert vel.time == vel.variables[0].time == vel.variables[1].time
- # 3 components
- with pytest.raises(ValueError):
- vel = VelocityTS(name='vel', units='m/s', time=dates2, variables=[u_data, v_data, u_data], extrapolate=False)
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_serialization(self, vel, json_):
- dict_ = vel.serialize(json_)
- print dict_
- assert dict_[u'name'] == 'vel'
- if json_ == 'webapi':
- assert dict_[u'units'] == ('m/s', 'degrees')
- assert dict_[u'varnames'] == ['magnitude', 'direction', 'u', 'v']
- if json_ == 'save':
- print dict_['timeseries']
- assert dict_['timeseries'][0][1][0] == 2.0
- assert dict_[u'units'] == ['m/s']
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_deserialize(self, vel, json_):
- dict_ = vel.serialize(json_)
- dser = VelocityTS.deserialize(dict_)
- print dser
- assert dser['name'] == 'vel'
- assert all(dser['time'] == dates2)
- assert all(np.isclose(dser['data'][0], u_data))
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_new_from_dict(self, vel, json_):
- deser = VelocityTS.deserialize(vel.serialize(json_))
- vel2 = VelocityTS.new_from_dict(deser)
- assert vel == vel2
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_update_from_dict(self, vel, json_):
- deser = VelocityTS.deserialize(vel.serialize(json_))
- vel2 = VelocityTS.new_from_dict(deser)
- deser['name'] = 'vel2'
- vel.update_from_dict(deser)
- vel2.name = 'vel2'
- assert vel.name == 'vel2'
- assert vel == vel2
-
-
-@pytest.fixture()
-def g_vel(gp, gp2):
- return VelocityGrid(name='g_vel', variables=[gp, gp2])
-class TestVelocityGrid:
- def test_construction(self, gp, gp2):
- g_vel = VelocityGrid(name='g_vel', variables=[gp, gp2])
- g_vel = VelocityGrid(name='g_vel', units='m/s', time=grid_time, grid=test_grid, variables=[grid_u, grid_v], grid_file=curr_file, data_file=curr_file)
- pass
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_serialization(self, g_vel, json_):
- dict_ = g_vel.serialize()
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_deserialize(self, g_vel, json_):
- pass
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_new_from_dict(self, g_vel, json_):
- pass
-
- @pytest.mark.parametrize("json_", ('save', 'webapi'))
- def test_update_from_dict(self, g_vel, json_):
- pass
+ assert gvp.varnames[0] == 'u_rho'
+# pytest.set_trace()
+
+ def test_at(self):
+ curr_file = os.path.join(s_data, 'staggered_sine_channel.nc')
+ gvp = GridVectorProp.from_netCDF(filename=curr_file,
+ varnames=['u_rho', 'v_rho'])
+ points = np.array(([0, 0, 0], [np.pi, 1, 0], [2 * np.pi, 0, 0]))
+ time = datetime.datetime.now()
+
+ assert all(np.isclose(gvp.at(points, time)[:, 1], np.cos(points[:, 0] / 2) / 2))
if __name__ == "__main__":
- import pprint
- k = vp()
- corners = np.array(((1, 1), (2, 2)))
- t1 = dt.datetime(1999, 12, 31, 23)
- t2 = dt.datetime(2000, 1, 1, 0)
- t3 = dt.datetime(2000, 1, 1, 1)
- t4 = dt.datetime(2000, 1, 1, 8)
- t5 = dt.datetime(2000, 1, 1, 9)
-
- # No extrapolation. out of bounds time should fail
- with pytest.raises(ValueError):
- k.at(corners, t1)
-
- print k.name
- assert (k.at(corners, t2) == np.array([2, 5])).all()
- assert (k.at(corners, t3) == np.array([3, 6])).all()
- assert (k.at(corners, t4) == np.array([10, 13])).all()
- with pytest.raises(ValueError):
- k.at(corners, t5)
-
- v = g_vel(gp(), gp2())
- dict_ = v.serialize()
- pp.pprint(dict_)
- deser = VelocityGrid.deserialize(dict_)
- pp.pprint(deser)
- v2 = VelocityGrid.new_from_dict(deser)
- v == v2
- test_tsprop_construction()
- test_tsprop_unit_conversion()
- test_tsprop_set_attr()
- test_gridprop_construction()
+ pass
diff --git a/py_gnome/tests/unit_tests/test_map.py b/py_gnome/tests/unit_tests/test_map.py
index 52f35dcf2..cfb3a3c82 100644
--- a/py_gnome/tests/unit_tests/test_map.py
+++ b/py_gnome/tests/unit_tests/test_map.py
@@ -16,15 +16,14 @@
from gnome.basic_types import oil_status, status_code_type
from gnome.utilities.projections import NoProjection
-from gnome.map import GnomeMap, MapFromBNA, RasterMap, MapFromUGrid
+from gnome.map import GnomeMap, MapFromBNA, RasterMap # , MapFromUGrid
from conftest import sample_sc_release
basedir = os.path.dirname(__file__)
-datadir = os.path.join(basedir, "../sample_data")
-testbnamap = os.path.join(basedir, '../sample_data', 'MapBounds_Island.bna')
-test_tri_grid = os.path.join(basedir, '../sample_data',
- 'small_trigrid_example.nc')
+datadir = os.path.normpath(os.path.join(basedir, "sample_data"))
+testbnamap = os.path.join(datadir, 'MapBounds_Island.bna')
+test_tri_grid = os.path.join(datadir, 'small_trigrid_example.nc')
def test_in_water_resolution():
@@ -35,7 +34,6 @@ def test_in_water_resolution():
# Create an 500x500 pixel map, with an LE refloat half-life of 2 hours
# (specified here in seconds).
-
m = gnome.map.MapFromBNA(filename=testbnamap, refloat_halflife=2,
raster_size=500 * 500)
@@ -921,11 +919,30 @@ def test_resurface_airborne_elements():
assert spill['next_positions'][:, 2].min() == 0.
+
+def test_bna_no_map_bounds():
+ """
+ tests that the map bounds will get expanded to include
+ the bounding box of the land and spillable area.
+ """
+ test_no_bounds_bna = os.path.join(datadir, 'no_map_bounds.bna')
+ m = MapFromBNA(test_no_bounds_bna)
+
+ assert np.array_equal(m.map_bounds, [(3., 10.),
+ (3., 11.),
+ (6., 11.),
+ (6., 10.),
+ ])
+
+
if __name__ == '__main__':
- tester = Test_MapfromBNA()
- print "running test"
- # tester.test_map_on_land()
- tester.test_map_spillable_lake()
+
+ map = test_bna_no_map_bounds()
+
+ # tester = Test_MapfromBNA()
+ # print "running test"
+ # # tester.test_map_on_land()
+ # tester.test_map_spillable_lake()
# tester = Test_GnomeMap()
# tester.test_on_map()
diff --git a/py_gnome/tests/unit_tests/test_movers/test_random_vertical_mover.py b/py_gnome/tests/unit_tests/test_movers/test_random_vertical_mover.py
index f33ad4ac5..27c261f68 100644
--- a/py_gnome/tests/unit_tests/test_movers/test_random_vertical_mover.py
+++ b/py_gnome/tests/unit_tests/test_movers/test_random_vertical_mover.py
@@ -63,7 +63,7 @@ def test_vertical_zero():
"""
checks that there is no vertical movement
"""
- mv = RandomVerticalMover() # all defaults
+ mv = RandomVerticalMover(mixed_layer_depth=10.0) # mostly defaults
num_elements = 100
@@ -73,9 +73,10 @@ def test_vertical_zero():
)
# set z positions:
sc['positions'][:, 2] = np.linspace(0, 50, num_elements)
+ print sc['positions']
- mv.vertical_diffusion_coef_above_ml = 0;
- mv.vertical_diffusion_coef_below_ml = 0;
+ mv.vertical_diffusion_coef_above_ml = 0.0
+ mv.vertical_diffusion_coef_below_ml = 0.0
delta = mv.get_move(sc,
time_step,
@@ -98,7 +99,7 @@ def test_bottom_layer():
total_time = 60000
num_elements = 100
- num_timesteps = total_time // time_step
+ num_timesteps = total_time // time_step
mv = RandomVerticalMover(vertical_diffusion_coef_below_ml=D_lower) # m
@@ -146,7 +147,7 @@ def test_mixed_layer():
total_time = 600
num_elements = 1000
- num_timesteps = total_time // time_step
+ num_timesteps = total_time // time_step
mv = RandomVerticalMover(vertical_diffusion_coef_above_ml=D_mixed,
mixed_layer_depth=1000, # HUGE to avoid surface effects.
@@ -193,7 +194,7 @@ def test_mixed_layer2():
total_time = 6000
num_elements = 1000
- num_timesteps = total_time // time_step
+ num_timesteps = total_time // time_step
mv = RandomVerticalMover(vertical_diffusion_coef_above_ml=D_mixed,
vertical_diffusion_coef_below_ml=0.0,
diff --git a/py_gnome/tests/unit_tests/test_spill/test_spill.py b/py_gnome/tests/unit_tests/test_spill/test_spill.py
index f03056cc2..0fa7016af 100644
--- a/py_gnome/tests/unit_tests/test_spill/test_spill.py
+++ b/py_gnome/tests/unit_tests/test_spill/test_spill.py
@@ -85,7 +85,8 @@ def test_amount_mass_vol(amount, units):
assert spill.units == units
if units in Spill.valid_vol_units:
- exp_mass = (spill.substance.density_at_temp(water.temperature) *
+ # use 15C (288.15K) for mass<=>volume conversion
+ exp_mass = (spill.substance.density_at_temp(288.15) *
uc.convert('Volume', units, 'm^3', spill.amount))
else:
exp_mass = uc.convert('Mass', units, 'kg', spill.amount)
diff --git a/py_gnome/tests/unit_tests/test_utilities/test_geometry/test_polygons.py b/py_gnome/tests/unit_tests/test_utilities/test_geometry/test_polygons.py
index d870cb4a9..827604a03 100644
--- a/py_gnome/tests/unit_tests/test_utilities/test_geometry/test_polygons.py
+++ b/py_gnome/tests/unit_tests/test_utilities/test_geometry/test_polygons.py
@@ -89,14 +89,13 @@ def test_bounding_box(self):
P = Polygon(p1)
print P.bounding_box
assert P.bounding_box == np.array([[1., 2.], [7., 8.]],
- dtype=np.float)
+ dtype=np.float)
def test_size_zero(self):
- P = Polygon( (), )
+ P = Polygon((), )
assert len(P) == 0
-
class Test_PolygonSet:
def test_append(self):
@@ -136,6 +135,15 @@ def test_zero_length(self):
assert len(poly_set) == 0
+ def test_zero_length_false(self):
+ """
+ A length-zero Polygon set should be Falsey
+ """
+ poly_set = PolygonSet()
+
+ assert not poly_set
+
+
# def test_pop(self):
# pass
diff --git a/py_gnome/tests/unit_tests/test_utilities/test_weathering_algorithms.py b/py_gnome/tests/unit_tests/test_utilities/test_weathering_algorithms.py
index 951f753f9..48c394f9b 100644
--- a/py_gnome/tests/unit_tests/test_utilities/test_weathering_algorithms.py
+++ b/py_gnome/tests/unit_tests/test_utilities/test_weathering_algorithms.py
@@ -75,3 +75,10 @@ def test_ding_farmer():
wave_height,
k_w),
1.0)
+
+
+def test_monohan():
+ from gnome.utilities.weathering.monahan import Monahan
+
+ assert np.isclose(Monahan.whitecap_decay_constant(0), 2.54) # fresh water
+ assert np.isclose(Monahan.whitecap_decay_constant(35), 3.85) # salt water
diff --git a/py_gnome/tests/unit_tests/test_weatherers/test_dispersion.py b/py_gnome/tests/unit_tests/test_weatherers/test_dispersion.py
index 66c318c95..25c481f8d 100644
--- a/py_gnome/tests/unit_tests/test_weatherers/test_dispersion.py
+++ b/py_gnome/tests/unit_tests/test_weatherers/test_dispersion.py
@@ -88,12 +88,14 @@ def test_dispersion_not_active(oil, temp, num_elems):
assert np.all(sc.mass_balance['sedimentation'] == 0)
-@pytest.mark.xfail
+# the test oils don't match the data base, using so tests don't depend on db
@pytest.mark.parametrize(('oil', 'temp', 'dispersed'),
- [('ABU SAFAH', 288.7, 361.402),
- ('ALASKA NORTH SLOPE (MIDDLE PIPELINE)',
- 288.7, 552.632),
- ('BAHIA', 288.7, 525.503)
+ [('ABU SAFAH', 288.7, 63.076),
+ #('ALASKA NORTH SLOPE (MIDDLE PIPELINE)',
+ ('oil_ans_mp',
+ 288.7, 592.887),
+ #('BAHIA', 288.7, 14.472)
+ ('oil_bahia', 288.7, 133.784)
]
)
def test_full_run(sample_model_fcn2, oil, temp, dispersed):
diff --git a/py_gnome/tests/unit_tests/test_weatherers/test_dissolution.py b/py_gnome/tests/unit_tests/test_weatherers/test_dissolution.py
index 88a1900ca..990663d54 100644
--- a/py_gnome/tests/unit_tests/test_weatherers/test_dissolution.py
+++ b/py_gnome/tests/unit_tests/test_weatherers/test_dissolution.py
@@ -28,7 +28,7 @@
def test_init():
- 'test sort order for Dissolution weatherer'
+ 'test initialization'
wind = constant_wind(15., 0)
waves = Waves(wind, Water())
diss = Dissolution(waves)
@@ -38,13 +38,13 @@ def test_init():
for at in ('mass', 'viscosity', 'density')])
-def test_sort_order():
- 'test sort order for Dissolution weatherer'
- wind = constant_wind(15., 0)
- waves = Waves(wind, Water())
- diss = Dissolution(waves)
+# def test_sort_order():
+# 'test sort order for Dissolution weatherer'
+# wind = constant_wind(15., 0)
+# waves = Waves(wind, Water())
+# diss = Dissolution(waves)
- assert weatherer_sort(diss) == 8
+# assert weatherer_sort(diss) == 10
def test_serialize_deseriailize():
@@ -126,9 +126,9 @@ def test_dissolution_k_ow(oil, temp, num_elems, k_ow, on):
@pytest.mark.parametrize(('oil', 'temp', 'num_elems', 'drop_size', 'on'),
[('oil_bahia', 311.15, 3,
- [231.19e-6, 221.98e-6, 212.91e-6], True),
+ [239.92e-6, 231.33e-6, 222.85e-6], True),
('oil_ans_mp', 311.15, 3,
- [234.08e-6, 221.6e-6, 213.08e-6], True),
+ [245.32e-6, 233.54e-6, 225.35e-6], True),
('oil_ans_mp', 311.15, 3,
[0.0, 0.0, 0.0], False)])
def test_dissolution_droplet_size(oil, temp, num_elems, drop_size, on):
@@ -190,10 +190,10 @@ def test_dissolution_droplet_size(oil, temp, num_elems, drop_size, on):
('oil_bahia', 288.15, 15., 3, 3.6288e-3, True),
('oil_bahia', 288.15, 20., 3, 6.1597e-3, True),
# temperature trends
- ('oil_bahia', 273.15, 15., 3, 2.6198e-3, True),
- ('oil_bahia', 283.15, 15., 3, 3.3789e-3, True),
- ('oil_bahia', 293.15, 15., 3, 3.8367e-3, True),
- ('oil_bahia', 303.15, 15., 3, 4.1746e-3, True),
+ ('oil_bahia', 273.15, 15., 3, 3.62526e-3, True),
+ ('oil_bahia', 283.15, 15., 3, 3.6267e-3, True),
+ ('oil_bahia', 293.15, 15., 3, 3.6568e-3, True),
+ ('oil_bahia', 303.15, 15., 3, 3.71499e-3, True),
]
@@ -263,7 +263,7 @@ def test_dissolution_mass_balance(oil, temp, wind_speed,
.format(sc.mass_balance['dissolution'] / initial_amount)
)
print sc.mass_balance['dissolution'], expected_mb
- assert np.isclose(sc.mass_balance['dissolution'], expected_mb)
+ assert np.isclose(sc.mass_balance['dissolution'], expected_mb, rtol=1e-4)
else:
assert 'dissolution' not in sc.mass_balance
@@ -277,8 +277,8 @@ def test_dissolution_mass_balance(oil, temp, wind_speed,
@pytest.mark.parametrize(('oil', 'temp', 'expected_balance'),
- [('oil_ans_mp', 288.7, 38.1926),
- ('oil_bahia', 288.7, 136.751)])
+ [('oil_ans_mp', 288.7, 38.632),
+ ('oil_bahia', 288.7, 137.88038)])
def test_full_run(sample_model_fcn2, oil, temp, expected_balance):
'''
test dissolution outputs post step for a full run of model. Dump json
@@ -327,12 +327,12 @@ def test_full_run(sample_model_fcn2, oil, temp, expected_balance):
.format(dissolved[-1] / original_amount))
assert dissolved[0] == 0.0
- assert np.isclose(dissolved[-1], expected_balance)
+ assert np.isclose(dissolved[-1], expected_balance, rtol=1e-4)
@pytest.mark.parametrize(('oil', 'temp', 'expected_balance'),
# [(_sample_oils['benzene'], 288.7, 2.98716)
- [('benzene', 288.7, 9729.56707)])
+ [('benzene', 288.7, 9731.38174)])
def test_full_run_no_evap(sample_model_fcn2, oil, temp, expected_balance):
'''
test dissolution outputs post step for a full run of model. Dump json
diff --git a/py_gnome/tests/unit_tests/test_weatherers/test_roc.py b/py_gnome/tests/unit_tests/test_weatherers/test_roc.py
new file mode 100644
index 000000000..b4b9340f6
--- /dev/null
+++ b/py_gnome/tests/unit_tests/test_weatherers/test_roc.py
@@ -0,0 +1,579 @@
+'''
+tests for ROC
+'''
+from datetime import datetime, timedelta
+
+import numpy as np
+from pytest import raises, mark, set_trace
+
+import unit_conversion as us
+
+from gnome.basic_types import oil_status, fate
+
+from gnome.weatherers.roc import (Burn, Disperse, Skim, Platform)
+from gnome.persist import load
+from gnome.weatherers import (WeatheringData,
+ FayGravityViscous,
+ weatherer_sort,
+ Emulsification,
+ Evaporation)
+from gnome.spill_container import SpillContainer
+from gnome.spill import point_line_release_spill
+from gnome.utilities.inf_datetime import InfDateTime
+from gnome.environment import Waves, constant_wind, Water
+
+from ..conftest import (test_oil, sample_model_weathering2)
+
+delay = 1.
+time_step = 900
+rel_time = datetime(2012, 9, 15, 12, 0)
+active_start = rel_time + timedelta(seconds=time_step)
+active_stop = active_start + timedelta(hours=24.)
+amount = 36000.
+units = 'kg'
+wind = constant_wind(15., 0)
+water = Water()
+waves = Waves(wind, water)
+
+class ROCTests:
+ @classmethod
+ def mk_objs(cls, sample_model_fcn2):
+ model = sample_model_weathering2(sample_model_fcn2, test_oil, 333.0)
+ model.set_make_default_refs(True)
+ model.environment += [waves, wind, water]
+ model.weatherers += Evaporation(wind=wind, water=water)
+ model.weatherers += Emulsification(waves=waves)
+ return (model.spills.items()[0], model)
+
+ def prepare_test_objs(self, obj_arrays=None):
+ self.model.rewind()
+ self.model.rewind()
+ at = set()
+
+ for wd in self.model.weatherers:
+ wd.prepare_for_model_run(self.sc)
+ at.update(wd.array_types)
+
+ if obj_arrays is not None:
+ at.update(obj_arrays)
+
+ self.sc.prepare_for_model_run(at)
+
+ def reset_and_release(self, rel_time=None, time_step=900.0):
+ self.prepare_test_objs()
+ if rel_time is None:
+ rel_time = self.sc.spills[0].release_time
+
+ num_rel = self.sc.release_elements(time_step, rel_time)
+ if num_rel > 0:
+ for wd in self.model.weatherers:
+ wd.initialize_data(self.sc, num_rel)
+
+ def step(self, test_weatherer, time_step, model_time):
+ test_weatherer.prepare_for_model_step(self.sc, time_step, model_time)
+ self.model.step()
+ test_weatherer.weather_elements(self.sc, time_step, model_time)
+
+class TestRocGeneral(ROCTests):
+ burn = Burn(offset=50.0,
+ boom_length=250.0,
+ boom_draft=10.0,
+ speed=2.0,
+ throughput=0.75,
+ burn_efficiency_type=1,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]))
+
+ def test_get_thickness(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ assert self.burn._get_thickness(self.sc) == 0.0
+ self.model.step()
+# assert self.burn._get_thickness(self.sc) == 0.16786582186002749
+ self.model.step()
+# assert self.burn._get_thickness(self.sc) == 0.049809899105767913
+
+class TestROCBurn(ROCTests):
+ burn = Burn(offset=50.0,
+ boom_length=250.0,
+ boom_draft=10.0,
+ speed=2.0,
+ throughput=0.75,
+ burn_efficiency_type=1,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]))
+
+ def test_prepare_for_model_run(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.burn.prepare_for_model_run(self.sc)
+ assert self.sc.mass_balance['burned'] == 0.0
+ assert 'systems' in self.sc.mass_balance
+ assert self.burn.id in self.sc.mass_balance['systems']
+ assert self.sc.mass_balance['systems'][self.burn.id]['boomed'] == 0.0
+ assert self.sc.mass_balance['boomed'] == 0.0
+ assert self.burn._swath_width == 75
+ assert self.burn._area == 1718.75
+ assert self.burn.boom_draft == 10
+ assert self.burn._offset_time == 14.805
+ assert round(self.burn._boom_capacity) == 477
+ assert len(self.sc.report[self.burn.id]) == 1
+ assert self.burn._area_coverage_rate == 0.3488372093023256
+ assert len(self.burn.timeseries) == 1
+
+ def test_reports(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.burn.boom_length = 3500.0
+ self.burn.prepare_for_model_run(self.sc)
+ assert self.burn._swath_width == 1050
+ assert len(self.burn.report) == 2
+
+ def test_serialize(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.burn.serialize()
+
+ def test_prepare_for_model_step(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+
+ self.burn.prepare_for_model_run(self.sc)
+ self.burn.prepare_for_model_step(self.sc, time_step, active_start)
+
+ assert self.burn._active == True
+
+ def test_weather_elements(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.model.time_step = 900
+ self.reset_and_release()
+ burn = Burn(offset=6000.0,
+ boom_length=100.0,
+ boom_draft=10.0,
+ speed=2.0,
+ throughput=0.75,
+ burn_efficiency_type=1,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]))
+
+ self.model.weatherers.append(burn)
+ self.model.rewind()
+ self.model.step()
+ assert burn._is_burning == False
+ assert burn._is_collecting == True
+ assert self.sc.mass_balance['burned'] == 0
+ self.model.step()
+ assert burn._is_burning == False
+ assert burn._boom_capacity == 0
+ assert burn._is_transiting == True
+ assert burn._is_boom_full == True
+ assert burn._burn_rate == 0.14
+ assert self.sc.mass_balance['burned'] == 0
+ collected = self.sc.mass_balance['boomed']
+ self.model.step()
+ assert burn._burn_time == 1414.2857142857142
+ assert burn._burn_time_remaining <= burn._burn_time
+ assert np.isclose(collected, 1877.2886248344857, 0.001)
+ assert burn._is_collecting == False
+ assert burn._is_cleaning == False
+ assert burn._is_burning == True
+ self.model.step()
+ assert burn._is_transiting == False
+ assert burn._is_burning == True
+ assert burn._is_boom_full == False
+ self.model.step()
+ self.model.step()
+ assert burn._is_burning == False
+ assert burn._is_cleaning == True
+ assert np.isclose(self.sc.mass_balance['boomed'], 0)
+ assert self.sc.mass_balance['boomed'] >= 0
+ #assert np.isclose(self.sc.mass_balance['burned'], collected)
+ self.model.step()
+ assert burn._is_burning == False
+ assert burn._is_cleaning == True
+
+ self.model.rewind()
+ self.model.rewind()
+ for step in self.model:
+ print 'amount in boom', self.sc.mass_balance['boomed']
+ assert self.sc.mass_balance['boomed'] >= 0
+ print '===========', step['step_num'], '=============='
+ print 'collecting', burn._is_collecting
+ print 'transiting', burn._is_transiting
+ print 'burning', burn._is_burning
+ print 'cleaning', burn._is_cleaning
+
+ def test_serialization(self):
+ b = TestROCBurn.burn
+ ser = b.serialize()
+ deser = Burn.deserialize(ser)
+ b2 = Burn.new_from_dict(deser)
+ ser2 = b2.serialize()
+ ser.pop('id')
+ ser2.pop('id')
+ assert ser == ser2
+
+
+ def test_step(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.model.step()
+
+class TestPlatform(ROCTests):
+
+ def test_construction(self):
+ p = Platform()
+ assert p.units == dict([(k, v[0]) for k, v in Platform._attr.items()])
+ p = Platform(_name = "Test Platform")
+ assert p.transit_speed == 150
+ assert p.max_op_time == 4
+ p = Platform(_name = "Test Platform", units = {'transit_speed': 'm/s'})
+ assert p.units['transit_speed'] == 'm/s'
+
+ def test_serialization(self):
+ p = Platform(_name='Test Platform')
+
+ import pprint as pp
+ ser = p.serialize()
+ pp.pprint(ser)
+ deser = Platform.deserialize(ser)
+
+ pp.pprint(deser)
+
+ p2 = Platform.new_from_dict(deser)
+ ser2 = p2.serialize()
+ pp.pprint(ser2)
+
+ print 'INCORRECT BELOW'
+
+ ser.pop('id')
+ ser2.pop('id')
+ assert ser == ser2
+
+class TestRocChemDispersion(ROCTests):
+
+ disp = Disperse(name='test_disperse',
+ transit=100,
+ pass_length=4,
+# dosage=1,
+ cascade_on=False,
+ cascade_distance=None,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]),
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform='Test Platform',
+ units=None,)
+
+ def test_construction(self):
+ d = Disperse(name='testname',
+ transit=100,
+ platform='Test Platform')
+ #payload in gallons, computation in gallons, so no conversion
+
+ def test_serialization(self):
+ import pprint as pp
+ p = Disperse(name='test_disperse',
+ transit=100,
+ pass_length=4,
+# dosage=1,
+ cascade_on=False,
+ cascade_distance=None,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]),
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform='Test Platform',
+ units=None,)
+ ser = p.serialize()
+ print 'Ser'
+ pp.pprint(ser)
+ deser = Disperse.deserialize(ser)
+
+ print ''
+ print 'deser'
+ pp.pprint(deser)
+
+ p2 = Disperse.new_from_dict(deser)
+ ser2 = p2.serialize()
+ print
+ pp.pprint(ser2)
+
+ ser.pop('id')
+ ser2.pop('id')
+ ser['platform'].pop('id')
+ ser2['platform'].pop('id')
+ assert ser['platform']['swath_width'] == 100.0
+ assert ser2['platform']['swath_width'] == 100.0
+ assert ser == ser2
+
+ def test_prepare_for_model_run(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.disp.prepare_for_model_run(self.sc)
+# assert self.sc.mass_balance[self.disp.id] == 0.0
+ assert self.disp.cur_state == 'retired'
+ assert len(self.sc.report[self.disp.id]) == 0
+ assert len(self.disp.timeseries) == 1
+
+ def test_prepare_for_model_step(self, sample_model_fcn2):
+ disp = Disperse(name='test_disperse',
+ transit=100,
+ pass_length=4,
+ dosage=1,
+ cascade_on=False,
+ cascade_distance=None,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]),
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform='Test Platform',
+ units=None,)
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.model.weatherers += disp
+ self.model.spills[0].amount = 1000
+ self.model.spills[0].units = 'gal'
+ self.reset_and_release()
+ disp.prepare_for_model_run(self.sc)
+ print self.model.start_time
+ print self.disp.timeseries
+ assert disp.cur_state == 'retired'
+ self.model.step()
+ print self.model.current_time_step
+ self.model.step()
+ print self.model.spills.items()[0]['viscosity']
+ assert disp.cur_state == 'en_route'
+ print disp._next_state_time
+ self.model.step()
+ assert disp.cur_state == 'en_route'
+ print disp.transit
+ print disp.platform.transit_speed
+ print disp.platform.one_way_transit_time(disp.transit)/60
+ while disp.cur_state == 'en_route':
+ self.model.step()
+ off = self.model.current_time_step * self.model.time_step
+ print self.model.start_time + timedelta(seconds=off)
+ print 'pump_rate ', disp.platform.eff_pump_rate(disp.dosage)
+ try:
+ for step in self.model:
+ off = self.model.current_time_step * self.model.time_step
+ print self.model.start_time + timedelta(seconds=off)
+ except StopIteration:
+ pass
+
+ def test_prepare_for_model_step_cont(self, sample_model_fcn2):
+ disp = Disperse(name='test_disperse',
+ transit=100,
+ pass_length=4,
+# dosage=1,
+ cascade_on=False,
+ cascade_distance=None,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]),
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform='Test Platform',
+ units=None,)
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.model.weatherers += disp
+ self.model.spills[0].amount = 20000
+ self.model.spills[0].units = 'gal'
+ self.model.spills[0].end_release_time = self.model.start_time + timedelta(hours=3)
+ self.reset_and_release()
+ disp.prepare_for_model_run(self.sc)
+
+ try:
+ for step in self.model:
+ off = self.model.current_time_step * self.model.time_step
+ print self.model.start_time + timedelta(seconds=off)
+ except StopIteration:
+ pass
+# print self.model.start_time
+# print self.disp.timeseries
+# assert self.disp.cur_state == 'retired'
+# self.model.step()
+# print self.model.current_time_step
+# self.model.step()
+# print self.model.spills.items()[0]['viscosity']
+# assert self.disp.cur_state == 'en_route'
+# print self.disp._next_state_time
+# self.model.step()
+# assert self.disp.cur_state == 'en_route'
+# print self.disp.transit
+# print self.disp.platform.transit_speed
+# print self.disp.platform.one_way_transit_time(self.disp.transit)/60
+# while self.disp.cur_state == 'en_route':
+# self.model.step()
+# off = self.model.current_time_step * self.model.time_step
+# print self.model.start_time + timedelta(seconds=off)
+# print 'pump_rate ', self.disp.platform.eff_pump_rate(self.disp.dosage)
+# assert 'disperse' in self.disp.cur_state
+ try:
+ for step in self.model:
+ off = self.model.current_time_step * self.model.time_step
+# print '********', self.model.start_time + timedelta(seconds=off)
+# print self.sc['mass']
+# print self.sc.mass_balance['dispersed']
+ assert all(self.sc['mass'] >= 0)
+ assert np.all(self.sc['mass_components'] >= 0)
+ assert self.sc.mass_balance['chem_dispersed'] + self.sc.mass_balance['evaporated'] < sum(self.sc['init_mass'])
+ except StopIteration:
+ pass
+
+ def test_prepare_for_model_step_boat(self, sample_model_fcn2):
+ disp = Disperse(name='boat_disperse',
+ transit=20,
+ pass_length=4,
+# dosage=1,
+ cascade_on=False,
+ cascade_distance=None,
+ timeseries=np.array([(rel_time, rel_time + timedelta(hours=12.))]),
+ loading_type='simultaneous',
+ pass_type='bidirectional',
+ disp_oil_ratio=None,
+ disp_eff=None,
+ platform='Typical Large Vessel',
+ units=None,
+ onsite_reload_refuel=True)
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.model.weatherers += disp
+ self.model.spills[0].amount = 20000
+ self.model.spills[0].units = 'gal'
+ self.model.spills[0].end_release_time = self.model.start_time + timedelta(hours=3)
+ self.reset_and_release()
+ disp.prepare_for_model_run(self.sc)
+ print self.model.start_time
+ print self.disp.timeseries
+ assert disp.cur_state == 'retired'
+ self.model.step()
+ print self.model.current_time_step
+ self.model.step()
+ print self.model.spills.items()[0]['viscosity']
+ assert disp.cur_state == 'en_route'
+ print disp._next_state_time
+ self.model.step()
+ assert disp.cur_state == 'en_route'
+ print disp.transit
+ print disp.platform.transit_speed
+ print disp.platform.one_way_transit_time(disp.transit)/60
+ while disp.cur_state == 'en_route':
+ self.model.step()
+ off = self.model.current_time_step * self.model.time_step
+ print self.model.start_time + timedelta(seconds=off)
+ print 'pump_rate ', disp.platform.eff_pump_rate(disp.dosage)
+ try:
+ for step in self.model:
+ off = self.model.current_time_step * self.model.time_step
+ print self.model.start_time + timedelta(seconds=off)
+ except StopIteration:
+ pass
+
+# def test_reports(self, sample_model_fcn2):
+# (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+# self.reset_and_release()
+# self.burn.boom_length = 3500.0
+# self.burn.prepare_for_model_run(self.sc)
+# assert self.burn._swath_width == 1050
+# assert len(self.burn.report) == 2
+#
+# def test_serialize(self, sample_model_fcn2):
+# (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+# self.reset_and_release()
+# self.burn.serialize()
+#
+# def test_prepare_for_model_step(self, sample_model_fcn2):
+# (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+# self.reset_and_release()
+#
+# self.burn.prepare_for_model_run(self.sc)
+# self.burn.prepare_for_model_step(self.sc, time_step, active_start)
+#
+# assert self.burn._active == True
+# assert self.burn._ts_collected == 93576.38888888889
+
+
+# def test_inactive(self):
+# d = Disperse(name='test',
+# platform='Test Platform',
+# timeseries=[(datetime(2000, 1, 1, 1, 0, 0), datetime(2000, 1, 1, 2, 0, 0))])
+# d.prepare_for_model_run()
+#
+#
+class TestRocSkim(ROCTests):
+ skim = Skim(speed=2.0,
+ storage=2000.0,
+ swath_width=150,
+ group='A',
+ throughput=0.75,
+ nameplate_pump=100.0,
+ skim_efficiency_type='meh',
+ recovery=0.75,
+ recovery_ef=0.75,
+ decant=0.75,
+ decant_pump=150.0,
+ discharge_pump=1000.0,
+ rig_time=timedelta(minutes=30),
+ timeseries=[(datetime(2012, 9, 15, 12, 0), datetime(2012, 9, 16, 1, 0))],
+ transit_time=timedelta(hours=2))
+
+ def test_prepare_for_model_run(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ self.skim.prepare_for_model_run(self.sc)
+
+ def test_prepare_for_model_step(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+
+ self.skim.prepare_for_model_run(self.sc)
+ self.skim.prepare_for_model_step(self.sc, time_step, active_start)
+
+ assert self.skim._active == True
+
+ def test_weather_elements(self, sample_model_fcn2):
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.reset_and_release()
+ skim = Skim(speed=2.0,
+ storage=2000.0,
+ swath_width=150,
+ group='A',
+ throughput=0.75,
+ nameplate_pump=100.0,
+ skim_efficiency_type='meh',
+ recovery=0.75,
+ recovery_ef=0.75,
+ decant=0.75,
+ decant_pump=150.0,
+ discharge_pump=1000.0,
+ rig_time=timedelta(minutes=30),
+ timeseries=[(datetime(2012, 9, 15, 12, 0), datetime(2012, 9, 16, 1, 0))],
+ transit_time=timedelta(hours=2))
+
+ self.model.weatherers.append(skim)
+ self.model.rewind()
+ self.model.step()
+ self.model.step()
+ self.model.step()
+ self.model.step()
+
+ def test_serialization(self):
+ s = TestRocSkim.skim
+
+ ser = s.serialize()
+ assert 'timeseries' in ser
+ deser = Skim.deserialize(ser)
+ s2 = Skim.new_from_dict(deser)
+ ser2 = s2.serialize()
+ ser.pop('id')
+ ser2.pop('id')
+ assert ser == ser2
+
+ def test_model_save(self, sample_model_fcn2):
+ s = TestRocSkim.skim
+ (self.sc, self.model) = ROCTests.mk_objs(sample_model_fcn2)
+ self.model.weatherers.append(s)
+ self.model.save('./')
+
+ def test_model_load(self):
+ m = load('./Model.zip')
diff --git a/py_gnome/tests/unit_tests/test_weatherers/test_weatherer.py b/py_gnome/tests/unit_tests/test_weatherers/test_weatherer.py
index d1467d6e2..83fca5b2c 100644
--- a/py_gnome/tests/unit_tests/test_weatherers/test_weatherer.py
+++ b/py_gnome/tests/unit_tests/test_weatherers/test_weatherer.py
@@ -12,10 +12,32 @@
from gnome.spill.elements import floating
from gnome.environment import Water
-from gnome.weatherers import Weatherer, HalfLifeWeatherer
+
+from gnome.weatherers import *
+
from oil_library import get_oil_props
from conftest import weathering_data_arrays, test_oil
+from gnome.weatherers import (Weatherer,
+ HalfLifeWeatherer,
+ ChemicalDispersion,
+ Skimmer,
+ Burn,
+ ROC_Burn,
+ ROC_Disperse,
+ Beaching,
+ Evaporation,
+ NaturalDispersion,
+ # OilParticleAggregation,
+ Dissolution,
+ # Biodegradation,
+ Emulsification,
+ WeatheringData,
+ FayGravityViscous,
+ ConstantArea,
+ Langmuir,
+ )
+
subs = get_oil_props(test_oil)
rel_time = datetime(2012, 8, 20, 13) # yyyy/month/day/hr/min/sec
@@ -58,3 +80,29 @@ def test_one_weather(self):
print '\nsc["mass"]:\n', sc['mass']
assert np.allclose(0.5 * orig_mc.sum(1), sc['mass'])
assert np.allclose(0.5 * orig_mc, sc['mass_components'])
+
+# # all the weatherers
+# __all__ = [Weatherer,
+# HalfLifeWeatherer,
+# ChemicalDispersion,
+# Skimmer,
+# Burn,
+# ROC_Burn,
+# ROC_Disperse,
+# Beaching,
+# Evaporation,
+# NaturalDispersion,
+# # OilParticleAggregation,
+# Dissolution,
+# # Biodegradation,
+# Emulsification,
+# WeatheringData,
+# FayGravityViscous,
+# ConstantArea,
+# Langmuir,
+
+def test_sort_order():
+ assert weatherer_sort(Dissolution()) > weatherer_sort(NaturalDispersion())
+
+
+
diff --git a/py_gnome/tests/unit_tests/test_weatherers/test_weathering_data.py b/py_gnome/tests/unit_tests/test_weatherers/test_weathering_data.py
index c4704bf99..9c39ca5ab 100644
--- a/py_gnome/tests/unit_tests/test_weatherers/test_weathering_data.py
+++ b/py_gnome/tests/unit_tests/test_weatherers/test_weathering_data.py
@@ -149,7 +149,8 @@ def test_density_update_frac_water(self, vary_frac_water):
exp_res = (wd.water.get('density') * sc['frac_water'] +
(1 - sc['frac_water']) * init_dens)
- assert np.all(sc['density'] == exp_res)
+ #assert np.all(sc['density'] == exp_res)
+ assert np.allclose(sc['density'], exp_res)
assert np.all(sc['density'] > init_dens)
assert np.all(sc['viscosity'] > init_visc)
else: