7.3.12. Helper Module

parflow.tools.helper.filter_none(x)
parflow.tools.helper.get_key_priority(key_name)

Return number that can be used to sort keys in term of priority

parflow.tools.helper.get_or_create_dict(root, key_path, overriden_keys)

Helper function to get/create a container dict for a given key path

parflow.tools.helper.map_to_child(name)

Helper function that return a function for extracting a field name

parflow.tools.helper.map_to_children_of_type(class_name)

Helper function that return a function for extracting children of a given type (class_name).

parflow.tools.helper.map_to_parent(pfdb_obj)

Helper function to extract the parent of a pfdb_obj

parflow.tools.helper.map_to_self(pfdb_obj)

Helper function to extract self of self (noop)

parflow.tools.helper.normalize_location(func)

Assume the first string argument is location and normalize it.

Normalizing it replaces dot notation with slash notation. For instance:

.Geom.Perm => Geom/Perm

parflow.tools.helper.remove_prefix(s, prefix)
parflow.tools.helper.sort_dict(d, key=None)

Create a key sorted dict

parflow.tools.helper.sort_dict_by_priority(d)

Create a key sorted dict

parflow.tools.helper.with_absolute_path(func)

Assume the first string argument is a path and resolve it.