Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid.integrate method fails for an MPAS mesh dual grid, and MPAS physical field. #281

Closed
areanddee opened this issue Apr 18, 2023 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@areanddee
Copy link

Describe the bug

integrate method fails when called from a dual grid extracted from a Native MPAS grid file, such as x1.40962.grid.nc. Specifically, it appears to be deducing the wrong numbers of faces on an icosahedral grid face, i.e. AreaCell(nCells) in the native MPAS grid file, where nCells = 40962, to compute the area. Instead it appears to be using nVertices = 81920. Thus the arrays of face_area and face values in integrate() appear nonconformal to the code, and it fails.

To Reproduce
Steps to reproduce the behavior:

  1. Go to loft@casper.ucar.edu:~/ESDS-Hackathon
  2. run the python code aqua_ux.py located there.
  3. See error traceback:

Traceback (most recent call last):
File "/glade/u/home/loft/ESDS-Hackathon/aqua_ux.py", line 31, in
prect_gbl = dual_grid.integrate(prect_ds)
File "/glade/work/loft/conda-envs/geocat/lib/python3.10/site-packages/uxarray/grid.py", line 379, in integrate
integral = np.dot(face_areas, face_vals)
File "<array_function internals>", line 180, in dot
ValueError: shapes (81920,) and (40962,) not aligned: 81920 (dim 0) != 40962 (dim 0)

Expected behavior

integrate should compute the global integral, i.e.the np.dot(face_areas, face_vals) both of which should be conformal arrays of length 40962 , and return the desired area integral result.

Screenshots
Here is an ncdump of the MPAS grid file: note shape of AreaCells.

(geocat) [loft@casper-login1 ~/ESDS-Hackathon]$ ncdump -h x1.40962/x1.40962.grid.nc
netcdf x1.40962.grid {
dimensions:
nCells = 40962 ;
nEdges = 122880 ;
nVertices = 81920 ;
maxEdges = 10 ;
maxEdges2 = 20 ;
TWO = 2 ;
vertexDegree = 3 ;
nVertLevels = 1 ;
Time = UNLIMITED ; // (0 currently)
variables:
double latCell(nCells) ;
double lonCell(nCells) ;
double meshDensity(nCells) ;
double xCell(nCells) ;
double yCell(nCells) ;
double zCell(nCells) ;
int indexToCellID(nCells) ;
double latEdge(nEdges) ;
double lonEdge(nEdges) ;
double xEdge(nEdges) ;
double yEdge(nEdges) ;
double zEdge(nEdges) ;
int indexToEdgeID(nEdges) ;
double latVertex(nVertices) ;
double lonVertex(nVertices) ;
double xVertex(nVertices) ;
double yVertex(nVertices) ;
double zVertex(nVertices) ;
int indexToVertexID(nVertices) ;
int cellsOnEdge(nEdges, TWO) ;
int nEdgesOnCell(nCells) ;
int nEdgesOnEdge(nEdges) ;
int edgesOnCell(nCells, maxEdges) ;
int edgesOnEdge(nEdges, maxEdges2) ;
double weightsOnEdge(nEdges, maxEdges2) ;
double dvEdge(nEdges) ;
double dv1Edge(nEdges) ;
double dv2Edge(nEdges) ;
double dcEdge(nEdges) ;
double angleEdge(nEdges) ;
double areaCell(nCells) ;
double areaTriangle(nVertices) ;
int cellsOnCell(nCells, maxEdges) ;
int verticesOnCell(nCells, maxEdges) ;
int verticesOnEdge(nEdges, TWO) ;
int edgesOnVertex(nVertices, vertexDegree) ;
int cellsOnVertex(nVertices, vertexDegree) ;
double kiteAreasOnVertex(nVertices, vertexDegree) ;

// global attributes:
:on_a_sphere = "YES " ;
:sphere_radius = 1. ;
:np = 40962 ;
:n_scvt_iterations = 1000 ;
:eps = 1.e-10 ;
:Convergence = "L2" ;
}

OS:
Centos 7.0

Environment
(geocat) [loft@casper-login1 ~/ESDS-Hackathon]$ conda list

packages in environment at /glade/work/loft/conda-envs/geocat:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
alsa-lib 1.2.8 h166bdaf_0 conda-forge
anyio 3.6.2 pyhd8ed1ab_0 conda-forge
aom 3.5.0 h27087fc_0 conda-forge
appdirs 1.4.4 pyh9f0ad1d_0 conda-forge
argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py310h5764c6d_3 conda-forge
arpack 3.7.0 hdefa2d7_2 conda-forge
asttokens 2.1.0 pyhd8ed1ab_0 conda-forge
attr 2.5.1 h166bdaf_1 conda-forge
attrs 22.1.0 pyh71513ae_1 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
bleach 5.0.1 pyhd8ed1ab_0 conda-forge
blosc 1.21.2 hafa529b_0 conda-forge
bokeh 3.0.2 pyhd8ed1ab_0 conda-forge
bottleneck 1.3.5 py310hde88566_1 conda-forge
brotli 1.0.9 h166bdaf_8 conda-forge
brotli-bin 1.0.9 h166bdaf_8 conda-forge
brotlipy 0.7.0 py310h5764c6d_1005 conda-forge
brunsli 0.1 h9c3ff4c_0 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
c-blosc2 2.6.0 hf91038e_0 conda-forge
ca-certificates 2022.12.7 ha878542_0 conda-forge
cartopy 0.21.0 py310h83f2385_3 conda-forge
certifi 2022.12.7 pyhd8ed1ab_0 conda-forge
cf_xarray 0.7.4 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py310h255011f_2 conda-forge
cfitsio 4.2.0 hd9d235c_0 conda-forge
cftime 1.6.2 py310hde88566_1 conda-forge
charls 2.3.4 h9c3ff4c_0 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
click 8.1.3 unix_pyhd8ed1ab_2 conda-forge
cloudpickle 2.2.0 pyhd8ed1ab_0 conda-forge
contourpy 1.0.6 py310hbf28c38_0 conda-forge
cryptography 38.0.3 py310h597c629_0 conda-forge
curl 7.86.0 h7bff187_1 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
cytoolz 0.12.0 py310h5764c6d_1 conda-forge
dask 2022.11.0 pyhd8ed1ab_0 conda-forge
dask-core 2022.11.0 pyhd8ed1ab_0 conda-forge
dav1d 1.0.0 h166bdaf_1 conda-forge
dbus 1.13.6 h5008d03_3 conda-forge
debugpy 1.6.3 py310hd8f1fbe_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
distributed 2022.11.0 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
eofs 1.4.0 py_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
expat 2.5.0 h27087fc_0 conda-forge
fftw 3.3.10 nompi_hf0379b8_105 conda-forge
flit-core 3.8.0 pyhd8ed1ab_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.14.1 hc2a2eb6_0 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
fonttools 4.38.0 py310h5764c6d_1 conda-forge
freetype 2.12.1 hca18f0e_0 conda-forge
fsspec 2022.11.0 pyhd8ed1ab_0 conda-forge
geocat-comp 2022.10.1 pyha770c72_0 conda-forge
geocat-datafiles 2022.03.0 pyha770c72_0 conda-forge
geocat-f2py 2022.04.0 py310h8adf1f6_1 conda-forge
geometric_features 0.8.0 pyhd8ed1ab_0 conda-forge
geos 3.11.1 h27087fc_0 conda-forge
gettext 0.21.1 h27087fc_0 conda-forge
giflib 5.2.1 h36c2ea0_2 conda-forge
glib 2.74.1 h6239696_1 conda-forge
glib-tools 2.74.1 h6239696_1 conda-forge
glpk 5.0 h445213a_0 conda-forge
gmp 6.2.1 h58526e2_0 conda-forge
gst-plugins-base 1.21.1 h3e40eee_1 conda-forge
gstreamer 1.21.1 hd4edc92_1 conda-forge
hdf4 4.2.15 h9772cbc_5 conda-forge
hdf5 1.12.2 nompi_h2386368_100 conda-forge
heapdict 1.0.1 py_0 conda-forge
icu 70.1 h27087fc_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
imagecodecs 2022.9.26 py310h543e91f_4 conda-forge
imageio 2.22.4 pyhfa7a67d_1 conda-forge
importlib-metadata 5.0.0 pyha770c72_1 conda-forge
importlib_resources 5.10.0 pyhd8ed1ab_0 conda-forge
inpoly 0.2.0 py310hde88566_5 conda-forge
ipykernel 6.17.1 pyh210e3f2_0 conda-forge
ipython 8.6.0 pyh41d4057_1 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 8.0.2 pyhd8ed1ab_1 conda-forge
jack 1.9.21 he978b8e_1 conda-forge
jedi 0.18.1 pyhd8ed1ab_2 conda-forge
jigsaw 0.9.14 h58526e2_0 conda-forge
jigsawpy 0.3.3 pyhd8ed1ab_1 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
joblib 1.2.0 pyhd8ed1ab_0 conda-forge
jpeg 9e h166bdaf_2 conda-forge
jsonschema 4.17.0 pyhd8ed1ab_0 conda-forge
jupyter 1.0.0 py310hff52083_7 conda-forge
jupyter_client 7.3.4 pyhd8ed1ab_0 conda-forge
jupyter_console 6.4.4 pyhd8ed1ab_0 conda-forge
jupyter_core 5.0.0 py310hff52083_0 conda-forge
jupyter_server 1.23.2 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 3.0.3 pyhd8ed1ab_0 conda-forge
jxrlib 1.1 h7f98852_2 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
kiwisolver 1.4.4 py310hbf28c38_1 conda-forge
krb5 1.19.3 h3790be6_0 conda-forge
lame 3.100 h166bdaf_1003 conda-forge
lcms2 2.14 h6ed2654_0 conda-forge
ld_impl_linux-64 2.39 hc81fddc_0 conda-forge
lerc 4.0.0 h27087fc_0 conda-forge
libaec 1.0.6 h9c3ff4c_0 conda-forge
libavif 0.11.1 h5cdd6b5_0 conda-forge
libblas 3.9.0 16_linux64_openblas conda-forge
libbrotlicommon 1.0.9 h166bdaf_8 conda-forge
libbrotlidec 1.0.9 h166bdaf_8 conda-forge
libbrotlienc 1.0.9 h166bdaf_8 conda-forge
libcap 2.66 ha37c62d_0 conda-forge
libcblas 3.9.0 16_linux64_openblas conda-forge
libclang 15.0.4 default_h2e3cab8_0 conda-forge
libclang13 15.0.4 default_h3a83d3e_0 conda-forge
libcups 2.3.3 h3e49a29_2 conda-forge
libcurl 7.86.0 h7bff187_1 conda-forge
libdb 6.2.32 h9c3ff4c_0 conda-forge
libdeflate 1.14 h166bdaf_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libevent 2.1.10 h9b69904_4 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libflac 1.4.2 h27087fc_0 conda-forge
libgcc-ng 12.2.0 h65d4601_19 conda-forge
libgfortran-ng 12.2.0 h69a702a_19 conda-forge
libgfortran5 12.2.0 h337968e_19 conda-forge
libglib 2.74.1 h606061b_1 conda-forge
libgomp 12.2.0 h65d4601_19 conda-forge
libhwloc 2.8.0 h32351e8_1 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
liblapack 3.9.0 16_linux64_openblas conda-forge
libllvm11 11.1.0 he0ac6c6_5 conda-forge
libllvm15 15.0.4 h63197d8_1 conda-forge
libnetcdf 4.8.1 nompi_h261ec11_106 conda-forge
libnghttp2 1.47.0 hdcd2b5c_1 conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libogg 1.3.4 h7f98852_1 conda-forge
libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge
libopus 1.3.1 h7f98852_1 conda-forge
libpng 1.6.38 h753d276_0 conda-forge
libpq 14.5 hd77ab85_1 conda-forge
libsndfile 1.1.0 h27087fc_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsqlite 3.39.4 h753d276_0 conda-forge
libssh2 1.10.0 haa6b8db_3 conda-forge
libstdcxx-ng 12.2.0 h46fd767_19 conda-forge
libtiff 4.4.0 h55922b4_4 conda-forge
libtool 2.4.6 h9c3ff4c_1008 conda-forge
libudev1 252 h166bdaf_0 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libvorbis 1.3.7 h9c3ff4c_0 conda-forge
libwebp-base 1.2.4 h166bdaf_0 conda-forge
libxcb 1.13 h7f98852_1004 conda-forge
libxkbcommon 1.0.3 he3ba5ed_0 conda-forge
libxml2 2.10.3 h7463322_0 conda-forge
libzip 1.9.2 hc869a4a_1 conda-forge
libzlib 1.2.13 h166bdaf_4 conda-forge
libzopfli 1.0.3 h9c3ff4c_0 conda-forge
llvmlite 0.39.1 py310h58363a5_1 conda-forge
locket 1.0.0 pyhd8ed1ab_0 conda-forge
lz4 4.0.2 py310h5d5e884_0 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
markupsafe 2.1.1 py310h5764c6d_2 conda-forge
matplotlib 3.6.2 py310hff52083_0 conda-forge
matplotlib-base 3.6.2 py310h8d5ebf3_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
metis 5.1.0 h58526e2_1006 conda-forge
metpy 1.3.1 pyhd8ed1ab_0 conda-forge
mistune 2.0.4 pyhd8ed1ab_0 conda-forge
mpas_tools 0.15.0 py310h73bf603_2 conda-forge
mpfr 4.1.0 h9202a9a_1 conda-forge
mpg123 1.30.2 h27087fc_1 conda-forge
msgpack-python 1.0.4 py310hbf28c38_1 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
mysql-common 8.0.31 haf5c9bc_0 conda-forge
mysql-libs 8.0.31 h28c427c_0 conda-forge
nbclassic 0.4.8 pyhd8ed1ab_0 conda-forge
nbclient 0.7.0 pyhd8ed1ab_0 conda-forge
nbconvert 7.2.5 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.2.5 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.2.5 pyhd8ed1ab_0 conda-forge
nbformat 5.7.0 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h27087fc_1 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
netcdf4 1.6.1 nompi_py310h55e1e36_101 conda-forge
networkx 2.8.8 pyhd8ed1ab_0 conda-forge
notebook 6.5.2 pyha770c72_1 conda-forge
notebook-shim 0.2.2 pyhd8ed1ab_0 conda-forge
nspr 4.32 h9c3ff4c_1 conda-forge
nss 3.78 h2350873_0 conda-forge
numba 0.56.3 py310ha5257ce_0 conda-forge
numpy 1.23.4 py310h53a5b5f_1 conda-forge
openjpeg 2.5.0 h7d73246_1 conda-forge
openssl 1.1.1t h0b41bf4_0 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pandas 1.5.1 py310h769672d_1 conda-forge
pandoc 2.19.2 h32600fe_1 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
partd 1.3.0 pyhd8ed1ab_0 conda-forge
pathlib 1.0.1 py310hff52083_7 conda-forge
pcre2 10.40 hc3806b6_0 conda-forge
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.2.0 py310h454ad03_3 conda-forge
pint 0.19.2 pyhd8ed1ab_0 conda-forge
pip 22.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
platformdirs 2.5.2 pyhd8ed1ab_1 conda-forge
ply 3.11 py_1 conda-forge
pooch 1.6.0 pyhd8ed1ab_0 conda-forge
progressbar2 4.2.0 pyhd8ed1ab_0 conda-forge
proj 9.1.0 h93bde94_0 conda-forge
prometheus_client 0.15.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.32 pyha770c72_0 conda-forge
prompt_toolkit 3.0.32 hd8ed1ab_0 conda-forge
properscoring 0.1 py_0 conda-forge
psutil 5.9.4 py310h5764c6d_0 conda-forge
pthread-stubs 0.4 h36c2ea0_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pulseaudio 14.0 h0d2025b_11 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pyamg 4.2.3 py310hc4a4660_2 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyevtk 1.5.0 pyh8a188c0_0 conda-forge
pygments 2.13.0 pyhd8ed1ab_0 conda-forge
pyopenssl 22.1.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyproj 3.4.0 py310hb1338dc_2 conda-forge
pyqt 5.15.7 py310h29803b5_2 conda-forge
pyqt5-sip 12.11.0 py310hd8f1fbe_2 conda-forge
pyrsistent 0.19.2 py310h5764c6d_0 conda-forge
pyshp 2.3.1 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.10.6 h582c2e5_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.16.2 pyhd8ed1ab_0 conda-forge
python-igraph 0.10.2 py310h18f4e01_1 conda-forge
python-utils 3.4.5 pyhd8ed1ab_0 conda-forge
python_abi 3.10 2_cp310 conda-forge
pytz 2022.6 pyhd8ed1ab_0 conda-forge
pywavelets 1.3.0 py310hde88566_2 conda-forge
pyyaml 6.0 py310h5764c6d_5 conda-forge
pyzmq 24.0.1 py310h330234f_1 conda-forge
qt-main 5.15.6 hd477bba_1 conda-forge
qtconsole 5.4.0 pyhd8ed1ab_0 conda-forge
qtconsole-base 5.4.0 pyha770c72_0 conda-forge
qtpy 2.3.0 pyhd8ed1ab_0 conda-forge
readline 8.1.2 h0f457ee_0 conda-forge
requests 2.28.1 pyhd8ed1ab_1 conda-forge
scikit-image 0.19.3 py310h769672d_2 conda-forge
scikit-learn 1.1.3 py310h0c3af53_1 conda-forge
scipy 1.9.3 py310hdfbd76f_2 conda-forge
send2trash 1.8.0 pyhd8ed1ab_0 conda-forge
setuptools 65.5.1 pyhd8ed1ab_0 conda-forge
shapely 1.8.5 py310h5b266fc_2 conda-forge
sip 6.7.4 py310hd8f1fbe_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
snappy 1.1.9 hbd366e4_2 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
sqlite 3.39.4 h4ff8645_0 conda-forge
stack_data 0.6.1 pyhd8ed1ab_0 conda-forge
suitesparse 5.10.1 h9e50725_1 conda-forge
tbb 2021.7.0 h924138e_1 conda-forge
tblib 1.7.0 pyhd8ed1ab_0 conda-forge
terminado 0.17.0 pyh41d4057_0 conda-forge
texttable 1.6.7 pyhd8ed1ab_0 conda-forge
threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge
tifffile 2022.10.10 pyhd8ed1ab_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tornado 6.1 py310h5764c6d_3 conda-forge
traitlets 5.5.0 pyhd8ed1ab_0 conda-forge
typing_extensions 4.4.0 pyha770c72_0 conda-forge
tzdata 2022f h191b570_0 conda-forge
unicodedata2 15.0.0 py310h5764c6d_0 conda-forge
urllib3 1.26.11 pyhd8ed1ab_0 conda-forge
uxarray 2023.04.0 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 1.4.2 pyhd8ed1ab_0 conda-forge
wheel 0.38.4 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.3 pyhd8ed1ab_0 conda-forge
xarray 2022.11.0 pyhd8ed1ab_0 conda-forge
xcb-util 0.4.0 h166bdaf_0 conda-forge
xcb-util-image 0.4.0 h166bdaf_0 conda-forge
xcb-util-keysyms 0.4.0 h166bdaf_0 conda-forge
xcb-util-renderutil 0.3.9 h166bdaf_0 conda-forge
xcb-util-wm 0.4.1 h166bdaf_0 conda-forge
xhistogram 0.3.2 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.9 h7f98852_0 conda-forge
xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge
xskillscore 0.0.24 pyhd8ed1ab_0 conda-forge
xyzservices 2022.9.0 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
zeromq 4.3.4 h9c3ff4c_1 conda-forge
zfp 1.0.0 h27087fc_3 conda-forge
zict 2.2.0 pyhd8ed1ab_0 conda-forge
zipp 3.10.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 h166bdaf_4 conda-forge
zlib-ng 2.0.6 h166bdaf_0 conda-forge
zstd 1.5.2 h6239696_4 conda-forge

@areanddee areanddee added the bug Something isn't working label Apr 18, 2023
@erogluorhan
Copy link
Member

@philipc2 @rajeeja this is a follow up issue from our ESDS unstructured grids collab. work yesterday. Could you please look into it when you have time?

@rajeeja
Copy link
Contributor

rajeeja commented Apr 18, 2023

We are working on it and should have a fix soon.

@philipc2
Copy link
Member

@areanddee

Thank you for this! We have been working on getting a fix for the face area calculation that was brought up at the ESDS event, see #283. The area is now correctly calculated for both the primal and dual meshes

@rajeeja
Copy link
Contributor

rajeeja commented Apr 18, 2023

@areanddee I don't have access to [casper.ucar.edu]

Error message says dims are off .. one is #nodes and the other is #faces are you getting variable and mesh from the same grid?

prect_gbl = dual_grid.integrate(prect_ds)

@philipc2
Copy link
Member

philipc2 commented Apr 18, 2023

@areanddee

I was able to evaluate the integral using the primal_mesh, since it appears that the data that you are using is defined there.

primal_grid = ux.Grid(mpas_grid_ds, use_dual=False)
prect_gbl = primal_grid.integrate(prect_ds)

The output I got was: prect (GBL integral): 4.821380031525318e-07

This was using the changes in #283

@areanddee
Copy link
Author

areanddee commented Apr 19, 2023 via email

@rajeeja
Copy link
Contributor

rajeeja commented Apr 19, 2023

Phillip and Ravi-

The MPAS scalar field and mesh both use the same cell centers.

I believe the root cause of my issue to be that in the April release, only
the dual mesh version of compute_face_area gave the correct answer, but the
dual mesh cannot use the integrate method to compute global integrals. So
primal must be used (which was broken). Now that it works (#283) I can just
change to primal.

I am embarrassed to say that I not sure how to update my conda environment
to #283 on Git to check/use this. A couple pointers in that regard would be
appreciated.

Rich

On Tue, Apr 18, 2023 at 3:56 PM Philip Chmielowiec @.***>
wrote:

I was able to calculate the integral using the primal_mesh, since it
appears that the data that you are using is defined there.

primal_grid = ux.Grid(mpas_grid_ds, use_dual=False)prect_gbl = primal_grid.integrate(prect_ds)

The output I got was: prect (GBL integral): 4.821380031525318e-07

This was using the changes in #283
#283


Reply to this email directly, view it on GitHub
#281 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZ2GWBI6CXTX4LSXROR2V7DXB4EXPANCNFSM6AAAAAAXC6YM4U
.
You are receiving this because you were mentioned.Message ID:
@.***>

Clone this repo, cd into it and do:

pip install -e .

@philipc2 philipc2 added this to the MPAS I/O milestone Aug 22, 2023
@rajeeja
Copy link
Contributor

rajeeja commented Oct 3, 2023

@areanddee I think we have fixed this. Can you try again?

Thanks.

@erogluorhan
Copy link
Member

Closing now, could always re-open if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

4 participants