cmip6dr / dreqPy

The Data Request Python API
0 stars 0 forks source link

ver 01.00.28 command-line utility fails on "-m CMIP" #21

Open JamesAnstey opened 6 years ago

JamesAnstey commented 6 years ago

Using the command-line tool to get priority=1 requests for piControl for CMIP (core request),

drq -m CMIP -p 1 -e piControl --xls

gives me this error:

INFO.volsum.01002: Writing xls/requestVol_CMIP_1_1.xlsx Traceback (most recent call last): File "/HOME/rja/code/cmip6/latest/dreqPy/dreqCmdl.py", line 70, in main_entry() File "/HOME/rja/code/cmip6/latest/dreqPy/dreqCmdl.py", line 53, in main_entry x.run() File "/HOME/rja/code/cmip6/latest/dreqPy/scope.py", line 1963, in run vs.anal(olab=mlab,doUnique=False, mode=vsmode, makeTabs=makeXls) File "/HOME/rja/code/cmip6/latest/dreqPy/volsum.py", line 296, in anal self.accPdict[e].add( (rqv.vid,rqv.priority) ) AttributeError: 'vsum' object has no attribute 'accPdict'

However using the same command with ver 01.00.27 works fine. With version 01.00.28 I don't have the error for other MIPs that I've tried (DynVar, DCPP, HighResMIP, VolMIP), it's only happened with CMIP.

martinjuckes commented 5 years ago

Hello James, sorry for the slow response. I believe this has now been fixed in 01.00.29b1, soon to become 01.00.29. "accPict" was initialised inside an optional section of code, and it appears that in the past this always worked. I've moved the initialisation into init where it belongs.

JamesAnstey commented 5 years ago

Thanks Martin! I just tried the same command (drq -m CMIP -p 1 -e piControl --xls) using version 01.00.29b1 and it ran without error.