SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.43k stars 363 forks source link

np.float32 type for `central_longitude` results in empty map for projection Mercator #2066

Open kthyng opened 2 years ago

kthyng commented 2 years ago

Description

Type of float for central_longitude as an input to the Mercator projection results in a map, but type of np.float32 results in an empty map (whose range in x is essentially 0).

Code to reproduce

import cartopy
import matplotlib.pyplot as plt
import numpy as np

central_longitude = float(-151.45528)

fig = plt.figure(figsize=(8, 7), dpi=100)
ax = fig.add_axes([0.06, 0.01, 0.93, 0.95], projection=cartopy.crs.Mercator(central_longitude=central_longitude))
ax.coastlines(resolution='110m')

results in image

central_longitude = np.float32(-151.45528)

fig = plt.figure(figsize=(8, 7), dpi=100)
ax = fig.add_axes([0.06, 0.01, 0.93, 0.95], projection=cartopy.crs.Mercator(central_longitude=central_longitude))
ax.coastlines(resolution='110m')

results in an empty space.

Full environment definition ### Operating system MacOS ### Cartopy version 0.19.0.post1 ### conda list ``` # packages in environment at /Users/kthyng/miniconda3/envs/ocean-model-skill-assessor: # # Name Version Build Channel aiohttp 3.8.1 py39h63b48b0_1 conda-forge aiosignal 1.2.0 pyhd8ed1ab_0 conda-forge alabaster 0.7.12 py_0 conda-forge anyio 3.6.1 py39h6e9494a_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py39h63b48b0_2 conda-forge asciitree 0.3.3 pypi_0 pypi astroid 2.7.2 py39h6e9494a_0 conda-forge asttokens 2.0.5 pyhd8ed1ab_0 conda-forge async-timeout 4.0.2 pyhd8ed1ab_0 conda-forge attrs 22.1.0 pyh71513ae_1 conda-forge babel 2.10.3 pyhd8ed1ab_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.11.1 pyha770c72_0 conda-forge black 22.6.0 py39h6e9494a_2 conda-forge bleach 5.0.1 pyhd8ed1ab_0 conda-forge bokeh 2.4.3 py39h6e9494a_0 conda-forge brotli 1.0.9 h5eb16cf_7 conda-forge brotli-bin 1.0.9 h5eb16cf_7 conda-forge brotlipy 0.7.0 py39h63b48b0_1004 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge ca-certificates 2022.6.15 h033912b_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cartopy 0.19.0.post1 py39hada9a11_0 conda-forge certifi 2022.6.15 py39h6e9494a_0 conda-forge cf_xarray 0.7.4 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py39hae9ecf2_0 conda-forge cfgv 3.3.1 pyhd8ed1ab_0 conda-forge cftime 1.6.1 py39h15b18c7_0 conda-forge charset-normalizer 2.1.0 pyhd8ed1ab_0 conda-forge check-manifest 0.46 pyhd8ed1ab_0 conda-forge click 8.1.3 py39h6e9494a_0 conda-forge cloudpickle 2.1.0 pyhd8ed1ab_0 conda-forge cmarkgfm 0.8.0 py39h63b48b0_1 conda-forge cmocean 2.0 py_3 conda-forge colorama 0.4.5 pyhd8ed1ab_0 conda-forge colorspacious 1.1.2 pyh24bf2e0_0 conda-forge conda 4.13.0 py39h6e9494a_1 conda-forge conda-package-handling 1.8.1 py39h63b48b0_1 conda-forge coverage 6.4.3 py39h6218fd2_0 conda-forge cryptography 37.0.4 py39h9c2a9ce_0 conda-forge curl 7.83.1 h372c54d_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cytoolz 0.12.0 py39h701faf5_0 conda-forge dask 2021.7.0 pyhd8ed1ab_0 conda-forge dask-core 2021.7.0 pyhd3eb1b0_0 debugpy 1.6.0 py39hfd1d529_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge distlib 0.3.5 pyhd8ed1ab_0 conda-forge distributed 2021.7.0 py39hecd8cb5_0 doctr 1.9.0 pyhd8ed1ab_0 conda-forge docutils 0.17.1 py39h6e9494a_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge erddapy 1.0.0 pypi_0 pypi execnet 1.9.0 pyhd8ed1ab_0 conda-forge executing 0.9.1 pyhd8ed1ab_0 conda-forge extract_model 0.7 pyhd8ed1ab_0 conda-forge fasteners 0.16.3 pypi_0 pypi filelock 3.7.1 pyhd8ed1ab_0 conda-forge flake8 3.9.2 pyhd8ed1ab_0 conda-forge flake8-builtins 1.5.3 pyh9f0ad1d_0 conda-forge flake8-comprehensions 3.6.1 pyhd8ed1ab_0 conda-forge flake8-mutable 1.2.0 py_1 conda-forge flake8-print 4.0.0 pyhd8ed1ab_0 conda-forge flit-core 3.7.1 pyhd8ed1ab_0 conda-forge fonttools 4.34.4 py39h701faf5_0 conda-forge freetype 2.10.4 h4cff582_1 conda-forge frozenlist 1.3.1 py39h6218fd2_0 conda-forge fsspec 2022.7.1 pyhd8ed1ab_0 conda-forge geojson 2.5.0 py_0 conda-forge geos 3.9.1 he49afe7_2 conda-forge gettext 0.19.8.1 hd1a6beb_1008 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge glib 2.72.1 h2292cb8_0 conda-forge glib-tools 2.72.1 h2292cb8_0 conda-forge gst-plugins-base 1.20.3 hda0ba4b_0 conda-forge gstreamer 1.20.3 hdc08c3f_0 conda-forge h5netcdf 0.11.0 pyhd8ed1ab_0 conda-forge h5py 3.7.0 nompi_py39h66c274d_100 conda-forge hdf4 4.2.15 hefd3b78_3 conda-forge hdf5 1.12.1 nompi_ha60fbc9_104 conda-forge heapdict 1.0.1 py_0 conda-forge icu 70.1 h96cf925_0 conda-forge identify 2.5.3 pyhd8ed1ab_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge imagesize 1.4.1 pyhd8ed1ab_0 conda-forge importlib-metadata 4.11.4 py39h6e9494a_0 conda-forge importlib-resources 5.9.0 pyhd8ed1ab_0 conda-forge importlib_metadata 4.11.4 hd8ed1ab_0 conda-forge importlib_resources 5.9.0 pyhd8ed1ab_0 conda-forge iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge intake 0.6.2 pypi_0 pypi intake-xarray 0.6.0 pyhd8ed1ab_0 conda-forge ioos_qc 1.0.0 pyh9f0ad1d_0 conda-forge ipykernel 6.15.1 pyh736e0ef_0 conda-forge ipython 8.4.0 py39h6e9494a_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.7.1 pyhd8ed1ab_0 conda-forge isort 5.9.2 pypi_0 pypi jedi 0.18.1 pyhd8ed1ab_2 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.1.0 pyhd8ed1ab_0 conda-forge jpeg 9e hac89ed1_2 conda-forge json5 0.9.5 pyh9f0ad1d_0 conda-forge jsonschema 4.9.1 pyhd8ed1ab_0 conda-forge jupyter 1.0.0 py39h6e9494a_6 conda-forge jupyter_client 7.3.4 pyhd8ed1ab_0 conda-forge jupyter_console 6.4.4 pyhd8ed1ab_0 conda-forge jupyter_core 4.11.1 py39h6e9494a_0 conda-forge jupyter_server 1.18.1 pyhd8ed1ab_0 conda-forge jupyterlab 3.0.16 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_server 2.15.0 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 1.1.1 pyhd8ed1ab_0 conda-forge keyring 23.7.0 py39h6e9494a_0 conda-forge kiwisolver 1.4.4 py39h7c694c3_0 conda-forge krb5 1.19.3 hb49756b_0 conda-forge lazy-object-proxy 1.7.1 py39h63b48b0_1 conda-forge lcms2 2.12 h577c468_0 conda-forge lerc 4.0.0 hb486fe8_0 conda-forge libarchive 3.5.2 hde4784d_3 conda-forge libblas 3.9.0 15_osx64_openblas conda-forge libbrotlicommon 1.0.9 h5eb16cf_7 conda-forge libbrotlidec 1.0.9 h5eb16cf_7 conda-forge libbrotlienc 1.0.9 h5eb16cf_7 conda-forge libcblas 3.9.0 15_osx64_openblas conda-forge libclang 14.0.6 default_h55ffa42_0 conda-forge libclang13 14.0.6 default_hb5731bd_0 conda-forge libcurl 7.83.1 h372c54d_0 conda-forge libcxx 14.0.6 hce7ea42_0 conda-forge libdeflate 1.13 h775f41a_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge libgfortran5 9.3.0 h6c81a4c_23 conda-forge libglib 2.72.1 hfbcb929_0 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge liblapack 3.9.0 15_osx64_openblas conda-forge libllvm11 11.1.0 hd011deb_3 conda-forge libllvm14 14.0.6 h41df66c_0 conda-forge libmamba 0.25.0 h2d3d89a_1 conda-forge libmambapy 0.25.0 py39h3f08081_1 conda-forge libnetcdf 4.8.1 nompi_h6609ca0_102 conda-forge libnghttp2 1.47.0 h942079c_0 conda-forge libogg 1.3.4 h35c211d_1 conda-forge libopenblas 0.3.20 openmp_h4e9756f_1 conda-forge libopus 1.3.1 hc929b4f_1 conda-forge libpng 1.6.37 h5a3d3bf_3 conda-forge libpq 14.4 hf6bb32a_0 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libsolv 0.7.22 hd9580d2_0 conda-forge libssh2 1.10.0 h52ee1ee_2 conda-forge libtiff 4.4.0 h5e0c7b4_3 conda-forge libvorbis 1.3.7 h046ec9c_0 conda-forge libwebp 1.2.3 hf64df63_1 conda-forge libwebp-base 1.2.3 hac89ed1_2 conda-forge libxcb 1.13 h0d85af4_1004 conda-forge libxml2 2.9.14 h08a9926_3 conda-forge libzip 1.9.2 hab082e8_0 conda-forge libzlib 1.2.12 hfe4f2af_2 conda-forge llvm-openmp 14.0.4 ha654fa7_0 conda-forge llvmlite 0.38.1 py39hdfe08e5_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge lz4-c 1.9.3 he49afe7_1 conda-forge lzo 2.10 haf1e3a3_1000 conda-forge mamba 0.25.0 py39ha435c47_1 conda-forge markupsafe 2.1.1 py39h63b48b0_1 conda-forge matplotlib-base 3.5.2 py39h64a0072_1 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mccabe 0.6.1 pypi_0 pypi mistune 0.8.4 py39h89e85a6_1005 conda-forge more-itertools 8.13.0 pyhd8ed1ab_0 conda-forge msgpack-python 1.0.4 py39h7c694c3_0 conda-forge multidict 6.0.2 py39h63b48b0_1 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mypy 0.910 py39h89e85a6_0 conda-forge mypy_extensions 0.4.3 py39h6e9494a_5 conda-forge mysql-common 8.0.30 h924029e_0 conda-forge mysql-libs 8.0.30 h3cab752_0 conda-forge nbclassic 0.4.3 pyhd8ed1ab_0 conda-forge nbclient 0.6.6 pyhd8ed1ab_0 conda-forge nbconvert 6.5.0 pyhd8ed1ab_0 conda-forge nbconvert-core 6.5.0 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 6.5.0 pyhd8ed1ab_0 conda-forge nbformat 5.4.0 pyhd8ed1ab_0 conda-forge nbsphinx 0.8.7 pyhd8ed1ab_0 conda-forge ncurses 6.3 h96cf925_1 conda-forge nest-asyncio 1.5.5 pyhd8ed1ab_0 conda-forge netcdf4 1.6.0 nompi_py39h340a447_100 conda-forge nodeenv 1.7.0 pyhd8ed1ab_0 conda-forge notebook 6.4.12 pyha770c72_0 conda-forge notebook-shim 0.1.0 pyhd8ed1ab_0 conda-forge nspr 4.32 hcd9eead_1 conda-forge nss 3.78 ha8197d3_0 conda-forge numba 0.55.2 py39hc37845d_0 conda-forge numcodecs 0.8.0 pypi_0 pypi numpy 1.22.4 py39h677350a_0 conda-forge ocean-model-skill-assessor 0.1.dev56+g9f5f955.d20210913 dev_0 ocean_data_gateway 0.7.6 pyhd8ed1ab_0 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1q hfe4f2af_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge pandas 1.4.3 py39hf72b562_0 conda-forge pandoc 2.19 h694c41f_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.2.0 pyhd8ed1ab_0 conda-forge pathspec 0.9.0 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pep517 0.12.0 py39h6e9494a_2 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.2.0 py39h579eac4_0 conda-forge pint 0.19.2 pyhd8ed1ab_0 conda-forge pint-pandas 0.2 pyhd8ed1ab_0 conda-forge pint-xarray 0.2.1 pyhd8ed1ab_0 conda-forge pip 21.1.3 pyhd8ed1ab_0 conda-forge pkginfo 1.8.3 pyhd8ed1ab_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 2.5.2 pyhd8ed1ab_1 conda-forge pluggy 0.13.1 py39h6e9494a_4 conda-forge ply 3.11 py_1 conda-forge pre-commit 2.14.0 py39h6e9494a_0 conda-forge proj 7.2.0 h78d1473_2 conda-forge prometheus_client 0.14.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.30 pyha770c72_0 conda-forge prompt_toolkit 3.0.30 hd8ed1ab_0 conda-forge psutil 5.9.1 py39h701faf5_0 conda-forge pthread-stubs 0.4 hc929b4f_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge py 1.11.0 pyh6c4a22f_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycodestyle 2.7.0 pyhd8ed1ab_0 conda-forge pycosat 0.6.3 py39h63b48b0_1010 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyflakes 2.3.1 pyhd8ed1ab_0 conda-forge pygc 1.3.0 pyhd8ed1ab_0 conda-forge pygments 2.12.0 pyhd8ed1ab_0 conda-forge pylint 2.10.2 pyhd8ed1ab_0 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyqt 5.15.7 py39h727c745_0 conda-forge pyqt5-sip 12.11.0 py39h7c248c4_0 conda-forge pyrsistent 0.18.1 py39h63b48b0_1 conda-forge pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 py39h6e9494a_5 conda-forge pytest 6.2.4 py39h6e9494a_0 conda-forge pytest-cov 2.12.1 pyhd8ed1ab_0 conda-forge pytest-forked 1.4.0 pyhd8ed1ab_0 conda-forge pytest-xdist 2.3.0 pyhd8ed1ab_0 conda-forge python 3.9.13 h57e37ff_0_cpython conda-forge python-build 0.8.0 pyhd8ed1ab_0 conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.16.1 pyhd8ed1ab_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytz 2022.1 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py39h63b48b0_4 conda-forge pyzmq 23.2.0 py39hd639792_0 conda-forge qt-main 5.15.4 h938c29d_2 conda-forge qtconsole 5.3.1 pyhd8ed1ab_0 conda-forge qtconsole-base 5.3.1 pyha770c72_0 conda-forge qtpy 2.1.0 pyhd8ed1ab_0 conda-forge readline 8.1.2 h3899abd_0 conda-forge readme_renderer 36.0 pyhd8ed1ab_0 conda-forge reproc 14.2.3 h0d85af4_0 conda-forge reproc-cpp 14.2.3 he49afe7_0 conda-forge requests 2.28.1 pyhd8ed1ab_0 conda-forge requests-toolbelt 0.9.1 py_0 conda-forge rfc3986 2.0.0 pyhd8ed1ab_0 conda-forge ruamel.yaml 0.17.21 py39h63b48b0_1 conda-forge ruamel.yaml.clib 0.2.6 py39h63b48b0_1 conda-forge ruamel_yaml 0.15.80 py39h701faf5_1007 conda-forge scikit-learn 1.1.2 py39h8031a56_0 conda-forge scipy 1.7.0 py39h056f1c0_1 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 63.4.2 py39h6e9494a_0 conda-forge setuptools-scm 6.0.1 pyh44b312d_0 conda-forge setuptools_scm 6.0.1 hd8ed1ab_0 conda-forge shapely 1.7.1 py39h1d9c377_5 conda-forge simplejson 3.17.6 py39h63b48b0_1 conda-forge sip 6.6.2 py39hd408605_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sniffio 1.2.0 py39h6e9494a_3 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sphinx 4.1.2 pyh6c4a22f_1 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_2 conda-forge sqlite 3.39.2 hd9f0692_0 conda-forge stack_data 0.3.0 pyhd8ed1ab_0 conda-forge tblib 1.7.0 pyhd8ed1ab_0 conda-forge terminado 0.15.0 py39h6e9494a_0 conda-forge threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge tinycss2 1.1.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 h5dbffcc_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.2 py39h701faf5_0 conda-forge tqdm 4.64.0 pyhd8ed1ab_0 conda-forge traitlets 5.3.0 pyhd8ed1ab_0 conda-forge twine 3.4.2 pyhd8ed1ab_0 conda-forge typing-extensions 4.3.0 hd8ed1ab_0 conda-forge typing_extensions 4.3.0 pyha770c72_0 conda-forge tzdata 2022a h191b570_0 conda-forge ukkonen 1.0.1 py39h7248d28_2 conda-forge unicodedata2 14.0.0 py39h63b48b0_1 conda-forge urllib3 1.26.11 pyhd8ed1ab_0 conda-forge virtualenv 20.16.3 py39h6e9494a_0 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.3.3 pyhd8ed1ab_0 conda-forge wheel 0.37.0 pyhd8ed1ab_1 conda-forge widgetsnbextension 3.6.1 pyha770c72_0 conda-forge wrapt 1.12.1 py39h89e85a6_3 conda-forge xarray 2022.6.0 pyhd8ed1ab_1 conda-forge xcmocean 0.2.1 pyhd8ed1ab_0 conda-forge xoak 0.1.1 pyhd8ed1ab_0 conda-forge xorg-libxau 1.0.9 h35c211d_0 conda-forge xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge yaml 0.2.5 h0d85af4_2 conda-forge yaml-cpp 0.7.0 hb486fe8_1 conda-forge yarl 1.7.2 py39h63b48b0_2 conda-forge zarr 2.8.3 pyhd8ed1ab_0 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zict 2.2.0 pyhd8ed1ab_0 conda-forge zipp 3.8.1 pyhd8ed1ab_0 conda-forge zlib 1.2.12 hfe4f2af_2 conda-forge zstd 1.5.2 ha9df2e0_3 conda-forge ``` ### pip list ``` Package Version Location ----------------------------- ---------------------------- ------------------------------------------------- aiohttp 3.8.1 aiosignal 1.2.0 alabaster 0.7.12 anyio 3.6.1 appdirs 1.4.4 appnope 0.1.3 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 asciitree 0.3.3 astroid 2.7.2 asttokens 2.0.5 async-timeout 4.0.2 attrs 22.1.0 Babel 2.10.3 backcall 0.2.0 backports.functools-lru-cache 1.6.4 beautifulsoup4 4.11.1 black 22.6.0 bleach 5.0.1 bokeh 2.4.3 brotlipy 0.7.0 build 0.8.0 cached-property 1.5.2 Cartopy 0.19.0.post1 certifi 2022.6.15 cf-xarray 0.7.4 cffi 1.15.1 cfgv 3.3.1 cftime 1.6.1 charset-normalizer 2.1.0 check-manifest 0.46 click 8.1.3 cloudpickle 2.1.0 cmarkgfm 0.8.0 cmocean 2.0 colorama 0.4.5 colorspacious 1.1.2 conda 4.13.0 conda-package-handling 1.8.1 coverage 6.4.3 cryptography 37.0.4 cycler 0.11.0 cytoolz 0.12.0 dask 2021.7.0 debugpy 1.6.0 decorator 5.1.1 defusedxml 0.7.1 distlib 0.3.5 distributed 2021.7.0 doctr 1.9.0 docutils 0.17.1 entrypoints 0.4 erddapy 1.2.1 execnet 1.9.0 executing 0.9.1 extract-model 0.7 fasteners 0.17.3 fastjsonschema 2.16.1 filelock 3.7.1 flake8 3.9.2 flake8-builtins 1.5.3 flake8-comprehensions 3.6.1 flake8-mutable 1.2.0 flake8-print 4.0.0 flit-core 3.7.1 fonttools 4.34.4 frozenlist 1.3.1 fsspec 2022.7.1 geojson 2.5.0 h5netcdf 0.11.0 h5py 3.7.0 HeapDict 1.0.1 identify 2.5.3 idna 3.3 imagesize 1.4.1 importlib-metadata 4.11.4 importlib-resources 5.9.0 iniconfig 1.1.1 intake 0.6.5 intake-xarray 0.6.0 ioos-qc 1.0.0 ipykernel 6.15.1 ipython 8.4.0 ipython-genutils 0.2.0 ipywidgets 7.7.1 isort 5.9.3 jedi 0.18.1 Jinja2 3.1.2 joblib 1.1.0 json5 0.9.5 jsonschema 4.9.1 jupyter 1.0.0 jupyter-client 7.3.4 jupyter-console 6.4.4 jupyter-core 4.11.1 jupyter-server 1.18.1 jupyterlab 3.0.16 jupyterlab-pygments 0.2.2 jupyterlab-server 2.15.0 jupyterlab-widgets 1.1.1 keyring 23.7.0 kiwisolver 1.4.4 lazy-object-proxy 1.7.1 libmambapy 0.25.0 llvmlite 0.38.1 locket 1.0.0 mamba 0.25.0 MarkupSafe 2.1.1 matplotlib 3.5.2 matplotlib-inline 0.1.3 mccabe 0.6.1 mistune 0.8.4 more-itertools 8.13.0 msgpack 1.0.4 multidict 6.0.2 munkres 1.1.4 mypy 0.910 mypy-extensions 0.4.3 nbclassic 0.4.3 nbclient 0.6.6 nbconvert 6.5.0 nbformat 5.4.0 nbsphinx 0.8.7 nest-asyncio 1.5.5 netCDF4 1.6.0 nodeenv 1.7.0 notebook 6.4.12 notebook-shim 0.1.0 numba 0.55.2 numcodecs 0.10.2 numpy 1.22.4 ocean-data-gateway 0.7.6 ocean-model-skill-assessor 0.1.dev56+g9f5f955.d20210913 /Users/kthyng/projects/ocean-model-skill-assessor packaging 21.3 pandas 1.4.3 pandocfilters 1.5.0 parso 0.8.3 partd 1.2.0 pathspec 0.9.0 pep517 0.12.0 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.2.0 Pint 0.19.2 Pint-Pandas 0.2 pint-xarray 0.2.1 pip 21.1.3 pkginfo 1.8.3 pkgutil-resolve-name 1.3.10 platformdirs 2.5.2 pluggy 0.13.1 ply 3.11 pre-commit 2.14.0 prometheus-client 0.14.1 prompt-toolkit 3.0.30 psutil 5.9.1 ptyprocess 0.7.0 pure-eval 0.2.2 py 1.11.0 pycodestyle 2.7.0 pycosat 0.6.3 pycparser 2.21 pyflakes 2.3.1 pygc 1.3.0 Pygments 2.12.0 pylint 2.10.2 pyOpenSSL 22.0.0 pyparsing 3.0.9 PyQt5 5.15.7 PyQt5-sip 12.11.0 pyrsistent 0.18.1 pyshp 2.3.1 PySocks 1.7.1 pytest 6.2.4 pytest-cov 2.12.1 pytest-forked 1.4.0 pytest-xdist 2.3.0 python-dateutil 2.8.2 pytz 2022.1 PyYAML 6.0 pyzmq 23.2.0 qtconsole 5.3.1 QtPy 2.1.0 readme-renderer 36.0 requests 2.28.1 requests-toolbelt 0.9.1 rfc3986 2.0.0 ruamel-yaml-conda 0.15.80 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.6 scikit-learn 1.1.2 scipy 1.7.0 Send2Trash 1.8.0 setuptools 63.4.2 setuptools-scm 6.0.1 Shapely 1.7.1 simplejson 3.17.6 sip 6.6.2 six 1.16.0 sniffio 1.2.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soupsieve 2.3.2.post1 Sphinx 4.1.2 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 stack-data 0.3.0 tblib 1.7.0 terminado 0.15.0 threadpoolctl 3.1.0 tinycss2 1.1.1 toml 0.10.2 tomli 2.0.1 toolz 0.12.0 tornado 6.2 tqdm 4.64.0 traitlets 5.3.0 twine 0.0.0 typing-extensions 4.3.0 ukkonen 1.0.1 unicodedata2 14.0.0 urllib3 1.26.11 virtualenv 20.16.3 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.3.3 wheel 0.37.0 widgetsnbextension 3.6.1 wrapt 1.12.1 xarray 2022.6.0 xcmocean 0.2.1 xoak 0.1.1 yarl 1.7.2 zarr 2.8.3 zict 2.2.0 zipp 3.8.1 ```
QuLogic commented 2 years ago

This has to do with Proj 5 (#1124 and #1148). Long ago, I started looking at this and writing tests for everything, but never figured out the best way to fix it. Probably casting to float on input would do, but then tests break because of string comparisons. The issue effectively is that we add a small epsilon to avoid Proj doing wrapping, but for float32, that epsilon is so small it rounds to 0.

kthyng commented 2 years ago

@QuLogic Thanks for explaining it to me. I understand it's a more complicated issue now — hopefully someone googling in the future can find this and realize what their issue is if it comes up. Feel free to close it if you want.