You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation says that calling the function getvar with the variables 'mcape' and 'mcin' retrieve only those variables of cape_2d variable but I receive the following error
from wrf import getvar
from netCDF4 import Dataset
nc = Dataset('wrfout_d01_2015-12-24_03:00:00')
mcape = getvar(nc, 'mcape')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [4], line 1
----> 1 mcape = getvar(nc, 'mcape')
File ~/miniconda3/envs/wrf_python_build/lib/python3.10/site-packages/wrf/routines.py:350, in getvar(wrfin, varname, timeidx, method, squeeze, cache, meta, **kwargs)
348 actual_var = _undo_alias(varname)
349 if actual_var not in _VALID_KARGS:
--> 350 raise ValueError("'{}' is not a valid variable name".format(varname))
352 _check_kargs(actual_var, kwargs)
354 return _FUNC_MAP[actual_var](wrfin, timeidx, method, squeeze, cache,
355 meta, _key, **kwargs)
ValueError: 'mcape' is not a valid variable name
The text was updated successfully, but these errors were encountered:
Documentation says that calling the function getvar with the variables 'mcape' and 'mcin' retrieve only those variables of cape_2d variable but I receive the following error
The text was updated successfully, but these errors were encountered: