Hi Wang,

ArrayOfAgendaAppend is a relict from the old controlfiles and not available in 
pyarts. Something we need to fix in our docs. You can use the Append method 
instead:

ws.Append(ws.pnd_agenda_array, pnd_agenda1)
ws.Append(ws.pnd_agenda_array, pnd_agenda2)

or set the names manually and then initialize from a list:

pnd_agenda1.name = "pnd_agenda_array"
pnd_agenda2.name = "pnd_agenda_array"
ws.pnd_agenda_array = [pnd_agenda1, pnd_agenda2]

The error "The agenda pnd_agenda_array must use the input WSV 
agenda_array_index, but it does not." means that the pnd_agenda1 you defined 
does not use the all the variables defined by the pnd_agenda_array interface. 
Your agenda needs to use all [IN] variables and generate all [OUT] variables 
defined in the interface: 
https://atmtools.github.io/arts-docs-2.6/stubs/pyarts.workspace.Workspace.pnd_agenda_array.html

If needed, interface variables you don't want to use can be ignored with 
ws.Ignore(ws.agenda_array_index) inside the agenda.

Cheers,
Oliver

> On 26. Mar 2024, at 02:45, bing wang <bingwang0...@gmail.com> wrote:
> 
> Dear all,
> 
> I'm using pyarts 2.6 for scattering calculations, but I don't know how to 
> assign an Agenda to pnd_agenda_array after creating arts.Agenda like 
> "TestScatSolvers.arts", there doesn't seem to be an ArrayOfAgendaAppend() 
> method in pyarts, and using a List, e.g., the ws.pnd_agenda_ 
> array=[pnd_agenda1, pnd_agenda2] will prompt "An ArrayOfAgenda must only 
> consist of agendas with the same name", directly assign ws. 
> agenda_array=[pnd_agenda1] will prompt "The agenda pnd_agenda_array must use 
> the input WSV agenda_array_index, but it does not. " Does anyone know how to 
> create an ArrayOfAgenda?
> 
> Many thanks.
> 
> Wang



Reply via email to