NCAR / NCAR/wrf-python

wrf-python importing issues

Open
#147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

I am new to python and wrf-python

I have installed wrf-python with Conda forge and I can see wrk-python in Conda list

then I am trying to practice with wrf-python example scripts and in the begging when I try to import (from wrf import getvar,ALL_TIMES) I am getting this error

ImportError                               Traceback (most recent call last)
<ipython-input-7-e3eca81516d1> in <module>
      2 
      3 from netCDF4 import Dataset
----> 4 from wrf import getvar#,ALL_TIMES

~/opt/anaconda3/lib/python3.8/site-packages/wrf/__init__.py in <module>
      4 
      5 try:
----> 6     from . import api
      7     from .api import *
      8 except ImportError:

~/opt/anaconda3/lib/python3.8/site-packages/wrf/api.py in <module>
----> 1 from .config import (xarray_enabled, disable_xarray, enable_xarray,
      2                      cartopy_enabled, disable_cartopy, enable_cartopy,
      3                      basemap_enabled, disable_basemap, enable_basemap,
      4                      pyngl_enabled, enable_pyngl, disable_pyngl,
      5                      set_cache_size, get_cache_size, omp_enabled)

~/opt/anaconda3/lib/python3.8/site-packages/wrf/config.py in <module>
      4 import wrapt
      5 
----> 6 from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
      7                           fomp_set_schedule, fomp_set_dynamic,
      8                           omp_constants)

ImportError: dlopen(/Users/jeevan/opt/anaconda3/lib/python3.8/site-packages/wrf/_wrffortran.cpython-38-darwin.so, 2): Symbol not found: _GOMP_loop_maybe_nonmonotonic_runtime_next
  Referenced from: /Users/jeevan/opt/anaconda3/lib/python3.8/site-packages/wrf/_wrffortran.cpython-38-darwin.so
  Expected in: /Users/jeevan/opt/anaconda3/lib/libiomp5.dylib
 in /Users/jeevan/opt/anaconda3/lib/python3.8/site-packages/wrf/_wrffortran.cpython-38-darwin.so
`
```

 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported import path in wrf/init.py, wrf/api.py, and wrf/config.py, then inspect the _wrffortran.cpython-38-darwin.so loading error in the Anaconda environment. Reproduce from wrf import getvar and determine what environment or compatibility condition prevents the import from completing; done means the example import succeeds without the reported symbol error.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.