Three patches for time series generation
- Added
caseargument toenv_workflow.get_job_specs() - explicitly ignored last two arguments returned from
env_mach_specific.get_mpirun()-- shouldn't be necessary, but I was seeingValueError: too many values to unpackand the error went away with the additional_s - Remove indexing from
options.debugintseries_generator, sinceparser.add_argument()explicitly casts it as int; avoidsTypeError: 'int' object has no attribute '__getitem__'
I needed to make these changes to run a case from cesm2_2_beta05, but I suspect it will break compatibility with cesm2.1... which probably isn't ideal if CMIP runs are making use of --workflow timeseries. I've got a sandbox that works for me, so I'm in no rush to see these changes back on master
Fixes #217 (I don't have permission to link the issue to this PR)
@mnlevy1981 - I'm going to wait on merging this PR as it's not clear what direction the postprocessing is going post CMIP6 and I don't want to break the current working master.
Regarding the indexing of the debug parameter, I agree that this should be removed. However, the proposed solution will lead to DEBUG statements when '0' is specified, since the result is stored in a list [0] and this list renders to True in a statement like: if (debug): .
I propose this alternative:
- parser.add_argument('--debug', nargs=1, required=False, type=int, default=0,
+ parser.add_argument('--debug', required=False, type=int, nargs='?', default=0, const=2,
this will work as expected in all cases, and even works when --debug is specified but no value is given (it will take the value of 2). See nargs documentation.
@mnlevy1981 I know this is old, but could you resolve the conflicts here?