parse_nml_for_landcover#
- mhm_tools.pre.landcover_ascii_to_nc.parse_nml_for_landcover(nml_text: str) Tuple[Dict[int, str], Dict[int, dict], Dict[int, str], int | None][source]#
Extract landcover-relevant information from an mHM namelist.
- Returns:
dir_map (dict[int, str]) – idx -> dir_LCover(idx)
entries (dict[int, dict]) – idx -> {“year_start”: int|None, “year_end”: int|None}
fname_map (dict[int, str]) – idx -> LCoverfName(idx)
n_domains (int | None) – nDomains value if found, else None
Also validates that successive [year_start, year_end] blocks are
continuous (no gaps) and non-overlapping. Raises ValueError if invalid.