imod.formats.ipf.write_assoc#
- imod.formats.ipf.write_assoc(path, df, itype=1, nodata=1e+20, assoc_columns=None)[source]#
- Writes a single IPF associated (TXT) file. - Parameters:
- path (pathlib.Path or str) – Path for the written associated file. 
- df (pandas.DataFrame) – DataFrame containing the data to write. 
- itype (int or str) – - IPF type. Possible values, either integer or string: - 1:- "timeseries", a column named- "time"is required.
- 2:- "borehole1d", a column named- "top"is required.
- 3:- "cpt", a column named- "top"is required.
- 4:- "borehole3d", columns named- "x_offset",- "y_offset", and- "top"are required.
 
- nodata (float) – The value given to nodata values. These are generally NaN (Not-a-Number) in pandas, but this leads to errors in iMOD(FLOW) for IDFs. Defaults to value of 1.0e20 instead. 
- assoc_columns (optional, list or dict) – Columns to store in the associated file. In case of a dictionary, the columns will be renamed according to the mapping in the dictionary. Defaults to None. 
 
- Returns:
- Writes a file. 
- Return type:
- None