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

AttributeError: 'function' object has no attribute 'get_max_dbz' #32

Closed
lkugler opened this issue Nov 16, 2017 · 1 comment
Closed

AttributeError: 'function' object has no attribute 'get_max_dbz' #32

lkugler opened this issue Nov 16, 2017 · 1 comment
Labels
question Further information is requested

Comments

@lkugler
Copy link

lkugler commented Nov 16, 2017

Hi,
I get the above Error for 'get_max_dbz' or 'get_ctt' (ctt module).
Is this a known bug?
Version 1.0.5

Traceback (most recent call last):
  File "dbz-test.py", line 8, in <module>
    a = dbz.get_max_dbz(ds)

Minimal working example

from netCDF4 import Dataset
from wrf import dbz, to_np, latlon_coords,get_basemap

ds = Dataset('wrfout_d02_2017-07-10_12:00:00')
print ds

a = dbz.get_max_dbz(ds)

lats, lons = latlon_coords(a)
bm = get_basemap(a)
x, y = bm(to_np(lons), to_np(lats))
bm.contourf(x, y, to_np(a))
@bladwig1
Copy link

bladwig1 commented Nov 16, 2017

You want to use the 'getvar' function to extract/compute the diagnostic variable that you want. You should never directly call the 'get_max_dbz' function directly, as this is for internal use only.

from wrf import getvar
max_dbz = getvar(ncfile, "mdbz")

The basic usage documentation is here:

http://wrf-python.readthedocs.io/en/latest/basic_usage.html#computing-diagnostic-variables

The documentation for getvar is here:

http://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.getvar.html#wrf.getvar

Also, there's a google group that you can subscribe to for general usage questions, which can be found here:

http://wrf-python.readthedocs.io/en/latest/support.html#google-group

Hope this helps,

Bill

@bladwig1 bladwig1 added the question Further information is requested label Nov 16, 2017
bladwig1 pushed a commit that referenced this issue Dec 18, 2017
…_' to avoid naming issues with the raw computational routines. Closes #33. Closes #32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants