NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
392 stars 149 forks source link

WRF-python post-processing wind speed issues #229

Open Eliott-He opened 4 months ago

Eliott-He commented 4 months ago

Recently, I used uvmet from WRF-Python to extract the U and V components of wind velocity. However, when I extracted the composite wind speed from uvmet_wspd_wdir, I found that the wind speed calculated using the U and V components differed significantly from the directly extracted wspd values.

code:

import wrf import numpy as np from netCDF4 import Dataset

file_data = Dataset('D3_2010_07_3_20100712161000.nc') U,V = wrf.getvar(file_data,'uvmet') #m/s WSD,WDIR = wrf.getvar(file_data,'uvmet_wspd_wdir') a = np.sqrt(np.array(U.values)2+np.array(V.values)2) b = np.array(WSD.values)

The result indicates that a is the transpose matrix of b. Why does the matrix transpose happen? Is it due to the storage problem of components in u and v?

I am not very sure which one is the true value that can be compared with observed values. I am so glad looking forward to your answer.

Eliott-He commented 4 months ago

This error occurs only when using Python 3.11 and did not occur when using version 3.9.

kafitzgerald commented 4 months ago

Thanks for the bug report!

Can you confirm which variables are transposed (i.e. U/V or WSD/WDIR) and share a bit of info about the system you're running on (operating system) and your environment (e.g. the output of conda list)?

I wasn't able to replicate this locally.

Eliott-He commented 4 months ago

Thank you very much for your reply.

I am using Windows 10 as my operating system, with conda version 23.7.4 and Python version 3.11.4.

The variables that have been transposed are WSD and WDIR. The calculation results for U and V are consistent with those obtained when running on Python 3.9.

WSD: zQR5ymdezx O8BVOhK4q1

My conda list is: _anaconda_depends 2023.07 py311_1 abseil-cpp 20211102.0 hd77b12b_0 affine 2.4.0 pypi_0 pypi aiobotocore 2.4.2 py311haa95532_0 aiofiles 22.1.0 py311haa95532_0 aiohttp 3.8.3 py311h2bbff1b_0 aioitertools 0.7.1 pyhd3eb1b0_0 aiosignal 1.2.0 pyhd3eb1b0_0 aiosqlite 0.18.0 py311haa95532_0 alabaster 0.7.12 pyhd3eb1b0_0 anaconda-catalogs 0.2.0 py311haa95532_0 anaconda-client 1.12.0 py311haa95532_0 anaconda-navigator 2.4.2 py311haa95532_0 anaconda-project 0.11.1 py311haa95532_0 anyio 3.5.0 py311haa95532_0 appdirs 1.4.4 pyhd3eb1b0_0 argon2-cffi 21.3.0 pyhd3eb1b0_0 argon2-cffi-bindings 21.2.0 py311h2bbff1b_0 arrow 1.2.3 py311haa95532_1 arrow-cpp 11.0.0 py311h308b814_0 astroid 2.14.2 py311haa95532_0 astropy 5.1 py311h5bb9823_0 asttokens 2.0.5 pyhd3eb1b0_0 async-timeout 4.0.2 py311haa95532_0 atomicwrites 1.4.0 py_0 attrs 22.1.0 py311haa95532_0 automat 20.2.0 py_0 autopep8 1.6.0 pyhd3eb1b0_1 aws-c-common 0.4.57 ha925a31_1 aws-c-event-stream 0.1.6 hd77b12b_5 aws-checksums 0.1.9 ha925a31_0 aws-sdk-cpp 1.8.185 hd77b12b_0 babel 2.11.0 py311haa95532_0 backcall 0.2.0 pyhd3eb1b0_0 backports 1.1 pyhd3eb1b0_0 backports.functools_lru_cache 1.6.4 pyhd3eb1b0_0 backports.tempfile 1.0 pyhd3eb1b0_1 backports.weakref 1.0.post1 py_1 bcrypt 3.2.0 py311h2bbff1b_1 beautifulsoup4 4.12.2 py311haa95532_0 binaryornot 0.4.4 pyhd3eb1b0_1 black 23.3.0 py311haa95532_0 blas 1.0 mkl bleach 4.1.0 pyhd3eb1b0_0 blosc 1.21.3 h6c2663c_0 bokeh 3.2.1 py311h746a85d_0 boltons 23.0.0 py311haa95532_0 boost-cpp 1.73.0 h2bbff1b_12 boto3 1.24.28 py311haa95532_0 botocore 1.27.59 py311haa95532_0 bottleneck 1.3.5 py311h5bb9823_0 brotli 1.0.9 h2bbff1b_7 brotli-bin 1.0.9 h2bbff1b_7 brotlipy 0.7.0 py311h2bbff1b_1002 bzip2 1.0.8 he774522_0 c-ares 1.19.0 h2bbff1b_0 c-blosc2 2.8.0 hd77b12b_0 ca-certificates 2023.08.22 haa95532_0 cartopy 0.22.0 py311hf63dbb6_0 conda-forge certifi 2023.7.22 py311haa95532_0 cffi 1.15.1 py311h2bbff1b_3 cfitsio 3.470 h2bbff1b_7 cftime 1.6.2 py311h5bb9823_0 chardet 4.0.0 py311haa95532_1003 charls 2.2.0 h6c2663c_0 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.0.4 py311haa95532_0 click-plugins 1.1.1 pypi_0 pypi cligj 0.7.2 pypi_0 pypi cloudpickle 2.2.1 py311haa95532_0 clyent 1.2.2 py311haa95532_1 cmaps 2.0.1 pypi_0 pypi cnmaps 1.1.7 pypi_0 pypi colorama 0.4.6 py311haa95532_0 colorcet 3.0.1 py311haa95532_0 comm 0.1.2 py311haa95532_0 conda 23.7.4 py311h1ea47a8_0 conda-forge conda-build 3.26.0 py311haa95532_0 conda-content-trust 0.2.0 pyhd8ed1ab_0 conda-forge conda-index 0.2.3 py311haa95532_0 conda-libmamba-solver 23.5.0 py311haa95532_0 conda-pack 0.6.0 pyhd3eb1b0_0 conda-package-handling 2.2.0 py311haa95532_0 conda-package-streaming 0.9.0 py311haa95532_0 conda-repo-cli 1.0.41 py311haa95532_0 conda-token 0.4.0 pyhd3eb1b0_0 conda-verify 3.4.2 py_1 console_shortcut 0.1.1 4 constantly 15.1.0 py311haa95532_0 contourpy 1.0.5 py311h59b6b97_0 cookiecutter 1.7.3 pyhd3eb1b0_0 cryptography 41.0.2 py311h31511bf_0 cssselect 1.1.0 pyhd3eb1b0_0 curl 8.1.1 he2ea4bf_2 cycler 0.11.0 pyhd3eb1b0_0 cytoolz 0.12.0 py311h2bbff1b_0 daal4py 2023.1.1 py311h30df693_0 dal 2023.1.1 h59b6b97_48681 dask 2023.6.0 py311haa95532_0 dask-core 2023.6.0 py311haa95532_0 datashader 0.15.1 py311haa95532_0 datashape 0.5.4 py311haa95532_1 debugpy 1.6.7 py311hd77b12b_0 decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 diff-match-patch 20200713 pyhd3eb1b0_0 dill 0.3.6 py311haa95532_0 distributed 2023.6.0 py311haa95532_0 docstring-to-markdown 0.11 py311haa95532_0 docutils 0.18.1 py311haa95532_3 entrypoints 0.4 py311haa95532_0 et_xmlfile 1.1.0 py311haa95532_0 executing 0.8.3 pyhd3eb1b0_0 filelock 3.9.0 py311haa95532_0 fiona 1.9.4.post1 pypi_0 pypi flake8 6.0.0 py311haa95532_0 flask 2.2.2 py311haa95532_0 fmt 9.1.0 h6d14046_0 fonttools 4.25.0 pyhd3eb1b0_0 freetype 2.12.1 ha860e81_0 frozenlist 1.3.3 py311h2bbff1b_0 fsspec 2023.3.0 py311haa95532_0 future 0.18.3 py311haa95532_0 gdal 3.4.3 pypi_0 pypi gensim 4.3.0 py311heda8569_0 geojson 3.0.1 pypi_0 pypi geopandas 0.14.0 pypi_0 pypi geos 3.8.0 h33f27b4_0 gflags 2.2.2 ha925a31_0 giflib 5.2.1 h8cc25b3_3 glib 2.69.1 h5dc1a3c_2 glob2 0.7 pyhd3eb1b0_0 glog 0.5.0 hd77b12b_0 greenlet 2.0.1 py311hd77b12b_0 gst-plugins-base 1.18.5 h9e645db_0 gstreamer 1.18.5 hd78058f_0 h5py 3.7.0 py311h259cc0e_0 hdf4 4.2.13 h712560f_2 hdf5 1.10.6 h1756f20_1 heapdict 1.0.1 pyhd3eb1b0_0 holoviews 1.17.0 py311haa95532_0 hvplot 0.8.4 py311haa95532_0 hyperlink 21.0.0 pyhd3eb1b0_0 icc_rt 2022.1.0 h6049295_2 icu 58.2 ha925a31_3 idna 3.4 py311haa95532_0 imagecodecs 2021.8.26 py311h94f204c_2 imageio 2.31.4 py311haa95532_0 imagesize 1.4.1 py311haa95532_0 imbalanced-learn 0.10.1 py311haa95532_1 importlib-metadata 6.0.0 py311haa95532_0 importlib_metadata 6.0.0 hd3eb1b0_0 importlib_resources 6.1.0 pyhd8ed1ab_0 conda-forge incremental 21.3.0 pyhd3eb1b0_0 inflection 0.5.1 py311haa95532_0 iniconfig 1.1.1 pyhd3eb1b0_0 intake 0.6.8 py311haa95532_0 intel-openmp 2023.1.0 h59b6b97_46319 intervaltree 3.1.0 pyhd3eb1b0_0 ipykernel 6.19.2 py311h86cfffd_0 ipython 8.12.0 py311haa95532_0 ipython_genutils 0.2.0 pyhd3eb1b0_1 ipywidgets 8.0.4 py311haa95532_0 isort 5.9.3 pyhd3eb1b0_0 itemadapter 0.3.0 pyhd3eb1b0_0 itemloaders 1.0.4 pyhd3eb1b0_1 itsdangerous 2.0.1 pyhd3eb1b0_0 jaraco.classes 3.2.1 pyhd3eb1b0_0 jedi 0.18.1 py311haa95532_1 jellyfish 0.9.0 py311h2bbff1b_0 jinja2 3.1.2 py311haa95532_0 jinja2-time 0.2.0 pyhd3eb1b0_3 jmespath 0.10.0 pyhd3eb1b0_0 joblib 1.2.0 py311haa95532_0 jpeg 9e h2bbff1b_1 jq 1.6 haa95532_1 json5 0.9.6 pyhd3eb1b0_0 jsonpatch 1.32 pyhd3eb1b0_0 jsonpointer 2.1 pyhd3eb1b0_0 jsonschema 4.17.3 py311haa95532_0 jupyter 1.0.0 py311haa95532_8 jupyter_client 7.4.9 py311haa95532_0 jupyter_console 6.6.3 py311haa95532_0 jupyter_contrib_core 0.4.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.0 py311haa95532_0 jupyter_events 0.6.3 py311haa95532_0 jupyter_nbextensions_configurator 0.6.1 pyhd8ed1ab_0 conda-forge jupyter_server 1.23.4 py311haa95532_0 jupyter_server_fileid 0.9.0 py311haa95532_0 jupyter_server_ydoc 0.8.0 py311haa95532_1 jupyter_ydoc 0.2.4 py311haa95532_0 jupyterlab 3.6.3 py311haa95532_0 jupyterlab_pygments 0.1.2 py_0 jupyterlab_server 2.22.0 py311haa95532_0 jupyterlab_widgets 3.0.5 py311haa95532_0 jupyterthemes 0.20.0 py_1 conda-forge jxrlib 1.1 he774522_2 keyring 23.13.1 py311haa95532_0 kiwisolver 1.4.4 py311hd77b12b_0 krb5 1.19.4 h5b6d351_0 lazy-object-proxy 1.6.0 py311h2bbff1b_0 lazy_loader 0.2 py311haa95532_0 lcms2 2.12 h83e58a3_0 lerc 3.0 hd77b12b_0 lesscpy 0.15.1 pyhd8ed1ab_0 conda-forge libaec 1.0.4 h33f27b4_1 libarchive 3.6.2 h2033e3e_1 libboost 1.73.0 h6c2663c_12 libbrotlicommon 1.0.9 h2bbff1b_7 libbrotlidec 1.0.9 h2bbff1b_7 libbrotlienc 1.0.9 h2bbff1b_7 libclang 14.0.6 default_hb5a9fac_1 libclang13 14.0.6 default_h8e68704_1 libcurl 8.1.1 h86230a5_2 libdeflate 1.17 h2bbff1b_0 libevent 2.1.12 hcc03200_0 libffi 3.4.4 hd77b12b_0 libiconv 1.16 h2bbff1b_2 liblief 0.12.3 hd77b12b_0 libllvm14 14.0.6 h4157e71_3 libmamba 1.4.1 h214f63a_0 libmambapy 1.4.1 py311h214f63a_0 libnetcdf 4.8.1 h6685c40_2 libogg 1.3.5 h2bbff1b_1 libpng 1.6.39 h8cc25b3_0 libprotobuf 3.20.3 h23ce68f_0 libsodium 1.0.18 h62dcd97_0 libsolv 0.7.22 h23ce68f_0 libspatialindex 1.9.3 h6c2663c_0 libssh2 1.10.0 hcd4344a_2 libthrift 0.15.0 he49ee6e_2 libtiff 4.5.0 h6c2663c_2 libvorbis 1.3.7 he774522_0 libwebp 1.2.4 hbc33d0d_1 libwebp-base 1.2.4 h2bbff1b_1 libxml2 2.10.3 h0ad7f3c_0 libxslt 1.1.37 h2bbff1b_0 libzip 1.8.0 h49b8836_0 libzopfli 1.0.3 ha925a31_0 linkify-it-py 2.0.0 py311haa95532_0 llvmlite 0.40.0 py311hf2fb9eb_0 locket 1.0.0 py311haa95532_0 lxml 4.9.2 py311h2bbff1b_0 lz4 4.3.2 py311h2bbff1b_0 lz4-c 1.9.4 h2bbff1b_0 lzo 2.10 he774522_2 m2-msys2-runtime 2.5.0.17080.65c939c 3 m2-patch 2.7.5 2 m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 markdown 3.4.1 py311haa95532_0 markdown-it-py 2.2.0 py311haa95532_1 markupsafe 2.1.1 py311h2bbff1b_0 matplotlib 3.7.1 py311haa95532_1 matplotlib-base 3.7.1 py311hf62ec03_1 matplotlib-inline 0.1.6 py311haa95532_0 mccabe 0.7.0 pyhd3eb1b0_0 mdit-py-plugins 0.3.0 py311haa95532_0 mdurl 0.1.0 py311haa95532_0 menuinst 1.4.19 py311h59b6b97_1 metpy 1.5.1 pyhd8ed1ab_0 conda-forge mistune 0.8.4 py311h2bbff1b_1000 mkl 2023.1.0 h8bd8f75_46356 mkl-service 2.4.0 py311h2bbff1b_1 mkl_fft 1.3.6 py311hf62ec03_1 mkl_random 1.2.2 py311hf62ec03_1 more-itertools 8.12.0 pyhd3eb1b0_0 mpmath 1.3.0 py311haa95532_0 msgpack-python 1.0.3 py311h59b6b97_0 msys2-conda-epoch 20160418 1 multidict 6.0.2 py311h2bbff1b_0 multipledispatch 0.6.0 py311haa95532_0 munkres 1.1.4 py_0 mypy_extensions 0.4.3 py311haa95532_1 navigator-updater 0.4.0 py311haa95532_0 nbclassic 0.5.5 py311haa95532_0 nbclient 0.5.13 py311haa95532_0 nbconvert 6.5.4 py311haa95532_0 nbformat 5.7.0 py311haa95532_0 nest-asyncio 1.5.6 py311haa95532_0 netcdf4 1.6.2 py311hec71f40_0 networkx 3.1 py311haa95532_0 nltk 3.8.1 py311haa95532_0 notebook 6.5.4 py311haa95532_1 notebook-shim 0.2.2 py311haa95532_0 numba 0.57.0 py311hf62ec03_0 numexpr 2.8.4 py311h1fcbade_1 numpy 1.24.3 py311hdab7c0b_1 numpy-base 1.24.3 py311hd01c5d8_1 numpydoc 1.5.0 py311haa95532_0 openjpeg 2.4.0 h4fc8c34_0 openpyxl 3.0.10 py311h2bbff1b_0 openssl 1.1.1w h2bbff1b_0 orc 1.7.4 h623e30f_1 orjson 3.9.7 pypi_0 pypi packaging 23.0 py311haa95532_0 pandas 1.5.3 py311heda8569_0 pandocfilters 1.5.0 pyhd3eb1b0_0 panel 1.2.1 py311haa95532_0 param 1.13.0 py311haa95532_0 paramiko 2.8.1 pyhd3eb1b0_0 parsel 1.6.0 py311haa95532_0 parso 0.8.3 pyhd3eb1b0_0 partd 1.2.0 pyhd3eb1b0_1 pathlib 1.0.1 pyhd3eb1b0_1 pathspec 0.10.3 py311haa95532_0 patsy 0.5.3 py311haa95532_0 pcre 8.45 hd77b12b_0 pcre2 10.37 h0ff8eda_1 pep8 1.7.1 py311haa95532_1 permetrics 1.5.0 pypi_0 pypi pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.4.0 py311hd77b12b_0 pint 0.22 pyhd8ed1ab_1 conda-forge pip 23.2.1 py311haa95532_0 pkginfo 1.9.6 py311haa95532_0 platformdirs 2.5.2 py311haa95532_0 plotly 5.9.0 py311haa95532_0 pluggy 1.0.0 py311haa95532_1 ply 3.11 py311haa95532_0 pooch 1.4.0 pyhd3eb1b0_0 powershell_shortcut 0.0.1 3 poyo 0.5.0 pyhd3eb1b0_0 proj 8.2.1 h5ed7ab8_0 prometheus_client 0.14.1 py311haa95532_0 prompt-toolkit 3.0.36 py311haa95532_0 prompt_toolkit 3.0.36 hd3eb1b0_0 protego 0.1.16 py_0 psutil 5.9.0 py311h2bbff1b_0 ptyprocess 0.7.0 pyhd3eb1b0_2 pure_eval 0.2.2 pyhd3eb1b0_0 py-cpuinfo 8.0.0 pyhd3eb1b0_1 py-lief 0.12.3 py311hd77b12b_0 pyarrow 11.0.0 py311h8a3a540_0 pyasn1 0.4.8 pyhd3eb1b0_0 pyasn1-modules 0.2.8 py_0 pybind11-abi 4 hd3eb1b0_1 pycodestyle 2.10.0 py311haa95532_0 pycosat 0.6.4 py311h2bbff1b_0 pycparser 2.21 pyhd3eb1b0_0 pyct 0.5.0 py311haa95532_0 pycurl 7.45.2 py311hcd4344a_0 pydispatcher 2.0.5 py311haa95532_2 pydocstyle 6.3.0 py311haa95532_0 pyerfa 2.0.0 py311h2bbff1b_0 pyflakes 3.0.1 py311haa95532_0 pygments 2.15.1 py311haa95532_1 pyjwt 2.4.0 py311haa95532_0 pylint 2.16.2 py311haa95532_0 pylint-venv 2.3.0 py311haa95532_0 pyls-spyder 0.4.0 pyhd3eb1b0_0 pynacl 1.5.0 py311h8cc25b3_0 pyodbc 4.0.34 py311hd77b12b_0 pyopenssl 23.2.0 py311haa95532_0 pyparsing 3.0.9 py311haa95532_0 pyproj 3.4.1 py311hdd1a45a_0 pyqt 5.15.7 py311hd77b12b_0 pyqt5-sip 12.11.0 py311hd77b12b_0 pyqtwebengine 5.15.7 py311hd77b12b_0 pyrsistent 0.18.0 py311h2bbff1b_0 pyshp 2.1.3 pyhd3eb1b0_0 pysocks 1.7.1 py311haa95532_0 pytables 3.8.0 py311ha4dc190_2 pytest 7.4.0 py311haa95532_0 python 3.11.4 h966fe2a_0 python-dateutil 2.8.2 pyhd3eb1b0_0 python-fastjsonschema 2.16.2 py311haa95532_0 python-json-logger 2.0.7 py311haa95532_0 python-libarchive-c 2.9 pyhd3eb1b0_1 python-lmdb 1.4.1 py311hd77b12b_0 python-lsp-black 1.2.1 py311haa95532_0 python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0 python-lsp-server 1.7.2 py311haa95532_0 python-slugify 5.0.2 pyhd3eb1b0_0 python-snappy 0.6.1 py311hd77b12b_0 python_abi 3.11 2_cp311 conda-forge pytoolconfig 1.2.5 py311haa95532_1 pytz 2022.7 py311haa95532_0 pyvista 0.41.0 pypi_0 pypi pyviz_comms 2.3.0 py311haa95532_0 pywavelets 1.4.1 py311h2bbff1b_0 pywin32 305 py311h2bbff1b_0 pywin32-ctypes 0.2.0 py311haa95532_1000 pywinpty 2.0.10 py311h5da7b33_0 pyyaml 6.0 py311h2bbff1b_1 pyzmq 23.2.0 py311hd77b12b_0 qdarkstyle 3.0.2 pyhd3eb1b0_0 qstylizer 0.2.2 py311haa95532_0 qt-main 5.15.2 he8e5bd7_8 qt-webengine 5.15.9 hb9a9bb5_5 qtawesome 1.2.2 py311haa95532_0 qtconsole 5.4.2 py311haa95532_0 qtpy 2.2.0 py311haa95532_0 qtwebkit 5.212 h2bbfb41_5 queuelib 1.5.0 py311haa95532_0 rasterio 1.3.9 pypi_0 pypi re2 2022.04.01 hd77b12b_0 regex 2022.7.9 py311h2bbff1b_0 reproc 14.2.4 hd77b12b_1 reproc-cpp 14.2.4 hd77b12b_1 requests 2.31.0 py311haa95532_0 requests-file 1.5.1 pyhd3eb1b0_0 requests-toolbelt 1.0.0 py311haa95532_0 rfc3339-validator 0.1.4 py311haa95532_0 rfc3986-validator 0.1.1 py311haa95532_0 rioxarray 0.15.0 pypi_0 pypi rope 1.7.0 py311haa95532_0 rtree 1.0.1 py311h2eaa2aa_0 ruamel.yaml 0.17.21 py311h2bbff1b_0 ruamel_yaml 0.17.21 py311h2bbff1b_0 s3fs 2023.3.0 py311haa95532_0 s3transfer 0.6.0 py311haa95532_0 sacremoses 0.0.43 pyhd3eb1b0_0 scikit-image 0.20.0 py311h3513d60_0 scikit-learn 1.3.0 py311hf62ec03_0 scikit-learn-intelex 2023.1.1 py311haa95532_0 scipy 1.10.1 py311hc1ccb85_1 scooby 0.7.3 pypi_0 pypi scrapy 2.8.0 py311haa95532_0 seaborn 0.12.2 py311haa95532_0 send2trash 1.8.0 pyhd3eb1b0_1 service_identity 18.1.0 pyhd3eb1b0_1 setuptools 68.0.0 py311haa95532_0 shapely 1.8.5.post1 pypi_0 pypi sip 6.6.2 py311hd77b12b_0 six 1.16.0 pyhd3eb1b0_1 smart_open 5.2.1 py311haa95532_0 snappy 1.1.9 h6c2663c_0 sniffio 1.2.0 py311haa95532_1 snowballstemmer 2.2.0 pyhd3eb1b0_0 snuggs 1.4.7 pypi_0 pypi sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.4 py311haa95532_0 sphinx 5.0.2 py311haa95532_0 sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0 sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0 sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0 sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0 spyder 5.4.3 py311haa95532_1 spyder-kernels 2.4.3 py311haa95532_0 sqlalchemy 1.4.39 py311h2bbff1b_0 sqlite 3.41.2 h2bbff1b_0 stack_data 0.2.0 pyhd3eb1b0_0 statsmodels 0.14.0 py311hd7041d2_0 sympy 1.11.1 py311haa95532_0 tabulate 0.8.10 py311haa95532_0 tbb 2021.8.0 h59b6b97_0 tbb4py 2021.8.0 py311h59b6b97_0 tblib 1.7.0 pyhd3eb1b0_0 tenacity 8.2.2 py311haa95532_0 terminado 0.17.1 py311haa95532_0 text-unidecode 1.3 pyhd3eb1b0_0 textdistance 4.2.1 pyhd3eb1b0_0 threadpoolctl 2.2.0 pyh0d69192_0 three-merge 0.1.1 pyhd3eb1b0_0 tifffile 2021.7.2 pyhd3eb1b0_2 tinycss2 1.2.1 py311haa95532_0 tk 8.6.12 h2bbff1b_0 tldextract 3.2.0 pyhd3eb1b0_0 toml 0.10.2 pyhd3eb1b0_0 tomlkit 0.11.1 py311haa95532_0 toolz 0.12.0 py311haa95532_0 torch 2.0.1 pypi_0 pypi torchvision 0.15.2 pypi_0 pypi tornado 6.3.2 py311h2bbff1b_0 tqdm 4.65.0 py311h746a85d_0 traitlets 5.7.1 py311haa95532_0 trame 2.5.2 pypi_0 pypi trame-client 2.11.3 pypi_0 pypi trame-components 2.2.1 pypi_0 pypi trame-deckgl 2.0.2 pypi_0 pypi trame-markdown 2.0.2 pypi_0 pypi trame-matplotlib 2.0.2 pypi_0 pypi trame-plotly 2.1.1 pypi_0 pypi trame-rca 0.3.1 pypi_0 pypi trame-router 2.1.0 pypi_0 pypi trame-server 2.11.7 pypi_0 pypi trame-simput 2.3.3 pypi_0 pypi trame-vega 2.0.3 pypi_0 pypi trame-vtk 2.5.8 pypi_0 pypi trame-vuetify 2.3.1 pypi_0 pypi transformers 2.1.1 pyhd3eb1b0_0 twisted 22.10.0 py311h2bbff1b_0 twisted-iocpsupport 1.0.2 py311h2bbff1b_0 typing-extensions 4.7.1 py311haa95532_0 typing_extensions 4.7.1 py311haa95532_0 tzdata 2023c h04d1e81_0 uc-micro-py 1.0.1 py311haa95532_0 ucrt 10.0.22621.0 h57928b3_0 conda-forge ujson 5.4.0 py311hd77b12b_0 unidecode 1.2.0 pyhd3eb1b0_0 urllib3 1.26.16 py311haa95532_0 utf8proc 2.6.1 h2bbff1b_0 vc 14.2 h21ff451_1 vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge vs2015_runtime 14.36.32532 h05e6639_17 conda-forge vtk 9.2.6 pypi_0 pypi w3lib 1.21.0 pyhd3eb1b0_0 watchdog 2.1.6 py311haa95532_0 wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py311haa95532_1 websocket-client 0.58.0 py311haa95532_4 werkzeug 2.2.3 py311haa95532_0 whatthepatch 1.0.2 py311haa95532_0 wheel 0.38.4 py311haa95532_0 widgetsnbextension 4.0.5 py311haa95532_0 win_inet_pton 1.1.0 py311haa95532_0 windrose 1.9.0 pypi_0 pypi winpty 0.4.3 4 wrapt 1.14.1 py311h2bbff1b_0 wrf-python 1.3.4.1 py311hc52a59b_3 conda-forge wslink 1.11.4 pypi_0 pypi xarray 2023.6.0 py311haa95532_0 xlwings 0.29.1 py311haa95532_0 xyzservices 2022.9.0 py311haa95532_1 xz 5.4.2 h8cc25b3_0 y-py 0.5.9 py311hb6bf4ef_0 yaml 0.2.5 he774522_0 yaml-cpp 0.7.0 hd77b12b_1 yapf 0.31.0 pyhd3eb1b0_0 yarl 1.8.1 py311h2bbff1b_0 ypy-websocket 0.8.2 py311haa95532_0 zeromq 4.3.4 hd77b12b_0 zfp 0.5.5 hd77b12b_6 zict 2.2.0 py311haa95532_0 zipp 3.11.0 py311haa95532_0 zlib 1.2.13 h8cc25b3_0 zlib-ng 2.0.7 h2bbff1b_0 zope 1.0 py311haa95532_1 zope.interface 5.4.0 py311h2bbff1b_0 zstandard 0.19.0 py311h2bbff1b_0 zstd 1.5.5 hd43e919_0

KMHL-Limited commented 3 months ago

I've experienced a similar set of issues in the last month for other functions such as get_cloudfrac (cloud fraction) and get_rh (relative humidity).

I've had to rewrite the fortran routines (e.g. DCLOUDFRAC2, DCOMPUTERH, DCOMPUTETK) in python to get them to work.

I then compared to outcomes at each stage to the python 3.9 run Fortran WRF routines to confirm the python 3.11 versions worked which they do but python 3.11 using the WRF-python runs into issues.

Not a solution to your problem but empathy with your issues.

Eliott-He commented 3 months ago

I've experienced a similar set of issues in the last month for other functions such as get_cloudfrac (cloud fraction) and get_rh (relative humidity).

I've had to rewrite the fortran routines (e.g. DCLOUDFRAC2, DCOMPUTERH, DCOMPUTETK) in python to get them to work.

I then compared to outcomes at each stage to the python 3.9 run Fortran WRF routines to confirm the python 3.11 versions worked which they do but python 3.11 using the WRF-python runs into issues.

Not a solution to your problem but empathy with your issues.

Thank you very much for your reply, and I appreciate the alternative approach you provided for modifying the Fortran program. I have also attempted to make changes to some Fortran programs but was unsuccessful. In the end, I decided to revert back to Python 3.9. I am currently not sure whether the issue lies within the internal Fortran program or the Python program.

Eliott-He commented 3 months ago

Thanks for the bug report!

Can you confirm which variables are transposed (i.e. U/V or WSD/WDIR) and share a bit of info about the system you're running on (operating system) and your environment (e.g. the output of conda list)?

I wasn't able to replicate this locally.

I apologize for forgetting to use the reply format in my previous response. The link to my previous answer is here: https://github.com/NCAR/wrf-python/issues/229#issuecomment-1949571293