Hi everyone
Any thoughts on how I could create a (gridded) animated map? There is a function cdsplot.geoseries() that returns a list of pcolormesh plots from a DataArray along the specified dimension. And there is the function animate.figure() that returns "an animated gif from list of input figures."
So I naively assumed I could use the output of the first to feed into the second:
figlist = ct.cdsplot.geoseries(data,pcolormesh_kwargs={'cmap': 'viridis'}) fig = ct.animate.figure(figlist) |
But this produces an error:
Traceback (most recent call last): File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 49, in handle_request result = cached(context.method, proc, context, context.args, context.kwargs) File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached result = proc(context, *context.args, **context.kwargs) File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 118, in __call__ return p(*args, **kwargs) File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 59, in __call__ return self.proc(context, *args, **kwargs) File "/home/cds/cdsservices/services/animate.py", line 46, in figure cmd = prepare_cmd(context, figures=figures, framerate=framerate) File "/home/cds/cdsservices/services/animate.py", line 27, in prepare_cmd context.run_command('/bin/bash', '-c', '%s' % " ".join(cmd + palette_opt)) TypeError: sequence item 1: expected str instance, dict found |
A list of figures is created, but animate doesn't like it. So how could I get this to work? Any pointers to get me started?
Many thanks!
Rutger