Traceback (most recent call last):
File "acme_diags_driver.py", line 79, in <module>
run_diag(parameter)
File "/Users/zhang40/anaconda2/envs/acme_diags_env/lib/python2.7/site-packages/acme_diags-0.1-py2.7.egg/acme_diags/driver/zonal_mean_2d_driver.py", line 199, in run_diag
mv1_reg = mv1_p.crossSectionRegrid(lev_out, lat_out)
File "/Users/zhang40/anaconda2/envs/acme_diags_env/lib/python2.7/site-packages/cdms2/avariable.py", line 1217, in crossSectionRegrid
fromlat, newLatitude, fromlevel, newLevel)
File "/Users/zhang40/anaconda2/envs/acme_diags_env/lib/python2.7/site-packages/regrid2/crossSection.py", line 116, in __init__
lat_wts_bndsIn = get_latitude_wts_bnds(latIn)
File "/Users/zhang40/anaconda2/envs/acme_diags_env/lib/python2.7/site-packages/regrid2/crossSection.py", line 678, in get_latitude_wts_bnds
return (wts, bnds)
UnboundLocalError: local variable 'wts' referenced before assignment
@chengzhuzhang Uncovered this error.
A quick glance at the
get_latitude_wts_bnds()function shows thatwtsis only declared in the if statements, thus an error on the linereturn (wts, bnds).Maybe we need to initialize wts to None?
Your thoughts @dnadeau4