Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specified with only the fieldset as its single argument, sort() sorts in descending ascending order the fieldset according to date, time, step, (ensemble) number, level and paramId.

The second argument allows you to modify the precedence of the sorting keys - e.g. if the second argument is a string "parameter", then the sorting is done according to the parameter first. If the second argument is a list you specify a list of sorting keys - e.g. ["parameter", "date"] sorts on parameter and then date. Please note that the "parameter" sorting key represents the paramId.

The third argument specifies a sorting direction. This can be a string (">" or "<") or a list ([">", "<", ">",...]). If it is a string, the sorting direction it specifies applies to all sorting keys specified in the second argument. If it is a list, then the second argument must also be a list with the same number of elements - the sorting directions apply to each sorting key specified.

...