runtraj.models.hysplit.read_namelist#

runtraj.models.hysplit.read_namelist(path)[source]#

Return the entries of a SETUP.CFG namelist, by lowercase name.

It reads the file as NameList writes it, one entry a line. A value in quotes is a list of strings (VARSIWANT), TRUE and FALSE (with or without dots) are booleans, a number is an int or a float as written, and anything else, such as an empty EFILE, is a string.

Raises:

ValueError – If the file is not a $SETUP ... $END namelist, or a line between them is not KEY=value.

Return type:

dict[str, Any]

Parameters:

path (str | Path)